Calculating resistor value to protect LED

The three main concerns when choosing a protective resistor for an indicator LED are…

Simple pushbutton switch controlled LED circuit schematic diagram by electronzap electronzapdotcom
Simple pushbutton switch controlled LED circuit schematic diagram by electronzap electronzapdotcom
  • Indicator LED current limited to no more than 20 milliamps (0.02 amps).  Lower current than 20mA is good, but the LED won’t produce much light at very low current. 10-15mA will probably be plenty of current. There’s other types of LEDs that can handle more current and produce more light.
  • Wattage (power converted to head) of resistor must be at a safe level. Most resistors are rated for a maximum of 1/4W (0.25 watt), which should be kept below 1/8W (0.125W). It’s easy to buy higher wattage resistor if you search for them. You probably won’t want lower wattage resistors for anything unless there’s a lack of space and the wattage needs are low.
  • Voltage across the resistor. Will be the supply voltage minus the voltage drop of the LED.

Become a Patron!

Everything from the power supply, the switch if there is one, and all connectors need to be able to handle that much current/power as well. But they can all usually handle a lot more current than an LED.

Upcoming topics:

  • 10mA goal.
  • 20mA goal.
  • 15mA goal. (to be added).
  • 0.125W limit @ 20mA.

Calculating resistor value needed for 10mA through LED with Ohms law:

10mA is well below the 20mA max current that should flow through most indicator LEDs.

R = V/I is the Ohms law calculation used to calculate the resistance needed to get a desired current through a resistor. Resistance equals voltage divided by current.

Using a 5V supply:

10mA current calculation for LED protection using Ohms Law learning electronics shorts 116
10mA current calculation for LED protection using Ohms Law learning electronics shorts 116

Let’s have a desired current of 0.01A. Which is the same as 10mA. Ohms law is calculated in amps.

5V is the most common voltage for prototype circuits.

An LED drops some of the voltage from the resistor that is in series with it. Otherwise the LED doesn’t limit current. The resistor sets the current based on the remaining voltage across it.

  • Red LEDs usually drop about 2V.
  • Blue LEDs usually drop about 3V.

That means that if we want approx. 10mA (there’s other factors that alter the exact current a little), then we need…

  • Red LED: 3V/0.01A = 300Ω of resistance.
  • Blue LED: 2V/0.01A = 200Ω of resistance.

When it comes to heat generations, you can expect:

  • Red LED’s resistor: 3V x 0.01A = 0.03W of power.
  • Blue LED’s resistor: 2V x 0.01A = 0.02W if power.

The most common resistors have a rated wattage of a maximum of 0.25W. It is recommended to keep them below 0.125W.

20mA goal:

20mA is the maximum current that most indicator LEDs should pass. You can always go lower in current, which is probably better for the LED anyways. Therefore, after you calculate the resistance you need for 20mA, you can use a slightly higher value resistor than calculated since most of the time you won’t have that exact value anyways. It will still be close to 20mA if the resistance is close to the calculated value.

When circuit is powered with 5V.

Five volts is a common supply voltage. And red LEDs usually drop about 2V from reaching the resistor.

How to calculate resistor value for 20mA to protect LED from 5V for learning electronics shorts 103
How to calculate resistor value for 20mA to protect LED from 5V for learning electronics shorts 103

That leaves 3 volts across the resistor to set the current. If we desire 20mA through that circuit, we need…

  • 3V across resistor divided by 0.02A desired current = 150Ω resistor. 3V/0.02A=150Ω
  • 3V across the resistor times 0.02A of current flowing through it equals 0.06 watts of power being generated. That’s far less than the recommended limit of 0.125W when using a resistor rated for 1/4W. 3V x 0.02A = 0.06W

As shown in the video below. We aren’t guaranteed to get 20mA through the circuit. The LEDs actually drop a little more voltage (About 2.2V for red and 3.2V for blue) near the maximum current. There’s also other voltage losses in a real circuit.

0.125W limit @ 20mA

  • 0.125W/0.02A = 6.25V max voltage that should be put across 1/4W resistor with 20mA flowing through it.
  • 6.25V/0.02A = 312.5Ω resistor max that won’t exceed 0.125W

 To support this site, check out the following links:

Home page

  • Information on this site is not guaranteed to be accurate. Always consult the manufacturer info/datasheet of parts you use. Research the proper safety precautions for everything you do.
  • Electronzap is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com.