Does this RGB LED really need 220 ohm resistors per color

arduinoledohms-law

I have an arduino kit (5v) and instead of just following their simple instructions I want to know why they are using certain resistors for their RGB LED's.

The RGB LED that comes with this is identical to this one. And I'm assuming the forward voltage and current is the same.

The directions call for three 220-ohm resistors, but is that necessary? My math tells me that Red needs a 100-ohm and the Green & Blue need 160-ohm's. Won't using more resistance decrease the luminosity of the LED?

Or maybe the resistors have something to do with the affect they are trying to achieve with the LED? Here's what the book states, which I don't really understand:

"By creating a voltage difference between the cathode and voltage
coming out of the Arduino's PWM pins (which are connected to the
anodes through 220-ohm resistors), you'll cause the LED to fade
between its three colors."

Do the resistors have anything to do with this fading, or isn't it just the PWM controlling that?

Best Answer

"Do the resistors have anything to do with this fading, or isn't it just the PWM controlling that?"

That is difficult to answer briefly. The value of the resistor sets the LED current, and the phase angle of the PWM (basically, the percentage of the time the LED is driven on) will combine to produce an apparent brightness. I say apparent, because your eye will integrate the total light to produce a brightness which is approximately proportional to the average LED power. The book is apparently referring to a program which you can run which will slowly change the phase angles of the 3 LED PWM drives. This will cause one to fade while another increases, or perhaps cause all three colors to fade and brighten. It depends on the program.

As for using all 3 resistors the same, this will indeed cause the red LED to get more current. However, this does not necessarily mean that the red will be brighter than the others. There are two effects occurring simultaneously. The first is that the optical power put out by one color will be different than that of another for the same current. This is implied, and I think you picked up on it, by the data sheet. The other effect is that the sensitivity of the human eye (and brain - it's a system) is not uniform with color. So it's hard to say without more data whether or not equal-value current limiting resistors will give equal apparent LED brightness.

I'd guess that equal resistors give results that are close enough, and they make it easier and cheaper to provide in the kit.