# RGB LED current question

Discussion in 'The Projects Forum' started by frozenlead, Feb 10, 2010.

Not open for further replies.

Mar 30, 2008
19
0
Hey everyone,

I'm building an ambient LED system, and I've got a question concerning the current on the LEDs. I'm using common anode RGB LEDs, which have a stated max current of 20mA. I'm concerned about what kind of wire to use for the LEDs. Here's the project:

I've got an LED controller that will run 30 channels of lights - 1/3 of the channels for each color (RGB), which will let me run 10 light bars with 3 colors each. Now, each bar will have 20 LEDs, for a total of 200 in the entire project. Each bar will be fed by 4 wires (RGB and ground). Should the total current be calculated as 20mA for each color, or 20mA per LED? If I go per color, then I get 20mA * 20 LEDs per bar * 3 colors = 1200mA, which means I need 21 gauge wire or larger. If I go 20mA for every LED, regardless of color, I get 20mA * 20 LEDs per bar = 400mA, which will let me use 24 gauge wire. I'd like to use the 24 since I've an abundance of phone cabling instead of having to buy 21 or 20 gauge wire. Does anyone know which is correct?

Thanks!

2. ### beenthere Retired Moderator

Apr 20, 2004
15,815
283
What is the LED you are using? That information must be in the data sheet.

Mar 30, 2008
19
0
4. ### SgtWookie Expert

Jul 17, 2007
22,183
1,728
Red: 1.9v-2.3v @ 20mA
Grn: 3.4v-3.8v @ 20mA
Blu: 3.4v-3.8v @ 20mA
You will need to use separate current limiting resistors for each cathode of each LED.
You won't be able to use these RGB LEDs in series, so you will need to calculate 20mA per LED for each color. Your common cathode +V supply wiring will need to be able to carry 60mA per LED.

Mar 30, 2008
19
0
The 20 LEDs on each bar will be in parallel, and each bar will be fed with 3 voltage lines, which I'll put the three resistors on, respectively. Wouldn't that be 20mA for each cathode, and 60mA for the single anode on each bar?

6. ### SgtWookie Expert

Jul 17, 2007
22,183
1,728
I'll say it again, you will need a separate resistor for each cathode of each LED.

If you try to use a single cathode resistor for the entire bar of LEDs, you will very likely have big problems, and a pile of burned-up LEDs.

If you want to be able to use a single resistor for a number of LEDs that are wired in parallel, you will have to measure each LED for it's Vf at the specified current for all three colors, and match the entire bar for their Vf's. If you do not, some of the LEDs will conduct at lower voltage, and they will get much more current, causing them to rapidly fail. After that, the remaining LEDs will have too much current, and will rapidly fail in turn, like a row of dominoes.

Yes.

Mar 30, 2008
19
0
Sure, all the forward voltages are slightly different, but can't I compensate for it by lowering the current through the LEDs? 19 or 18mA is acceptable, and will still be quite bright, considering there's 200 of them.

8. ### SgtWookie Expert

Jul 17, 2007
22,183
1,728
No, you can't do it that way. One or two of the LEDs will get far more current than the others, and will burn out while the others will look dim until the bright ones burn.

What voltage do you plan on operating these LEDs from?

Mar 30, 2008
19
0
Each cathode is going to get 5V.

Isn't there a point that's a safe current for the LED, regardless of manufacturing tolerances? They're rated at 20mA max, so I would have thought running them at 18mA or so would take care of the current variance - sure, some will get more current than others, but keeping the maximum current (on whatever LED it may be) under 20mA is what's important.

Thanks for the help - I realize I can be a pain.

10. ### SgtWookie Expert

Jul 17, 2007
22,183
1,728
You mean each anode will be supplied with 5v, and the cathodes will have current sunk from them. That's the only way you can operate common anode RGB LEDs.

OK, let's look at one of the colors.

Green has a Vf of 3.4v to 3.8v at 20mA.

Your typical Vf will likely be around 3.6v.

However, if you have some in the string that are 3.4v @ 20mA, and some that are 3.8v @ 20mA, the LED with the Vf of 3.4v will be getting quite a bit more current than the one with the Vf of 3.8v, or even 3.6v. Once the low Vf LED fails, the next lowest Vf LED will fail, and they will then quickly all burn up, because they will have to share the current that the dead LEDs are no longer passing.

So, you still have to use one resistor per cathode per LED. Red will require 150 Ohms, green and blue 75 Ohms. They can all be 1/8W resistors. This is calculated for Vcc=5v, typical red Vf=2.0v, typical green and blue Vf=3.5v, for 20mA current.

And no, you can't just use one current limiting resistor on each common anode, either.

Last edited: Feb 10, 2010
11. ### SgtWookie Expert

Jul 17, 2007
22,183
1,728
Did you have a layout in mind for your bars?

Like maybe, two columns of 7 on the outside, and a column of 6 in the center?

Or two columns of 10?

Mar 30, 2008
19
0
I think we differ on the wiring of the LED itself. I've never used an RGB LED, but I was under the assumption that the anode (prefix an referring to negative) is the ground and the three cathodes were each supplied with the voltage for their respective LEDs - isn't the RGB LED just three LEDs together with a combined ground? The current from any given color shouldn't affect the other colors if they're separated, should it (provided that they're powered independently, which, in this case, they will be)?

I'm not sure what you mean by columns in the center and such - each board is just 20 LEDs in parallel, stacked one after another. There's just a single column.

I found a guy using the same kind of wiring with only 3 resistors per board - maybe we're just differing on illustration? He uses a different controller, but his looks like it's also 5V/lead.
http://www.instructables.com/id/Bui...ing-the-resistors-to-the-wire-and-then-to-th/

13. ### hgmjr Moderator

Jan 28, 2005
9,030
214
Please heed carefully what sgtwookie is trying to explain to you. His advice will save you a lot of grief.

hgmjr

14. ### SgtWookie Expert

Jul 17, 2007
22,183
1,728
The anode is where you supply the positive voltage to.
The cathode is where the current is sunk from.

If you wanted common cathode LEDs, you should have bought those. However, you are really better off with common anode LEDs for RGB's.

The fellow in the instructibles article appears to be using similar RGB LEDs as what you purchased. It is easier to sink current from the RGB cathodes than it is to source current to RGB anodes, as you can use logic level N-channel MOSFETs to drive them directly. If you're having to source current to common-cathode RGB's, it can get a bit messy with the driver.

But, the fellow is using a single resistor for multiple LEDs in parallel. I do not recommend this for the reasons I've already stated more than once. If you use a single resistor for multiple LEDs in parallel, you will have a current imbalance. They may work OK for a while, with some of the LEDs being brighter and some dimmer - then one day the whole thing will burn up, and you will wonder what happened.

If you use individual resistors on each cathode, you might lose an LED here and there, but you won't have a disaster. One failure (or even several) won't cause the rest of them to pop like popcorn.

Last edited: Feb 10, 2010

Mar 30, 2008
19
0
Just trying to get it all straight - I haven't actually bought anything yet. I'm just having a hard time un-justifying this method, not that yours is in any shadow of doubt. I'll skip the math, though, buy a little of the parts, and test the thing out.

Thanks for the help, mate.

16. ### SgtWookie Expert

Jul 17, 2007
22,183
1,728
It will be more difficult to build it correctly, as you will have lots more parts involved.

The trade-off is that you will get much more even lighting from your LEDs, and your chances of a wholesale disaster are practically nil; as each individual LED will have proper current limiting protection.

Mar 24, 2008
20,772
2,540
18. ### Audioguru New Member

Dec 20, 2007
9,411
896
I recommend that you measure those cheap ******* LEDs because somebody else bought them then found that they were actually common-cathode, not common anode as promised. I wonder if they all work?