From ideas to your own hands
You now know what current, voltage and resistance are, and how they are linked by Ohm's law. There is nothing like building a real circuit to make those ideas solid: seeing an LED light because you closed the loop, and measuring a current you predicted.
Engineers love building things, and they are also careful people. Electricity from the wrong source can kill, and even small batteries can get hot enough to burn if they are short-circuited. So this lesson starts with safety, then shows you a breadboard, how to light an LED properly, how to use a multimeter, and a first project to build.
What is safe, and what never is
Safe to build with
- AA and AAA batteries (1.5 V each) in a battery holder. Two in series give 3 V, three give 4.5 V.
- A 9 V battery with a snap-on connector.
- A USB power bank or USB port, used as designed: through a ready-made USB breadboard power module or the USB cable of a microcontroller board, never by cutting a cable open. These give 5 V.
- A current-limited bench power supply, used with a teacher or another adult. You can set the most current it will ever deliver, say 50 mA, so a mistake just makes it stop instead of making something hot.
- Coin cells such as the CR2032 (3 V), with one important warning: keep them, and any project that uses them, away from small children, because a swallowed button battery can cause serious internal burns within hours.
Why are these safe for your body? Dry skin has a high resistance, often tens of thousands of ohms or more. By Ohm's law, 9 V across 10 000 Ω drives only 0.9 mA, too little to feel. Safety standards call voltages this low extra-low voltage for that reason. Wet skin conducts far better, which is one more reason to keep your hands and your workbench dry.
Never
- Mains electricity. Never touch, open or experiment with sockets, plugs, mains cables or anything plugged into them. Mains is 100 to 240 V, depending on the country, and it can kill. Mains wiring is work for qualified electricians.
- Never open chargers, power supplies, televisions, microwave ovens or other appliances. Some of their parts can stay charged to dangerous voltages long after they are unplugged.
- Damaged lithium batteries. Never use, charge, puncture or take apart a swollen, dented or punctured lithium battery. Take it to a battery collection point.
- Big batteries. Never experiment with car, e-bike or scooter batteries: they can deliver hundreds of amperes into a short circuit, enough to melt metal and start fires.
Note
Professionals who work on mains or high-power equipment train for years and follow strict procedures: they switch off and lock the supply before working, and test that it really is dead. Their meters carry a "CAT" safety rating that says which circuits they may be connected to; a cheap hobby multimeter may have no such rating at all, which is one more reason never to use it on mains. Industrial machines are guarded and certified to safety standards for the same reason: electricity and moving machinery forgive no mistakes.
The breadboard
A breadboard lets you build circuits by pushing the legs of components and the ends of wires into holes, with no soldering. Underneath the holes are strips of springy metal that grip the legs and connect certain holes together. (The name comes from early radio builders, who nailed their circuits onto real wooden bread boards.)
Definition— breadboard
A breadboard is a plastic board with rows of holes connected underneath in a fixed pattern:
- In the main area, each short line of five holes is joined together. A gap runs down the middle of the board, and the lines on either side of it are not joined to each other.
- Along the edges run the power rails, long lines marked + and −, each joined along its length. They carry the battery's connections to wherever you need them.
Lighting an LED properly
An LED (light-emitting diode) lets current through in one direction only. Its longer leg, the anode, goes towards the + side of the battery; the shorter leg, the cathode, goes towards −, and the rim of the LED is usually flattened on the cathode side. Put it in backwards and it simply stays dark; with its resistor in place, no harm is done at these low voltages.
An LED needs a certain voltage across it before it lights, its forward voltage: about 2 V for a red LED and about 3 V for a white or blue one. Above that, its current shoots up very steeply with only a little more voltage. Connected straight to a battery, it would draw far too much current and burn out within moments. So an LED always needs a series resistor to limit the current. Many small LEDs are bright enough at 5 to 10 mA and should not have more than about 20 mA.
To choose the resistor, use Ohm's law on the resistor alone. The voltage left over for it is the supply voltage minus the LED's forward voltage:
Example— A red LED at 10 mA, from three different supplies
Take a red LED (about 2 V) and aim for 10 mA, which is 0.010 A.
- 3 V (two AA cells): .
- 5 V (USB): .
- 9 V (a 9 V battery): .
But you can't buy a 300 Ω or 700 Ω resistor in most shops. Resistors come in standard series of values, set out in an international standard (IEC 60063). The common E12 series has twelve values in every factor of ten:
10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82, then 100, 120, 150 and so on.
Each value is about 1.21 times the one before, so the gaps are evenly spread. When the exact value isn't available, choose the next value up: a slightly bigger resistor means a slightly smaller current, which is the safe direction. So 300 Ω becomes 330 Ω and 700 Ω becomes 820 Ω.
Resistors show their value with coloured bands. Each colour is a digit: black 0, brown 1, red 2, orange 3, yellow 4, green 5, blue 6, violet 7, grey 8, white 9. On a four-band resistor the first two bands are digits, the third says how many zeros follow, and the fourth (often gold) gives the accuracy. So orange-orange-brown is 3, 3 and one zero: 330 Ω; brown-black-brown is 100 Ω; grey-red-brown is 820 Ω. If you are not sure, measure it with a multimeter.
A resistor-choosing helper
This program does the whole job: for each supply and each LED colour it works out the exact resistance, picks the next E12 value up, and checks the real current and the heat in the resistor. Press Run, then try your own LED's forward voltage or a different target current.
# Choose the series resistor for an LED from the standard E12 values
E12 = [10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82]
def e12_at_least(ohms):
"""The smallest E12 resistor (10 ohms or more) with at least this resistance."""
multiplier = 1
while True:
for base in E12:
if base * multiplier >= ohms:
return base * multiplier
multiplier *= 10
target_mA = 10 # aim for 10 mA through the LED
leds = [("red", 2.0), ("white", 3.0)] # typical forward voltages
supplies = [3.0, 5.0, 9.0]
print("supply LED exact R choose current resistor power")
for supply in supplies:
for colour, v_led in leds:
spare = supply - v_led # volts left over for the resistor
if spare <= 0.5:
print(f"{supply:>4.0f} V {colour:<5} supply too low: use a higher voltage")
continue
exact = spare * 1000 / target_mA # Ohm's law: R = V / I
r = e12_at_least(exact)
current_mA = spare / r * 1000
power_mW = spare * spare / r * 1000 # P = V x I = V x V / R
print(f"{supply:>4.0f} V {colour:<5} {exact:>6.0f} Ω {r:>5} Ω "
f"{current_mA:>5.1f} mA {power_mW:>8.0f} mW")Why does the program refuse to light a white LED from 3 V? A white LED needs about 3 V for itself, leaving almost nothing for the resistor. With so little spare voltage, a small difference between one LED and another, or a battery running down from 3.2 V to 2.8 V, would change the current enormously. Engineers give the resistor at least a volt or so to work with, or use a special circuit that controls the current directly.
Measuring with a multimeter
A multimeter is the electrical engineer's most-used tool: one instrument that measures voltage, current and resistance, chosen with a dial. It has two leads: the black one always goes into the socket marked COM (common); the red one goes into the socket for what you are measuring, usually one marked V Ω for volts and ohms and another marked mA or A for current.
Voltage: across
Set the dial to DC volts (marked V with a straight line, often V⎓), with the red lead in the V Ω socket. With the circuit switched on, touch the two probes to the two ends of whatever you want to measure: the meter goes across the component, in parallel. A fresh 9 V battery usually reads a little over 9 V; in the circuit above you would find about 2 V across the LED and about 7 V across the resistor.
Current: through
To measure current, the current must flow through the meter. Switch off, break the loop at one point, and connect the meter into the gap, in series. Move the red lead to the mA socket and set the dial to DC milliamperes. Switch on and read the current: about 8.5 mA in our circuit.
Resistance: with the power off
Set the dial to Ω and touch the probes to the two ends of a resistor that is not in a powered circuit: the meter sends its own small current through it. Measuring with the power on gives wrong readings and can damage the meter. The continuity setting, often shown with a sound-wave symbol, beeps when there is an almost-zero-resistance path, which is handy for checking wires and breadboard rails.
The classic mistake
In current mode, the meter is designed to have almost no resistance, so that it doesn't disturb the circuit it is measuring. Now imagine you finish measuring a current, leave the red lead in the mA socket, and then touch the probes across a battery to check its voltage. The meter is now a near short circuit across the battery. A large current rushes through it and blows the small fuse inside the meter (if it has one), and may damage the meter and heat the battery.
The rule: current is measured in series, never across a supply. And as soon as you finish measuring a current, move the red lead back to the V Ω socket.
Simulate first, then build
Before building, try your circuit in a free simulator. Nothing can burn out, and you can see voltages and currents everywhere at once:
- Falstad's CircuitJS runs in the browser and shows the current as moving dots; it is open source and needs no account.
- Tinkercad Circuits, from Autodesk, has a virtual breadboard, batteries, LEDs and a multimeter that you use just like the real ones.
- PhET's Circuit Construction Kit, from the University of Colorado Boulder, is simple and colourful, and works in many languages.
Professional engineers do the same with SPICE simulators, as you saw in Circuits and Ohm's law.
Example— A first project: a push-button torch
You need: a breadboard, a holder for two AA cells (3 V), a red LED, a 100 Ω resistor (brown-black-brown), a small push button, a few jumper wires and a multimeter.
- Build it in a simulator first, and check that the LED lights only while the button is pressed.
- With the batteries out of the holder, connect the holder's red wire to the + rail and its black wire to the − rail.
- Place the push button across the centre gap. Join one side of it to the + rail with a jumper wire.
- Connect the 100 Ω resistor from the other side of the button to a free column. Put the LED's long leg in that same column and its short leg in another column, and join that column to the − rail.
- Check every connection against your simulation, then put the batteries in. Press the button: the LED should light.
- Measure: the battery voltage, the voltage across the LED and across the resistor (do they add up?), and the current (break the loop at the LED's short leg and put the meter in series). Compare with Ohm's law.
- Next challenge: add a second LED, with its own resistor, in parallel with the first. Predict the battery current before you measure it.
When you can do this, you are ready for a microcontroller board such as an Arduino, a Raspberry Pi Pico or a BBC micro:bit, which can switch LEDs on and off under the control of a program. Here is a taste, in the Arduino language; it needs a real board (or a simulator such as Wokwi), so it is not run here:
// Blink an LED on pin 13: Arduino sketch, not run here (it needs a board).
void setup() {
pinMode(13, OUTPUT); // make pin 13 an output
}
void loop() {
digitalWrite(13, HIGH); // 5 V on pin 13: LED on
delay(500); // wait 500 milliseconds
digitalWrite(13, LOW); // 0 V: LED off
delay(500);
}You will learn how such boards work in Microcontrollers.
Common misconceptions
Misconception
"Low voltage means nothing can go wrong." Low voltage protects your body, but batteries can still deliver large currents into a short circuit, which heat wires and batteries. Lithium batteries can catch fire.
Misconception
"An LED works without a resistor if the battery is small." With AA cells, USB or a 9 V battery, an LED without a resistor draws far too much current and is quickly damaged. (A single coin cell is a special case: its own internal resistance is high enough to limit the current, which is why LED-and-coin-cell keyrings work.)
Misconception
"To measure current, touch the probes to both ends of the battery." That puts the meter, in its low-resistance current mode, straight across the battery: a short circuit. Current is measured in series, by breaking the loop.
Misconception
"A bigger resistor than calculated will stop the LED working." A slightly bigger resistor just makes the LED a little dimmer. Choosing the next standard value up is the safe choice.
Exercises
These exercises cover safety, breadboards, choosing resistors and using a multimeter. One asks you to write a small Python function.
1. Building and measuring circuits safely
Warm-upHumanAna wants to power her first LED circuits. Which of these are safe choices? Choose all that apply.
2. Building and measuring circuits safely
CoreHumanRavi powers a red LED (forward voltage 2 V) from four AA cells in series (6 V). He wants a current of 10 mA. What exact resistance, in ohms, does Ohm's law give for the series resistor?
3. Building and measuring circuits safely
CoreHumanRavi's calculation gave 400 Ω, which isn't a standard value. Near 400 Ω, the E12 series has 330 Ω, 390 Ω and 470 Ω. Following the lesson's rule, which should he use?
4. Building and measuring circuits safely
CoreHumanA resistor's bands are yellow, violet, brown, gold. Using the colour code (black 0, brown 1, red 2, orange 3, yellow 4, green 5, blue 6, violet 7, grey 8, white 9), what is its resistance in ohms?
5. Building and measuring circuits safely
Warm-upHumanOn a breadboard, Ama puts one leg of a resistor in a hole in the main area. Which other holes are now connected to that leg?
6. Building and measuring circuits safely
CoreHumanDaniel has just measured a current, so his meter's red lead is still in the mA socket. Without changing anything, he touches the probes to the two terminals of a 9 V battery to check its voltage. What happens?
7. Building and measuring circuits safely
CoreHumanIn an LED circuit with a series resistor, Fatima measures 9.0 V across the battery and 2.0 V across the LED. What voltage, in volts, does she expect to measure across the resistor?
8. Building and measuring circuits safely
CoreComputationalComplete the function led_resistor(supply, v_led, current_mA) so that it returns the exact series resistance, in ohms, for an LED with forward voltage v_led (volts), on a supply of supply volts, at a current of current_mA milliamperes.
For example, led_resistor(5, 2, 10) should give 300.0.
Further reading and resources
- Falstad Circuit Simulator (CircuitJS) · Paul Falstad and contributorsA free circuit simulator that runs in the browser and animates the current as moving dots. Open source.
- Tinkercad Circuits · AutodeskA free online virtual breadboard with batteries, LEDs, multimeters and microcontroller boards. Needs a free account.
- Circuit Construction Kit: DC (interactive simulation) · PhET Interactive Simulations, University of Colorado BoulderBuild circuits from batteries, bulbs and resistors and measure them with a virtual voltmeter and ammeter.
- WokwiA free online simulator for microcontroller boards (Arduino, ESP32, Raspberry Pi Pico) with LEDs, buttons and sensors, for when you are ready for the next step.