📚 Course contents

Electronics Concepts, lesson 9 of 19

Why Does an LED Need a Resistor? Simplified

beginner6 min read

Short answer: an LED can't control how much current it takes. Once the voltage is high enough to switch it on, it lets almost unlimited current through, gets hot and burns out. A resistor in series limits the current to a safe amount, usually 10–20 mA.

That's the whole idea. The rest of this article shows why it happens, and how to pick the right resistor every time.

What really happens inside the LED

An LED is a diode, a one-way door for current. Like every diode, it has a forward voltage: a step the voltage has to climb before any current flows.

  • Below that step (about 2 V for red, 3 V for blue or white), almost nothing flows and the LED stays dark.
  • Just above it, the current shoots up very steeply. A tiny bit more voltage gives a lot more current.

A resistor behaves very differently: double the voltage and the current only doubles, nice and predictable (that's Ohm's law). An LED doesn't follow Ohm's law. Its "resistance" collapses once it switches on.

So if you connect an LED straight across a 5 V supply, there's nothing to hold the current back. It can rush to hundreds of milliamps for a moment. The LED is made for about 20 mA, so it overheats, goes dim, and dies, sometimes with a little pop.

Long leg to +. Electricity flows from the battery's +, through the resistor, into the LED's long leg and out of its short leg. It lights!

How the resistor fixes it

Put the resistor and the LED in series (one after the other). Now the supply voltage is shared:

  • the LED keeps its own forward voltage across it (about 2 V for red),
  • whatever is left over sits across the resistor.

The resistor follows Ohm's law, so it sets the current: I = V ÷ R. And because it's a series circuit, the same current flows through the LED too. The resistor has become the tap.

Try it yourself

Drag the sliders. Watch what happens to the current when you make the resistor smaller, or the voltage bigger.

5V220 Ω

13.6 mA of current flowing. Just right. A healthy flow and a bright LED.

I = (V − 2 V for the LED) ÷ R = (5 − 2) ÷ 220 = 0.0136 A

  1. Set 5 V and 220 Ω. Note the current. That's the classic Arduino LED.
  2. Now drop the resistor towards zero. When does the LED start running too hot?
  3. Keep the current near 15 mA but switch to a 9 V battery. How big does the resistor need to be now?

Working it out: which resistor do I need?

There's one simple formula:

R = (supply voltage − LED forward voltage) ÷ current

Example: a red LED on an Arduino's 5 V pin

  1. Supply = 5 V. Red LED forward voltage ≈ 2 V.
  2. Voltage left for the resistor = 5 − 2 = 3 V.
  3. We want about 15 mA = 0.015 A.
  4. R = 3 ÷ 0.015 = 200 Ω.
  5. 200 Ω isn't a standard value, so round up to the next one: 220 Ω. That's why every starter kit is full of red-red-brown resistors.

Check the heat too: power = 3 V × 0.015 A = 0.045 W. A normal ¼ W resistor handles that easily.

Don't want to do the maths? Use the free LED resistor calculator. It also picks the standard value and checks the power for you.

LED colourForward voltageResistor on 5 V (15 mA)Resistor on 3.3 V (ESP32, 10 mA)
Red~2.0 V220 Ω150 Ω
Yellow / green~2.1 V220 Ω120 Ω
Blue / white~3.1 V150 Ω22 Ω*

*With blue or white LEDs on 3.3 V there's hardly any voltage left for the resistor, so the brightness changes a lot from one LED to the next. Red is the safer choice on 3.3 V boards.

Common mistakes

  • Rounding the resistor down. Always round up. A slightly bigger resistor gives a slightly dimmer LED; a smaller one can overload it.
  • One resistor for several LEDs in parallel. The LEDs never share fairly: the one with the lowest forward voltage hogs the current. Give each LED its own resistor.
  • "But my coin-cell LED keychain has no resistor!" True. The tiny coin cell can't deliver much current, so the battery itself acts as the resistor. That doesn't work with a USB port, an Arduino or a 9 V battery.
  • Worrying which side the resistor goes. It doesn't matter. In a series circuit the current is the same everywhere, so before or after the LED works the same.

Check what you learnt

  1. Why can't an LED limit its own current?

  2. A red LED (2 V) runs from a 9 V battery at 20 mA. Which resistor is closest?

  3. You have three LEDs in parallel. What's the right way to add resistors?

Conclusion

An LED is like a plant that can't stop drinking. The resistor is the tap that keeps it safe. Take the LED's forward voltage away from the supply, divide by the current you want, round up, and your LEDs will glow happily for years.

What next?