I have this circuit enter image description here

enter image description here

And I want it to power all the led rgb (100 in total), I want to make a independent portable circuit, so I don't have to use the usb power. The thing is when I use this circuit it only power to 44 led.

WHile when I use the usb 5V it can full lights all led .

enter image description here

enter image description here

This is my code

#include <Adafruit_NeoPixel.h>

#define NUM_LEDS 100
#define LED_PIN 2
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, LED_PIN, NEO_RGB+NEO_KHZ800);
void setup()



void loop()

  for (int i = 0; i < NUM_LEDS; i = i+1)
    strip.setPixelColor(i, strip.Color(255, 240, 255));



What may I be missing?

  • 1) USB port capable of providing 5V with up to 1A current. Your 4 AA-battery obviously not capable to deliver the current it required for 100 LED. 2) Programmable LED is not just LED, it has chip inside and it supposed to operate at 5V, you drive it with 6V, even it not "work", but it could damage the chip in the long run. I' suggest you read Adafruit Neopixel Uber Guide which explain the power requirements and choice of power source.
    – hcheung
    Feb 20, 2023 at 1:03
  • As shown, your four batteries are delivering 1.6v to the MCU, not 6v
    – dandavis
    Feb 22, 2023 at 0:20

1 Answer 1


The current available from a computer's USB port is 500 mA; some ports can supply more if the device negotiates for it.

You show AA cells in your diagram. Even assuming they're Alkaline cells, batteries differ in their capacity vs. discharge rates, and presumably in their internal resistances. Most any power-supply's voltage will sag as you draw more current from it. The likely answer is that as you add LED's the battery voltage falls below either what is needed to light the LEDs; or 2) the dropout voltage of Arduino's voltage regulator, which shuts down the Arduino (assuming you're connected to 'V_in', not '5v', which neither diagram shows). Less-than-fresh batteries will exhibit this voltage drop sooner and to a greater degree.

This study of AA battery capacity vs. current draw might help understand the apparent loss of capacity at greater currents. But even without that phenomenon, the battery voltage will fall as (I * R_battery); capacity loss just makes it worse.

  • Hello JRobert thanks for your observation. Besides the explanation, is there anything I can do to solve this?
    – RodParedes
    Feb 19, 2023 at 19:25
  • add more batteries in parallel (not series) or start with a higher voltage and use a properly rated and efficent dc-dc converter to lower it
    – user10489
    Feb 20, 2023 at 1:51
  • It would probably be worth asking another question about how to estimate power draw from the lights and how to design a proper battery pack to power it...
    – user10489
    Feb 20, 2023 at 1:55
  • 1
    A quick and dirty solution would be to make another (or 2 more, if needed) 4-cells-in-series battery packs, and connect its/their +V and Gnd to the +V and Gnd (respectively) of the present pack. All of your batteries should be fresh. Run a test to see how many LEDs it will sustain, and whether it will sustain them for as long as you need it to. The better solution is @user10489's second suggestion - to calculate your current needs and an energy budget, and design a power-pack to meet it.
    – JRobert
    Feb 22, 2023 at 17:09
  • Exactly as JRobert says... note that if the batteries are not "fresh" they will mutually charge each other, which could be bad for non-rechargable batteries. (In other words, they don't have to be fresh or balanced if they are rechargeable.)
    – user10489
    Feb 23, 2023 at 1:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.