Your first LED circuit
8 min read
An LED needs a resistor in series. Without it, too much current flows and the LED burns out in seconds.
Find the resistor value
R = (Vsupply − Vled) ÷ I
For a red LED (about 2 V) on 5 V at 15 mA: (5 − 2) ÷ 0.015 = 200 Ω. Pick the next bigger standard value, 220 Ω.
Build it
- Long leg of the LED (+) goes to the resistor.
- The resistor goes to Arduino pin D13.
- Short leg of the LED (−) goes to GND.
- Upload the Blink example. The LED flashes once a second.
Try the LED resistor calculator in Tools to check other colours.
Quick quiz
1. Why does an LED need a resistor?
2. Why does a relay switch the 12V valve instead of an Arduino pin?
Score: 0 / 2