Charging and discharging a capacitor – measuring the RC time constant
PhysicsElectricity & CircuitsAges 16–17Virtual lab
Use it with your class: students open it from a link or a QR code, with no account needed.
A virtual lab circuit with a source of EMF E, a resistor R, a capacitor C and a two-way switch K: move K to 1 to charge the capacitor and to 2 to discharge it through R. A voltmeter reads u_C, the u_C(t) graph is plotted live, and the moment u reaches the 63% level is marked automatically so τ can be measured and compared with τ = RC. A data table records t, u_C, i, the charge q = Cu and the stored energy W = Cu²/2. A second tab plots ln V against t: the gradient −1/RC gives the time constant, compared with the 63% method.
Lesson: Capacitors, capacitance and stored energy; charging and discharging through a resistor
What it shows
A capacitor does not charge instantly: the current through the resistor is largest the moment the switch closes and falls as charge builds up on the plates. When charging from zero, the voltage follows u = E(1 − e^(−t/τ)); when discharging, u = u₀e^(−t/τ). The time constant τ = RC sets the pace: after one τ the capacitor reaches 63% of E on charging, or falls to 37% of its starting voltage on discharging. The stored energy W = Cu²/2 is supplied by the source and, on discharge, dissipated as heat in the resistor. Because ln V = ln V₀ − t/RC, a graph of ln V against t is a straight line whose gradient gives τ from all the readings instead of one.
How to use
With the default Source EMF 6 V, Resistance 10 kΩ and Capacitance 470 μF, τ = 4.7 s. Press Charge (K → 1) and watch the current dots slow down as the voltmeter reading approaches E; the moment u_C reaches 63% is marked on the graph and entered in the table. Then press Discharge (K → 2). Use Record reading for extra points and a faster Speed when R and C are large. Double R or C and compare the measured τ. On the ln V graph tab, press Discharge and log, then Fit line, and compare the two methods in the table.
Parameters you can change
- Source EMF 1–12 V
- Resistance 1–100 kΩ
- Capacitance 100–2200 μF
- Show theoretical curve and τ = RC mark
- Screen Charge and discharge, ln V graph
- Readings Few, Normal, Many
- Fit only readings above 0–1 V
Questions to explore
- What happens to the measured time constant when you double R, and when you double C?
- Why is the current largest just after the switch is moved and then falls towards zero?
- How much energy is stored when the capacitor is fully charged, and where does it go during discharge?
- Why do the readings at small V scatter most on the ln V graph, and what happens to τ if you change the cut-off?