Arduino setup not powering if LED WS2812b is connected first

I have the below setup for a powerbank powered setup using Arduino Mega and ws2812b led lights. I have a capacitor connected to usb cable - arduino vin (as discussed here: Using capacitors on projects )

Something strange happens using this setup with Arduino Mega which I did not notice with the same setup using Nano or NodeMCU boards:

  1. I need to plug in the USB power FIRST and then connect WS2812b lights, otherwise Arduino does not power up. If I connect the LEd lights, and then plug usb to power the setup, there is no power.
  2. If I plug in the USB power first, and then DO NOT PLUG the LED lights, arduino restrarts after about 10 seconds.

Do you have any idea why such an issue might happen?

The Arduino is not a power supply. The Arduino can't supply enough current for more than a few WS2812 pixels. The LED strip needs an external supply capable of supplying the required current. Each pixel can pull about 60mA when full bright white. Plan your power supply based on 60mA times the number of pixels and you can't go wrong.

Thank you for your reply. I am not using the arduino as a power supply. I use a powerbank, and regardless of the number of leds, even if it is a small number of leds, the arduino does not turn on if LEDs are connected first.

What is the red and black pair of wires connecting your Arduino to your LED strips? I see that you're feeding power directly from the powerbank USB, but that may itself not have enough power. How many LEDs are on your strip? Have you made a current requirement calculation?

When you "connect the LED strips first", do any of them turn on?

I connect usb coming from powerbank to VIN of arduino and GND of arduino. I connect LED's 5V and GND to the same VIN of Arduino and GND of arduino.
If I am not wrong: This means I basically power both Arduino and LED's from powerbank.

There are about 50 leds on my strip.

When I connect LED strips first, nothing turns on, arduino is off.

Have you tried connecting everything to a standard USB port instead of power bank? Such as a USB wall adapter?

Incorrect wiring. You should connect that to +5V and GND of the arduino... if you had posted a real schematic instead of a Fritzing mess, someone probably would have caught that right at the beginning...

VIN supplies power to the processor via a voltage regulator. If you supply that with only 5V, the regulator can't supply 5V to the board, it will be less.

1 Like

Thank you. I changed the wiring to as you said, that seems to be the correct way to wire, especially for powerbanks. However that didnt seem to be the issue somehow. The issue was the capacitor. I had wired it directly on the 5V and GND pins of arduino, and connecting the cables coming from led strip on top of the 5v and GND pins of arduino as well. Somehow this difference in wiring, or maybe just using the capacitor it self, was the problem. I removed the capacitor completely for now and hopefully this will not create issues when using setup with powerbank.

If you have any freeware suggestions for schematics I would also love to look into it.

The capacitor should not affect the circuit that way, so it's more likely it's an influence on the real cause - you didn't actually say what changes you made other than the removal. It's possible the powerbank doesn't drive capacitive loads well. I think you should try a smaller capacitor, maybe 10uF instead of 1000uF. It should be connected as close as possible to the strip itself.

What I showed you doesn't just "seem to be correct" - it is correct, and it's documented on the product page for the board.

If you're talking about freeware to draw schematics, do what I do - find a piece of paper and a pen or pencil. But Fritzing also has a schematic view that you can use, from what I've read (I never use Fritzing).

How clean is your wiring? Rats nest wiring can often cause problems with digital circuits.

1 Like

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