# How do I calculate capacitor size in relation to LED quantities?

According to the NeoPixel best practices (which is the exact product I'm using):

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 as shown above. The capacitor buffers sudden changes in the current drawn by the strip.

Seems to me that the size of the capacitor is linked to the amount of pixels to be used (since more pixels = more max current drawn). If I'm correct, would anyone care to explain how to calculate the capacitor size in relation to the amount of pixels?

Some extra specs:

• Each individual NeoPixel draws up to 60 milliamps at maximum brightness white (avg 20 milliamps).
• They require 5V.

• Power supply will be a low quality wall wart that puts out anywhere from 9-15V (but my circuit has a LM7805 voltage regulator that will bring this down to 5V.
• The distance from the capacitor to the first LED in the strip will be around 1 inch.
• It's not purely dependent on those numbers. It depends on the quality of the PSU and how far you are wiring it, etc. Anecdotally, I designed a PCB with ~100 Anypixels and assembled one of the PCBs without any bypass or bulk capacitor. It worked fine. I still used all bypass and bulk caps on the final design but still, the point stands, YMMV. May 23, 2017 at 21:48
• @WesleyLee Thanks for commenting. I've updated the question with the info you requested. May 23, 2017 at 21:57
• My point was more like, you might want to determine this experimentally. 1 inch seems quite reasonable though. Another point is, how many LEDs are you powering? Have you considered the power dissipation of the 7805? May 23, 2017 at 22:00
• @WesleyLee OK, gotcha. My 7805 can handle upto 1.5A which is almost double what I will be using with 10 LEDs (600mA max) so I'm ok on that front. May 23, 2017 at 22:06
• 0.6A * 10V voltage drop (if using 15V supply) = 6W, which is substantial. You will probably not run the LEDs at 100% all the time, but it might become a problem in some situations. May 23, 2017 at 22:16