Why does an LED need a series resistor?
Because an LED is a diode, not a resistor — above its forward voltage the current rises almost vertically for tiny increases in voltage. Connected straight across a supply it draws whatever current the supply can deliver and destroys itself, often within seconds. The resistor sets the current, which is what actually determines brightness and lifespan.
How is the resistor value calculated?
Subtract the LED's forward voltage from the supply, then divide by the desired current: R = (Vs − Vf) ÷ I. A red LED at 2 V drawing 20 mA from a 5 V supply needs (5 − 2) ÷ 0.02 = 150 Ω. Then pick the next standard value upward — 150 Ω exists in E24, but where the exact figure is not a stock value, going up slightly runs the LED a little below target, which is safe.
What forward voltage should I use?
It varies by colour because it depends on the semiconductor bandgap. Red is around 1.8–2.2 V, yellow and amber similar, while green, blue and white are typically 3.0–3.4 V. This matters: a white LED needs over 3 V before it conducts at all, so it will not light from a 3 V coin cell in the way a red one will. Use the datasheet figure where you have it.
Can I put several LEDs on one resistor?
In series, yes — add their forward voltages and use one resistor, provided the supply exceeds the total. In parallel, no. LEDs have slight manufacturing variation, so the one with the lowest forward voltage takes most of the current, runs hottest, drops further and takes even more — a runaway that ends with one dead LED and the others dim. Parallel strings each need their own resistor.
What power rating does the resistor need?
Multiply the voltage across the resistor by the current through it. In the 150 Ω example, 3 V × 0.02 A = 60 mW, comfortably within a standard quarter-watt part. High-current LEDs or large supply-to-forward-voltage gaps change this: driving 100 mA from 12 V through a 2 V LED dissipates a full watt in the resistor, which needs a physically larger component and gets genuinely hot.
Is a resistor the right approach for high-power LEDs?
Not really. For anything above roughly 100 mA, a resistor wastes significant power as heat and lets brightness drift as the supply voltage or LED temperature changes. Constant-current drivers regulate the current directly, are far more efficient, and keep brightness stable. Resistors remain the right answer for indicators and small signal LEDs, which is most hobby and classroom use.