Arduino Advent Calendar Day 06 - RGB LEDs

Need help for the Arduino Advent Calendar Day 6 Guide? Just post on this thread and our highly trained team of Arduino ninjas will be able to help you in no time!

Instead of putting three 220 resistors on the Red Green Blue pins could not one 220 resistor be connected to the Black Pin?

Excellent question, well done. Several answers;

  • yes, it would not harm the RGB LED,
  • yes, it would reduce the wiring complexity and number of components,
  • no, as it would dim the Yellow, Magenta, and Cyan effects in the program.

With one resistor being used, and more than one LED turned on by the program, the current is shared, and so the current per LED is reduced, and the brightness is reduced. You might try it to see what it looks like.

You can further test by using a multimeter in DC current mode to measure the current on each LED.

Your question also brings up something else; in a professional design, we might use a different value resistor on each LED, because they each have different forward voltages. This would help to balance the colour of the light.

If your program will only ever display red, or green, or blue, you can get away with one resistor.