10
\$\begingroup\$

Do you need to use different resistors against each of the colours on an RGB LED?

\$\endgroup\$
16
\$\begingroup\$

Yes, you need a separate resistor per LED. (or per color of an RGB LED, which just just 3 LEDs in one package)

Due to the physics of the LED, different colored LEDs have different "forward voltage"s (a primary characteristic of an LED). This site's LED color chart gives the forward voltages for their LEDs, but it does really depend on the LED in question. In general, the higher in frequency light an LED makes (the bluer it is), the higher the forward voltage. Often, a red LED's forward voltage is ~2V, a green one ~3V, and a blue one is ~3.4V, but it really does depend on the LED manufacturer and the exact frequency of the light emitted.

Once you know the forward voltage of an LED, you can use Ohm's Law to calculate the resistor you need for a given power supply voltage. Or you can use a handy LED calculator to help.

\$\endgroup\$
  • 4
    \$\begingroup\$ I don't think you understand exactly the use of the forward voltage drop. It refers to minimum forward bias for the junction to conduct. It's important when connecting LEDs in serial, if the sum of the voltage drops is greater than the supply voltage, it will not behave properly. What is important for resistor sizing is supply voltage and maximum current. The chart you link to gives luminosity/current graphs. One must pick the requisite current, 50mA seems to be the peak they recommend. Then use ohm's law with the current and supply voltage to specify the resistor. \$\endgroup\$ – wackyvorlon Dec 5 '09 at 20:37
  • 5
    \$\begingroup\$ I think both of you are saying the same thing in different words. Todbot calculates the resistor value the way I would, and it works. You are calculating the same thing, but you are being more specific what light amount you want. I have seen many datasheets where the voltage they specify is the voltage they will be if at max-light output(with DC current). You are taking a curve and picking the amount you want, neither approach is wrong. \$\endgroup\$ – Kortuk Dec 5 '09 at 20:58
  • 4
    \$\begingroup\$ wackyvorlon, for a given power supply voltage (5V say) and a given desired current through the LED (20mA usually), you need to know the forward voltage of the LED to calculate the value of the current limiting resistor. \$\endgroup\$ – todbot Dec 5 '09 at 21:11
  • \$\begingroup\$ @todbot, I think he understood it, I just think he is saying it in a different way. \$\endgroup\$ – Kortuk Dec 6 '09 at 0:58
  • 2
    \$\begingroup\$ "Then use ohm's law with the current and supply voltage to specify the resistor." That's wrong. You need to use the supply voltage minus the voltage drop of the LED. \$\endgroup\$ – endolith Dec 7 '09 at 1:22
7
\$\begingroup\$

Voltage drop is different. You can use a single resistor if it keeps current below safe values for each of the 3 leds. Downside effect: the RED led will be brighter than the green LED, and much brighter than the BLUE led. I always use 3 separate resistors if the "color quality" is an issue.

\$\endgroup\$
  • 1
    \$\begingroup\$ I thought I had seen RGB diodes where they managed to let you avoid this design constraint, although I will admit I normally use an intelligent driver if I have RGB diodes. \$\endgroup\$ – Kortuk Dec 5 '09 at 11:05
  • 1
    \$\begingroup\$ Intelligent drivers handle current in a different way, and some of them don't need resistors at all (TCL5940, IIRC) \$\endgroup\$ – Axeman Dec 5 '09 at 11:13
  • \$\begingroup\$ I understand that, I was qualifying my knowledge by adding I normally do not use a resistor for my LEDs. When I am not using an intelligent LED driver, I normally make my own with a severe over current for short bursts. \$\endgroup\$ – Kortuk Dec 5 '09 at 20:55
  • \$\begingroup\$ Me too :-) I think this is the only way to get rated light output in multiplexed led arrays. \$\endgroup\$ – Axeman Dec 6 '09 at 11:28
2
\$\begingroup\$

Or one resistor in line with all of them, determined by if they are common cathode or common annode. I have seen high qualify RGB LEDs where you can use one resistor, i have seen low quality ones where an intelligent driver cannot make them look good.

\$\endgroup\$
  • \$\begingroup\$ Wouldn't the voltage drop across the resistor change depending on how many LED segments were on? (Assume for the moment that they are controlled either on or off -- no dimming.) \$\endgroup\$ – Jesse Jul 23 '10 at 7:17
  • \$\begingroup\$ Yes, And I was thinking if you would only have one on a time. \$\endgroup\$ – Kortuk Jul 23 '10 at 21:01
2
\$\begingroup\$

The provided answers are incorrect. Connecting to either the common pin (If there are 4 terminals) or simply shorting all of the cathodes or anodes together (to make a common pin) and using 3 signal lines will let you use a single resistor. Choose the smallest resistor which can be connected continuously to any one pin without blowing the LED. The supply voltage must not be too close to the highest voltage, (e.g. a 1.4V red LED and 2.5V blue LED will have manageable current differences at 5V, but 3.3V might make it hard to get a full spectrum over your brightness options.

Now, the software. If you PWM each pin at a different time, the current difference in voltage can be compensated for in software.

For example:

Naive White:  
R --__________  
G ____--______  
B ________--__  

More accurate white (V_red < V_green < V_blue, so I_red > I_green > I_blue, and the eye sees some colors brighter):
R  --____________________
G ________----___________
B ________________--------

Bright Red-yellow, whitened:
R ----___
G___---_
B_____-

This causes current drops (probably wouldn't turn on). Don't do this:
R ___----
G _----__
B----____

Etc.
The maximum brightness will be the same as PWMing them independently, because you're limited by the power dissipation of the single component.

\$\endgroup\$
  • 1
    \$\begingroup\$ I was playing with some RGB LEDs and looking for some ideas, and came across something wrong on the internet (imgs.xkcd.com/comics/duty_calls.png). Had to fix it. Sorry to bump an old question. \$\endgroup\$ – Kevin Vermeer Jul 23 '10 at 1:53
  • 2
    \$\begingroup\$ reemrevnivek, that's a clever approach. I like it. This approach requires the hardware guy to pick a tiny resistor sufficient to drive the blue LED to full brightness at 100% on time, and to trust the software guy not to accidentally turn on the red LED PWM to 100% (which would probably overheat and destroy that red LED). Alas, many hardware guys that don't trust the software guy that much, even when the hardware guy and the software guy are the same person. They say it's worth adding a few extra resistors to guarantee that software bugs can't damage the hardware. \$\endgroup\$ – davidcary Jul 24 '10 at 0:07
-1
\$\begingroup\$

There is a lot of variation in RGB LEDs. You need to consult the data sheet.

\$\endgroup\$
  • 2
    \$\begingroup\$ I think, given the question, it is safe to assume that mad_z would need more information then telling him to read the datasheet to help him. \$\endgroup\$ – jkopel Dec 6 '09 at 0:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.