Bulk capacitors are more about placement than value

(especially with WS2812 / NeoPixel LEDs)

If you’ve ever seen WS2812 (NeoPixel) LEDs flicker, shift colors or behave strangely at higher brightness, chances are the problem was not software and not the capacitor value.

It was where the capacitor was placed.


The common intuition (and why it fails)

A typical fix looks like this:

  • Add a big electrolytic capacitor

  • Place it at the power input

  • Assume the problem is solved

In reality, this often changes very little.

WS2812 LEDs draw fast, synchronous current spikes.

At the moment these spikes happen, the capacitor may be electrically too far away to help.


What “too far away” really means

“Too far” is not a specific distance on a ruler.

It means the current has to travel through an inductive loop before it can reach the capacitor.

As a practical rule of thumb for WS2812 designs:

  • ≤ 5–10 mm trace length: good

  • ≈ 20–30 mm: marginal

  • > 50 mm: often useless for fast current spikes

And just as important:

  • narrow traces make the problem worse

  • long return paths make the problem worse

Distance and loop shape matter more than capacitance value.


Why WS2812 expose this so clearly

WS2812 LEDs are unforgiving because they:

  • switch internally with PWM

  • often change state synchronously

  • react immediately to small supply dips

The result is visible:

  • flicker at full white

  • color shifts

  • glitches that disappear when brightness is limited

This is classic power integrity, not a logic or firmware issue.


What actually works in practice

1. Placement beats value

100 µF close to the LEDs is better than 1000 µF far away.


2. Think in loops, not lines

  • Place the capacitor directly between 5 V and GND

  • Keep both paths short and wide

  • Minimize the current loop area


3. Distribute, don’t centralize

For multiple LEDs:

  • use several smaller bulk capacitors

  • place them near LED groups (e.g. every 5–10 LEDs)

  • avoid relying on one large capacitor at the connector


Practical PCB guideline for WS2812

A simple, reliable approach:

  • Bulk capacitor per LED cluster

  • Trace length to LEDs: under ~10 mm if possible

  • Wide copper pours for 5 V and GND

  • Small ceramic capacitors close to the LEDs in addition to bulk caps

This works far more reliably than a single large capacitor at the board edge.


Typical signs your capacitor is “too far away”

If you see these, suspect placement first:

  • flicker only at high brightness

  • colors shift when switching to white

  • first LEDs look fine, last ones glitch

  • problems vanish when brightness is reduced


Takeaway

A capacitor that’s too far away might as well not exist.

With WS2812 LEDs, inductance beats capacitance.

Place your bulk capacitors where the current is needed, not where there was space left.

Note: For sharing this guide with the community, @Marcus has received 50€ AISLER Store Credit. :orange_heart:

Do you have a tool, a script, or a project that others could learn from? View our Announcement to find out how you can earn credit for your next order by posting a guide!