Physics · Simulator 016
Flip a switch to charge a capacitor through a resistor, then flip it back to discharge it. Change the resistance, capacitance and supply voltage, and watch the exponential curves and the time constant τ = RC.
Class 11–12CollegeClass 12 Physics: Electrostatic Potential and Capacitance
When the switch connects the battery, current flows through the resistor and charge builds on the capacitor. As the capacitor voltage rises, the voltage across the resistor falls, so the current drops:
charging: V_C(t) = V₀ (1 − e^(−t/τ)), I(t) = (V₀/R) e^(−t/τ)
discharging: V_C(t) = V_start · e^(−t/τ), I(t) = −(V_start/R) e^(−t/τ)
τ = R·C
After one time constant the capacitor reaches 63.2% of its final voltage when charging, or falls to 36.8% when discharging. After 5τ it is within 1% of the end value. Energy stored is ½CV². While charging from empty, the resistor dissipates exactly as much energy as the capacitor ends up storing, whatever R is.
The simulation integrates dV_C/dt = (V_source − V_C)/(RC) numerically, and you can flip the switch at any moment.
Ideal components: no internal resistance in the battery, no leakage in the capacitor, no wire inductance.
A camera flash charges a 220 µF capacitor to 300 V through a 4.7 kΩ resistor. How long until it is 99% charged? How much energy is then stored?
τ = 4700 × 220×10⁻⁶ ≈ 1.03 s. 99% needs t = τ ln(100) ≈ 4.6τ ≈ 4.8 s. Energy: ½ × 220×10⁻⁶ × 300² ≈ 9.9 J, released in about a millisecond through the flash tube.
Circuit: R = 47 kΩ, C = 220 µF, battery 12 V, capacitor empty at the start.
Time constant: τ = RC = 47 000 × 0.000220 ≈ 10.3 s.
Starting current: I₀ = V₀ / R = 12 / 47 000 ≈ 0.26 mA, falling as the capacitor charges.
After one τ (10.3 s): VC = 12 × (1 − e−1) ≈ 7.6 V. After 5τ (about 52 s): over 11.9 V, within 1% of full.
Energy stored when full: ½CV² = 0.5 × 0.000220 × 12² ≈ 15.8 mJ. The resistor turns another 15.8 mJ into heat on the way, whatever its value.
Set R = 47 kΩ, C = 220 µF and 12 V and read the voltage at 10 s.
τ = R × C, in seconds when R is in ohms and C in farads. After one time constant a charging capacitor reaches 63% of the supply voltage; after five it is practically full.
The capacitor's voltage pushes back against the battery. As it rises, less voltage is left across the resistor, so the current, V/R, gets smaller.
Timers, camera flashes, blinking lights, smoothing power supplies and simple filters that remove high or low frequencies from a signal.