Back

How Circuits Work

Capacitor Charging and Discharging: The RC Time Constant, Delays, and Afterglow

Chapter 5: Capacitors ·

This page sums up what you play through in ElecLab Chapter 5, "Capacitors", with diagrams and worked numbers. It explains how a capacitor stores charge, the time constant τ = RC that sets how long charging takes, how a circuit can make an LED light late or keep glowing after the switch is off, and why the direction of an electrolytic capacitor matters.

1. A capacitor stores charge

A capacitor stores electric charge between two electrodes. The stored charge Q and the voltage V are related by Q = C × V, where C is the capacitance, measured in farads (F). Chapter 5 uses electrolytic capacitors from 1000 µF to 10000 µF (0.001 to 0.01 F).

An empty capacitor lets current through like a wire at the moment it's connected. As it charges and its voltage rises, the current drops, and when it reaches the battery's voltage the current stops. In the figure, L1 lights at first, then goes out once C1 has charged to 3V.

B15VR1150ΩL118.7 mAC11000µF0.00 V−++−+−
At first (C1 is empty): current flows and L1 lights.
B15VR1150ΩL1C11000µF3.00 V−++−+−
Once C1 holds 3V, the current stops and L1 goes out.

Wiring example from 5-1

2. The charging curve and the time constant τ = RC

Charge an empty capacitor C from a battery of voltage V through a resistor R, and the capacitor's voltage rises like this.

Capacitor voltage = V × (1 − e^(−t ÷ RC))

R × C is called the time constant (τ, tau). With R in Ω and C in F, it's in seconds. Each τ shrinks the remaining gap to about 37% (1/e).

TimeShare of the battery's voltage reached
1τAbout 63%
2τAbout 86%
3τAbout 95%
5τOver 99%

Example: 1 kΩ and 1000 µF give τ = 1000 × 0.001 = 1 s. Charged from a 9V battery, the capacitor reaches about 5.69V after 1 s and about 7.78V after 2 s. Doubling the capacitance, or doubling the resistance, doubles the time to reach the same voltage.

3. Making an LED light late

Put a capacitor right beside an LED (in parallel) and charge it through a resistor, and the LED won't light until the capacitor's voltage reaches the LED's forward voltage (about 2V for red). The current goes into charging the capacitor first. The charging formula gives an estimate of the delay.

Time until it lights ≈ RC × ln(V ÷ (V − LED voltage))

Example: with a 5V battery, 220 Ω, and 2200 µF, τ = 220 × 0.0022 ≈ 0.48 s, and the delay is 0.48 × ln(5 ÷ 3) ≈ 0.25 s. In ElecLab it's about 0.26 s, a little longer because the LED has to reach 5 mA to count as lit. More capacitance or more resistance makes it later.

4. Discharging and afterglow

A charged capacitor can drive current in place of a battery (discharging). Even after the battery is cut off, current flows from the capacitor through the LED, which keeps glowing for a while. As the voltage falls, so does the current, and the LED gradually dims.

C11000µF5.00 VR1150ΩL118.8 mA+−+−
C1, charged to 5V, acts like a battery and lights L1.
C11000µF2.40 VR1150ΩL12.5 mA+−+−
A while later, down to 2.4V, L1 is only dim.

Wiring example from 5-3

The discharge current also falls at a pace set by the resistance of the discharge path times the capacitance (the time constant). For the circuit in the figure (1000 µF charged to 5V, 150 Ω), about (5 − 2) ÷ (150 + 10) ≈ 18.8 mA flows at first, and it drops to about 37% every τ = (150 + 10) × 0.001 = 0.16 s. It falls below 5 mA and turns dim after about 0.21 s. More resistance on the LED's side discharges more slowly and glows longer, but dimmer. Connect the LED straight to the capacitor and only the LED's small internal resistance limits the discharge, so it goes out almost at once.

5. Electrolytic capacitor polarity and voltage rating

Most large capacitors are electrolytic capacitors, which have + and − sides. The − side is marked with a stripe; connect the + side toward the battery's +. Connected backwards, or given more than its voltage rating (16V for the ones in Chapter 5), gas builds up inside and it swells or bursts. In ElecLab, it breaks if it gets more than 1V backwards or more than its rating.

C11000µF+−+ side− side (band)
An electrolytic capacitor has a direction. The side with the band is −.

Wiring example from 5-1

Common misconceptions

After τ = RC seconds, is the capacitor full?
After τ it's at about 63% of the battery's voltage. It passes 99% after about 5τ (5 × RC).
Does a larger capacitor charge to a higher voltage?
The final voltage is set by the battery. Capacitance changes how long it takes to get there, and how much charge is stored.
Can a capacitor replace a battery?
For a short time, yes (that's how afterglow works). But it holds far less charge than a battery, and its voltage keeps dropping as it discharges.
Does a capacitor break if I connect it to a battery with no resistor?
Connecting a capacitor straight across a power supply is a normal technique in real circuits, used to steady the supply voltage (as long as the direction and rating are right). It charges almost instantly. You add a resistor when you want it to charge slowly.
Can an electrolytic capacitor go either way round?
No. Point the striped − side toward the battery's −. Backwards, it breaks.

Try it in the Chapter 5 stages

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

Start with 5-1Choose a Stage