Safety first
Everything on this page is a simulation, so nothing here can hurt you. If you want to try real circuits later, follow these rules and ask an adult first.
Do
- Use small batteries, like AA cells or a 9 V battery.
- Work with an adult nearby, on a dry table.
- Always put a resistor in series with an LED.
- Unplug the battery before you change a circuit.
Never
- Never touch wall outlets, plugs, or anything plugged in. Wall power can seriously hurt or kill.
- Never open chargers, TVs, or other devices that plug in.
- Never connect the two ends of a battery with a wire.
- Never use laptop or phone batteries for experiments.
Voltage, current, and resistance
An electric circuit is a closed loop that electricity can travel around. A battery, some wires, and a light make a circuit. Three measurements describe what is going on in it.
Voltage
measured in volts (V)
The "push" a battery gives the electricity. More volts means a stronger push.
Pipe version: water pressure.
Current
measured in amps (A)
How much electric charge flows past a point each second. More amps means more flow.
Pipe version: how much water moves per second.
Resistance
measured in ohms (Ω)
How hard it is for current to get through a part. More ohms means less flow.
Pipe version: how narrow the pipe is.
Why does the letter I stand for current? It comes from the French word intensité. Scientists kept the letter, so we still use it.
Move the sliders. The pump pushes water around a loop of pipe. The battery pushes charge around a loop of wire. The dots move faster when the flow is bigger.
Where the pipe picture breaks down: wires do not leak, so the current that leaves the battery is the same current that comes back. Resistance is not only "narrowness." It also depends on the material, the length, and the temperature. And electric signals travel very fast along a wire, even though the charges themselves drift slowly. Use the pipe picture to get started, not as the whole story.
The units, quick reference
- Volt (V)
- Named for Alessandro Volta, who built an early battery.
- Amp (A)
- Short for ampere, after André-Marie Ampère. Small currents use milliamps: 1 A = 1000 mA.
- Ohm (Ω)
- Named for Georg Ohm. 1 kΩ = 1000 Ω.
- Watt (W)
- How fast energy is used. Named for James Watt. We meet it in the power section.
Ohm's law: V = I × R
In 1827, Georg Ohm showed that for many materials, voltage, current, and resistance fit one simple rule:
voltage = current × resistance, or V = I × R
You can rearrange it. If you know two of the three numbers, you can find the third. Try the triangle: tap a letter to cover it, and the formula for that letter appears.
V = I × R
Example: 6 V, 2 A, 3 Ω
Tap V, I, or R to cover it. What is left shows how to find it.
Ohm's law calculator
Pick what you want to find. Then slide the other two. The calculator does the math and shows its work.
Ohm's law works well for simple parts like resistors. Some parts, such as LEDs, do not follow a straight V = I × R line, which is why the next section needs a resistor.
LED circuit lab
An LED (light-emitting diode) is a tiny light that uses very little power. It has two special features in this lab. It needs about 2 volts to start working. And once it is on, it lets almost any amount of current through, so it can burn itself out. This lab's LED has a maximum of 20 mA. Real LEDs vary, so check the datasheet for a real part.
A resistor in series with the LED fixes this. Series means the parts sit one after another on the same path. The resistor soaks up the extra volts and sets the current: I = (Vsource − VLED) ÷ R.
Ammeter · current
0mA
limit 20 mA
Voltmeter · across LED
0V
Across resistor
0V
V = I × R
Brightness
0%
of this LED's max
Where do the battery's volts go?
Ask the calculator for the right resistor
Choose how much current you want. The calculator uses your battery voltage above.
Try this: set the battery to 9 V and pick 330 Ω. The lab predicts about 21 mA, which is over the 20 mA limit, so the LED burns out. Notice the voltmeter afterward: with the LED broken, no current flows, so the whole battery voltage sits across the gap. Then ask the calculator for a safe resistor and replace the LED.
The lab treats the LED as a part that drops exactly 2.0 V once it is on. Real LEDs shift a little with color, current, and temperature, and real LEDs often survive small overloads for a short time. The lab is strict on purpose so the rule is easy to see.
Series vs parallel
With two bulbs, you have two basic choices. In a series circuit the bulbs share one path, one after the other. In a parallel circuit each bulb gets its own path back to the battery.
Total resistance
40Ω
Current from the battery
0.15A
Bulb A
On- Voltage
- 0 V
- Current
- 0 A
- Power
- 0 W
Bulb B
On- Voltage
- 0 V
- Current
- 0 A
- Power
- 0 W
Brightness here means each bulb's share of its full brightness at 6 V, based on the volts across it. Real bulb filaments change resistance as they heat up, so real numbers differ a little.
Series
- One path, so the same current goes through every part.
- Resistances add: Rtotal = R1 + R2.
- The battery's volts are shared between the parts.
- One break stops everything.
Parallel
- Each part has its own path and gets the full voltage.
- Currents add up. Total resistance goes down: 1/Rtotal = 1/R1 + 1/R2.
- Two equal resistors in parallel act like one half the size.
- If one path breaks, the others keep working.
Road trip picture: adding a second road for cars makes it easier for traffic to flow, so the total resistance falls. That is why homes use parallel wiring. Each light and outlet gets the full voltage, and turning one off does not turn off the rest.
Fix the circuit
Four circuits have problems. Use Ohm's law to work out what is wrong, then fix each one.
The LED is too dim
Not yetA 5 V battery, a 10 kΩ resistor, and an LED. The LED barely glows. Pick a resistor so the current is between 5 mA and 20 mA.
Need a hint?
Rearrange Ohm's law: R = (5 V − 2 V) ÷ I. For 10 mA, that is 3 ÷ 0.010 = 300 Ω. Pick a value near that.
The LED burns out
Not yetYou only have a 100 Ω resistor. A 9 V battery burns out the LED. Change the battery so the LED is bright and safe, between 3 mA and 20 mA.
Need a hint?
The resistor can only take so many volts before the current passes 20 mA. At 100 Ω, 20 mA uses 2 V in the resistor, so the battery can be at most 2 V + 2 V = 4 V.
Short circuit warning
DangerThe lamp is dark and the battery is getting hot. One wire does not belong. Select it.
Need a hint?
Electricity takes the easiest path. Look for a wire that gives it a way home without going through the lamp.
The lamp will not light
Not yetThe battery is fresh, the switch is on, and the lamp is fine. But nothing happens. Select where the problem is.
Need a hint?
Current needs a complete loop. Look for a place where the path is broken, even by a tiny gap.
Power, heat, and fuses
Power tells you how fast energy is being used. It is measured in watts (W). For electricity: P = V × I. A 6 V battery pushing 0.5 A is delivering 6 × 0.5 = 3 W.
Put Ohm's law inside that and you get P = I² × R. Look at the little 2. If you double the current, you get four times the heat. That is why wires and resistors get warm: all wires and parts have some resistance, and the energy that gets used up turns into heat.
A resistor's watt rating is how much heat it can shed safely. A common small resistor is rated about 1/4 W. Go past the rating and it can scorch, smoke, or fail. The numbers here are simplified.
Short circuits and fuses
A short circuit happens when electricity finds a path with almost no resistance. Ohm's law says I = V ÷ R. If R is nearly zero, I gets enormous. The heat grows with the square of that current, so wires, batteries, and the parts around them can get dangerously hot in seconds.
A fuse is a safety part built to fail first. It has a thin strip of metal that melts when the current goes over its rating, which opens the circuit and stops the flow. Circuit breakers do the same job and can be reset.
In real life a battery's own internal resistance limits how big a short-circuit current gets, but it can still be far above what thin wires can safely carry. Never short a real battery to test this.
How code turns on an LED
A microcontroller is a tiny computer on one chip. It has pins: metal legs you can switch on and off from code. When a pin is set HIGH, it holds a voltage, often 5 V or 3.3 V depending on the board. When it is LOW, it sits at 0 V.
That is just a battery you can switch with a line of code. Ohm's law still applies, so the LED still needs its resistor.
const int ledPin = 13; // LED pin void setup() { pinMode(ledPin, OUTPUT); } void loop() { digitalWrite(ledPin, HIGH); // pin = 5 V delay(500); digitalWrite(ledPin, LOW); // pin = 0 V delay(500); }
Pins can supply only a small current, often around 20 mA, so check your board's datasheet. Bigger loads like motors need extra parts. Look how robots use pins to read sensors and drive motors.
The on/off idea is the same one behind binary numbers: high voltage for 1, low voltage for 0. Inside chips, billions of tiny switches combine into logic circuits. See a taste of that in Quantum Gates and Circuits, which starts from ordinary logic gates.
Common questions
What is Ohm's law?
Voltage equals current times resistance: V = I × R. Voltage is in volts, current in amps, and resistance in ohms. If you know two of them, you can find the third.
Why does an LED need a resistor?
An LED drops only about 2 volts and has very little resistance once it turns on, so almost nothing limits the current. Too much current can burn it out. A resistor in series takes up the extra voltage and sets the current. Use R = (source voltage − LED voltage) ÷ the current you want.
What is the difference between a series and a parallel circuit?
In series, the parts share one path, so the same current flows through each one and one break stops everything. In parallel, each part has its own path, so each gets the full source voltage and the others keep working if one is removed.
What is a short circuit and why is it dangerous?
A short circuit is a path with almost no resistance between the two sides of a power source. By Ohm's law, tiny resistance lets a huge current flow. That can overheat wires and batteries and can start a fire. Fuses and circuit breakers are built to cut the current off.
Does current really flow from plus to minus?
By convention, diagrams show current flowing from the positive side of a battery to the negative side. In metal wires the moving charges are electrons, and they actually drift the other way. The math works the same either way, so the convention stuck. The dots in this page's diagrams follow the convention.
Is it safe to try circuits at home?
Small battery circuits, such as AA batteries with an LED and a resistor, are generally safe, and you should ask an adult first. Never experiment with wall outlets, plugs, chargers, or anything connected to mains power, because that voltage can seriously hurt you. Do not short-circuit batteries.
Quick quiz
1. A 12 V battery is connected across a 4 Ω resistor. How much current flows?
2. Two bulbs are wired in series. You unscrew one. What happens to the other?
3. Why do you put a resistor in series with an LED?
Keep learning
You can now predict what a simple circuit will do with a bit of arithmetic. Next, see how robots use circuits to sense and move, explore the on and off idea behind computers, or take a full CodeHS course.
Voltages and limits on this page are simplified for learning. Always follow the datasheet and an adult's guidance for real parts.