LED Series Resistor Calculator

· #calculator #led #resistor #basics

Contents

Below is an LED series resistor calculator. Enter the supply voltage, the LED’s forward voltage and the current you want, and it works out the resistor value, the next standard value from the chosen series, the current you actually get with that resistor and the power rating the resistor needs. If several LEDs are connected in series, enter how many.

How the calculation works

An LED does not limit its own current: once the voltage across it reaches the forward voltage, the current rises steeply with even a small further increase. A resistor in series takes up the rest of the supply voltage and sets the current. The value follows from Ohm’s law:

R = (Vsupply − n × Vf) / I

where n is the number of LEDs in series, Vf the forward voltage of one LED and I the desired current.

For a 5 V supply, a red LED with Vf = 2 V and a current of 10 mA:

R = (5 V − 2 V) / 0.010 A = 300 Ω  →  next standard value in E12: 330 Ω
I = (5 V − 2 V) / 330 Ω = 9.1 mA
P = 3 V × 9.1 mA = 27 mW  →  a 1/8 W resistor is enough

Typical forward voltages

The forward voltage depends on the semiconductor material, and so on the color. The table gives the usual ranges at around 20 mA. The calculator offers a typical value for each color, but the exact one is in the LED’s datasheet.

ColorForward voltage Vf
Infrared1.2–1.6 V
Red1.8–2.2 V
Orange, yellow1.9–2.2 V
Yellow-green (older, GaP)2.0–2.4 V
Green (bright, InGaN)2.8–3.4 V
Blue, white2.8–3.4 V

The forward voltage also drops a little as the LED warms up and rises with current. That is one more reason for the resistor to take up a good share of the supply voltage.

Choosing the current

Ordinary 3 mm and 5 mm LEDs are usually rated for at most 20 mA of continuous current, and that value is also listed in the datasheet as the test current. Modern high-efficiency LEDs are clearly visible at 2–5 mA, and as indicators they rarely need more than 10 mA. A lower current means less heat, a longer life and a smaller load on the source.

When the LED is driven directly from a microcontroller pin, also check the maximum current per pin and per port in the microcontroller’s datasheet.

Standard value and power rating

The calculated value rarely matches a resistor you can buy, so the calculator picks the next higher value from the chosen standard series. The current then comes out slightly lower than requested, never higher. E12 values are the easiest to find. E24 and E96 get closer to the calculated value, which matters mostly at higher currents.

The power in the resistor is the voltage across it multiplied by the current. A resistor should not run at its full rated power, so the calculator recommends a rating at least twice the calculated power. Ordinary through-hole resistors are 1/4 W, and the most common SMD sizes (0603, 0805) are 1/10 to 1/8 W.

Several LEDs

LEDs in series carry the same current, so they share one resistor and their forward voltages add up. The supply voltage has to be higher than the sum of all forward voltages, with enough left over for the resistor. If too little voltage is left, the current depends heavily on the actual forward voltage of each LED and on supply fluctuations, and the calculator warns you about it.

Parallel LEDs need their own resistors

Do not connect several LEDs in parallel to a single resistor. Their forward voltages are never exactly the same, so the LED with the lowest one takes most of the current, overheats and fails, and then the next one gets overloaded. Give each parallel branch its own resistor.

When a resistor is not enough

A series resistor turns into heat all the voltage that the LEDs do not use. With indicator LEDs this is a matter of milliwatts, but with high-power LEDs at hundreds of milliamps it becomes watts. Then a constant-current driver is a better choice: it holds the current steady regardless of the forward voltage and the supply, and wastes far less power. The calculator warns when the power in the resistor exceeds 0.5 W.