Pages: [1]   Go Down
Author Topic: RGB LED  (Read 877 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 45
From birth to death, it is just like this.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So I have an RGB LED and I believe it is a common cathode, but it may be anode.  Anyway, would there be any functional difference between having a single 270 ohm resistor from the common cathode to ground and having a separate one for each color?
Logged

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Oh yes, quite a significant one.

Just try what happens and you'll never forget about it. And I'm not talking about the famous blue smoke here (if R is chosen reasonably of course).
Logged

• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2855
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Absolutely.

With a single resistor the brightness of one LED will change when you turn on another one (they will both be dimmer than if just one was on by itself).

--
The Aussie Shield: breakout all 28 pins to quick-connect terminals
Logged

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hah, 'getting dimmer' is one way of putting it  smiley-lol
Logged

• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

0
Offline Offline
Newbie
*
Karma: 0
Posts: 45
From birth to death, it is just like this.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ok thanks everyone.  I was thinking the same thing, but I'm much stronger with the programming than the actual electrical setup process.  So would a resistor with a 3R on the common cathode do the same job as a single res. of value R on each of the 3 color leads?  And wouldn't any configuration lead to a dimming when more than one color lights up?  unless the fact that they are coming from the same LED would make the brightness sum the same at all times.  (sorry bout the long post)
Logged

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

No.

The simple answer is: You always need an individual resistor for each color.

As soon as you put a single resistor in the "common path" you create a bottleneck and you lose true individual control of the leds. Or some won't turn on at all. Think of it as 3 lines of people trying to get through a narrow door. There's no way they won't disturb each other's progress.

If you dive into the basics (Kirchhoff Laws) you'll eventually find out that parallel components (in this case 3 leds with one common connection) always see the same voltage. And the smallest one is dominant here, which will be the "forward voltage" of the red led. It turns on first and the blue and green will be very dim or won't light up at all.

With a single resistor you will observe something like this:

- turn on green or blue alone: OK
- turn on blue + green: might work
- turn on either blue or green first and then red: only red will stay on
« Last Edit: February 16, 2011, 07:23:09 pm by madworm » Logged

• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2855
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So would a resistor with a 3R on the common cathode do the same job as a single res. of value R on each of the 3 color leads?

No. Once again, when two LED's are turned on they will have less brightness than a single one on by itself (and with 3R, they will all be less bright to begin with). With a single R in each lead the brightness will be the same regardless of how many are on. In theory...it depends on the rest of your circuit and what it's current-sourcing/sinking capacity is.

Quote
And wouldn't any configuration lead to a dimming when more than one color lights up?

No. Look at the circuit for our Gadget Shield (second page, on the right side):

http://ruggedcircuits.com/AS010/as010.pdf

This circuit keeps the same brightness in all LED's regardless of how many are on.

--
The Rugged Motor Driver: two H-bridges, more power than an L298, fully protected
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 45
From birth to death, it is just like this.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Got it.  Thanks again for the help everyone.
Logged

0
Offline Offline
Shannon Member
****
Karma: 214
Posts: 12443
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just to clarify:  If each colour is driven from its own separate constant-current source (some LED driver chips do this), then no resistors are needed and everything is simple.  If you drive from fixed voltage via resistors then the different forward voltages for each colour mean separate resistors are required.  This has the advantage in that you can select the resistor ratios to provide colour-balance for 'white'.  Remember to respect the maximum forward current ratings for each colour and the total power dissipation for the package.

If you are only wanting one colour at a time to light up you can get away with just a cathode resistor, but this isn't the usual arrangement.
Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: