Back

How Circuits Work

How an LED Circuit Works: Closed Loops, Polarity, and Resistor Values (Ohm's Law)

Chapter 1: Your First Circuit ·

This page sums up what you play through in ElecLab Chapter 1, "Your First Circuit", with diagrams and worked numbers. It explains why an LED sometimes won't light even when it's connected to a battery, why an LED needs a resistor, and how to decide the resistor's value, using the same circuit calculation as the game.

1. Current flows only around a complete loop (a closed circuit)

Current leaves the battery's + terminal, passes through the LED and resistor, and returns to the − terminal. A path that goes all the way around like this is called a closed circuit. If the loop is broken in even one place, no current flows anywhere. A missing wire, or a wire whose end doesn't reach a terminal, is the most common reason an LED won't light.

Current doesn't get used up on its way around. In a single loop, the current leaving the battery, the current through the LED, and the current returning to − are all the same. What drops each time it passes an LED or a resistor is the voltage (the push behind the current), not the current.

B12.2VL1−++−long lineshort lineanodecathode
On a battery the long line is +. On an LED the triangle side is + (anode) and the bar side is − (cathode).
B12.2VS1ONL120.0 mA−++−
It lights when the loop is closed (you will use the switch S1 in 1-3).

Wiring example from 1-1

2. An LED has a direction

An LED (light-emitting diode) lets current through in one direction only. In a circuit diagram, the triangle side is + (the anode) and the bar side is − (the cathode). It lights when the anode faces the battery's + side. Connected backwards, no current flows, so it stays dark even though it isn't broken. On a real LED, the longer leg is usually the anode.

An LED also has a voltage at which it starts to light, called its forward voltage. For a red LED it's about 2V, and below that almost no current flows. ElecLab models a red LED as acting like a 10 Ω resistor for any voltage above 2.0V. For example, connected straight to a 2.2V battery, (2.2 − 2.0) ÷ 10 = 0.020 A, or 20 mA, flows.

3. Straight to the battery, it burns out: limit the current with a resistor

What happens if you connect a red LED straight to a 5V battery? The 3V above the 2V where it starts to light is taken up only by the LED's small internal resistance (10 Ω in ElecLab), so the current is (5 − 2) ÷ 10 = 300 mA. A red LED can safely handle only about 25 mA (ElecLab's limit), so that's more than 10 times too much. A real LED would burn out almost instantly.

So you put a resistor in the loop. A resistor makes it harder for current to flow, and it has no direction. A series loop is a single path, so the current is the same whether the resistor is on the LED's + side or its − side.

B15VL1Burned! 300 mA−++−
LED alone: too much current, so it burns out
B15VR11kΩ−+
Resistor alone: only 5V ÷ 1 kΩ = 5 mA flows

Wiring example from 1-2

4. How to choose the resistor (Ohm's law)

The voltage V across a resistor, the current I through it, and its resistance R are related like this. It's called Ohm's law.

Voltage V = resistance R × current I (so I = V ÷ R and R = V ÷ I)

In a single loop with an LED and a resistor, what's left of the battery voltage after the LED takes its share (about 2V for red) is across the resistor. So once you decide the current, the resistor's value follows.

Resistance R = (battery voltage − LED voltage) ÷ the current you want

Example: you want 10 mA through a red LED from a 3V battery (two AA cells). R = (3 − 2) ÷ 0.010 = 100 Ω. In ElecLab the LED's internal 10 Ω adds to that, so the actual current is (3 − 2) ÷ (100 + 10) ≈ 9.1 mA. When you work in mA, writing resistance in kΩ keeps the decimal point in the right place (1V ÷ 1 kΩ = 1 mA).

Brightness depends on the current. Here's the guide for ElecLab's red LED (real LEDs have different ratings, so check the datasheet).

LED currentWhat the LED does
Below 0.1 mAOff
0.1–5 mADim
5–25 mALit (bright from 10 mA)
Above 25 mABurns out

Resistors are sold in fixed series of values such as E12 (100, 120, 150, 180, 220, 270, 330, 390, 470, 560, 680, 820 Ω, and so on). If there's no resistor with exactly the value you calculated, picking the next larger one keeps the current under the limit.

5. A switch breaks or completes the loop

A switch goes somewhere in the loop. When it's OFF the loop is broken and the current stops. When it's ON the loop is complete and current flows. Anywhere in the loop works the same, on the battery's + side or its − side. In ElecLab, press "Run!" to turn on the power first, then press the switch to turn it ON and OFF.

B12.2VL1S1OFF−++−
OFF: the loop is broken, so the LED is dark
B12.2VL120.0 mAS1ON−++−
ON: the loop is closed, so the LED lights

Wiring example from 1-3

Common misconceptions

Does the LED use up the current, so less comes back to −?
No. In a single loop the same current flows everywhere. What drops at each LED or resistor is the voltage, and that energy turns into light or heat. (You measure voltages with a voltmeter in Chapter 4.)
Does the resistor have to go on the LED's + side to work?
Either side works the same. A series loop is a single path, so wherever the resistor is, it lowers the current of the whole loop by the same amount.
If the battery voltage is close to the LED's voltage, can I skip the resistor?
It's risky, because a tiny change in battery voltage changes the current a lot. With ElecLab's red LED, 2.2V gives 20 mA, but 2.5V gives 50 mA and burns it out. A battery's voltage also changes as it's used, so the usual way is to set the current with a resistor.
If the LED doesn't light, is it broken?
First check that the loop goes all the way around and that the LED faces the right way. A backwards LED passes no current, so it stays dark even though it isn't broken. It also won't light if the battery voltage is below the LED's forward voltage.

Try it in the Chapter 1 stages

You can check what you read by actually wiring it up. It runs in your browser with no sign-up.

Start with 1-1Choose a Stage