Your first circuit: light an LED
What you’ll learn
- Why an LED always needs a resistor
- How to calculate that resistor
- How to wire an LED and a push button on a breadboard
Parts
| Part | Qty | Notes |
|---|---|---|
| Breadboard | 1 | Half-size is fine |
| LED (any colour, 5 mm) | 1 | |
| 220 Ω resistor | 1 | Stripes: red-red-brown |
| Push button | 1 | 4-leg tactile switch |
| 4 × AA battery holder (6 V) or 5 V from an Arduino/USB | 1 | |
| Jumper wires | 4–5 |
No parts? Use the simulator in the Try it section below.
LEDs only work one way
LED = Light-Emitting Diode. A diode lets current flow in one direction only.
- Long leg = anode (+), connects towards the + supply
- Short leg = cathode (−), connects towards GND. The rim of the LED also has a flat edge on this side.
Put it in backwards and it simply won’t light (no harm done at these voltages).
Why the resistor?
An LED has almost no resistance once it turns on. Without a resistor, Ohm’s law says current would be huge, and the LED burns out in a flash.
Each LED “uses up” a fixed voltage called its forward voltage (Vf): about 2 V for red/yellow/green and 3 V for blue/white. The resistor takes the rest.
R = (Vsupply − Vf) ÷ ILED
For a red LED on 5 V at 15 mA: R = (5 − 2) ÷ 0.015 = 200 Ω. Round up to the next common value: 220 Ω.
Build it
- Connect the battery/5 V + to the breadboard’s red rail and − to the blue rail. Leave the power off/unplugged.
- Put the LED in rows 10 and 11: long leg in row 10, short leg in row 11.
- Put the 220 Ω resistor from the red + rail to row 10.
- Connect a jumper from row 11 to the blue − rail.
- Connect power. The LED should light. If not, see the table below.
- Now add a button: unplug power, move the resistor so it goes from + rail to row 5, place the button across the centre gap with its legs in rows 5 and 7, and add a jumper from row 7 to row 10 (same side of the gap as the LED). Power on and press: the LED lights only while pressed.
What you should see
The LED glows steadily (step 5), then only while the button is held (step 6).
If it doesn’t work
| Symptom | Likely cause |
|---|---|
| LED never lights | LED backwards; GND not connected; battery flat |
| LED very dim | Resistor too large (check stripes: 220 Ω is red-red-brown) |
| LED flashes once and dies | No resistor, so the LED is burnt out. Replace it and add the resistor! |
| Button does nothing / always on | Button rotated 90°; its legs are connected in pairs. Rotate it. |
Example: a green LED on 3.3 V
Green LED, Vf ≈ 2 V, target 10 mA, supply 3.3 V: R = (3.3 − 2) ÷ 0.01 = 130 Ω. Round up to 150 Ω.
Example: two LEDs from one supply
Give each LED its own resistor and wire the two LED-plus-resistor pairs in parallel. Sharing one resistor between parallel LEDs makes them fight over current, and one ends up brighter or burns out.
Example: reading resistor stripes
| Stripes | Value |
|---|---|
| red, red, brown | 22 × 10 = 220 Ω |
| orange, orange, brown | 33 × 10 = 330 Ω |
| brown, black, red | 10 × 100 = 1 kΩ |
| brown, black, orange | 10 × 1000 = 10 kΩ |
Try it in the simulator
This is the step 6 circuit: 5 V, a push button, a 220 Ω resistor and an LED. Start it, then press and hold the button (top left). Then double-click the resistor and try 100 Ω and 1000 Ω. Watch the LED brightness and the current.
Runs on Falstad Circuit Simulator, free, no account needed.
Brighter or dimmer?Easy
In the simulator, change the resistor to 1000 Ω and press the button. What changes? The LED is dimmer and the current drops to about 3 mA.
Blue LED on 9 VMedium
Pick a resistor for a blue LED (Vf ≈ 3 V) on 9 V at 15 mA. (9 − 3) ÷ 0.015 = 400 Ω, so use 470 Ω.
Two LEDs in seriesHard
Two red LEDs in series on 9 V at 15 mA. What resistor? Both forward voltages come off the supply first. (9 − 2 − 2) ÷ 0.015 ≈ 333 Ω, so use 390 Ω (round up to be safe).
Quick check
Finished this lesson?