0
\$\begingroup\$

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?

\$\endgroup\$
4
  • 5
    \$\begingroup\$ You've done the math. You've read the datasheet. You knew what you were calculating, how, and why; no reason to assume that you didn't know. Now do the experiment. Try all 220Ω, then try your calculated values, observe the effects. In other words, snap out of analysis-paralysis. \$\endgroup\$ Commented Jan 6, 2015 at 3:42
  • \$\begingroup\$ Well I am completely new to this stuff and I didn't want to risk burning something out or something going wrong if I was missing something. Also, I just realized the kit only comes with 220-ohm resistors. I just wanted more information. \$\endgroup\$ Commented Jan 6, 2015 at 4:01
  • \$\begingroup\$ You are using larger resistors than you are calculating, so no worries about burning it out. But also, burning stuff out is part of the learning process. Unless it's very high voltage or high energy stuff, only the parts will suffer. But you'll learn a whole lot more that way, and the parts can be replaced. \$\endgroup\$
    – caveman
    Commented Jan 6, 2015 at 4:20
  • \$\begingroup\$ I, for one, question your math. What exactly are you trying to do? If you are trying to equalize the mcd at 100% PWM those values are not plausible. There's no problem running parts at less than the maximum current, in fact it might help them to last more than a few hundred hours (judging by Xmas LED string reliability this is a real possibility). By the way, that datasheet would not be accepted by any serious customer. "Maximum brightness" only specified means they guarantee that no LED they sell will ever be brighter than spec (but can be arbitrarily dim!). \$\endgroup\$ Commented Jan 6, 2015 at 4:45

2 Answers 2

5
\$\begingroup\$

"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.

\$\endgroup\$
1
  • \$\begingroup\$ And easier for the beginner to wire up said kit. \$\endgroup\$ Commented Feb 22, 2023 at 16:44
2
\$\begingroup\$

In my experience, red will dominate when using the same resistor values with the same voltage applied to each pin (common cathode). This is because the RGB LEDs I have used (and the one you are using) have a 2V drop for red, and 3.2V drop for green and blue. PWM can compensate for that (as can a higher resistance value on the red pin), depending on how you program the duty cycle for each pin. They are probably telling you to use the same resistor value to make the project simpler and cheaper.

\$\endgroup\$
2
  • \$\begingroup\$ I totally agree. I've experienced the problem that the red can be more dominant. You should check the voltage rating for each colour. It should be specified on the package or on the manufacturer's home site. \$\endgroup\$
    – Sigma
    Commented Jan 6, 2015 at 11:38
  • \$\begingroup\$ This LCD display with RGB backlight has the opposite problem. Red is pathetically anemic when driving all three channels to the datasheet's specified currents. It'd be really nice if a self-contained color-mixing module would include some kind of color-calibration instead of just physical max'es and "typical" based on that. \$\endgroup\$
    – AaronD
    Commented Jun 29, 2018 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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