## LED Resistor Calculation

This article is about how to calculate LED resistor. The working voltage of most of the LEDs/Power LEDs is between 2-4 volts.

Sometimes our power source may supply a higher voltage (e.g. 5V), so if we try to turn on the LED with higher voltage, the LED burns.

The LEDs are making with different specifications, but the manufacturers also provide a “datasheet” for their products.

For example, the following link is the datasheet file for standard “farnell 5 mm Red LEDs”:

https://www.farnell.com/datasheets/1498852.pdf

In the “Electerical Characterstics” table of the above datasheet file, there is the “Forward Voltage (Vf)” value.

This value is the standard working voltage of the LED which the LED can remain turned on for a long time with its maximum allowed light intensity.

According to the last column of this row, the needed current is 20mA at 2v typical voltage.

## Single LED Resistor Calculation

For example. the power source that you have is a typical 5v USB (e.g. a power bank).

It’s suggested to consider 5.2v for the USB voltage instead 5v for sure.

So now we have all the needed values and we can use Ohm’s law to calculate the resistor.

R=V/I

Actually V is the voltage that must be decreased with the resistor (5.2-2) and I is the forward current of the LED (0.020 A).

R=3.2/0.02 –> R=160 ohm

The resistors have errors, for example, if we have a resistor with 10% error (silver ring), the nominal value of the resistor which we need to use, must be 10% higher. That means we need at least 160+16=176 ohm resistor.

According to the E12 standard (https://wicard.net/resistor-and-how-to-use-it-in-the-circuit-basic-electronics/) the closest higher resistor value is 180 ohm (brown, gray, brown-silver).

Now the resistor’s power must be calculated:

P=R×I^2

P=180×0.02^2

P=0.072W

So at least a 1/8w resistor should be suitable for a red LED. The typical axial resistors are 1/4w.

## Multiple LEDs Calculation

You also can use series LEDs with the same forward current or parallel LEDs with the same forward voltage.

If you use two series 5mm Red LEDs, the forward voltage would be 4v with 20mA current, so the needed resistor is:

R=V/I

R=(5.2-4)/0.02

R=60 ~ 68 ohm E12 resistor

If you use two parallel LEDs, the current must be considered 40mA instead 20mA in the calculations:

R=(5.2-2)/0.04

R=80~82 ohm E12 1% resistor with brown ring

You can calculate the suitable resistor for other kind of the LEDs according to the LEDs specification in their provided datasheet.

Written by: M. Mahdi K. Kanan – Full stack electronics and programming engineer and the founder of WiCardTech