Electronic – Why would I need a capacitor in front of a LED strip

capacitorled strip

Guides for connecting RGB led strips like WS2812B, which can be addressed individually, often suggest to add a capacitor in front. For example, the NeoPixel Guide states that

Before connecting NeoPixels to any large power source (DC “wall wart” or even a large battery), add a capacitor (1000 µF, 6.3V or higher) across the + and – terminals […] The capacitor buffers sudden changes in the current drawn by the strip.

But why would I want to buffer that? What happens if I don’t add a capacitor?

fyi – I do not have a background in electronics, and I probably lack fundamentas here.

Best Answer

The wire between your power supply isn't just a wire – it has a resistance and an inductivity. People tend to use thin wires, much too thin, and then wonder why their stuff fails in mysterious ways.

schematic

simulate this circuit – Schematic created using CircuitLab

If you switch on many of your NeoPixels at the same time, they demand a change in current which cannot be supplied in an instant by a thin wire – because that wire has too much inductivity. In result, the voltage dips, which may be visible but may also lead to spurious brownout resets.

The advice given in the guide however is imperfect, because common 1000 µF aluminium caps also have a high parasitic inductivity in series. You had to use an array of ceramic caps instead. Low ESL Al caps is an alternative in between.

But forget that idea completely, you should simply use thick wires between your power supply and your NeoPixels.