LED fault

LED not lighting? Check polarity, resistor and pin

A dark LED has only a handful of common causes. Work from power to code, change one thing at a time, and the fault shows itself quickly.

22 November 20266 min read
A simple Arduino LED and resistor circuit on a breadboard used to demonstrate systematic fault finding
Start with the smallest circuit that still shows the problem, then add parts back one at a time.

Build it for real

To build this project for real, get the parts from hobidevre.com → hobidevre.com →

More build guides: hobidevre.com/blog

Start with board power, not the LED

Press reset and watch the small power indicator on the board. If it is dark, the problem is upstream of your LED: a loose USB connector, a charge-only cable that carries no data, or a dead supply. Swap the cable before touching the circuit.

With the board powered, measure between the 5 V and GND headers. You should read close to 5 V. A board that resets when the LED is connected is telling you the supply is already near its limit.

Check LED polarity

An LED conducts in one direction only. The longer leg is the anode and goes toward the positive side; the shorter leg, often with a flat edge on the plastic body, is the cathode and goes toward ground. Reversing it gives a permanently dark LED with no damage.

On a breadboard it is easy to seat the two legs in the same connected row, which shorts them together. Put each leg in a different numbered row so current must pass through the component.

The series resistor is not optional

A standard red LED drops roughly 2 V. On a 5 V board, a 220 Ω resistor in series limits current to about 14 mA, which is bright enough and safe. Without it the LED can burn out in seconds, sometimes visibly, sometimes silently.

Check that the resistor is actually in the current path and that its legs are not touching each other. A resistor lying across the same two rows as the LED does nothing.

Verify the pin in code

The pin number in the sketch must match the wire. Set the pin as an output with pinMode, then drive it HIGH. A pin left as an input cannot source the current needed to light the LED.

Off-by-one errors are common when a project is copied from a guide. Trace the wire with your finger and read the number printed on the board, then compare it with the code rather than trusting memory.

Measure with a multimeter

Set the meter to DC volts and measure across the LED. A healthy, forward-biased red LED reads around 1.8 to 2.2 V. Near 0 V means no current is reaching it; close to the supply voltage means the LED is open or reversed.

If you have a continuity mode, test the LED itself with the circuit powered off. A good LED gives a small reading in one direction and none in the other.

Test the LED in isolation

Build the smallest possible circuit: board 5 V, 220 Ω resistor, LED, and a wire back to GND. If it lights, the LED is fine and the fault is in your larger layout. If it stays dark, try a known-good LED before concluding the part is dead.

The built-in LED on pin 13 is a free diagnostic. If it blinks but your external LED does not, the board and sketch are running and the fault is purely in the external wiring.

When the component really is damaged

A failed LED is usually obvious: a cracked lens, a burnt smell, or a leg that came loose from the solder. A shorted part often gets warm. Replace it only after power, polarity, resistor and pin have all been confirmed good.

Write down what you changed at each step. If the LED suddenly works, the last change is the cause, and knowing it prevents the same mistake in the next build.

Get the parts

If you want to build this project in real life, you can get the parts from hobidevre.com.

Frequently asked questions

Why does my LED light only when I reverse it?

Because polarity was wrong the first time. The longer leg (anode) must face the positive supply and the shorter leg (cathode) must face ground.

Can I skip the resistor for a quick test?

No. A 220 Ω resistor in series limits current to roughly 14 mA on a 5 V board. Without it the LED can burn out in seconds.

Why is my LED very dim instead of dark?

A dim LED usually means too much series resistance, a weak supply, or a pin that cannot source much current. Check the resistor value and measure the rail voltage.

Related reading

Practise in the browser

Open the same layout in the simulator and follow the steps. Sign in to save your work.