TactivergeLite

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'?

About 35 min · 4 goals · Checked by automated tests · Full interactive version

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.

Predict

A 1,000 µF capacitor charges from 9 V through 1 kΩ (τ = 1 s). Roughly what is its voltage after 1 second?

  1. 4.5 V (half way)
  2. About 5.7 V (63 % of the way)
  3. 9 V (full)
  4. 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.

You can also open the interactive on the full site when you have a faster connection.

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
  1. Around the loop: V = i·R + v. The capacitor's current is i = C·dv/dt, so R·C·dv/dt = V − v.

  2. Separate variables: dv/(V − v) = dt/(RC).

  3. Integrate from v = 0 at t = 0: −ln(V − v) + ln V = t/(RC), so ln((V − v)/V) = −t/(RC).

  4. Exponentiate: (V − v)/V = e^(−t/RC), so v(t) = V(1 − e^(−t/τ)) with τ = RC.

  5. 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

Practice

Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.

Practice 1. After exactly one time constant, how far has a charging capacitor got towards the supply voltage?

s

V

s

µF

Practice 6. In the experiment you double the resistance and keep the capacitor. What happens to the time it takes to reach 90 % of the supply?

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.

UART: one wire, ten bits, one byte →