In iNet I only see drawings with one LED strip and an electrolytic capacitor. I’m looking for an example how to integrate/cabeling an electrolytic capacitor, for example - when we are using 5 long LED strips.
Thanks!
Similar theme: wled.discourse.group/t/does-this-capacitor-really-required/2964 | forum.arduino.cc/t/multiple-led-strips-and-external-power-supply/906283/10 | forum.arduino.cc/t/verify-electrical-schematic-for-led-strip-project/1159874
#wled #elco #capacitor #scheme #drawing #wiring #led #project
this answers it, its optional. if you have 5 strips, put one at the beginning of each strip
1 Like
You don’t need the capacitor, it won’t hurt but probably it won’t do anything because electrolytic capacitors (especially the cheap ones you get on Amazon) are way too slow to respond to the switching speed of addressable LEDs. What’s needed are ceramic capacitors, which are much faster, and that is why most strips include those already.
It’s like the Arduino optocoupler disease where the Internet is full of random Arduino optocoupler circuits where the optocoupler doesn’t actually do anything because people copied some random Arduino circuit.
Case in point from the link:
Add 500-1000uF (6-10v) capacitors to the strips 5v pins. The resistor is for strip input protection, suggest you use two resistors, one for each strip.
1000uF capacitor and add two resistors to the same data line, double the protection 
not entirely true. the capacitor can help to stabilize power fluctuations on cheap powersupplies. Not PWM speed but animation speed, think: strobe effect.
If the goal is to stabilize a power supply (which is questionable, capacitance on an unknown control loop can also degrade its stability rather than improve it), then you want to put the capacitors close to the power supply’s controller. Putting them on the strip would reduce their effectiveness because the capacitance would be isolated from the loop by the wire impedance.
Putting it on the strip makes sense if the goal is to filter out the strip switching noise, but at least on the ws2812b I probed it and found it made negligible difference (few millivolts RMS), mostly because the switching noise is pretty high frequency and electrolytics aren’t good at high frequencies. Conversely 100 parallel 100nF capacitors might only be 10uF (or 100uF if they actually used the recommended 1uF size), but their parallel impedance is on the order of a million times less than a cheap electrolytic, so their parallel combination is much more effective. They also don’t really strobe all at once due to the pixel transmission delay, they switch sequentially, so you get a lot of fast, small changes in current that small capacitors absorb very effectively.
1 Like
what you write is mostly correct. that is why its optional. it helps sometimes (there are users reporting the cap fixing issues in their setups).
that is incorrect, all leds switch more or less at once on color change.
Sorry for the delay, got a really bad respiratory virus from kids school and was out of action for a few weeks then overwhelmed with slow recovery and work projects.
Regarding the delay between pixels, the ws28xx do not switch at the same time; there is no clock signal between pixels to synchronize them, so each 2.5 ms PWM cycle is free running. When you command a color change, the individual pixels turn on randomly over a ~1 ms period depending on where they are in the PWM cycle (not clear to me if they have to wait for the beginning of the PWM cycle or if theres a couple points where it can reset mid cycle). Here is the measured current (through shunt resistors) into two pixels showing the effect:
Blue turns on first, completes the ‘on’ part of the PWM cycle and then turns off. Both are off for 200 uS, then yellow gets to the on part of its cycle and flips on. For any PWM level each pixel is running that pattern at random time intervals to every other pixel. The actual current is a bunch of fast transients that get mostly absorbed by the decoupling caps and then a slower recharge current for the caps.
Regarding the advice being optional, good advice should be likely to help, optional or not. I have been testing with some high quality, low ESR 3300uF caps on a cheap noisy switching supply, and found that for various patterns (rainbow, bouncing balls, etc) I could only reduce noise by < 10 mV RMS even with a relatively high resistance cable on a 5v strip, and at that point the caps are almost as expensive as the whole LED strip. You could use cheaper caps, but they’ll be even less effective.
Is there some scenario where you think the caps would make a bigger difference? I’d like to test and figure this out. Then we don’t have to give optional advice that may or may not help, we can just say what is needed in each situation.
1 Like
good testing, thanks for the insight.
so PWM cycles do not sync to the actualy command? I would have thought that all LEDs would switch simultaneously to the ~50us low pulse…
the scenario where a cap helps is - as you mention - with cheap buck converters that benefit from more capacitance. A lot of them are cost-reduced to the point where voltage-ripple is in the hundreds of millivolts, which also affects the data-signal threhsold leading to flickering.
I was confused by those measurements too but apparently someone has already figured this out:
The PWM engine is free running, so you have to wait for it to get back to the start of a cycle (or maybe some points in the middle?) before it takes the new data. I saw delays of more than 600 uS, although average was less.
I’ve designed switching converters, and while I can measure that if you really want, it is not going to make any difference to ripple. To put some numbers on my point above that electrolytics are slow capacitors that don’t work on high frequency noise, Wikipedia gives the impedance vs frequency for some 1000uF electrolytic cap:
So its a capacitor up to about 100 KHz, after that it is more inductive than capacitive, and by a few MHz it is basically not a capacitor at all. Typical switching power supply is 100-1000 KHz switching rate, with ripple extending up to 20 or 40 harmonics, so maybe 10s of MHz. You can put extra electrolytics on one, but at those frequencies the impedance is so high they don’t do anything for ripple.
There are big electrolytics in a switching power supply, but they’re to stabilize the control loop in the converter by buffering charge at longer time intervals. Consider if the switching frequency is 200 KHz, then each cycle is 5 uS. The control loop will need at least 2 cycles to respond to changes in current demand, so for at least 10 uS the current supplied will not match the load demand. If you could get all the PWM engines in all the pixels to sync and flip on together without having a lot of electrolytics, there is no way the converter could respond fast enough and the voltage would drop down close to zero. Get them all to flip off and the voltage would spike and kill the pixels. The electrolytics in the supply are there to provide or absorb current when there are transients like that. But the PWM in each pixel are not synchronized (probably for this reason!), so for a 200 KHz converter, the current will change gradually over 100s of cycles, giving it plenty of time to respond.
Places I was thinking where there might be a difference:
- SPI strips like AP102C since they’re clocked off one another and so PWM might be synchronized
- Long power wires that isolate the load from the control loop. Possibly you could get the voltage to overshoot when things turn off, and cause glitching with a 3.3V data line by raising the voltage needed to register a rising edge.
- Anywhere else you can generate a ~10 microsecond current transient.
I might test 5-10m of power cable and see what the voltage looks like to short blinks. If I can get it to drop, next would be to test the minimum voltage needed to not have corrupted data. With stable 5v, it is 3.00V on the WS2812B I have, but maybe I can get that to creep up.