Sub topic 4
Discharging a Capacitor Through a Resistor
This chapter assumes you know Ohm's law, KVL and KCL, series and parallel resistors, basic calculus, and what a first-order linear differential equation looks like. It covers the source-free (natural) response of an RC circuit: a charged capacitor connected to a resistor with no source in the loop.
The circuit and the question
Take a capacitor C that holds an initial voltage V0 at time t = 0. A resistor R is then connected across it, for example by a switch closing. Nothing else drives the loop. The question is how the capacitor voltage v(t) changes for t ≥ 0.
The energy stored in the capacitor is the only source of current. The resistor converts that energy to heat. As the voltage falls, the current falls with it, so the discharge slows as it proceeds.
Deriving the equation
Define v(t) as the capacitor voltage, with the + sign on the plate where the current leaves. Define i(t) as the current flowing out of that plate through the resistor.
The passive sign convention for the capacitor needs care. If i is defined as flowing out of the + terminal, the current into the capacitor's + terminal is -i. The capacitor relation i_in = C dv/dt becomes:
-i = C dv/dt
Ohm's law for the resistor, with current i flowing from the + side through R, gives:
v = iR
Substitute i = v/R into the capacitor relation:
-v/R = C dv/dt
Rearrange:
dv/dt + v/(RC) = 0
You can also reach this by KCL at the top node. The current leaving the node through the resistor, v/R, must equal the current supplied by the capacitor, -C dv/dt. Both routes give the same equation.
This is a first-order, linear, homogeneous equation with constant coefficients. "Homogeneous" means there is no forcing term on the right side, because there is no source.
Solving by separation of variables
Move the terms so each variable sits on one side:
dv/v = -dt/(RC)
Integrate from the initial condition (t = 0, v = V0) to a general point (t, v):
ln(v) - ln(V0) = -t/(RC)
So:
v(t) = V0 e^(-t/(RC)), for t ≥ 0
The product RC has units of seconds (ohms times farads). It is called the time constant, tau:
tau = RC
The solution is then v(t) = V0 e^(-t/tau).
You can check this by substitution. The derivative is dv/dt = -(V0/tau) e^(-t/tau) = -v/tau, which satisfies dv/dt + v/tau = 0. At t = 0 the exponential is 1, so v(0) = V0, matching the initial condition.
Current and resistor quantities
Once v(t) is known, everything else follows from it:
- Current: i(t) = v/R = (V0/R) e^(-t/tau)
- Resistor voltage: v_R(t) = v(t), since the two elements are in parallel (a single loop with two elements)
- Resistor power: p(t) = v²/R = (V0²/R) e^(-2t/tau)
Unlike the capacitor voltage, the current is not continuous at t = 0. Before the switch closes, i = 0. At t = 0+, i jumps to V0/R. Only the capacitor voltage is forced to be continuous.
Reading the curve
The following table shows v(t)/V0 at whole multiples of tau.
| Time | v(t)/V0 | Fraction of initial voltage lost |
|---|---|---|
| 0 | 1.000 | 0% |
| 1 tau | 0.368 | 63.2% |
| 2 tau | 0.135 | 86.5% |
| 3 tau | 0.050 | 95.0% |
| 4 tau | 0.018 | 98.2% |
| 5 tau | 0.0067 | 99.3% |
Three facts are worth remembering.
- After one tau, the voltage is at 36.8% of its initial value (e^-1).
- After five tau, less than 1% remains. Engineers often treat the capacitor as fully discharged by then.
- The curve never reaches exactly zero in finite time. "Fully discharged" is a practical judgment, not a mathematical statement.
The tangent property
The initial slope is dv/dt at t = 0, which equals -V0/tau. A straight line starting at V0 with this slope would reach zero at exactly t = tau. So the time constant is the time the capacitor would need to discharge if the initial discharge rate were maintained. The real curve is slower after the start, because the current shrinks as the voltage falls.
This gives a quick graphical method. Draw the tangent to a measured decay curve at t = 0. Where the tangent crosses the time axis is tau.
A worked example
A 100 µF capacitor is charged to 12 V. It is then connected across a 4.7 kΩ resistor at t = 0. Find the voltage and current at t = 0.3 s and the time for the voltage to fall to 1 V.
- Time constant: tau = 4700 × 100×10^-6 = 0.47 s.
- Voltage at 0.3 s: v = 12 e^(-0.3/0.47) = 12 e^(-0.638) = 12 × 0.528 = 6.34 V.
- Initial current: V0/R = 12/4700 = 2.55 mA. At 0.3 s, i = 6.34/4700 = 1.35 mA.
- Time to reach 1 V: solve 1 = 12 e^(-t/tau). Then t = tau ln(12) = 0.47 × 2.485 = 1.17 s.
Step 4 uses the general inversion, t = tau ln(V0/v). It is the most common calculation in practice, for instance when you must know how long a supply rail takes to bleed down to a safe voltage.
Verifying numerically
The code below evaluates the worked example and prints the voltage at several times. It also solves for the time to reach 1 V and checks it against the formula.
import math
R = 4.7e3 # ohms
C = 100e-6 # farads
V0 = 12.0 # volts
tau = R * C # 0.47 s
def v(t):
return V0 * math.exp(-t / tau)
for t in (0.0, 0.3, tau, 2 * tau, 5 * tau):
print(f"t = {t:.3f} s: v = {v(t):.3f} V, i = {v(t) / R * 1000:.3f} mA")
t_1v = tau * math.log(V0 / 1.0)
print(f"Time to reach 1 V: {t_1v:.3f} s, check v = {v(t_1v):.3f} V")Energy during discharge
The capacitor starts with stored energy (1/2) C V0². The resistor dissipates power p(t) = (V0²/R) e^(-2t/tau). Integrating from 0 to infinity:
W = (V0²/R) × (tau/2) = (V0²/R) × (RC/2) = (1/2) C V0²
All of the initial stored energy ends up as heat in the resistor, regardless of the value of R. The resistance changes how fast the energy is dissipated, not how much. A larger R means a smaller peak power but a longer discharge.
Common errors
- Wrong sign. Writing dv/dt = +v/(RC) gives a growing exponential. A passive discharge must decay. If your equation predicts growth, recheck the sign of the current in the capacitor relation.
- Using the wrong initial condition. The initial voltage V0 is the capacitor voltage just before the switch changes. Because capacitor voltage is continuous, it equals the value just after. Do not use a resistor voltage or current from before the switch event.
- Treating the current as continuous. Only v is continuous. The resistor current jumps at t = 0.
- Mixing units. Microfarads with kilohms gives milliseconds. Convert everything to base units, or track the prefixes carefully (kΩ × µF = ms).
- Using R of the wrong resistor. In circuits with more than one resistor, tau uses the equivalent resistance seen by the capacitor, not just the resistor drawn next to it. A later chapter covers this.
Summary of the results
| Quantity | Expression |
|---|---|
| Differential equation | dv/dt + v/(RC) = 0 |
| Time constant | tau = RC |
| Capacitor voltage | v(t) = V0 e^(-t/tau) |
| Current | i(t) = (V0/R) e^(-t/tau) |
| Time to reach voltage v | t = tau ln(V0/v) |
| Energy dissipated | (1/2) C V0² |
Exercise
A 220 µF capacitor is charged to 9 V and then discharged through a 10 kΩ resistor starting at t = 0. (a) What is tau? (b) What is the voltage at t = 3 s? (c) How long does it take for the voltage to fall to 0.5 V? (d) How much energy is dissipated in the resistor in total?
Show answer
(a) tau = RC = 10,000 × 220×10^-6 = 2.2 s. (b) v(3) = 9 e^(-3/2.2) = 9 × 0.2557 = 2.30 V. (c) t = tau ln(9/0.5) = 2.2 × ln(18) = 2.2 × 2.890 = 6.36 s. (d) W = (1/2) C V0² = 0.5 × 220×10^-6 × 81 = 8.91 mJ, independent of R.
Exercise
A capacitor discharges through a resistor. You measure its voltage as 6.0 V at t = 0 and 2.2 V at t = 40 ms. Estimate tau, and then estimate the voltage at t = 100 ms.
Show answer
From v(t) = V0 e^(-t/tau), 2.2/6.0 = e^(-0.040/tau). Take logs: ln(6.0/2.2) = 1.004 = 0.040/tau, so tau ≈ 39.9 ms (about 40 ms). At 100 ms, v = 6.0 e^(-100/39.9) = 6.0 × 0.0815 = 0.49 V.