Calculate the ideal resistance for a LED

Today we will learn to calculate the resitance for the LED diodes. Let's see what is the ideal resistance to connect an LED without it going to damage or degrade.

To calculate the resistance, we must consider 3 important values:

* With which source we are going to feed the circuit (In this case 9V).
* Ideal working voltage of the LED diode.
* Maximum current supported by the LED.

Important: The values that correspond to the working voltage and maximum current of the LED diode are different according to the color, size, shape and even the company that makes them, so we recommend investigating about your model. The data provided here is relatively similar to what you can obtain for 5 mm LED diodes.

So the first thing we have to do after knowing what information we need to calculate the resistance of our LED diode, is to investigate the data sheet that corresponds to our model. Below you can see a table with the most common values for 5 mm LED diodes.

Colour
Voltage
Current
Red
1.8V ~ 2.1V
10mA< I <20mA
Orange/Amber
1.8V ~ 2.1V
10mA< I <20mA
Yellow
1.8V ~ 2.1V
10mA< I <20mA
Green
3.0V ~ 3.3V
10mA< I <20mA
Blue
3.0V ~ 3.3V
10mA< I <20mA
Cold White
3.0V ~ 3.3V
10mA< I <20mA
Warm White
3.0V ~ 3.3V
10mA< I <20mA
Pink
3.0V ~ 3.3V
10mA< I <20mA
UV/Purple
3.0V ~ 3.3V
10mA< I <20mA

In this case we will use as an example the values for a cold white LED. We will also consider that you have knowledge about Ohm's Law, if you do not know her we recommend you to see our post about it here.

Up to this point and knowing the three data which we mentioned earlier, we can use Ohm's law as shown on the right for calculate the value of the resistance.
Yes! only with this formula we can easily calculate the value of the resistance that we will need to place to the LED. Easy, no?

But it's not that simple, we need to know exactly what we have to replace and where, especially the voltage value (V). It is just at this point that most of the people who begin to study or enter the world of electronics where they make the mistake and although they correctly apply the formula, the values that they introduced in it are not the correct ones, so now we will explain what are the correct values that you should replace and where.

If we take the previous formula as such, we believe that the value of the voltage (V) that appears in it corresponds to the voltage of the source or the voltage that is needed to power the LED diode, but this is not the case, the value that we must have in the formula depends on the difference between them and this is because the resulting voltage is the voltage that must drop across the resistor before reaching the LED diode. Below we show you how to make the difference of voltages.


In our case, as we decided to do this example with 9V and a cold white LED, we would solve the previous formula as shown below.


Now knowing the above value and the current consumed by the LED diode, we can replace it into the resistance formula taken from Ohm's law as follows.


The result obtained by applying the above formula is the value that the resistance must have to place in the circuit to turn on the LED diode without it being burned. Sometimes the value for the resistance obtained is not commercial, as it is in this case, when this happens the most advisable thing is to look for a resistance value close to the one we obtained but above and never below because we can cause the LED diode to burn out.

For our example, since the value of the resistance was 300 Ohms and this is a "no" commercial value, the closest value that we can take will be 330 Ohms ensuring that the LED works correctly.

All the formulas used in this post were created on the CodeCogs site. | https://www.codecogs.com/