For a recent project I had to figure out how to power LOTS of Neopixel Leds from an Arduino board. Neopixels are digital RGB leds that can be controlled individually, even when in a strip of hundreds of Leds.
How many Leds can my Arduino handle?
There are two factors to take into account: memory and power:
The USB port receives 5V and 500 mAmps from your power source (your laptop, a charger or battery). That’s the maximum that your Arduino can handle and also the maximum that Arduino can provide to your leds. If you try to draw more than 500 mA from your laptop or battery, the laptop, battery and Arduino may get damaged or will shut themselves down.
One Neopixel can use 60 mA, that means you can only safely power 8 Neopixels straight from your Arduino!
An Arduino Uno has 2kb of memory. One Neopixel led uses 3 bytes of memory. That means you can drive about 600 Neopixels, or a bit less, depending on the size of the rest of your program.
Powering up to 8 Neopixels
As long as you connect 8 or less Neopixels you can power them straight from your Arduino board. Assuming you want to be able to burn them at full brightness (white light at full power). One color only uses about 20mA, so if you only show one color at a time you can connect more than 8 leds.
This diagram shows how to connect everything. This way, you can program your Arduino while the RGB leds are connected.
Powering more than 8 Neopixels
If you have more than 8 neopixels connected, you need a stronger power source that can provide more than 500 mAmps. The diagram below shows how to connect this power source. This could be a mobile charger that provides 5V and 2000 mAmps.
This diagram shows that the power source provides both the Arduino Board and the Leds with power. In this setup, the ‘extra’ power that your LEDS consume, is NOT flowing through the vulnerable Arduino circuitry. This way, you can connect as many Leds as you want, as long as the power source can provide the amps.
For example, if the power source has a maximum of 2000 mAmps, you can power 60 Neopixel RGB Leds. An adapter with 10Amps can power 166 RGB Leds. This setup is great if your project is finished and you want to install your lamp and arduino with a single power source.
It’s very important NOT to connect a USB cable in this setup, because your Arduino board is already powered!
(Note: Adafruit advises to put a capacitor between the power source and your circuit).
Powering more than 8 pixels while connected to USB
In the previous setup, you could power more than 8 RGB leds, but you can’t upload a new program to your Board. This makes it hard to test new software, so you need a different setup for that purpose. What you’ll do is disconnect the Arduino board from the external power source, and then you can connect the USB cord to your computer again:
Please note that this setup requires careful handing:
Power the RGB Leds first, then Arduino
Unplug the Arduino first, then the Power
Amperage for hundreds of Leds
When working with hundreds of Leds, you may find yourself needing more than 20 Amps. For example: 400 LEDS x 60mA = 24 amps. That’s a lot! We are starting to enter the realm of serious electronics here, and we need to consider safety.
Let’s start by using thicker wire that will support the amount of amps we are using. Your electronics shop can advise you on this. I used standard speaker cable to power my 10 amp led strips.
You can buy very large power sources that supply 20 or even 50 amps, but actually, there’s a much safer solution to work with lots of LEDS: distribute the power in smaller groups of LED strips that use only 10 amps.
In the diagram below, each LED strip is connected to one adapter that provides 5V and 10 Amps. The strips are connected to each other through ground and data, but NOT through power. Each strip has its own power source, which means we won’t draw all the Amps through the entire circuit. Now we can use thinner wiring, and we won’t electrify ourselves when a connection is loose somewhere!