Contact Us
Blog / LED Resistor Calculation, Circuit Diagram & Symbol (Complete Guide)

LED Resistor Calculation, Circuit Diagram & Symbol (Complete Guide)

Posted: May, 2026 Writer: NextPCB Content Team Share: NEXTPCB Official youtube NEXTPCB Official Facefook NEXTPCB Official Twitter NEXTPCB Official Instagram NEXTPCB Official Linkedin NEXTPCB Official Tiktok NEXTPCB Official Bksy
  1. Table of Content
  2.  Quick Answer
  3. 1. LED Resistor Calculation
  4. 2. LED Circuit Diagram
  5. 3. LED Symbol and Polarity
  6. 4. LED Forward Voltage by Color
  7. 5. Arduino LED Circuit
  8. 6. Practical Engineering Notes
  9. FAQ
  10. Summary Reference

An LED requires a series current-limiting resistor calculated as R = (Vs − Vf) / If . Without this resistor, the LED draws uncontrolled current and fails within seconds due to thermal runaway.

Quick Answer

LED Resistor Formula: R = (Vs − Vf) / If

Example — 5V supply, Red LED, 20mA:
R = (5.0 − 2.0) / 0.020 = 150Ω

Example — 5V supply, Blue LED, 20mA:
R = (5.0 − 3.3) / 0.020 = 85Ω → use 82Ω or 100Ω

1. LED Resistor Calculation

Formula

R = (Vs − Vf) / If

Variable Description Unit
R Series resistance Ω
Vs Supply voltage V
Vf LED forward voltage V
If Desired forward current A (divide mA by 1000)

Step-by-Step Example

Given: 5V supply · Red LED (Vf = 2.0V) · Target current 20mA
Voltage across resistor: 5.0 − 2.0 = 3.0V
Resistance: 3.0V ÷ 0.020A = 150Ω
Nearest E24 standard value: 150Ω (exact) or 180Ω for a safety margin
Resistor power: P = If2 × R = (0.020)2 × 150 = 0.06W → use 0.25W rated part

Quick Selection Table

Supply LED Color Vf (typ.) Target If Resistor
5V Red / Orange 2.0V 20mA 150–180Ω
5V Yellow / Green (std) 2.1V 20mA 150Ω
5V Blue / White 3.3V 20mA 82–100Ω
5V Green (high-brightness) 3.2V 20mA 82–100Ω
3.3V Red 2.0V 10mA 120–150Ω
3.3V Blue / White 3.3V 5mA 0–22Ω*
12V Red 2.0V 20mA 470–510Ω
12V Blue / White 3.3V 20mA 430–470Ω

*At 3.3V with a blue/white LED (Vf ≈ 3.3V), voltage headroom is near zero. Limit to 5mA or less. A 22Ω resistor provides minimum protection.

Key takeaway: For most 5V indicator circuits, 150–220Ω is a safe working range for red/orange/yellow LEDs. Always round up to the next standard resistor value to stay within current limits.

2. LED Circuit Diagram

Basic LED Circuit Diagram showing current flow, resistor, and LED voltage drop
Basic LED Circuit Diagram

The basic LED circuit places a current-limiting resistor in series between the supply voltage and the LED anode. Complete current path:
Vs (+) → [R] → LED anode → LED cathode → GND

Why a Resistor Is Required

An LED is not a resistive device. Its current increases exponentially with voltage above Vf — a 0.1V increase above threshold can multiply current several times over. Without a resistor, the supply drives far more current than the junction can handle. Temperature rises, Vf drops, current increases further: thermal runaway. The LED fails in under one second.

The resistor absorbs the voltage difference (Vs − Vf) and enforces a safe operating current regardless of supply impedance.

What Happens Without One

Direct to 5V supply: Several hundred milliamps through a 2V red LED. Junction destroyed within one second.
Direct to 1.5V AA battery: Still enough above Vf to cause damage in many LEDs — even a battery has enough current delivery to overdrive a junction.
After failure: The LED either goes dark immediately or operates at a fraction of rated brightness before dying from bond wire fatigue.

Key takeaway: Never connect an LED directly to any supply voltage — even low-voltage sources. The resistor is not optional.

3. LED Symbol and Polarity

Standard LED Schematic Symbol highlighting Anode (+), Cathode (-), and Light Emission arrows
Standard LED Schematic Symbol

Symbol Components

Element Location Meaning
Filled triangle Left Anode (+), P-type semiconductor
Vertical bar Right of triangle tip Cathode (−), N-type semiconductor
Two diagonal arrows Projecting outward Light emission (photon output)

Current flows from anode (triangle base) → cathode (bar). The outward arrows are the sole visual distinction between an LED and a standard rectifier diode, which uses identical triangle-bar geometry.
LED vs. Photodiode: A photodiode uses arrows pointing inward (toward the junction), indicating light absorption. Always confirm arrow direction in mixed-diode schematics.

Identifying Polarity on Physical Components

  • Lead length (through-hole): Longer lead = anode (+). Shorter lead = cathode (−).
  • Flat on lens base: The flat section of the circular base marks the cathode.
  • Internal electrode (clear lens): Larger metal post = cathode. Smaller = anode.
  • SMD markings: Green dot, beveled corner, or "K" label = cathode. Confirm against the datasheet.
  • PCB silkscreen: Flat courtyard edge, filled pad, or "K" designator = cathode (IPC-7351 standard).

Common Mistakes

Reversed polarity does not always cause visible damage immediately. At 3.3V with a reverse breakdown voltage of 5–6V, a reversed LED simply does not light — it may survive indefinitely. At 5V or higher, sustained reverse bias risks breakdown and permanent failure. Verify polarity with a multimeter in diode-test mode before powering the circuit.

Key takeaway: Long leg = anode = (+). Flat side on lens = cathode = (−). On PCB, "K" or flat silkscreen edge = cathode.

4. LED Forward Voltage by Color

Vf is determined by semiconductor material, not by LED physical size or brightness rating. Values below are at 20mA, 25°C junction temperature.

LED Color Material Vf Typical (V) Vf Range (V) Max If (mA)
Infrared (IR) GaAs / AlGaAs 1.2 1.0 – 1.6 100
Red AlGaAs / GaAsP 1.8 1.6 – 2.2 30
Orange GaAsP 2.0 1.8 – 2.3 30
Yellow GaAsP / AlGaInP 2.1 1.8 – 2.4 30
Green (standard) GaP 2.1 1.9 – 2.4 25
Green (high-brightness) InGaN 3.2 2.9 – 3.6 30
Blue InGaN 3.3 3.0 – 3.6 30
White InGaN + phosphor 3.3 3.0 – 3.6 30
UV InGaN 3.5 3.2 – 4.0 20

Engineering note: Vf decreases approximately −2mV per °C as junction temperature rises. Design your resistor using the minimum Vf in the datasheet range — this is the highest-current worst case. At 85°C, a red LED's Vf may drop from 2.0V to 1.8V, increasing current by ~15% through a fixed resistor.

5. Arduino LED Circuit

Arduino LED Circuit displaying connection from Arduino digital pin through resistor to LED
Arduino LED Circuit diagram

Standard Wiring

Arduino Pin D13 → [220Ω] → LED (+) → LED (−) → GND

Arduino digital output pins are rated at 40mA absolute maximum, with 20mA recommended per pin and 200mA total across all I/O on AVR-based boards (Uno, Nano, Mega). Running at 10mA is standard practice for indicator LEDs — it extends GPIO life and reduces total power draw.

Resistor Values by Board and LED Color

Board Voltage LED Color Vf If Target Resistor
5V (Uno, Mega) Red 2.0V 10mA 330Ω
5V (Uno, Mega) Blue / White 3.3V 10mA 180Ω
3.3V (Nano 33, MKR) Red 2.0V 5mA 270Ω
3.3V (Nano 33, MKR) Blue / White 3.3V 5mA 0–22Ω

Basic Arduino Code

const int LED_PIN = 13;

void setup() {
  pinMode(LED_PIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_PIN, HIGH);  // LED on
  delay(1000);
  digitalWrite(LED_PIN, LOW);   // LED off
  delay(1000);
}

PWM Brightness Control

Pins marked ~ on Arduino boards (3, 5, 6, 9, 10, 11 on Uno) support analogWrite(pin, 0–255) . PWM frequency is approximately 490Hz on most pins. For camera-facing indicators or high-flicker-sensitivity environments, use an external PWM controller operating at 20kHz+ to eliminate visible artifacts.
For detailed pin mapping and PWM assignments across Arduino form factors, including PCB layout considerations, see the Arduino Nano pinout diagram and PCB design guide.

Key takeaway: Use 330Ω for a 5V red LED at 10mA on Arduino GPIO. Never exceed 20mA per pin in any sustained condition.

6. Practical Engineering Notes

Why LEDs Fail in Real Circuits

  • Thermal runaway: Vf drops as temperature rises → current increases → more heat. Run at 50–60% of maximum rated current to maintain stable operation.
  • ESD damage: InGaN junctions (blue, white, high-brightness green) are ESD-sensitive. Sub-threshold discharge events cause latent junction degradation — the LED continues to function but dims progressively over weeks.
  • Vf tolerance in production: A ±0.2V Vf spread across a batch translates to ±10–15% current variation through a fixed resistor. For uniform brightness across multiple units, use a constant-current driver rather than a passive resistor.
  • Reverse voltage transients: Inductive loads (relays, motors) on the same power rail generate spikes that can exceed reverse breakdown voltage. Add a 100nF ceramic bypass capacitor at the LED supply pin and a TVS diode on the rail.
  • Parallel LEDs without individual resistors: Slight Vf differences cause uneven current sharing. The lowest-Vf device draws the most current and fails first. Always use one series resistor per LED in parallel configurations.

PCB Design Checklist

  • Mark cathode pads: flat silkscreen edge, filled pad, or "K" designator
  • Orient all LEDs with cathode in the same direction — reduces AOI setup errors
  • Power LEDs (>0.5W): include exposed copper thermal pads; junction life approximately halves for every 10°C above rated temperature
  • Through-board vias under high-power LED pads for thermal transfer to inner copper layers

Engineering note: Always design for the lowest expected Vf to ensure the resistor holds current in range across the full operating temperature. This single constraint prevents most LED circuit failures in production.
For production boards transitioning from prototype, manufacturing quality directly affects LED circuit reliability. NextPCB provides PCBA services with 24-hour lead time, IPC standard manufacturing, and full BOM sourcing support — covering component procurement, reflow, and post-assembly AOI inspection in a unified workflow.

FAQ

What resistor do I use for a 5V LED?
For red/orange (Vf ≈ 2.0V) at 20mA: 150Ω. For blue/white (Vf ≈ 3.3V) at 20mA: 82–100Ω. When LED color is unknown, 220Ω is a conservative safe default for any 5V indicator circuit.

Can I connect an LED without a resistor?
No. Without a current-limiting resistor, an LED will draw uncontrolled current from any low-impedance supply and fail in under a second. The only exception: some dedicated LED driver ICs incorporate internal current limiting.

Why does my LED burn out immediately?
Four most common causes: (1) no series resistor, (2) resistor value too low, (3) reversed polarity at voltages above 6V, (4) supply voltage exceeds LED's maximum rating. Check these in order before replacing the component.

How do I identify which LED leg is positive?
Longer lead = anode (+). Flat edge on the lens base = cathode (−). On SMD: check datasheet marking or use a multimeter in diode-test mode — forward bias lights the LED with the probe polarity matching anode/cathode.

Can I connect multiple LEDs in parallel?
Yes, but only with individual series resistors for each LED. Shared resistors cause uneven current due to Vf mismatch within the batch.

What is PWM dimming and does it affect the resistor?
PWM switches the LED on/off rapidly (490Hz–20kHz+) to control apparent brightness. The resistor calculation still applies to the fully-on state — the duty cycle does not change the peak current or the resistor value required.

Summary Reference

Parameter Value Notes
Red LED Vf 1.6 – 2.2V Typical 1.8V at 20mA, 25°C
Blue / White LED Vf 3.0 – 3.6V InGaN junction
Standard indicator current 10 – 20mA Most through-hole indicator LEDs
Resistor for 5V / red LED 150 – 220Ω At 10–20mA; use 220Ω for margin
Resistor for 5V / blue LED 82 – 100Ω At 20mA
Vf temperature coefficient −2mV / °C Current increases with temperature
Arduino GPIO max (AVR) 40mA abs. / 20mA recommended 200mA total I/O budget
LED reverse breakdown voltage 5 – 6V Standard indicator grade
Tag: PCB design hardware design LED circuit board resistor Arduino Prototype basic electronics component polarity led symbol LED resistor