TactivergeLite

Lite / Building Machines That Respond / Week 12

Keep the LED alive: current-limiting resistors

Connect a red LED straight to a 5 V supply and it may flash brightly once and never again. One resistor prevents it. Which one?

About 30 min · 3 goals · Checked by automated tests · Full interactive version

Why should I care?

Status LEDs are on almost every board you will ever design, and the current-limiting resistor is often the first calculation a new electronics engineer gets checked on. It combines everything so far: the loop rule, Ohm's law and real resistor values.

Safety: Everything here is a low-voltage simulation. Never experiment with mains electricity or high-current batteries; real circuits are built only under supervision with a small, current-limited low-voltage supply.

Predict

A red LED (2.0 V when lit) runs from 5 V through a resistor. How much voltage does the resistor take?

  1. 5 V
  2. 3 V
  3. 2 V
  4. 0 V
Guess first, then reveal

The loop rule says the voltages add to the supply: LED 2.0 V + resistor = 5 V, so the resistor takes 3 V. That 3 V is what sets the current through both of them.

Discover

Choose the LED circuit with a red LED. Set 5 V and find the smallest resistor that keeps the LED at or below 20 mA. Then switch to a blue LED. Why does the same resistor now give less current? Finally lower the supply below the LED's forward voltage and explain what you see.

What the interactive shows (text version)

In the circuits lab's LED circuit, the readout shows the LED current and warns above 20 mA. On 5 V with a red LED (2.0 V), 150 ohms gives 20 mA; 220 ohms gives about 13.6 mA. Switching to a blue LED (3.0 V) with the same resistor lowers the current because the resistor's share of the voltage falls. Below the forward voltage, no current flows and the LED is off.

You can also open the interactive on the full site when you have a faster connection.

Understand

LEDs are not resistors

An LED is a diode: below its forward voltage almost no current flows, and above it the current rises extremely steeply (you saw this on the V–I plotter). On its own it cannot limit its own current, so a tiny overshoot in voltage can mean a huge, destructive current.

The resistor takes the rest

Put a resistor in series. The LED settles at about its forward voltage and the resistor takes the remainder, Vs − Vf. Because the resistor is ohmic, that voltage fixes the current: I = (Vs − Vf) ÷ R.

Pick a real value, then recheck

Calculate R, choose the next standard value up (so the current is a little less, not more), then recalculate the current and the resistor's power. Typical small indicator LEDs are rated around 20 mA; 5–15 mA is usually bright enough.

Explain it another way

Intuitive

The LED is like a door that is jammed shut until you push past a threshold, then flies wide open. The resistor is a doorstop that stops it slamming.

Technical

An LED's I–V curve is roughly exponential above its knee. A series resistor linearises the circuit: with Vf approximately constant over the operating range, the current is set by the resistor, I ≈ (Vs − Vf)/R, a simple fixed-drop model.

Mathematical

9 V supply, red LED, 20 mA target: R = (9 − 2) ÷ 0.020 = 350 Ω. Next E24 value up is 360 Ω: I = 7 ÷ 360 ≈ 19.4 mA. Resistor power: 7 V × 0.0194 A ≈ 0.136 W, under a 0.25 W rating.

Applied

Every power, charging and error light on a robot controller is a calculation like this. Because blue and white LEDs drop about 3 V, designers sometimes cannot run them from 3.3 V logic with a sensible resistor and need a different circuit.

Derivation: Where R = (Vs − Vf) ÷ I comes from
  1. Loop rule around supply, resistor and LED: Vs = V_R + Vf, where Vf is the LED's forward voltage (about 2.0 V for red, 3.0 V for blue in this model).

  2. So the resistor's voltage is V_R = Vs − Vf.

  3. It is a series loop, so the same current I flows through the resistor and the LED. Ohm's law for the resistor: V_R = I × R.

  4. Combine: I × R = Vs − Vf, so R = (Vs − Vf) ÷ I.

  5. Example: Vs = 5 V, red LED, I = 15 mA: R = (5 − 2) ÷ 0.015 = 200 Ω. The nearest standard value above is 220 Ω, giving I = 3 ÷ 220 ≈ 13.6 mA: safe and still bright.

Worked example 1

A blue LED (Vf = 3.0 V) on a 5 V supply should take 10 mA. Which resistor?

R = (5 − 3) ÷ 0.010 = 200 Ω. Choose 220 Ω (next standard value up): I = 2 ÷ 220 ≈ 9.1 mA.

Worked example 2

Why is the 'next value up' safer than the 'nearest value'?

A larger resistor gives slightly less current, which keeps the LED below its rating even with resistor tolerance. A smaller one could push it over.

Common mix-ups

Practice

Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.

Ω

Ω

mA

Practice 4. Why must an LED never be connected straight across a 5 V supply?
Practice 5. The same 150 Ω resistor and 5 V supply are used with a red LED (2.0 V) and then a blue LED (3.0 V). Which carries more current?

Apply it

Design the power light for a 9 V robot: choose a red or blue LED, a current between 5 and 15 mA, the standard resistor, and check its power is under 0.25 W. Build it in the circuits lab and record the simulated current next to your calculation.

Reflect

Which step of the LED calculation would you most like a teammate to double-check, and why?

Write your answer on paper or in your own notes. Lite never stores what you write.

← Ohm's law: V = I × RModule check: when calculation meets simulation →