3

I have a total of 4 x RGB LEDs.

I am hoping to power these as well as a RFduino BLE module with a 3.7V lithium rechargeable battery.

I was just wondering how I would go about calculating the resistors needed for these RGB's?

I'm confused because I've seen this example of using 150ohm for Red and 100ohm for Blue and Green.

I guess I'll have to eventually get my head around resistance. There's a great app called Circuit Playground, but I wasn't 100% sure on what the forward voltage and supply voltage (Vf) meant.

gotnull
  • 167
  • 1
  • 1
  • 9

2 Answers2

3

It is recommended to have a max of 20mA per color. Assume there is an ideal voltage drop of 2V, 3.2V, and 3.2V across the red, green, and blue LED's respectively (data from the linked datasheet).

The theoretical minimum resistor values you can "safely" use are: $$ R_{red} = \frac{3.7V - 2V}{20mA} = 85 \Omega $$ $$ R_{blue} = R_{green} = \frac{3.7V - 3.2V}{20mA} = 25 \Omega $$

Usually in practice you'll have perfectly visible LED's even with 10mA per channel, in which case simply double the resistances.

The choice of \$100\Omega\$ and \$150\Omega\$ seem arbitrary, vaguely taking into account the fact that a higher resistance is needed for the red LED, but not quite scaling at the right proportion to get an equivalent current in each channel or any other useful balance I can tell. They're perfectly safe to use, and in practice probably won't make a difference.

helloworld922
  • 16,600
  • 10
  • 54
  • 87
2

With the recommended current through it, it's possible for an LED to drop a minimum forward voltage (Vf), which should be the the voltage used to calculate the value of the current limiting resistor, the reason being that with that resistor in place - and a fixed supply voltage - the current through the LED can never exceed the 20 mA design target.

That being the case, the value of the series resistor for the red LED would be:

           Vs - Vf      3.7V - 1.8V      
     Rs = --------- = -------------- = 95 ohms
             If            20mA

95 ohms isn't an available standard 5% value, but 91 ohms and 100 ohms are, and bracket 95 ohms.

Then, for the current through the 91 ohm resistor we have:

         Vs - Vf     1.9V
    If = --------- = ------ ~ 21 mA
           Rs        91R

and for 100 ohms:

         1.9V
    If = ------ = 19 mA
         100R

Since the LED is rated for a maximum current of 30mA, either resistor will limit it to less than that, so either is safe.

As for the resistors themselves, the 91 ohm resistor will dissipate:

    P = (Vs - Vf) * If ~ 40 milliwatts,

while the 100 ohm one will dissipate about 36 milliwatts, so a +/-5%, 1/10th watt (or larger) resistor would work OK for either.

The calculations for the green and blue LEDs are identical except for the Vf's, so they won't be repeated here.

As an aside, you mentioned that you'll be using four tricolor lamps, so you'll need to use three separate resistors for each lamp, or a total of 12 for the array.

Also, note that if you want to drive the LEDs to maximum brightness by putting 30mA through them, if your resistor values come out unobtainium you'll have to bump the values up in order to keep from overdriving the LEDs.

EM Fields
  • 17,377
  • 2
  • 19
  • 23