4
\$\begingroup\$

I have some strings of WS2812b 'Neopixel' LEDs. Some are individual pixels separated by short lengths of cable; others are clusters of six or twelve pixels separated by slightly longer cables. The cable will be fairly chunky (up to 1.5mm²).

Adafruit's best practices for their Neopixel LED strings say:

Place a 300 to 500 Ohm resistor between the Arduino data output pin and the input to the first NeoPixel.

And this question gives some insight into why this is valuable. My question is: is it a Good Idea, Bad Idea, or an It Depends Idea, to include a resistor between the pixels, or at the start of each pixel cluster? Does it depend on how long/thick the connecting cable is?

\$\endgroup\$
1
  • \$\begingroup\$ The first answer to that question answers why you need it. Bad idea. \$\endgroup\$ Mar 11, 2021 at 21:03

1 Answer 1

6
\$\begingroup\$

These things were specifically designed to be daisy-chainable. So I doubt it makes anything worse, and it wont make anything better.

The series resistor serves different purposes when you ask different people, and a lot of the answers you get are demonstratably false. That simply happens because it's a very popular component with hobbyists, so there's very many people writing about it. Even experienced engineers are sometimes wrong, and you're drawing many samples from a random distribution of answer qualities, so you'll get some bad ones.

So, the WS2812 does not need a resistor on its input. Full stop. The datasheet even has an exemplary schematic without one. It's still a good idea to have one between your 5V data source and your first WS2812, simply because:

  1. These things are often used in a long chain, which can very quickly change very sharply in current draw.
  2. Sharp increases in current draw often result in a significant drop in supply voltage as fed e.g. from a separate power supply, or a capacitor close to the chain. Similarly, sudden dips in current draw can lead to surges.
  3. Now you have a voltage difference between the first WS2812 and the supply voltage of whatever you use to feed bits into it. This can, and has in the past, led to undesirable situations where e.g. the data voltage is higher than the supply voltage of the first WS2812, which means there'll be significant current flowing from the data pin through protection diodes in the WS2812, posing a problem to the source (microcontroller) and/or to the sink (WS2812) of that current.

The undervoltage condition can also happen if you've got a big capacitor that needs to charge up through some cabling at poweron, while the MCU is already happily running at full supply voltage. Dead on power-on pixels can result from that.

Since under regular conditions, the input of the WS2812 is high-impedance, adding another couple hundred ohm in series doesn't make a difference, but will reduce any such unwanted current drastically.

However, when you have many of these things in a string, they all share the same supply anyway, at least when they're "neighbors". You're not winning anything, you're making your circuitry more complex and thus error-prone: I wouldn't do anything that I don't need to do. This is engineering, not magic :)

\$\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.