LED circuit design
Design a circuit made of a supply, an LED and a resistor. Real parts vary in resistance and in Vf, so the LED current varies with them.
SI prefixes accepted (4k7 / 1M / 10m / 220). Upper-case M = mega, lower-case m = milli
Advanced — Supply voltage max, Supply voltage min, Vf max and 2 more
Derived values
- Resistor dissipation
- 1.91 mW
- Worst case 3.77 mW
- LED dissipation
- 1.28 mW
- Vf × I
- Total dissipation
- 3.19 mW
- Vcc × I
- Voltage across R
- 3 V
- Vcc − Vf
Worst case 3.77 mW. With 50% derating you need a 7.55 mW rating or better, so a 1/16W (1005 / 0402) chip resistor is enough.
History
Formula
Resistor needed: R = (Vcc − Vf) / I_target × 1000 [Ω]
Design notes
An LED is a current-driven device. A series resistor R sets the current through it. Too small and the LED dies of overcurrent; too large and it is dim.
Design notes:
• Rated current: around 20 mA for a general-purpose LED, 20–30 mA for high-brightness and white parts
• Forward voltage: red ≈ 2.0 V, green ≈ 2.1 V, blue and white ≈ 3.0–3.5 V
• For production, budget for ±5% on the resistor, the spread in Vf and the supply tolerance together
• Check the worst case so peak current never exceeds the rating
When you need this
For choosing the current-limiting resistor on an indicator LED. Not just "what value" — the point is how far the current actually swings once supply variation, Vf spread and resistor tolerance are all included. Inconsistent brightness in production, or LEDs run past their rating, almost always trace back to skipping this.
LEDs are current-driven
An LED is not driven by voltage; brightness follows current. Worse, current rises very steeply once you pass the forward voltage Vf, so connecting one straight to a voltage source destroys it. A series resistor sets the current.
The resistor sees Vcc − Vf. The smaller that difference, the more the spread dominates. Driving a white LED with Vf = 3.1V from 5V leaves just 1.9V across the resistor, so a 0.2V shift in Vf changes the current by over 10%.
Vf and current rating by colour
| Colour | Vf (typical) | Vf spread | Rated current | Commonly used |
|---|---|---|---|---|
| Red | 1.9 – 2.1 V | ±0.2 V | 20 mA | 2 – 10 mA |
| Yellow / amber | 2.0 – 2.2 V | ±0.2 V | 20 mA | 2 – 10 mA |
| Green (yellow-green) | 2.0 – 2.2 V | ±0.2 V | 20 mA | 2 – 10 mA |
| Green (pure green) | 3.0 – 3.4 V | ±0.3 V | 20 mA | 5 – 20 mA |
| Blue | 3.0 – 3.4 V | ±0.3 V | 20 mA | 5 – 20 mA |
| White | 3.0 – 3.5 V | ±0.3 V | 20 – 30 mA | 5 – 20 mA |
Modern indicator LEDs are efficient enough that you rarely need the full 20mA. 1–5mA is usually bright enough, often too bright. Lower current also eases dissipation, heating and the resistor rating.
Worked example: a white LED at about 10mA from 5V
- Vcc = 5V, white LED Vf (typical) = 3.1V, target 12mA.
- R = (5 − 3.1) / 0.012 = 158Ω. The nearest E24 value is 150Ω.
- Entering Vcc = 5, Vf = 3.1, R = 150 gives 12.67mA nominal.
- Set Vcc to ±5% (4.75–5.25V), Vf to 2.9–3.4V and resistor tolerance to ±5%, and the current swings from 8.57mA to 16.49mA.
- The 16.5mA maximum is within the 20mA rating, so it is safe. But 8.6mA versus 16.5mA is nearly a factor of two in brightness. If several LEDs must match, use ±1% resistors or run at lower current.
- Resistor dissipation is 16.5mA² × 150Ω = 41mW, so a 1/10W 0603 part is sufficient.
What matters
- Keep Vcc − Vf large. The bigger it is, the less Vf spread matters. Trying to drive a Vf = 3.1V white LED from 3.3V leaves only 0.2V and the current is uncontrollable. Boost the supply or use a constant-current driver.
- Check port current limits when driving from a microcontroller. Even at 8mA per pin, there is almost always a separate limit per port group and per supply pin. Driving several LEDs directly exceeds it easily.
- Never parallel LEDs on one resistor. Current concentrates in the lower-Vf device: one is brighter and dies sooner. Give each its own resistor, or put them in series.
- With PWM dimming, watch peak current. The rating applies to the peak, not the average. Some LEDs specify a separate pulsed rating.
Frequently asked questions
Does the resistor go before or after the LED?
Can I drive a white LED from 3.3V?
How do I calculate for LEDs in series?
Does lower current extend life?
How do I choose the resistor power rating?
Standards and references
- IEC 62031 — Safety specification for LED modules.
- IEC 60810 — Performance requirements for LED light sources.
Last updated: 2026-08-29