Every LED needs a resistor in series with it — leave it out and you’ll burn out the LED, and possibly stress your Arduino pin. But which value? Here’s the simple answer and the reasoning behind it.
Why an LED needs a resistor at all
An LED has very little resistance of its own, so if you connect it straight across 5V it pulls far too much current and burns out — often instantly. The resistor limits that current to a safe level. This is not optional; it’s the single most important rule with LEDs.
The safe default
For a typical 5mm LED on a 5V Arduino pin, use 220Ω for a bright LED or 330Ω for a slightly dimmer, very safe one. Both are fine — keep a pack of each and you’ll rarely need anything else.
The formula, if you want exact
Ohm’s law gives the precise value:
R = (Vsupply − VLED) Γ· ILED
Where VLED is the LED’s forward voltage (about 2V for red/yellow, 3V for blue/white) and ILED is a safe current (0.01–0.02 A). For a red LED on 5V at 15 mA: (5 − 2) Γ· 0.015 = 200Ω — so the nearest common value, 220Ω, is perfect.
LED colour changes the maths a little
| LED colour | Approx. forward voltage | Good resistor on 5V |
|---|---|---|
| Red / Yellow | ~2.0 V | 220Ω |
| Green | ~2.2 V | 220Ω |
| Blue / White | ~3.0 V | 150–220Ω |
Blue and white LEDs use more of the supply voltage, so they can take a slightly smaller resistor — but 220Ω is safe for all of them.
What if the resistor is wrong?
- Too small (or none): too much current — the LED burns out and the pin is stressed.
- Too large: perfectly safe, just dimmer. When in doubt, go higher.
So if you’re unsure, err on the larger side — a dim LED is a fixable annoyance; a burnt one is done.
Frequently asked questions
Can I use one resistor for several LEDs?
Give each LED its own resistor for even, reliable brightness. Sharing one causes uneven results.
Does it matter which leg the resistor goes on?
No — in series, the resistor works on either the positive or negative leg.
What’s a safe all-round value?
330Ω. It’s safe for any 5mm LED on 5V, just slightly dimmer than 220Ω.
Related guides
Get LEDs and resistors
Grab 5mm LEDs and resistors from our components range, or the Starter Kit which includes both. Visit us at Shaheen Market, DAV College Road, Rawalpindi or order online with COD.