What size resistor and capacitor between ardunio and ws2812b?

Hi, I am new to Arduino and first strip of ws2812b arrived the other day. Iv watched several video where they mentioned to put a resistor and capacitor between the ardunio and ws2812b strip. But nobidy mentioned how did they determine the size. Iv heard 220 ohm, 330 ohm, and 400 ohm (or 400 and something) I have 150 ws2812b leds that I will be using. What size resistor should I use? And how do I figure that out for future reference? And should I use 100 uf capacitor as well?

Thank you,
Randy

You don't need a resitor to control a ws2812. Resistor is for arduino protection in case of LED strip failure. 220 ohm is enough to keep current within aceptable limit (aroun 20 mA) Higher resistance is more safe for arduino but may cause unstable signal transmission to LEDs. In most case resitanse below 500 Ohm is OK.

Hi Alesam,

Thank you for explaining the purpose of the resister I appreciate it.

I am assuming that using a 1000 uf cap. On the powers supply is okay with 150 leds (ws2812b) then too?

What if I decide to use 300 leds would I use a bigger capacitor then the 1000 uf?

Randy

Yes and no. More capacitance is usually helpful. A mix of big and small capacitors is more helpful.

But most power supplies have enough capacitance to run WS2812 LEDs without further help. If you saw more glitches, try adding a cap or two.

With that many LEDs the power distribution is more of a problem. You should not attempt to power the strip from only 1 end.

alesam:
You don't need a resistor to control a ws2812. Resistor is for Arduino protection in case of LED strip failure.

Actually, it isn't at all! :astonished:

The resistor serves two purposes, both of which are primarily to protect the delicate WS2812s, not the rugged Arduino. There might be some slight concern that if the LED strip was not powered, the Arduino would be driving into the protection diodes in the first WS2812 and that might over-stretch the Arduino but in actual fact, it is the WS2812 that would suffer. The experiences of people who come here with WS2812 strip failure seems to corroborate this.

Along the same lines, if there is a long and unruly transmission line between Arduino and WS2812, the transients generated on the line due to impedance mismatch may again, over-stress the poor WS2812 and the resistor is there to control those transients.