LED and its series resistor
An LED is a diode that emits light. Its voltage is nearly fixed (about 2 V for red, 3 V for blue or white), so it must never be connected straight across a supply. A series resistor sets the current: R = (V_s − V_F) / I_F.

Open this lesson in the labFree, in your browser, no account needed.
How it works
Design for 20 mA: R = (Vs − VF) / I = (9 − 1.9) / 0.020 = 355 Ω → use the next standard value up.
With R = 330 Ω: I = 21.5 mA, VLED = 1.904 V
Resistor heat: I²R = 153 mW. LED: 40.9 mW. A 5 mm LED is happy at 5–20 mA and dies above about 30–60 mA.
Try it on the bench
- Change the LED colour to blue (3 V): with the same resistor the current drops a little.
- Set R to 1 kΩ: dimmer but still clearly lit, and the LED lasts longer.
- Set R to 22 Ω and watch the LED burn out. Undo restores it.
Parts on the bench
In the course
Zen’s Electronics Design Mastery, module “Diodes & Power Supplies”.