0
\$\begingroup\$

The following hackish circuit uses the internal circuitry of one "sacrificial" WS2811 LED to level up the logic voltage to 5V for the remaining strip by placing a signal diode in series with the power supply input of that first WS2811 circuit.

From: https://hackaday.com/2017/01/20/cheating-at-5v-ws2812-control-to-use-a-3-3v-data-line/

Since all we're trying to do is drop the voltage by 0.7V, could we conceivably have found a resistor to be used in place of the diode to drop the voltage by a comparable amount? If so, are there any considerations that make the diode the better choice? If not, why not?

(I'm sure that to veterans this very question exposes a deep lack of understanding of electronic basics on my part. You probably don't need to point that out - I'm here to learn.)

\$\endgroup\$
2

3 Answers 3

3
\$\begingroup\$

I don't think so. For one thing, the WS2812 chip receiving 3.3V data may actually work. It may not be reliable, but you can't count on the LED's to stay off nor on or in any consistent state.

So then if the first chip changes output state of its LED's, then the supply current will also change. If the supply current changes, then the current through the diode will change. If you substitute a resistor instead of a diode, with the potentially non-constant current, you won't get the voltage drop you are trying to get. You will get a variable voltage drop that depends on the state of the LED's in the first chip. Also, these chips have internal switching. This means that even if the LED's are in a consistent state, the current will not be constant. So, all around, it is not a good idea to try to use a resistor.

In my opinion this circuit is really crappy. I would suggest you use a level shifting buffer if you want reliable operation. The sacrificial LED makes no sense to me.

\$\endgroup\$
5
  • \$\begingroup\$ yeah, it only takes a logic level mosfet and a resistor to level shift (nxp.com/docs/en/application-note/AN10441.pdf) that seems better than a buffer pixel. \$\endgroup\$ Commented Dec 11, 2019 at 8:35
  • \$\begingroup\$ @Jasen for these three wire RGB LED interfaces, that might not be sufficient and fast enough. But there are buffers that can do the job. \$\endgroup\$
    – user57037
    Commented Dec 11, 2019 at 15:28
  • \$\begingroup\$ presumably that works for high speed I2c at 3.2 up-to Mbit/s WS2812 is only 0.9Mbit/s, WS2812 has 15pF input capacitance, so a 4.7K pull-up resistor should be fine, add a ferite bead in series if you want extra speed. that app note is the same circuit as the logic level shifter sold by adafruit. \$\endgroup\$ Commented Dec 12, 2019 at 2:06
  • 1
    \$\begingroup\$ The WS2812 uses the pulse width to determine if the data is a zero or a one. It is pretty important to avoid using a circuit that will distort the pulse width. I would not feel comfortable using an open-collector driver because my fear is that the asymmetrical rise and fall times will not faithfully reproduce the correct pulse widths. \$\endgroup\$
    – user57037
    Commented Dec 12, 2019 at 8:36
  • 1
    \$\begingroup\$ I have used a level shifting circuit like @Jasen suggests for logic level interchange between 5V and 3.3 (eg: Arduino to ESP8266) but for WS2812 I think the waveshape would be too mangled. \$\endgroup\$
    – Tom Auger
    Commented Dec 20, 2019 at 20:19
0
\$\begingroup\$

A resistor might work under some conditions, but it is a poor choice because the voltage drop across it depends on the current being drawn-- and you have to know the expected current draw. The diode provides a roughly fixed voltage drop (depends on diode type, but typical silicon diode is about 0.6-0.7V).

If you use a resistor, the behavior might change when the LED is set to different brightness level.

The MOSFET level shifters, at least the cheap ones people get on Amazon, reportedly don't do a good job at the 800kHz required for the LED signals (the one listed in the comment above says it's only good for a 400kHz I2C bus, so probably not recommended). A decent level shifter (e.g. TXS0108E) should work but is more complicated and more pins than the pixel method here.

\$\endgroup\$
0
\$\begingroup\$

The purpose of the sacrificial pixel is to raise the logic level (amplify the '1').

The diode drops the power supply voltage a bit, but not too much, so that it's more likely to work (levels are okay, but not a huge amount of noise margin).

Typically threshold will be around half of Vcc with a range of 0.3 to 0.7 of Vcc so 3.5V maximum, which is obviously more than 3.3V.

With a lowered Vcc to 4.3V, the upper bound drops to 3.01V so the 3.3V output is within range. The daisy chain output of that pixel will be 0/4.3V which is within the acceptable range to drive the next pixel with a 5V supply.

A resistor does not have a constant drop so it's not really suitable.

This is kind of a clever solution, if you have to get things going with what's available but I'd be happier with a single 74HCT08 and gate with the inputs tied together (and a series resistor on the 3.3V out) or a proper voltage translator (better in case the 5V supply disappears then the aforementioned resistor would come into play).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.