Circuit Bytes · Episode 25 · Components · LEDs
LEDs and why they need a resistor
An LED is a diode that glows, and past its turn-on voltage a little extra voltage makes a flood of current. A resistor in series takes the leftover voltage and sets a safe current.
An LED is a diode that glows
An LED (light-emitting diode) is a diode: current flows through it in one direction only. When current flows, it gives off light. Like any diode, it needs a certain voltage before it turns on, called its forward voltage. A red LED needs about 2 V (roughly 1.8 to 2.2 V); blue and white LEDs need more, about 3 to 3.4 V.
Why straight to a battery burns it out
An LED does not behave like a resistor. Below its forward voltage, almost no current flows. Past it, the current climbs very steeply (the curve is exponential), so a little extra voltage means a flood of current. With nothing to limit it, the LED gets far more current than it is built for, overheats and dies.
The fix: a resistor in series
Put a resistor in series with the LED, in the same loop. The LED takes its forward voltage, and the resistor takes the leftover voltage. Because the resistor's voltage and current follow Ohm's law, it sets the current for the whole loop.
Sizing the resistor
Ohm's law gives the resistor:
R = (V supply − V LED) ÷ I
Small 3 mm and 5 mm indicator LEDs are commonly run at about 20 mA (0.02 A); always check the LED's datasheet.
Example from the video: a 5 V supply and a red LED (2 V) leave 5 − 2 = 3 V over. At 20 mA = 0.02 A, the resistor is 3 ÷ 0.02 = 150 Ω.
Try it yourself
Work out the resistor for a blue LED (about 3.2 V) on a 5 V USB supply at 15 mA: (5 − 3.2) ÷ 0.015 = 120 Ω. Then check a resistor color code chart: 120 Ω is brown, red, brown. If your kit doesn't have that value, pick the next value up; a little less current just means a slightly dimmer LED.
Good to know
- Typical forward voltages: red about 1.8-2.2 V; blue and white about 3-3.4 V. Check the datasheet.
- Small indicator LEDs are usually run at about 10-20 mA, with 20 mA a common rating.
- The LED's current-voltage curve is exponential, which is why a small extra voltage causes a big current jump.
- In practice, pick the nearest standard value at or above the result. 150 Ω is a standard value, but a basic E12 kit jumps from 120 Ω to 150 Ω to 180 Ω and from 270 Ω to 330 Ω, so you sometimes round up.
- Check the resistor's power too: in the example, 3 V × 0.02 A = 0.06 W, fine for a common 1/4 W resistor.
- A tiny coin cell can sometimes light an LED directly because of its own internal resistance; don't rely on that.
- Battery voltages only: never experiment with mains (wall outlet) power.
Answer to the comment question
A 9-volt battery, an LED that needs 3 volts, and 20 milliamps. What resistor do you need? 300 ohms. R = (9 − 3) ÷ 0.02 = 6 ÷ 0.02 = 300 Ω.
Test your knowledge
Quick quiz: LEDs and why they need a resistor
4 multiple-choice questions. Pick one answer for each, then check how you did.
Sources
- SparkFun Learn, "Light-Emitting Diodes (LEDs)": forward voltage, typical current, why LEDs need a current-limiting resistor
- SparkFun Learn, "Resistors: Example Applications": LED current limiting, R = (Vs − Vf) ÷ If
- All About Circuits, "Series LED Resistor Calculator": the same formula
- SparkFun Learn, "Diodes": LED forward voltages by color
Video transcript
Why does an LED burn out if you wire it straight to a battery?
An LED is a diode that glows. A red one needs about two volts to turn on.
Past that, a little extra voltage means a flood of current, and the LED overheats.
The fix is a resistor in series. It takes the leftover voltage and sets the current.
Ohm's law sizes it: the leftover voltage divided by the current you want. Small LEDs like about twenty milliamps.
Five-volt supply, red LED: three volts left over. Three divided by point zero two amps is one hundred fifty ohms.
A nine-volt battery, an LED that needs three volts, and twenty milliamps. What resistor do you need? Comment your answer below!
That's your byte.