I am planning on lighting a WS2812B strip with 24 neopixels connected to an Arduino NANO with an ATmega328P. The NANO will run on a 9-volt battery. When the NANO is running on a 9-volt battery, what is the current limit for the 5V pin? I need to know that, so this way I can set the brightness of the WS2812B strip so it will not go over the current limit of the 5V pin.
So far, these are what I learned:
-When powered by the USB, the current limit for the 5V pin is 500 mA. If powered by a power supply, the current limit for the 5V pin is 500 mA to 1A.
-Each neopixel can go up to about 60 mA.
The Nano's regulator cannot dissipate much power without overheating and shutting down or being damaged. Let's say it's 0.5W. with 9V input, that's up to about 125mA current. The Nano will need around 30mA for itself, so you don't have enough left to drive two ws2812 at full brightness.
A 9V battery (pp3) has a capacity of around 500mAh, so would last maybe 4 hours. The rechargeable ones, only half of that. Almost half the battery's charge will be wasted as heat by the regulator instead of producing light.
Also, 9V batteries have a very high internal resistance. When you draw a large current, the output voltage begins to drop. If it drops much below 6.5V, the 5V output of the Nano's regulator will also drop and the Nano and ws2812 may stop working, typically the blue led will stop working first.
So in conclusion, you need to re-think the battery and how it will be connected.
math2000:
When powered by the USB, the current limit for the 5V pin is 500 mA. If powered by a power supply, the current limit for the 5V pin is 500 mA to 1A.
To power the Nano by a 5 V power supply, you connect it to the "5V" pin - the most preferred way of powering it. If you refer to supplying it by the "Vin" or "Raw" pin then even 500 mA is total nonsense, you are limited to perhaps obtaining 100 mA in combination from the "5V" pin and output pins as PaulRB explains because the regulator has virtually no heatsink and will shut down from overheating if you draw more, hopefully reversibly.
math2000:
Each NeoPixel can go up to about 60 mA.
Actually more like 55 mA. So 24 would draw 1.3 Amp on full white brightness and 25 mA even when dark.
Now if you propose to operate from batteries, you do not want a Nano because the USB interface chip will be wasting power. For battery operation you can use a Pro Mini with a USB adaptor connected when you need to program it.
Definitely not the first option, for the reasons explained above!
But don't you want a battery supply?
Ws2812 LEDs and the Nano will normally run just fine on 4xAA or AAA NiMH cells. Connect the + from the battery box direct to the +V on the strip and to the 5V pin on the Nano, and of course the - from the battery to ground on the strip and the Nano.
Alternatively, a li-ion battery or pack could be used, but might be better to replace the Nano with a 3.3V Arduino.