Lite / Intelligent Robotic Systems / Week 20
The RC time constant, from measurements
A capacitor charging through a resistor never quite finishes. So how can engineers say exactly how long it 'takes'?
Why should I care?
RC circuits are everywhere in electronics: the power-on reset that holds a microcontroller still until its supply settles, the debounce filter on a button, the low-pass filter that smooths a noisy sensor, the timing in a 555 timer. Each one depends on one number, the time constant τ = RC. Measuring τ from a real curve is also how you find the value of a capacitor whose label has rubbed off.
- Calculate the time constant τ = RC with correct units.
- Use v(t) = V(1 − e^(−t/τ)) and the 63 % and 5τ landmarks to describe charging.
- Estimate τ (and an unknown capacitance) from measured points on a charging curve.
- Find the time for a charging capacitor to reach a threshold voltage.
Predict
A 1,000 µF capacitor charges from 9 V through 1 kΩ (τ = 1 s). Roughly what is its voltage after 1 second?
- 4.5 V (half way)
- About 5.7 V (63 % of the way)
- 9 V (full)
- About 1 V (it has only just started)
Guess first, then reveal
About 5.69 V. After one time constant the capacitor has covered 1 − e^(−1) ≈ 63.2 % of the gap to the supply, whatever R and C are. That fixed landmark is why τ is so useful.
Discover
Run the default circuit (9 V, 1,000 Ω, 1,000 µF) and read the voltage at t = τ from the results. Then double the resistance and run it again: what happens to τ and to the time to reach 90 %? Finally switch to discharge and check that after one τ the voltage is 37 % of where it started.
What the interactive shows (text version)
The RC experiment plots capacitor voltage and current against time for a battery charging a capacitor through a resistor. Inputs set the battery voltage (1–12 V), resistance (100 Ω to 100 kΩ), capacitance (1–2,200 µF), charge or discharge, and how many time constants to run. Results list τ = RC, the voltage at t = τ, the fraction of the way at τ (about 0.632) and the time to reach 90 %. With the defaults (9 V, 1 kΩ, 1,000 µF) τ is 1 s, the voltage at 1 s is about 5.69 V and 90 % takes about 2.3 s. The voltage rises quickly at first and then more and more slowly; the current starts at V/R and decays the same way.
Watch (optional)
Watch for: Watch for the five-time-constant rule and how the charging curve's shape stays the same when only R or C changes.
Works out how long a capacitor takes to charge using the RC time constant.
“Capacitor charge time calculation - time constants” by The Engineering Mindset (opens YouTube; streaming video uses a lot of data)
The video is optional. Everything you need is in this lesson's text.
Understand
Why it slows down
At switch-on the capacitor is empty, so the whole supply voltage sits across the resistor and a big current I = V/R flows. As charge builds up, the capacitor's voltage rises, the resistor's share falls, and the current shrinks. Less current means slower charging. The voltage approaches the supply ever more slowly: it never quite arrives, but it gets close very quickly.
The curve and its landmarks
The charging voltage is v(t) = V(1 − e^(−t/τ)) with τ = R·C. Ohms times farads gives seconds (and kΩ × µF gives milliseconds). After 1τ the capacitor is at 63.2 % of V, after 2τ 86.5 %, after 3τ 95 %, after 5τ 99.3 %. Engineers usually call it 'charged' after about 5τ. Discharging follows v = V·e^(−t/τ): 36.8 % left after one τ.
Measuring τ from data
On a measured curve, the quickest estimate is the time at which the voltage reaches 63 % of its final value. A better one uses every point: rearrange to τ = −t / ln(1 − v/V), compute it at several times and average. If ln(1 − v/V) plotted against t is a straight line, the circuit really is first-order, and the slope is −1/τ. Knowing R, the capacitance follows as C = τ/R.
Hitting a threshold
Many circuits care about when the capacitor crosses a voltage, such as a chip's reset threshold. Solve v = V(1 − e^(−t/τ)) for t: t = −τ·ln(1 − v/V). Crossing half the supply takes τ·ln 2 ≈ 0.69τ; crossing 90 % takes τ·ln 10 ≈ 2.3τ. Thresholds near the supply voltage take much longer and are sensitive to component tolerances.
Explain it another way
Intuitive
Filling a balloon through a thin straw: at first air rushes in, but the fuller the balloon, the harder it pushes back and the slower it fills. A thinner straw (bigger R) or a bigger balloon (bigger C) both make it slower.
Technical
Kirchhoff's voltage law gives V = i·R + v and the capacitor law i = C·dv/dt, so RC·dv/dt + v = V: a first-order linear ODE whose step response is v = V(1 − e^(−t/RC)). Real parts add capacitor leakage, equivalent series resistance and the source's internal resistance, and electrolytic capacitors often have ±20 % tolerance, so a measured τ is the honest way to know the circuit.
Mathematical
Example: 9 V, R = 1 kΩ, C = 1,000 µF, τ = 1 s. v(1 s) = 9 × (1 − e^(−1)) ≈ 5.69 V. Time to reach 5 V: t = −1 × ln(1 − 5/9) ≈ 0.811 s. If you measure 6.0 V at 1.1 s, τ ≈ −1.1/ln(1 − 6/9) = 1.1/1.0986 ≈ 1.001 s, which agrees.
Applied
A microcontroller reset pin often uses a 10 kΩ resistor and a 100 nF capacitor: τ = 1 ms, so the chip stays in reset for about a millisecond while the supply settles. Button debouncing picks τ longer than the contact bounce (a few milliseconds) but short enough to feel instant.
Derivation: Solving the charging equation
Around the loop: V = i·R + v. The capacitor's current is i = C·dv/dt, so R·C·dv/dt = V − v.
Separate variables: dv/(V − v) = dt/(RC).
Integrate from v = 0 at t = 0: −ln(V − v) + ln V = t/(RC), so ln((V − v)/V) = −t/(RC).
Exponentiate: (V − v)/V = e^(−t/RC), so v(t) = V(1 − e^(−t/τ)) with τ = RC.
At t = τ: v = V(1 − e^(−1)) ≈ 0.632·V. Taking logs of the same line gives the measurement formula τ = −t/ln(1 − v/V).
Worked example 1
With 9 V, 1 kΩ and 1,000 µF, find τ, the voltage at 0.5 s and 2 s, and the time to reach 5 V.
τ = 1,000 Ω × 0.001 F = 1 s. v(0.5) = 9(1 − e^(−0.5)) ≈ 3.54 V; v(2) = 9(1 − e^(−2)) ≈ 7.78 V. Time to 5 V: t = −1 × ln(1 − 5/9) = −ln(0.444) ≈ 0.811 s.
Worked example 2
A capacitor of unknown value charges from 9 V through 1 kΩ. You measure 6.0 V at 1.1 s. Estimate C.
τ = −1.1/ln(1 − 6/9) = −1.1/ln(0.333) = 1.1/1.0986 ≈ 1.00 s. C = τ/R = 1.00/1,000 ≈ 1,000 µF. Repeating at several times and averaging makes the estimate less sensitive to one bad reading.
Common mix-ups
The time constant is how long the capacitor takes to charge fully.
✓ τ is the time to reach about 63 %. 'Fully' (99 %) takes about 5τ, and mathematically it never quite finishes.A bigger supply voltage makes the capacitor charge faster.
✓ τ = RC does not depend on V. A bigger supply reaches any fixed voltage sooner, but the shape and the 63 % time stay the same.The capacitor value printed on the can is exact.
✓ Electrolytic capacitors often have ±20 % tolerance. Measuring τ and dividing by R gives the real value in your circuit.
Practice
Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.
Apply it
Design a power-on delay: a chip should start when its enable pin, charged from 3.3 V through a resistor, reaches 2.0 V, between 40 and 60 ms after power-on. Choose R and C from common values, calculate the delay with t = −RC·ln(1 − v/V), then check how far it moves if C is 20 % high or low. Try your values in the RC experiment.
Reflect
You measured τ from a curve instead of trusting the labels on the parts. Where else in engineering is measuring the whole system more trustworthy than adding up the datasheet values?
Write your answer on paper or in your own notes. Lite never stores what you write.