Skip to content
Battery Engineering Academy

Circuits for batteries · Beginner · 300 min

Capacitors and the RC circuit

How a resistor and a capacitor create a delay with one time constant, why that same shape appears when a battery relaxes after a load, and how EV packs use it to pre-charge safely.

By the end of this lesson you can

  • Calculate the RC time constant and the capacitor voltage at any time during charging
  • Calculate how long an RC circuit takes to reach a given percentage of its final value
  • Calculate the energy stored in a capacitor and explain why EV packs use pre-charge
  • Explain how an RC pair models the slow voltage recovery of a battery cell

Before this: Series and parallel connections

A capacitor stores charge and releases it, like a small, fast battery. Charged through a resistor, it fills quickly at first and then more slowly, approaching the supply voltage exponentially with a time constant equal to resistance times capacitance. The same behaviour appears inside every battery: after a current pulse, the voltage relaxes towards its rest value along the same kind of curve, which is why battery models are built from resistors and capacitors.

Study plan · two days

  1. Day 1 (about 2.5 h): The RC circuit. The capacitor picture, the equations, a calculator and worked examples. Practice drills and the knowledge check.
  2. Day 2 (about 2.5 h): From RC circuits to batteries. How long until a circuit has settled, and the link to battery voltage relaxation. Homework and further reading.

A capacitor is a tiny, fast battery

Intuition

A capacitor stores charge on two plates separated by an insulator. Think of a bucket with a hose: the more water (charge) in it, the higher the water level (voltage).

Put a resistor in the hose and the bucket cannot fill instantly. At first, the level difference is large and water rushes in. As the bucket fills, the difference shrinks and the flow slows. The level rises quickly at first, then more and more slowly, approaching the final level but never quite reaching it.

That curve, fast then ever slower, is the exponential response. How fast it happens is set by a single number: the time constant.

The equations

Engineering

A capacitor's charge is proportional to its voltage:

q=C vq = C\,v
  • CC: capacitance, in farads (F); 1 mF=10−3 F1\ \text{mF} = 10^{-3}\ \text{F}, 1 μF=10−6 F1\ \mu\text{F} = 10^{-6}\ \text{F}
  • qq: charge, in coulombs (C); vv: capacitor voltage, in V

When a capacitor starting at 0 V is charged from a source VsV_s through a resistor RR:

v(t)=Vs(1−e−t/τ),i(t)=VsR e−t/τ,τ=R Cv(t) = V_s\left(1 - e^{-t/\tau}\right), \qquad i(t) = \frac{V_s}{R}\,e^{-t/\tau}, \qquad \tau = R\,C
  • τ\tau: the time constant, in seconds (ohms × farads = seconds)
  • ii: current, in A. It is largest at the start (Vs/RV_s/R) and decays to zero

Rules of thumb: after 1τ1\tau the capacitor reaches 63.2 % of the final value; after 3τ3\tau, 95.0 %; after 5τ5\tau, 99.3 %. Engineers usually treat 5τ as "done".

To reach a chosen fraction ff of the final value:

t=−τ ln⁡(1−f)t = -\tau\,\ln(1 - f)

Stored energy:

E=12 C V2E = \tfrac12\,C\,V^2

in joules, with CC in F and VV in V.

RC circuit step response

Illustrative model
Ω
µF
V
V
Time constant τ
1 s
v at 1τ
3.161 V
Initial current
5 mA
0τ1τ2τ3τ4τ5τ5 V0 Vtime →

Assumptions
  • Ideal source, resistor and capacitor: no leakage, constant C.
  • v(t) = Vs + (v0 − Vs)·e^(−t/τ), τ = R·C. Set Vs = 0 to see a discharge.
  • This is the same first-order behaviour as the RC branch of a battery equivalent-circuit model (C12), but a real cell is not a capacitor.
Maths· Where the exponential comes from

Kirchhoff's voltage law around the loop gives Vs=R i+vV_s = R\,i + v, and the capacitor current is i=C dv/dti = C\,dv/dt. So:

RC dvdt+v=VsRC\,\frac{dv}{dt} + v = V_s

This is a first-order linear ODE. Its solution with v(0)=v0v(0) = v_0 is:

v(t)=Vs+(v0−Vs) e−t/RCv(t) = V_s + (v_0 - V_s)\,e^{-t/RC}

You can check it by substitution. Every first-order system (a cooling cup of tea, a cell relaxing after a load) has this form, with its own τ\tau. The rate of change is always proportional to "how far is left to go", which is why the approach slows down.

Solved examples

Worked example

Example 8.1: the time-constant rules

A 1 kΩ resistor charges a 1,000 µF capacitor from a 12 V source.

  1. τ=1000 Ω×0.001 F=1 s\tau = 1000\ \Omega \times 0.001\ \text{F} = 1\ \text{s}
  2. At t=1 st = 1\ \text{s}: v=12(1−e−1)=7.59 Vv = 12(1 - e^{-1}) = 7.59\ \text{V} (63.2 %)
  3. At t=2 st = 2\ \text{s}: v=12(1−e−2)=10.38 Vv = 12(1 - e^{-2}) = 10.38\ \text{V} (86.5 %)
  4. Time to 95 %: t=−1×ln⁡(0.05)≈3.0 st = -1 \times \ln(0.05) \approx 3.0\ \text{s}
  5. Initial current: 12/1000=12 mA12/1000 = 12\ \text{mA}, falling to under 0.1 mA after 5 s

Worked example

Example 8.2: why EV packs pre-charge

An EV's motor inverter has a large input capacitor. Take an illustrative 4.7 mF on a 400 V pack.

  1. Energy it will hold when charged: E=12×0.0047×4002=376 JE = \frac12 \times 0.0047 \times 400^2 = 376\ \text{J}
  2. If the main relay (contactor) closed directly, the only thing limiting the current would be a few milliohms of wiring and cell resistance. The inrush current would be thousands of amperes, enough to weld the contactor shut.
  3. Instead, a pre-charge circuit first connects the capacitor through a resistor, here an illustrative 50 Ω. The peak current is 400/50=8 A400/50 = 8\ \text{A}, and τ=50×0.0047=0.235 s\tau = 50 \times 0.0047 = 0.235\ \text{s}
  4. After about 5τ≈1.2 s5\tau \approx 1.2\ \text{s} the capacitor is above 99 % of the pack voltage. Then the main contactor closes with almost no voltage across it, and the pre-charge relay opens.

That is the double click you hear when an EV powers up. Pre-charge design is covered in C09 and C10.

Worked example

Example 8.3: a cell relaxing after a load

A cell's slow voltage recovery is often modelled as a resistor R1R_1 in parallel with a capacitor C1C_1 (the "1RC" model, C12). Take R1=15 mΩR_1 = 15\ \text{m}\Omega and C1=2,000 FC_1 = 2{,}000\ \text{F}, an illustrative parameter set.

  1. Time constant: τ=0.015×2000=30 s\tau = 0.015 \times 2000 = 30\ \text{s}
  2. After a long 10 A discharge, the RC pair holds 10×0.015=0.150 V=150 mV10 \times 0.015 = 0.150\ \text{V} = 150\ \text{mV}
  3. When the current stops, that voltage decays as 150 e−t/30150\,e^{-t/30} mV: 55 mV left after 30 s and about 7.5 mV after 90 s

So the cell's voltage keeps rising for minutes after the load is removed. This is why open-circuit voltage must be measured after a rest, and why SOC read from voltage immediately after driving is wrong (C06-L04, C06-L05). Real cells usually need more than one RC pair, and some time constants are much longer.

Simulator

Capacitor voltage (V) against Time (s)Capacitor voltage (V) plotted against Time (s) from 0 to 20. Current settings: Supply voltage (V) 5, Time constant τ = RC (s) 2. At Time (s) = 2, the value is 3.161 V.02405101520Time (s)Capacitor voltage (V)3.161 V
Charging an ideal capacitor through a resistor: 63 % of the way after one time constant, more than 99 % after five. Python-verified formula.

Where engineers use this

Engineering
  • Battery models. Equivalent-circuit models are a series resistor plus one or more RC pairs (C12). Fitting their τ\tau values from pulse tests is a core skill (C08, C12).
  • Pre-charge circuits in every high-voltage pack (Example 8.2).
  • Filters. RC low-pass filters smooth noisy voltage and current measurements before the BMS samples them (C10).
  • Timing. Relaxation times decide how long a test procedure must rest before reading the OCV (C08).

Common mistakes

  • Thinking the capacitor is full after 1τ. It is only 63 % of the way. Use 5τ for "essentially complete".
  • Mixing units in τ. mΩ × F gives milliseconds, not seconds. Convert to Ω and F first.
  • Reading OCV straight after a load. The RC voltage has not decayed yet, so the reading is biased.
  • Forgetting pre-charge. Connecting a pack directly to a big capacitor causes a huge inrush current.
  • Assuming one time constant fits a real cell. Cells show several, from milliseconds to hours.

Practice

Numbers change each time you press New values. Answers within about 1 % are accepted.

  1. D1

    A 100 Ω resistor is in series with a 0.0047 F capacitor. What is the time constant, in seconds?

    s
  2. D2

    A capacitor starting at 0 V charges from 12 V through a resistor, with τ = 1 s. What is its voltage after 2 s, in V?

    V
  3. D3

    An RC circuit has τ = 10 s. How long does it take to reach 90 % of its final voltage, in seconds?

    s
  4. D4

    An inverter's input capacitor is 0.002 F and is charged to 72 V. How much energy does it store, in J?

    J
  5. D5

    A cell's RC pair has R1 = 15 mΩ and τ = 30 s. A 10 A discharge has run long enough to fully charge it. How much RC voltage is left 30 s after the current stops, in mV?

    mV

Check your understanding

1. A 100 Ω resistor and a 0.01 F capacitor are in series. What is the time constant?
2. Roughly what fraction of its final voltage has a charging capacitor reached after three time constants?
3. Why does an EV close a pre-charge relay with a resistor before closing the main contactor?
4. A cell is measured 5 seconds after a long, heavy discharge. Its RC time constant is 60 s. Is this a good OCV reading?
5. In an RC charging circuit, when is the current largest?

How long until it settles?

Worked example

Example 8.4: 63 % and 99 %

With τ=2\tau = 2 s:

  1. 63.2 % of the final value is reached at t=τ=2.0t = \tau = 2.0 s
  2. 99 % is reached at t=−τln⁡(0.01)=9.2t = -\tau\ln(0.01) = 9.2 s, about 4.6τ4.6\tau

"Five time constants" is the usual engineering rule for "settled".

The same curve inside a battery

Engineering

After a current pulse, a battery's voltage does not return to its rest value at once. Part of the response is immediate (the internal resistance); the rest relaxes like a capacitor discharging through a resistor, with time constants from seconds to hours. Battery models represent this with one or more parallel RC branches (C06-L04, C12), and the BMS waits for the relaxation to finish before reading the rest voltage.

Voltage after a battery stops discharging

  1. 1Current stops

    Voltage jumps up by I·R₀ at once.

  2. 2Fast relaxation

    Seconds: an RC branch with a short time constant.

  3. 3Slow relaxation

    Minutes to hours: diffusion inside the cell.

  4. 4Rest voltage

    Open-circuit voltage, used to estimate SOC.

Homework

Homework · answers not provided

  1. For R = 1 kΩ and C = 470 µF, compute τ and the time to reach 90 % and 99 % of the supply voltage.
  2. A battery's voltage rises by 20 mV over 10 s after a pulse, following an RC curve with τ = 3 s. How much of the 20 mV remains after 15 s?
  3. Explain why a BMS that reads the rest voltage too soon will misjudge the state of charge.
  4. Use the RC calculator in the lesson to plot charging curves for three time constants and describe the differences.

Further reading

Further reading

  • OpenStax, University Physics Volume 2, chapter on RC circuits.
  • G. L. Plett, Battery Management Systems, Volume I, Artech House, 2015. Equivalent-circuit models.

Key takeaways

  • τ=RC\tau = RC sets the speed: 63 % after 1τ, 95 % after 3τ, more than 99 % after 5τ.
  • Charging: v(t)=Vs(1−e−t/τ)v(t) = V_s(1 - e^{-t/\tau}); the time to fraction ff is −τln⁡(1−f)-\tau\ln(1-f).
  • A capacitor stores 12CV2\frac12 CV^2. Big inverter capacitors are why EV packs pre-charge.
  • An RC pair models a cell's slow voltage recovery, the foundation of equivalent-circuit models.
  • An RC circuit reaches 63 % in one time constant and 99 % in about 4.6.
  • Battery voltage relaxes after a pulse in the same way; models use RC branches.
  • Next in this course: measuring electricity (C02-L09). For cells: OCV vs terminal voltage (C06-L05).

Sources for this lesson are listed on the References page.