LED Circuit Diagram: Resistor Sizing and Wiring

Wiring an LED is one of the first things anyone does with a microcontroller or a DC power supply. It is also one of the things most often done wrong. The mistakes range from no resistor at all (LED dies in seconds) to resistors so conservative the LED is barely visible. Getting the calculation right takes about thirty seconds once you understand what the numbers mean.

This guide covers the resistor sizing formula, single-LED and multi-LED configurations, what changes when you drive from Arduino vs. 12V vs. mains-derived supplies, and why paralleling LEDs without individual resistors is asking for trouble.

The Resistor Formula

An LED is not a resistor. It is a diode with a fairly stable forward voltage drop (Vf) that varies by color and LED type. Once forward voltage is established, current through the LED is determined entirely by what is left over. Without a current-limiting resistor, a 5V supply sees a 2V LED as a near-short circuit.

The formula:

R = (Vs - Vf) / If

Where:

Forward Voltage by LED Color

Color Typical Vf
Red 1.8--2.2V
Yellow / Orange 2.0--2.2V
Green (standard GaP) 2.0--2.5V
Green (high-brightness InGaN) 3.0--3.5V
Blue 3.0--3.5V
White 3.0--3.5V
UV (400nm) 3.4--3.8V
Infrared (940nm) 1.2--1.5V

Check the datasheet. A generic "green" LED you pick out of a bag could be 2.0V or 3.2V depending on whether it's old-style GaP or modern InGaN -- that difference matters for the resistor calculation.

Worked Examples

Red LED from a 5V Arduino pin (target If = 15mA): R = (5 - 2.0) / 0.015 = 200Ω → use 220Ω (next standard E12 value up)

At 220Ω: actual current = (5 - 2.0) / 220 = 13.6mA. Fine.

Blue LED from 12V supply (target If = 20mA): R = (12 - 3.3) / 0.020 = 435Ω → use 470Ω

At 470Ω: actual current = (12 - 3.3) / 470 = 18.5mA. Acceptable.

Red LED from 3.3V Arduino (target If = 10mA): R = (3.3 - 2.0) / 0.010 = 130Ω → use 150Ω

This one is tight. At 150Ω the current is exactly 8.7mA -- dim but safe. If you want brighter, note that running 15mA through a 3.3V pin is fine if you account for the pin's ~0.4V output impedance under load: effective supply is closer to 2.9V, giving (2.9 - 2.0) / 68Ω... which is why lower-voltage supplies need careful calculation, not guesses.

Single LED Circuit: Breadboard Layout

The standard circuit:

  1. Arduino digital pin (or positive supply) → resistor → LED anode → LED cathode → GND

On a breadboard: the resistor goes from the pin row to the LED anode row. The LED cathode (shorter leg, flat side on the package) goes to the ground rail.

You can also sink current instead of sourcing it -- connect the LED anode to 5V (through the resistor) and the cathode to an Arduino output pin set LOW. Either works electrically; sourcing is more common for indicator LEDs, sinking is common when driving multiple LEDs through shift registers or common-anode LED arrays.

Series LED Strings

Putting multiple LEDs in series reduces the resistor power dissipation and is more efficient at higher supply voltages.

In a series string:

Formula for a series string of N identical LEDs: R = (Vs - N × Vf) / If

Example: Three white LEDs in series from 12V (If = 15mA): R = (12 - 3 × 3.2) / 0.015 = (12 - 9.6) / 0.015 = 160Ω → use 180Ω

The resistor must handle: P = (Vs - N×Vf) × If = 2.4V × 15mA = 36mW. A standard 1/4W resistor is more than enough.

You cannot string blue/white LEDs (Vf ≈ 3.2V) in series on a 5V supply -- even two in series would require 6.4V.

Parallel LEDs: Why Individual Resistors Are Required

The instinct to run multiple LEDs in parallel with a single shared resistor is wrong.

LEDs have a negative temperature coefficient: as they warm up, Vf drops slightly, which causes more current, which causes more heating. In a parallel string with one shared resistor, the LED with the slightly lowest Vf hogs current, heats up further, drops more voltage, and draws even more current. The other LEDs run dim. The hot one may eventually fail.

The correct approach: one resistor per LED, always. Each LED gets its own series resistor calculated for the full supply voltage.

Example: Four red LEDs in parallel from 5V:

If driving from an Arduino digital pin (40mA absolute max), four LEDs from one pin is too much. Use a transistor or MOSFET driver, or distribute across multiple pins.

Driving LEDs from Arduino

Arduino Uno / Nano digital pins can source or sink 20mA comfortably (40mA absolute max). A single LED with the correct resistor is within spec.

For more than two or three LEDs, consider:

For PWM brightness control, use a PWM-capable pin (D3, D5, D6, D9, D10, D11 on Uno) and call analogWrite(). The LED resistor calculation stays the same -- the average current changes with duty cycle, but peak current at 100% duty must still be within spec.

Simulating an LED Circuit

Before committing to component values, sketch the circuit in CircuitDiagramMaker and run a DC simulation. The simulator shows the exact current flowing through the LED at your chosen resistor value. This is particularly useful when:

Run the DC operating point analysis and probe the resistor branch -- the current readout gives you the actual LED current with whatever exact supply voltage you specify.

LED Circuit in CircuitDiagramMaker

CircuitDiagramMaker includes LED symbols with configurable Vf values. Draw a single-LED circuit or a full parallel array, set the supply voltage and resistor values, and simulate to confirm current through each LED before building.

Create your own LED circuit diagram -- free

Common LED Failure Modes and How to Diagnose Them

LED problems usually fall into a small number of categories. This table covers the most common symptoms and their usual cause.

Symptom Likely cause
LED doesn't light at all Reversed polarity -- LEDs are diodes and only conduct current in one direction. Also check for a fully open circuit, or a resistor value so high the current is negligible
LED is dim Resistor value too high for the target current, or supply voltage sagging under load
LED burns out immediately or within seconds Missing or undersized resistor -- the single most common LED wiring mistake -- or reverse voltage exceeding the LED's reverse breakdown rating, which for most standard LEDs is only a few volts, far lower than a typical rectifier diode
One LED in a parallel array runs hot and fails while others stay dim Current hogging from a shared resistor (see the Parallel LEDs section above)
LED flickers visibly under PWM control PWM frequency too low. Arduino's default PWM frequency (around 490Hz or 980Hz depending on the pin) is normally fast enough to avoid visible flicker, but very low custom PWM frequencies can cause visible strobing

If an LED fails and you haven't changed the circuit, check the resistor position before assuming the LED itself is bad. A resistor calculated correctly but wired in parallel with the LED instead of in series delivers full supply voltage across the LED and destroys it just as fast as having no resistor at all. Also check that the resistor itself hasn't failed open (a resistor that fails open reads as an LED with no current, which looks identical to a polarity problem until you measure across the resistor).

Practical Build Notes

A few details that don't show up in the resistor math but matter for getting a build to work reliably.

Resistor tolerance: Standard 5% tolerance E24 series resistors are fine for LED current limiting. Precision 1% resistors are unnecessary -- a 5% error in resistor value translates to a small, barely perceptible difference in LED brightness, well within normal part-to-part variation in the LEDs themselves.

Protecting exposed connections: Outside of a breadboard or PCB, cover any exposed LED leads or resistor joints with heat-shrink tubing, or use wire nuts for stranded-wire connections. Bare joints can short against each other, against a metal enclosure, or against other circuitry, especially in anything that moves or vibrates.

Breadboard vs. permanent construction: Breadboards are fine for prototyping and testing resistor values before committing to a design. For a permanent build, move the circuit to a soldered perfboard or PCB. Breadboard contacts are spring-loaded and can develop intermittent connections over time, particularly with vibration, heat cycling, or repeated component swaps -- an intermittent LED in a finished project is often traced back to a breadboard connection that should have been soldered.

Confirming current after building: Component tolerances stack up -- the resistor, the LED's actual Vf, and the supply voltage can each be slightly off from the values used in the calculation. Once the circuit is built, measure actual current with a multimeter in series with the LED (or by measuring voltage across the resistor and applying Ohm's law) to confirm it matches the design target, especially for LEDs run close to their maximum rated current.

Key Takeaways

Led Load Resistor Wiring Diagram — circuit diagram showing component connectionsvccr_outgndgnd+-5V330ΩLEDLED Circuit
Led Load Resistor Wiring Diagram — open the interactive version of this diagram to customise and export it.
Circuit Diagram Of Led — circuit diagram showing component connectionsvccr_outgndgnd+-5V330ΩLEDLED Circuit
Circuit Diagram Of Led — open the interactive version of this diagram to customise and export it.
Led Wiring Diagram — circuit diagram showing component connectionsvccr_outgndgnd+-5V330ΩLEDLED Circuit
Led Wiring Diagram — open the interactive version of this diagram to customise and export it.

Frequently asked questions

What happens if I use a lower-value resistor than the calculation gives?

Using a lower resistor value than calculated increases current through the LED beyond its target. A modest reduction increases brightness at the cost of shorter lifespan; a resistor far too low pushes current past the LED's maximum rating and burns it out quickly, exactly like leaving the resistor out entirely, just slightly slower.

Can I run a white LED directly from a 3V coin cell without a resistor?

Not reliably. A fresh 3V coin cell is close to or below a white LED's forward voltage (3.0-3.5V), so there is little headroom and the LED draws whatever current the cell can supply as it discharges. Some coin-cell LED products get away with it briefly, but it shortens both LED and battery life.

Is it safe to touch an LED circuit while it's powered on?

Low-voltage DC LED circuits, typically 3V to 24V, pose no shock risk to touch. The exception is anything connected to mains voltage to power the supply itself -- keep hands away from the AC side of any transformer, wall adapter, or line-voltage LED driver, and treat that portion like any other mains wiring.

Can I connect an LED directly to AC mains voltage?

No, not directly. AC mains voltage is far higher than any standard LED's forward voltage and alternates direction every half-cycle. Without a rectifier and appropriate current limiting, the LED would draw destructive current on the forward half-cycle and see reverse voltage exceeding its breakdown rating on the other half, destroying it almost immediately.

Can I substitute a different resistor value if I don't have the exact calculated one on hand?

Yes -- round up to the nearest standard value rather than down. A slightly higher resistor value gives slightly less current and a dimmer LED, which is safe. A lower value increases current above the design target and shortens LED life, so when in doubt, choose the next value up.

How can I test if an LED is bad without a multimeter?

Connect the LED briefly to a current-limited source, such as through the resistor you already calculated, and check for light and correct polarity. A multimeter with a diode-test function is the easiest confirmation, but in its absence, swapping in a known-good LED of the same type is a reliable way to isolate the fault.

Interactive diagrams for this guide

Related guides