Multiple LEDs driven from one pin

Thread Starter

OzTinker

Joined Jun 6, 2021
8
Hi All,
First time post here and looking for some advice on a simple circuit to see if I have it correct. I am trying to drive four LEDs from one Arduino (5V Pro Micro or Mini) pin. Five pins will be eventually used all doing the same thing although at any one time only one pin will be "on". Resistors are planned to be 1/4 watt. LEDs are 1.8mm Vf around 3.2V, forward current of 20mA . https://www.ledsales.com.au/index.php?main_page=product_info&products_id=1275

1623021927703.png

Does the above look correct? I have used online calculators for the resistor values but not 100% sure I have done that correctly?
 

Thread Starter

OzTinker

Joined Jun 6, 2021
8
I am not sure it is actually that important that they are all the same intensity as they will be on each side of a small box so you won't really see them all together. As each pin changes then a different LED on that side of the box (it will be random) will come on so hopefully any variation in intensity between the LEDs that are on different pins wont be that noticeable. Plus the LEDs are behind a screen. The pins will change roughly every 0.5sec.
 

John P

Joined Oct 14, 2008
1,897
This is something that you "shouldn't" do, as others have said. But it seems to be pretty common with inexpensive devices, and it seems to work. You do need to be sure that the LEDs are identical, and you can't be too fussy about whether they really are carrying the same current. But it'll probably be OK.
 

Dave Lowther

Joined Sep 8, 2016
57
In regards to the use of four LEDs can I confirm that for R1 (noting the sub-optimal use of a single resistor) I use 20mA for the current and the Vf of 3.2V for the calculation? I wasn't 100% sure if it should be 80mA?

Similar question for R2. Used calculator 2 from here https://www.petervis.com/GCSE_Desig...ator/transistor_base_resistor_calculator.html but this time I used 80mA. Is that correct or should it be 20mA?
If you want (on average) 20mA per LED then the current through R1 and the collector of Q1 should be 4 x 20mA.
 

andrewmm

Joined Feb 25, 2011
1,466
resistor value,

R = V / I

Where V is the voltage you want to drop across the resistor, and I is the current through the resistor.

Your leds are 3v2 at 20 mA, and your supply is 5v,
so that's 4 * 20 , = 80 mA through the resistors, and you want to drop from 5v to 3v2 = 1v8

R = 1v8 / 80 mA
= 22.5 ohm

Power resistor dissipates

W = V * I
= 1v8 * 80 mA
= 0.15 W

Note though,
Leds are going to be BRIGHT at 20 mA,
also
As the resistor is so low in value, any change in voltage will have big change in current, resulting in different brightness's.

For instance, if v is 5.8 V, the current will now be 71 mA not 80 mA.
 

Thread Starter

OzTinker

Joined Jun 6, 2021
8
Thanks. I will be using a reasonable brick for the power supply so don't expect to see much more than +/-.1V but I will monitor for that and check everything once I have it built. As for the brightness I will certainly see how they go and will adjust the resistor as necessary now that I am clear on what values I need to put into the calculator.
 

BobaMosfet

Joined Jul 1, 2009
1,768
Hi All,
First time post here and looking for some advice on a simple circuit to see if I have it correct. I am trying to drive four LEDs from one Arduino (5V Pro Micro or Mini) pin. Five pins will be eventually used all doing the same thing although at any one time only one pin will be "on". Resistors are planned to be 1/4 watt. LEDs are 1.8mm Vf around 3.2V, forward current of 20mA . https://www.ledsales.com.au/index.php?main_page=product_info&products_id=1275

View attachment 240589
Here is a working simulated example. The BJT acts as a variable resistor because of the resistor on the base. This is operating the BJT in linear mode, so it might warm a little:

1623081385293.png

Because the BJT (2N2222) is acting as a variable resistor to limit the current across all LEDs in parallel, each LED does not need a resistor. If you operate the transistor in SATURATION mode, you will need a resistor on each LED to limit current. I recommend 8-10mA for each LED.

The switch simulates a 5V Arduino pin to the base of the transistor in this example.

The LEDs in this simulation are 2V @ up to 20mA. In real life, you rarely need to run an LED at more than half it's current rating unless you need that level of intensity.

Further reading:
Title: Understanding Basic Electronics, 1st Ed.
Publisher: The American Radio Relay League
ISBN: 0-87259-398-3
 
Last edited:

Thread Starter

OzTinker

Joined Jun 6, 2021
8
Thanks @BobaMosfet and @KeepItSimpleStupid based on your feedback what about this circuit? I like the use of the ULN2003 as that will shrink everything down into a tiny package and dropping the current through the LEDs to 10mA I have increased the resistors to 47Ω. I show two groups of LEDs here but it will be expanded to five. ADRP1 = Arduino Pin 1 etc

1623114538567.png
 
Still you need 1 resistor per LED. Look at the graphs to determine Vce(sat) and subtract that. e.g. R<= (5-Vce(sat))/20mA
Vce(sat) is around 0.5 to 1V or so.

You didn't fall into the COM trap. That pin is or can be left disconnected in your application.
 

Thread Starter

OzTinker

Joined Jun 6, 2021
8
Still you need 1 resistor per LED.
Based on the advice above I am going to try with just one. Fitting in 5 resistors is far easier than 20!

Edit: As it turns out the ULN2003 and Mini Pins line up perfectly so I am going to solder them together to keep the footprint right down. I think I'll use some perf board (2 rows) on the other side to attach the wires.

1623125218560.png
 
Last edited:
Top