# Powering 16 super bright blue LEDs with Arduino

What is the best way to power 16 super bright LEDs using an Arduino Uno to achieve max brightness?

Each LED has the following characteristsics:

IF Typical (mA) = 20
VF Typical (V) = 3.2
IV Typical (mcd) = 3700
IF Max Continuous (mA) = 30
Preferred Series Resistor (ohms)
5VDC = 91
9VDC = 300
12VDC = 430


Output from Arduino pins = 5V.
Power suppply is 12V, while the final will be an Automotive ~12V rail.

I've used two LED calculators:

1. http://led.linear1.org/led.wiz this site says I should use 16 LEDs in parallel with 100Ohm resistor on each one.

2. http://www.hebeiltd.com.cn/?p=zz.led.resistor.calculator this site says I should use 16 LEDs in parallel with just one 5.625Ohm resistor.

The Arduino Uno has 14 digital pins outputting 5V. I would like to use the least amount of 5V digital outputs, and the least amount of resistors necessary, while maintaining maximum brightness.

Hope you can help :)

• You forgot to mention what power supply you're using. – Ignacio Vazquez-Abrams May 28 '14 at 1:05
• The power supply I'm using is 12VDC – Backwards_Dave May 28 '14 at 1:31

8 parallel strands of 2 LEDs each and a 150ohm resistor. All loose anodes should be connected to V+. The loose cathodes should be connected to the collector of a TIP31 NPN transistor. The emitter should be connected to ground. The base should be connected to a 100ohm resistor, and the other side of the resistor should be connected to a digital output. 16 LEDs, 9 resistors, 1 transistor, 1 digital output.

(12V−(3.2V⋅2+1.2V))/30mA = 146.66667 Ω
30mA⋅8 = 240 mA
(5V−1.8V)/(30mA⋅8/10) = 133.33333 Ω

simulate this circuit – Schematic created using CircuitLab

• So should I just solder a wire directly from the 9V input to the Arduino? – Backwards_Dave May 28 '14 at 1:20
• How are you getting the 9V to the Arduino in the first place? – Ignacio Vazquez-Abrams May 28 '14 at 1:21
• Sorry, I meant to say 12V, not 9V! At the moment I'm using a 12V power pack connected to a 240VAC wall socket. Eventually I'd like to use the 12V output from my car. – Backwards_Dave May 28 '14 at 1:27
• ... Are you using the barrel jack? Are you connecting it directly to Vin? Are you using an external DC-DC converter and feeding it to +5V? – Ignacio Vazquez-Abrams May 28 '14 at 1:29
• The digital output turns the transistor on and off, which turns the LEDs on and off. – Ignacio Vazquez-Abrams May 28 '14 at 1:43

You need to read the data sheet. For an ATMega 48, http://www.atmel.com/Images/Atmel-8271-8-bit-AVR-Microcontroller-ATmega48A-48PA-88A-88PA-168A-168PA-328-328P_datasheet_Complete.pdf page 320 gives typical output under load of an output as 4.2 volts at 20 mA.

So the short answer is that, without external power boosters such as transistors, you cannot do what you want. At best, you can directly drive 14 LEDs, each with a 50 ohm series resistor.

A "5V" output is only nominal.

• You can't even do that much, because the wimpy regulator on the Arduino board can't handle that much current without overheating. – Dave Tweed May 28 '14 at 2:07

Two LEDs in series, dropping about 3.2V each with 30 mA through them, added to about 0.3 V for the transistor's Vce(sat) comes out to about 6.7 volts. Subtracting that from the 9V supply leaves about 2.3 volts which needs to be dropped through a current-limiting resistor with 30 mA through it, so from Ohm's law, the value of the resistor needs to be: R=E/I = 2.3V/30mA ~ 77 ohms. For a forced beta of ten and a collector current of 30 mA * 8 = 240 mA, the base current needs to be 24 mA. With a 5V output from the Arduino and a Vbe(sat) of about 1V max for the transistor, the value of the resistor needs to be Rb = Vin - Vbe(sat)/Ib = 5V - 1V / 24 mA ~ 167 ohms.

                    9V
|
[LED]
|
[LED]
|
[75R]
|
C
I/O>--[160R]---B  NPN
E
|
GND