Capacitor in LED setup needed or not

Hi Arduino community,

I am working on my first LED project and am trying to clean things up now before soldering everything together.

The project is very basic. The arduino only controls 3 leds in one color moving from left to right in a loop. All is powered by a powerbank which goes into the micro usb port of the arduino.

I have a 100nF capacitor between 5V and Ground and am wondering if this is really needed as it also runs well without it. Is there any risk removing this from the setup?

Thanks a lot already.


.

I see 100µF capacitor, not a 100nF capacitor. It can't hurt, but the Arduino itself has decoupling capacitors on-board.

It looks more like a100 microFarad capacitor to me but it is not strictly necessary for it to be there. The main purpose of such a capacitor would be to help remove any spikes in power to the circuit but they are unlikely to occur when using a power bank as opposed to a mains power supply

A more important consideration would whether you have current limiting resistors in series with the LEDs and I would have expected to see them on the breadboard. You may, of course, have then in the circuit but out of view in the 'photo

What is the purpose of the resistor than can be seen ?

Thank you. My mistake you are right it s a 100µF capacitor.

I was wiring this up based on a tutorial so im not sure if for example a ws2812 led strip would have limiting resistors in line with the leds.

The resistor you see in the picture is supposed to smooth out the jitter on the data connection to the led strip.

Now we learn its a WS2812 strip.... Could have said this up front as this explains the need for capacitor and resistor. You cropped the photo removing the strip from sight too!

The electrolytic cap works to reduce the noise on the supply from the rapid current changes pulled by the strip - for a long strip I'd make it bigger, and perhaps use a separate supply for the strip too.

1 Like

No it is not.

It dose two things.
First it acts a an impedance matcher you you don't get any reflections on the line which would cause distortion of the data signal. That is close to what you said but got cause and effect the wrong way round.

Second it acts as protection for the first LED in the list if the Arduino is powered up but the strip is not.

That capacitor is supposed to be placed across the power and ground right at the very start of the strip for maximum effect. Yes it is needed, the longer the strip the more it is needed.

2 Likes

Thank you @Grumpy_Mike for the explanation. Makes sense.

In regards to the capacitor. The strip is only 0.5m and there are only 3 leds on at the same time. Do i understand correctly that in this case the need for the capacitor is rather small?

Depends of what type of LEDs you're using. Can't see the LEDs in your picture.

Thank you for this late breaking detail which, as you have seen, changes the answers somewhat

what? what the LED do you talking about? where can I read more about this effect?

I would say so yes.

Talking about a WS2812 LED strip.

It is called phantom powering and can cause latch up, or other damage. It is when the signal from a powered up device feeds into say an input of an unpowered device. The unpowered device will draw current through the ESD protection diodes and attempt to power the device. A series resistor will limit the amount of current the unpowered device will use thus limiting any damage.

I see. Thank you for explanation.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.