Black Lives Matter - Action and Equality. ... Adafruit joins the Stop Hate for Profit campaign.
0

RGB LEDs, series vs parallel, and other ignorance
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

RGB LEDs, series vs parallel, and other ignorance

by jgunn on Fri Nov 12, 2010 1:06 am

Hello all,

I am wiring a set of 7 RGB LEDs together - it's for a decorative lamp, one LED in each of 7 "stalks" coming out of the lamp base. I plan to do PWM color mixing with a control knob on the base to adjust the color. All LEDs will be wired together so each "stalk" will display the same color.

Each of the three base colors (red, green, blue) will be individually controlled by an arduino digital pin triggering a transistor, which will be switching a ~3v power supply for the LEDs. Pretty simple stuff, but I'm new to this world so I'm starting small. Anyway... what makes sense in terms of the wiring method for the LEDs and the mandatory series resistor prescribed by her majesty Lady Ada in her awesome LED tutorial?

1) Each LED color (that is, the common anode and the cathode of a given color) for all 7 LEDs run in series with a single resistor?

2) Each LED color for all 7 LEDs wired in parallel with a series resistor for each LED?

I figure with the LEDs in series, I could fall victim to the old-school christmas-light effect where one goes out and they all die, but there should be a lower part count (only one resistor per color). If I went this route, how would I calculate the resistor value?

With the LEDs in parallel, one dead LED wouldn't take out all the rest, but I have to provide a resistor per LED.

Given enough current, there's no reason I would need a transistor per LED, right? I don't want to switch LEDs individually, only an entire "color channel" for all 7 LEDs at once.

Thoughts and advice appreciated.

-Jeff
jgunn
 
Posts: 5
Joined: Wed Oct 27, 2010 3:00 pm

Re: RGB LEDs, series vs parallel, and other ignorance

by richms on Fri Nov 12, 2010 1:31 am

If they are 4 wire RGB LEDs you cant do them in series. If you only have 3v available, you cant have them in series.

The series wirable RGB LEDs have 6 pins, so that you can series up all the red's, all the greens, and all the blues, and common the anode or cathode at one end of the series strings.

richms
 
Posts: 558
Joined: Tue Jan 20, 2009 3:05 am
Location: New Zealand

Re: RGB LEDs, series vs parallel, and other ignorance

by JohnDowdell on Fri Nov 12, 2010 4:39 am

Do you know the make/model of the LEDS that you got?

An LED has a definite voltage drop. Different LEDs have different voltage drops. To find out what the voltage drop is you have to look at the datasheet for the LED.

If you have an LED with a 2V Forward Voltage drop and you hook it up to 5V supply in series with an appropriate resistor, you would measure 2V across the LED and 3V across the resistor.
If it was a 12 volt supply, you would still measure a 2V forward voltage drop across the LED but you would measure a 10V drop across the resistor.

In the same way you could put 2 LEDs in series with a resistor: GND-LED->LED->-RESISTOR--12V
Now there is a 2V drop across each LED making a 4V drop across both LEDS. So there is an 8V drop across the resistor now.
If i try to run these 2 LEDS (4V voltage dop) from a 3V supply, there's a good chance that they won't light up.

The Forward Voltage drop for red in an RGB LED is usually under 3V but many green and blue LED elements of an RGB can get up to 3.6~3.8V forward voltage drop. As you can see that is above your proposed 3V supply.
Have you tried it with just one yet? does it work? Even if it does work and you're happy with the colours/brightness, if you put even two in series on a 3v supply, they wont light up as Rich implied.


If it does light up ok and you're happy with the colours, you could hook them up in parallel. you can most likely use the same resistance value you use for the three colours of a single LED but you may have to change to higher wattage resistors.
Lets say Red Forward Voltage drop = 2.1V
3V-2.1V=0.9V <- the voltage drop across the resistor
Lets say that the datasheet says that 20mA is the current for a good brightness of that LED.
if you've got 7 in parallel: 20mA x 7 = 140mA
Resistors have a power rating that you shouldn't exceed.
P=VI.
P=0.9x0.14
P=0.126W <- for this scenario a 1/4 watt resistor is OK.

Blue and Green will likely mean there is a lower voltage drop across their resistors and so the power dissipated by that resistor will be even less.
Once you've settled on what supply will drive the LEDS and what current they need at what brightness and you calculated your resistor value, just check the power requirement for the resistors as above.

my experience with diodes dying is that if it suffers traumatic mechanical damage it may open circuit. If it's electrically damaged, it'll short. so there's different implications for running them in parallel or series.

JD
JohnDowdell
 
Posts: 27
Joined: Sun May 02, 2010 1:59 am

Re: RGB LEDs, series vs parallel, and other ignorance

by jgunn on Fri Nov 12, 2010 9:50 am

The 3V supply was actually arbitrary. I'm waiting for the LEDs to show up, I bought a pack of the ones for sale here on adafruit so I have the datasheet readily available. I think I was overcomplicating it in my head when I was writing out the last post; I appreciate the guidance.

To your point(s), you're right, I'll need 4.5-5v to drive the more demanding colors, so I'll be sure to take that into account, but I actually like that, I'm pretty sure I have some 5v voltage regulators on hand.

I'll breadboard it with 1 LED and see if it all suits my needs, and then I'll post back.

Just so I'm sure I understand about running them in parallel... taking the red color section as an example, if I calculate the appropriate resistor, and as long as the resistor I choose has a sufficient power rating for the current I'm dealing with (something like 140mA), I should be able to gather the 7 red cathodes, and run them through the single resistor?

From a design perspective, is there any reason I shouldn't use a single transistor ad a single resistor for each color channel?

Thanks again,
Jeff
jgunn
 
Posts: 5
Joined: Wed Oct 27, 2010 3:00 pm

Re: RGB LEDs, series vs parallel, and other ignorance

by zener on Fri Nov 12, 2010 2:29 pm

jgunn wrote:I should be able to gather the 7 red cathodes, and run them through the single resistor?


Technically no. The Vf's of the red LED's could be different and probably are. So you will get uneven current sharing. The brightnesses could be significantly different. The right way is one resistor per LED.

jgunn wrote:From a design perspective, is there any reason I shouldn't use a single transistor and a single resistor for each color channel?

One transistor is fine. As I just said, one resistor is not fine.

zener
 
Posts: 4567
Joined: Sat Feb 21, 2009 2:38 am

Re: RGB LEDs, series vs parallel, and other ignorance

by richms on Sat Nov 13, 2010 5:56 am

jgunn wrote:The 3V supply was actually arbitrary. I'm waiting for the LEDs to show up, I bought a pack of the ones for sale here on adafruit so I have the datasheet readily available. I think I was overcomplicating it in my head when I was writing out the last post; I appreciate the guidance.

To your point(s), you're right, I'll need 4.5-5v to drive the more demanding colors, so I'll be sure to take that into account, but I actually like that, I'm pretty sure I have some 5v voltage regulators on hand.


5v is a good voltage since you can do it all on the arduino or similar that is USB powered and not bother with your own regulators etc since there is one on arduino or you can use a cheap USB wall wart.

jgunn wrote:I'll breadboard it with 1 LED and see if it all suits my needs, and then I'll post back.

Just so I'm sure I understand about running them in parallel... taking the red color section as an example, if I calculate the appropriate resistor, and as long as the resistor I choose has a sufficient power rating for the current I'm dealing with (something like 140mA), I should be able to gather the 7 red cathodes, and run them through the single resistor?


You can do that, and often it will work ok with a single resistor, but its not advisable since if one of the LEDs starts to drop its forward voltage, it will get more current than the rest, get hotter and go into thermal runaway, but probably not totally since there is the resistor and other LEDs, just will end up a lot brighter than the others. Could just happen because of the variance in foward voltage on LEDs - they do have quite a spread due to tollerances in manufacture, moreso if you choose to go bottom rung suppliers like the cheap ones on ebay.

Seperate resistors will make the LEDs each be limited individually so that you have no risk of one of them suddenly getting 100mA and the rest of them only 5 or something. Its good design and for the sake of a few cents and soldering time its not a place I would be looking to cut corners.

jgunn wrote:
From a design perspective, is there any reason I shouldn't use a single transistor ad a single resistor for each color channel?

Thanks again,
Jeff


You could use a single transistor for each, but at these low currents that is unnecessary, unless you have access to a crapload of cheap but pretty useless transistors. One per colour is all you need. As you are talking low currents, I dont think there is a commonly available bipolar transistor that would have problems doing all those LEDs and more. Just check that the base current is enough if you are putting 200mA thru the transistor so that it will saturate, as in dont put 50k or so for a base resistor. 1k is what I would use.

richms
 
Posts: 558
Joined: Tue Jan 20, 2009 3:05 am
Location: New Zealand

Please be positive and constructive with your questions and comments.