Help with choosing resistors for RGB superflux

Hi,

As a new one to electronics I need some help choosing right resistors. The problem is that I'm lost and confused at the moment :slight_smile: I want to control Superflux RGB led with my Arduino Duemilanove. To do that I need to connect some kind of resistor between board and LED...

The LED specifications are as follows:

Power: 2,1V red, 3,3V green, 3,4V blue
Wave Lenght: 640nm red, 515nm green, 465nm blue
Current: 20mA per colour
Power Recommended Resistors
5V 90 Ohm (green and blue), 150 Ohm (red)
9V 330 Ohm (green and blue), 470 Ohm (red)
12V 470 Ohm (green and blue), 560 Ohm (red)
13,8 V (car) 560 Ohm (green and blue), 620 Ohm (red)

And from Duemilanove specifications I know that it gives out 5V power and 40mA current.

Now what confuses me - the LED specs writes, that it has to receive 20mA to pin at 5V. So, according to the formula E=IR, I would have that at the same 5V arduino gives, if I connect would connect 90 Ohm resistor for blue pin as recomended - I would get 5V / 90Ohm = 55mA current? But the specs already says that current is 40mA, so how can I manage to get to get 20mA to LED pin at 5V and still to connect the recomended resistor?

Everything looks like total chaos for me, maybe someone can clarify me the whole story here about choosing right things?

Thanks!

There is a voltage across the LED when it is on.
The line labeled power in the specification explains this, for example there is 3.3V across a green LED and 2.1 across a red one.
Knowing that the voltage across the resistor can be computed. For a green LED it is 5 - 3,3 = 1,7V given this you apply ohm law
I= 1,7/50e-3 = 85 then you choose the nearest value in the normalized list.

You are not taking into account the forward voltage drop of the LEDs.

For example for the red LED

R = V/I
   =  (5-2.91)/0.02
   = 145  (rounded up to 150)

And for green and blue

R = V/I
   =  (5-3.3)/0.02
   = 85  (rounded up to 90)

EDIT: Beaten to the punch!

cunami,

But the specs already says that current is 40mA, so how can I manage to get to get 20mA to LED pin at 5V and still to connect the recommended resistor?

the atmega specifications says 40mA. but this value means the limit. It means that you can achieve from 0 to 40mA., not always 40mA. The voltage is always 5v. (if you don't exceed the 40mA. that can be supplied by atmega) but the current value depends on the circuit you attach to the pin.

So, according to the formula E=IR, I would have that at the same 5V arduino gives, if I connect would connect 90 Ohm resistor for blue pin as recommended - I would get 5V / 90Ohm = 55mA current?

In your case, the circuit you'll attach is a led+resistor in series, not only the resistor. So the formula is not correctly applied. The correct is: 5V-3.4V / 90 Ohm = 17.77mA (for blue pin as recommended). You forgot to subtract the voltage applied to the led (3.4V). The formula is applied to the resistor, so you must consider the voltage applied to the resistor (5V-3.4V=1.6V, not 5V).

The commercial values for resistors near 90 Ohms are 82 Ohms or 91 Ohms. If you need precision (I don't think it's necessary, but just to complement the answer), you can use two 180 Ohms resistors connected in parallel to achieve 90 Ohms. Or one 22 Ohms and one 68 Ohms resistors in series.

The other resistor values indicated in your post are commercial values.

the LED specs writes, that it has to receive 20mA to pin at 5V

No that's not what it says. It says the maximum current you can put through the LED is 20mA.

The only way you can control current is by pushing it with voltage and holding it back by resistance.

The other posts told you how to calculate these things.

You are not understanding the relationship between these three fundamental things, voltage, current and resistance. Which is OK as you are a beginner. Understand them and it is the first step to becoming an expert.

Enjoy the journey.

Thanks a lot everyone for your great help! It really made things more clear. But of course, I am still a beginner and all my knowledge comes back from school, where we learned not that much and that was more than 10 years ago! I really thought already about getting some book or something to learn basics of electronics ::slight_smile: