Tri-color RGB LED - share 1 resistor or use 3?

Four pin 5mm LED which has a common cathode part number RL5-RGB-DCC

RED typ 2.0V IF=20mA

GREEN typ 3.5V IF=20mA

BLUE typ 3.5V IF=20mA

Driving from Arduino PWM. I know I need a resistor but do I need one on common cathode, or do I need individual ones for each color?

by iwebber
November 18, 2016

2 Answers

Answer by mrobbins

It depends: if you're trying to drive all three LEDs at the same time, you need individual resistors. Pros: no need to worry about avoiding overlapping on-periods, and maximum possible brightness. Cons: need 3 resistors.

But if you're willing to drive them one at a time, you could possibly get away with just one resistor on the common cathode. Pros: just one resistor. Cons: have to scale PWM max to not over-drive the red LED, and need to synchronize in software so that you're only driving one at a time, and are limited to partial on-period for each LED.

My strong recommendation would be to use three individual resistors for the three LEDs; there's almost no situation in which it'd be a good tradeoff to save a penny on two extra resistors due to the extra complexity and limitations.

Here's why you need different resistors: because if you try to drive both LEDs at the same time with only a single resistor, the one with a lower forward voltage will "steal" current from the other LED, effectively turning it off or making it very dim.

Take a look at this simulation:

D1 has VF=2.04 volts @ 20mA

D2 has VF=1.36 volts @ 20mA

so when both V1 and V2 are on (think of this as your microcontroller pin or PWM output trying to drive both at the same instant), D1 basically doesn't get any current at all. This may not what you expect -- so use individual resistors!

This is sort of a generalization of the "path of least resistance" idea; while not strictly a resistance, the two diodes represent two parallel paths of current flow toward R1. Just as in the case where two parallel resistors will show a resistance dominated by the smaller resistance (because they have the same voltage drop across them, so whichever one allows more current flow at the same voltage drop will dominate the total current flow).

+2 votes
by mrobbins
November 20, 2016

Answer by mikerogerswsm

You will need three resistors because the diode voltages differ. A 5V Arduino should be able to drive the LEDs though you will need to choose the resistor values carefully. Measure the resistor voltage drops at full on, calculate the current and adjust the resistor values if necessary. If you have a 3.3V Arduino then you need a higher voltage supply and buffer amplifiers to drive the LEDs.

+2 votes
by mikerogerswsm
November 21, 2016

Your Answer

You must log in or create an account (free!) to answer a question.

Log in Create an account


Go Ad-Free. Activate your CircuitLab membership. No more ads. Save unlimited circuits. Run unlimited simulations.

Search Questions & Answers


Ask a Question

Anyone can ask a question.

Did you already search (see above) to see if a similar question has already been answered? If you can't find the answer, you may ask a question.


About This Site

CircuitLab's Q&A site is a FREE questions and answers forum for electronics and electrical engineering students, hobbyists, and professionals.

We encourage you to use our built-in schematic & simulation software to add more detail to your questions and answers.

Acceptable Questions:

  • Concept or theory questions
  • Practical engineering questions
  • “Homework” questions
  • Software/hardware intersection
  • Best practices
  • Design choices & component selection
  • Troubleshooting

Unacceptable Questions:

  • Non-English language content
  • Non-question discussion
  • Non-electronics questions
  • Vendor-specific topics
  • Pure software questions
  • CircuitLab software support

Please respect that there are both seasoned experts and total newbies here: please be nice, be constructive, and be specific!

About CircuitLab

CircuitLab is an in-browser schematic capture and circuit simulation software tool to help you rapidly design and analyze analog and digital electronics systems.