Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Recipe

Size an LED's series resistor

Use when: an LED is powered from a fixed voltage (a supply rail or an output pin driven HIGH) and needs a resistor in series

Goal: a standard resistor value, the current it gives, and a confirmed power rating

Taught in LEDs and current limiting

  1. 1

    Use the voltage the LED circuit actually sees: the 5V or 3V3 pin, or the pin's HIGH voltage.

    Example

    An Uno R4 Minima's 5V pin: V_s = 5.0 V.

    Why: the resistor's share of the voltage starts from this number, so every later step depends on it.

  2. 2

    Use the datasheet's V_f at the current you plan to run. Without a datasheet, use a typical value and plan to measure.

    Example

    A red LED: V_f \approx 2.0 V.

    • V_s is well above V_f (about 1 V or more spare) — continue.
    • V_s is only a few tenths of a volt above V_f — use a higher supply if you can; the current will swing widely with small changes in V_f.

    Why: by KVL the LED takes about V_f of the supply, and only what is left over sets the current.

  3. 3

    Pick a current below the LED's maximum and below any pin limit. 5 to 10 mA is a good start for an indicator.

    Example

    Target 10 mA, under a typical 20 mA LED maximum.

    Why: a target well under the maximum leaves room for a supply running high or a forward voltage running low.

  4. 4

    R = (V_s - V_f)/I.

    Example

    R = (5.0 - 2.0)\ \text{V} / 10\ \text{mA} = 3.0\ \text{V} / 0.010\ \text{A} = 300\ \Omega.

    Why: the resistor takes V_s - V_f and follows Ohm's law, so this is the resistance that gives the target current.

  5. 5

    Choose the next value up in the standard series and recompute the current.

    Example

    300 Ω is not an E12 value; the next one up is 330 Ω. I = 3.0\ \text{V} / 330\ \Omega \approx 9.1\ \text{mA}.

    Why: a bigger resistor gives less current, so rounding up can only move you further under the limits.

  6. 6

    P_R = (V_s - V_f) \times I. Keep it under half the resistor's rating.

    Example

    3.0\ \text{V} \times 9.1\ \text{mA} \approx 27\ \text{mW}, far under half of a ¼ W (250 mW) resistor.

    Why: the resistor turns its share of the energy into heat; running it at half its rating keeps it cool and long-lived.

Common mistakes

  • Leaving the resistor out because the LED "only needs 2 V".
  • Using V_s/I, which forgets that the LED uses part of the voltage.
  • Rounding down to a smaller resistor and pushing the current over a limit.
  • Treating the LED's maximum current as the target.
  • Fitting the LED backwards: the long leg goes toward the supply.