LED Strip works powered via USB but not 9V battery

When running while connected to the computer’s usb port, all works well i.e. the two buttons do what they are meant to and the LEDs change colour. When powered up as per the schematic, the LEDs burn red and do not change. There is obviously something that I don’t understand with respect to powering the Arduino Mini Pro.

Rainbow2-Final.ino (8.16 KB)

Make sure that your battery have enough amperes.

Put the 9V battery back in the smoke detector where it belongs. They are useless for almost all Arduino circuits.

Use 3xAA holder if using non-rechargeables, or 4xAA rechargeables and connect them directly to the 5V pin. Or 4xAA non-rechargeables connected to the RAW pin.

Thanks @PaulRB. Would the following help in this circumstance? 3.3V 5V 12V Multi Output Voltage Conversion DC DC 12V to 3.3V 5V 12V Power Module|power module|module 5vmodule 12v - AliExpress (3.3V 5V 12V Multi Output Voltage Conversion DC-DC 12V to 3.3V 5V 12V Power Module)

what will you use to power the dc to dc converter with? You will need to provide that with power to....

Keep in mind that little converter had 800mah output. That is great for some Let's and some low power arduino stuff. However keep in mind your hardware should stay in this range of you start to add more powerhungry things to your projects.

I was wondering if this would clean up the power from the 9V battery and thereby solve the above problem? Might be a silly question; not sure :slight_smile:

No it won't. Why do you need the battery, to have your project portable? Like said in previous posts, the 9 volt battery is probably not providing enough power. Has nothing to do with voltage but with amperage. Your leds are to hungry for the battery I guess. What kind of leds are they, do you have some more specs or a link or something?

What is the current draw of your LEDs?
If you do not know, then maybe we can help calculate it. Tell us which brand of LED strip you have and how many LEDs are on it.

Even if you provide a more appropriate power source, you might need to power the LED strip directly rather than through your arduino pro.

Thanks for that. I am using ws2812 DC 5V + with 6 LEDs. Currently it works properly when powered from computer via USB.

5x ws2812 could draw around 300mA, if all 5 LEDs are at maximum brightness white.

A 9V battery has a high internal resistance, which means it can only give a few tens of mA before it's voltage begins to drop. The convertor board would help, reducing the current requirement to perhaps 160-170mA at 9V, but that is still probably more than what the 9V battery can give.

But if your project has room for that convertor board, it has room for a larger and better battery, which is a far better solution.

For the smallest suitable battery, you could look at a Li-ion or Li-Po battery. But these batteries need to be protected from over-discharge, or they can become dangerous. Small protection circuits can be purchased cheaply on eBay/AliExpress. A special charger would also be needed, of course. These batteries have a nominal voltage of around 3.6-3.7V. That's enough to drive the ws2812 until the battery is more than half drained. At that point, the blue LEDs go first, then the green. The Pro Mini will probably continue to work down to those voltages also, but if it doesn't, you could swap it for an 8MHz, 3.3V Pro Mini.

Thanks @PaulRB. Would the following work for a charger and over-discharge protection circuit? https://www.aliexpress.com/item/5PCS-5V-1A-Micro-USB-18650-Lithium-Battery-Charging-Board-Charger-Module-Protection-Dual-Functions-TP4056/32908448725.html or https://www.aliexpress.com/item/DC-5V-2-1A-USP-Mobile-Power-Diy-Board-4-2V-Charge-Discharger-boost-battery-protection/32824032545.htm

I've used that module from your first link, that should work ok. Your second link does not work.