 Impressum / Publisher

# Calculating LED Resistors

[Read the Disclaimer first!] LEDs (Light Emitting Diodes) run at a somewhat specific voltage and a very specific current. If the current is exceeded for any significant time (more than a fraction of a second), then it suddenly becomes a Smoke Emitting Diode and fails. So the current needs to be limited. Ideally with a constant-current power source, but those are rather costly (compared with the LED itself) and difficult to construct. The solution is to limit the current to a reasonable level by using a resistor - this is not an ideal solution, but an acceptable one - it burns some power into useless heat.

On the left you see the basic circuit for driving a LED.

LEDs are normally specified to run at a range of (forward) voltages and a specific maximum (forward) current. They can be run at a lower current/voltage, but if the specs are exceeded they'll burn out. So how to calculate the correct resistance?

`R = U / I`

Resistance equals the voltage dropped by the device divided by the current flowing through it. Nice. ...but, but we have two devices here - a LED and a resistor - how about now?
Simple (see circuit diagram right) - two devices in series each "consume" a part of the voltage that corresponds with the relation of their resistance and both share the same current.

LEDs have an almost fixed voltage drop - the forward voltage, which only changes very little with the current flowing through them (at least when working near efficiency). This forward voltage is usually specified on the datasheet as a range. Why a range if it is fixed? Production tolerances make it impossible to have a perfectly fixed voltage, but the range should tell us what is safe.

Let's do an example: let's say our LED has a forward voltage of 3-3.4V and a current of 20mA. Our power supply (battery pack) has a voltage of about 6V. We'll do the calulation for a relatively safe forward voltage of 3.2V. That means in the circuit diagram on the right the LED's voltage is 3.2V and the resistors is 2.8V with a current of 20mA or 0.02A. Now it is almost trivial to calculate the size of the resistor:

```U1 = 3.2V

U2 = 6V - 3.2V = 2.8V

I = 20mA = 0.02A

R = U / I

R = 2.8V / 0.02A = 140Ω```

A resistor with 140 Ohms exists, but only with tolerances of 2% or 1%, which makes it a bit more expensive than necessary. The next one up is 147Ω with 5% tolerance, which should be okay for this application and is usually reasonably cheap - if you buy a few hundred or if it is part of a standard kit for tinkerers the price per resistor should be between 1 and 4 cents (US or EUR).

So here a few rules for calculating resistors for LEDs:

• Always let the resistor consume at least 1V, to make it reasonably safe for the LED. This means you need a power supply with at least 1V more than the LED's forward voltage.
• Use the forward current and the difference between power supply voltage and forward voltage to calculate the resistor.
• From the calculated resistance look for the next higher available resistor with a tolerance of 5% (or if your requirements are not very strict you can even use 10%). Reserve the 1% resistors for applications where tolerances are critical.

But what to do if you have an LED and no idea what type it is?

You should get a LED tester - this little device is helpful whenever you are working with LEDs, since it helps you check that the LED is working at all (a surprising number of LEDs are faulty). LED testers usually let you chose the forward current and then automatically produce enough voltage to drive the LED. You can use this in several scenarios:

1. The trivial: you know the spec of the LED and simply want to confirm it works - simply connect it to the correct current and push the test button. Done.
2. The simple: you know the spec, but not which leg is anode and which one is kathode.
1. Connect it to the right current in a random orientation -
2. if it lights up: good.
3. If not: turn it around and test again.
4. If still not: the LED is broken.
3. The search for truth: you don't have a spec, but want to estimate it:
1. Put the LED in the lowest current.
2. If it does not light up at all: turn it around and test again
3. If the light seems too low: try the next highest current
4. If it seems unreasonably bright: stop pushing the test button and go one lower before the LED breaks.
5. You broke the LED: this was too much current. Use the next LED from the batch to continue with a lower current.
6. Connect your multimeter to the LED while you test it - it will show you the correct forward current (the tester is a constant current source). Try it with several LEDs to get an average.

Webmaster: webmaster AT silmor DOT de