Series and parallel LEDs on 5 V, on an Arduino Uno
Two red LEDs in series with one resistor beside two LEDs in parallel, each with its own: the series pair glows dimmer. A multimeter in series with the pair reads the smaller current. The whole build, an Arduino Uno and 8 more parts, runs here in your browser on the firmware below; open it in the editor to change the wiring or the code and run it again.
Teaching? Assign it to your class in one click.
Beginner About 15 minutes to build and run. Runs in your browser. Free, and no account needed.
The parts retail for about $33. On Mokxi they're free.
What you'll learn
- Series circuits share one current
- Parallel branches each get the full voltage
- LED forward voltage and Ohm's law
- Measuring current with a multimeter in series
- Difficulty: Beginner
- Time: About 15 minutes
- Board: Arduino Uno R3
- Parts: 9
How it works
This project compares two ways to wire LEDs on 5 V. Two LEDs in series share one 220 ohm resistor, so one current flows through both. Two LEDs in parallel each have their own resistor, so each gets the full 5 V.
A red LED drops about 1.6 V. In series two of them take 3.2 V, leaving about 1.8 V across the resistor, so the current is only about 8 mA and the LEDs glow dimly. In parallel each branch is as bright as an LED alone.
The sketch only prints two lines and does nothing else. The learning is in the wiring and the multimeter.
Parts list
9 parts, plus the jumper wires and a bench instrument. The parts retail for about $33; on Mokxi they're free, and so are the instruments.
- 1 × Arduino Uno R3In Starter Kit, Claw Machine Kit, Vending Machine Kit.
- 1 × Full-size breadboard
- 3 × Resistor, 220 ΩIn Starter Kit, Claw Machine Kit, Halloween Prop Kit.
- 4 × LED, redIn Starter Kit, Halloween Prop Kit, Logic Lab Kit.
- 1 × Multimeter
Kits that can build it
This starter kit has every part in the circuit. Each kit's page lists what else it can build.
Wiring table
Every connection, pin by pin, read from the circuit itself. Each row joins the pin on the left to the pin on the right, by a jumper wire or a breadboard strip.
| Part and pin | Connects to |
|---|---|
| LED, red (2) pin C | Arduino Uno R3 pin GND |
| LED, red (3) pin C | Arduino Uno R3 pin GND |
| LED, red (4) pin C | Arduino Uno R3 pin GND |
| Resistor, 220 Ω (2) pin 1 | Arduino Uno R3 pin 5V |
| Resistor, 220 Ω (3) pin 1 | Arduino Uno R3 pin 5V |
| Multimeter pin A | Arduino Uno R3 pin 5V |
| Multimeter pin COM | Resistor, 220 Ω (1) pin 1 |
| LED, red (1) pin A | Resistor, 220 Ω (1) pin 2 |
| LED, red (2) pin A | LED, red (1) pin C |
| LED, red (3) pin A | Resistor, 220 Ω (2) pin 2 |
| LED, red (4) pin A | Resistor, 220 Ω (3) pin 2 |
The code
The firmware exactly as the editor opens it. Change a line there and press Run: it compiles in the browser.
// Series and parallel: the same LEDs, wired two ways.
//
// series: 5V -> meter A, COM -> 220 ohm -> LED 1 -> LED 2 -> GND
// parallel: 5V -> 220 ohm -> LED 3 -> GND and 5V -> 220 ohm -> LED 4 -> GND
//
// In series, one current flows through everything, and the 5 V is shared:
// each red LED takes about 1.6 V, which leaves only about 1.8 V for the
// resistor, so the current is small (1.8 V / 220 ohm, about 8 mA, which the
// meter shows) and the two LEDs glow dimly. In parallel each branch gets the
// whole 5 V, so each LED is as bright as it would be on its own.
//
// Turn the meter's dial to V and measure each LED, or move it into a branch
// of the parallel pair to compare the currents.
void setup() {
Serial.begin(9600);
Serial.println("Mokxi Uno: two LEDs in series beside two in parallel");
Serial.println("Compare how bright they are, then read the meter");
}
void loop() {
}
Code walkthrough
The key functions of the sketch, and what each one does.
setup sketch.ino
Starts serial and prints two messages that tell you to compare the brightness and read the meter. It does not control any pin.
void setup() {
Serial.begin(9600);
Serial.println("Mokxi Uno: two LEDs in series beside two in parallel");
Serial.println("Compare how bright they are, then read the meter");
}loop sketch.ino
Is empty. The LEDs are connected straight to 5 V, so they stay on without any code.
void loop() {
}Troubleshooting
The usual mistakes with this circuit, and the fix for each.
- The series pair is dim This project
This is expected. Two LEDs and one resistor leave only about 1.8 V for the resistor. - An LED does not light This project
Check its direction: the anode connects toward the resistor and 5 V, and the cathode toward ground or the next LED. - The LED is dim, burns out, or the pin reads wrong because the resistor value is off. Resistor
Read the color bands again. A 220 ohm to 330 ohm resistor suits a typical LED on 5 V. 10k is a common pull-up or pull-down value. Check with a multimeter if unsure. - A pull-up or pull-down resistor is missing, so the input floats and reads random values. Resistor
Tie the input to 5 V or ground through about 10k. Or use INPUT_PULLUP and wire the switch to ground. - The LED does not light, or it lights once and then dies. LED
LEDs have polarity. The longer leg (anode) goes toward the positive side. Always add a series resistor, about 220 ohms to 1 k ohm on a 5 V pin. - A blue or white LED stays dark on 3.3 V. LED
Blue and white LEDs drop about 3 V, so 3.3 V leaves almost nothing for the resistor. Use a 5 V supply, or a smaller resistor and a red or green LED. - The reading is zero, negative or nonsense when measuring voltage. Multimeter
Set the dial to volts first, then touch the probes across the part, in parallel. Red goes to the more positive point. A negative number just means the probes are swapped. - Measuring current gives zero or blows the meter's fuse. Multimeter
Current must flow through the meter, so break the circuit and put the meter in series. Never put an amps setting straight across a supply. Start with the highest current range.
Change it and keep it
Open it in the editor, change the circuit or the code, and keep your version in a free account.