LED with Series Resistor
Why an LED needs a resistor — and how to size it for a target current.
led-resistor.circuit dc analysis
How it works
An LED is a diode: past its forward voltage it will draw almost unlimited current and destroy itself. The series resistor sets the current. Here a 5 V supply drives a red LED (≈ 2 V forward) through 220 Ω.
The resistor drops the difference, 5 − 2 = 3 V, so the current is about 3 V / 220 Ω ≈ 13.6 mA. Run the analysis to see the LED energised and the exact operating point the diode model settles on.