---
title: Measuring capacitance and inductance
heading: Timing, resonance and impedance methods
eyebrow: C2 · Lesson 23 · Measuring C and L
xp: 40
---

::: hook
A multimeter reads resistance directly, but capacitance and inductance only show themselves when something changes: a voltage rising, a current ramping, a circuit ringing. Every way of measuring them uses one of those changes. A microcontroller times how long a touch pad takes to charge; a lab LCR meter applies a small sine wave and measures the current's size and phase; a technician pulses an inductor and watches its current ramp to see where it saturates. Each method is a direct use of $i = C\,dv/dt$, $v = L\,di/dt$ or resonance.
:::

::: play
- A capacitor charges through a known resistor $R$ toward 5 V. Two thresholds, set by the markers, are crossed at times $t_1$ and $t_2$.
- Timing between two thresholds is more robust than timing from zero: it doesn't need to know exactly when charging started.
- The readout turns the measured times back into C. Change the true C and see the measurement track it.
:::
:::

```sim plot
view: graph
x: t = 0..5 ms
y: v = 0..5 V
slider: R = 1..100 = 10 kΩ log
slider: C = 10..1000 = 100 nF log
slider: v1 = 0.5..2 step 0.1 = 1 V
slider: v2 = 2.5..4.5 step 0.1 = 4 V
plot: 5*(1 - exp(-t/1000/(R*1000*C*1e-9))) | label: capacitor voltage | samples: 500
plot: v1 + 0*t | label: first threshold | dashed | color: ch2
plot: v2 + 0*t | label: second threshold | dashed | color: ch3
readout: time between thresholds, ms = 1000*R*1000*C*1e-9*ln((5 - v1)/(5 - v2)) | digits: 4
readout: C worked back from that time and R, nF = (1000*R*1000*C*1e-9*ln((5 - v1)/(5 - v2)))*1e6/(R*1000*ln((5 - v1)/(5 - v2))) | digits: 4
```

::: predict
## A capacitor charging through 10 kΩ toward 5 V takes 1.39 ms to go from 1 V to 4 V. What is its capacitance?

- [ ] 139 nF
- [x] About 100 nF
- [ ] 1.39 µF
- [ ] 10 nF

::: reveal
About 100 nF. Between thresholds, $t_2 - t_1 = \tau\ln\frac{5 - 1}{5 - 4} = \tau\ln 4 = 1.386\tau$, so τ = 1.0 ms and $C = \frac{\tau}{R} = 100$ nF.
:::
:::

::: nameit
## Timing methods

Charge $C$ through a known $R$ toward $V$ and time the crossing of two thresholds:

$$t_2 - t_1 = RC\ln\frac{V - V_1}{V - V_2} \quad\Rightarrow\quad C = \frac{t_2 - t_1}{R\ln\frac{V - V_1}{V - V_2}}$$

Microcontroller touch sensors do this: a finger adds a few picofarads and the charge time grows. For an inductor, apply a voltage $V$ and watch the current ramp: $L = \frac{V\,\Delta t}{\Delta I}$. Where the ramp suddenly steepens, the core is saturating (lesson 5).

## Resonance

Put an unknown $L$ with a known $C$ (or the reverse), ring it, and measure the frequency:

$$L = \frac{1}{(2\pi f)^2C}$$

## Impedance (LCR meters)

An LCR meter applies a small sine wave at a known frequency, measures the current's magnitude and phase, and computes the complex impedance. The reactive part gives the value, $C = \frac{1}{2\pi f|X|}$ or $L = \frac{|X|}{2\pi f}$; the resistive part gives the ESR. Meters also report the **dissipation factor** $D = \omega C\cdot\text{ESR}$ for capacitors and $Q = \omega L/R$ for inductors, and measure at a chosen frequency because real parts change with it (lesson 4).

## Accuracy

Each method is only as good as its reference: the resistor's tolerance in a timing measurement, the known capacitor's in a resonance one. Stray capacitance from leads and probes adds picofarads, which matters for small capacitors, and is removed by measuring with the part disconnected and subtracting.
:::

::: example
## An unknown inductor rings at 15.9 kHz with a known 10 nF capacitor. What is it?

::: solution
1. **Resonance.** The ringing frequency is
   $$f = \frac{1}{2\pi\sqrt{LC}}$$
2. **Solve for L.**
   $$\begin{aligned} L &= \frac{1}{(2\pi f)^2C} \\ &= \frac{1}{(2\pi \times 15{,}900)^2 \times 10^{-8}}\ \text{H} \\ &= 10\ \text{mH} \end{aligned}$$

**Answer:** the inductor is 10 mH.
:::
:::

::: example
## A 5 V pulse across an inductor raises its current by 0.4 A in 2 µs. What is its inductance?

::: solution
1. **Inductance from the ramp.**
   $$\begin{aligned} L &= \frac{V\,\Delta t}{\Delta I} \\ &= \frac{5 \times 2 \times 10^{-6}}{0.4}\ \text{H} \\ &= 25\ \mu\text{H} \end{aligned}$$
2. **Spotting saturation.** If a later 2 µs raised it by 1.2 A, the inductance would have fallen to a third: saturation.

**Answer:** the inductance is 25 µH.
:::
:::

::: example
## An unknown inductor rings at 15.9 kHz with a 10 nF capacitor, and the ringing's amplitude halves every 10 cycles. What are its inductance, Q and series resistance?

::: solution
1. **Inductance.**
   $$\begin{aligned} L &= \frac{1}{(2\pi f)^2C} \\ &= 10.0\ \text{mH} \end{aligned}$$
2. **Q from the decay.** The amplitude decays as $e^{-\pi n/Q}$ after n cycles, so halving in 10 cycles means
   $$\begin{aligned} Q &= \frac{\pi \times 10}{\ln2} \\ &= 45 \end{aligned}$$
3. **Series resistance.**
   $$\begin{aligned} R &= \frac{\omega L}{Q} \\ &= \frac{2\pi \times 15\,900 \times 0.010}{45}\ \Omega \\ &= 22\ \Omega \end{aligned}$$
4. **One measurement.** One ring-down measurement, with a known capacitor and a scope, gives all three.

**Answer:** the inductance is 10.0 mH, Q is 45, and the series resistance is 22 Ω.
:::
:::

::: check
given: tau = 0.1 | 1 | 4.7; R = 1 | 10 | 100
answer: tau/1000/(R*1000)*1e9
unit: nF
tolerance: 0.5%

## Charging through {R} kΩ takes a time constant of {tau} ms. What is the capacitance?

::: right
Right. $C = \tau/R$ = {answer}.
:::

::: misses
- [tau*R] Divide by R: $\tau = RC$.
- [any] Not yet. $C = \tau/R$.
:::
:::

::: check
given: R = 10 | 47; dt = 0.5 | 2; v1 = 0.5 | 1; v2 = 3 | 3.5
answer: dt/1000/(R*1000*ln((5 - v1)/(5 - v2)))*1e9
unit: nF
tolerance: 0.5%

## A capacitor charging toward 5 V through {R} kΩ takes {dt} ms to go from {v1} V to {v2} V. What is C?

::: right
Right. $\frac{t_2 - t_1}{R\ln\frac{V - V_1}{V - V_2}}$ = {answer}.
:::

::: misses
- [dt/1000/(R*1000*ln(v2/v1))*1e9] Measure from the target voltage: $\ln\frac{V - V_1}{V - V_2}$.
- [any] Not yet. Solve the charging equation at both thresholds.
:::
:::

::: check
given: f = 1 | 10 | 100; C = 1 | 10 | 100
answer: 1/((2*pi*f*1000)^2*C*1e-9)*1e3
unit: mH
tolerance: 0.5%

## An inductor rings at {f} kHz with a {C} nF capacitor. What is its inductance?

::: right
Right. $\frac{1}{(2\pi f)^2C}$ = {answer}.
:::

::: misses
- [1/((f*1000)^2*C*1e-9)*1e3] Use $2\pi f$.
- [any] Not yet. Solve $f = 1/(2\pi\sqrt{LC})$ for $L$.
:::
:::

::: check
given: f = 0.1 | 1 | 100; Z = 10 | 1600
answer: 1/(2*pi*f*1000*Z)*1e9
unit: nF
tolerance: 0.5%

## An LCR meter at {f} kHz measures a capacitor's reactance as {Z} Ω. What is its capacitance?

::: right
Right. $\frac{1}{2\pi f|X|}$ = {answer}.
:::

::: misses
- [any] Not yet. $C = 1/(2\pi fX)$.
:::
:::

::: check
given: f = 0.12 | 1 | 100; C = 10 | 1000; esr = 0.05 | 1
answer: 2*pi*f*1000*C*1e-6*esr
tolerance: 0.5%

## A {C} µF capacitor has {esr} Ω of ESR at {f} kHz. What is its dissipation factor?

::: right
Right. $D = \omega C\cdot\text{ESR}$ = {answer}.
:::

::: misses
- [any] Not yet. $D = 2\pi fC\cdot\text{ESR}$.
:::
:::

::: check
given: V = 5 | 12; dt = 2 | 5; dI = 0.2 | 0.5
answer: V*dt/dI
unit: µH
tolerance: 0.5%

## {V} V across an inductor raises its current by {dI} A in {dt} µs. What is L?

::: right
Right. $V\Delta t/\Delta I$ = {answer}.
:::

::: misses
- [V*dI/dt] It's $V\Delta t/\Delta I$, from $v = L\,di/dt$.
- [any] Not yet. $L = V\Delta t/\Delta I$.
:::
:::

::: check
kind: parts
given: f = 5 | 15.9 | 50; C = 1 | 10; n = 5 | 20

## An unknown inductor rings at {f} kHz with a known {C} nF capacitor, and its amplitude halves every {n} cycles.

::: part
answer: 1/((2*pi*f*1e3)^2*C*1e-9)*1000
unit: mH
tolerance: 0.5%

### What's its inductance?

::: misses
- [any] $L = \frac{1}{(2\pi f)^2C}$.
:::
:::

::: part
answer: pi*n/ln(2)
tolerance: 0.5%

### What's its Q?

::: misses
- [any] Amplitude decays as $e^{-\pi n/Q}$.
:::
:::
:::

::: check
kind: derivation
vars: f = 100..1000000, C = 0.000000000001..0.000001, n = 1..100

## A coil rings at f with a known capacitor C, and halves in amplitude every n cycles.

::: step
answer: 1/((2*pi*f)^2*C)

### What's its inductance?
:::

::: step
answer: pi*n/ln(2)

### What's its Q?
:::

::: step
answer: 2*pi*f/((2*pi*f)^2*C)/(pi*n/ln(2))

### What's its series resistance, $\frac{\omega L}{Q}$?
:::

::: right
Right. One ring-down gives L, Q and R at the frequency that matters.
:::
:::

::: explain
## Why does a careful timing measurement of capacitance use two thresholds instead of timing from the moment charging starts?

::: model
Timing from zero needs the exact instant charging began and an exactly empty capacitor, and both are uncertain: the switch takes time to act, and a little residual charge shifts the curve. Between two thresholds on the same charging curve, the elapsed time depends only on RC and the two threshold voltages relative to the final voltage, $RC\ln\frac{V - V_1}{V - V_2}$. Any delay or leftover charge only moves both crossings together and cancels out of the difference.
:::
:::

::: practice

::: check
given: R = 1 | 10; C = 10 | 100
answer: R*C
unit: µs
tolerance: 0.5%

## What is the time constant of {R} kΩ and {C} nF?

::: misses
- [any] $RC$.
:::
:::

::: check
given: L = 1 | 10; C = 1 | 10
answer: 1/(2*pi*sqrt(L*1e-3*C*1e-9))/1000
unit: kHz
tolerance: 0.5%

## At what frequency does {L} mH ring with {C} nF?

::: misses
- [any] $1/(2\pi\sqrt{LC})$.
:::
:::

::: check
given: f = 1 | 100; L = 1 | 10
answer: 2*pi*f*1000*L*1e-3
unit: Ω
tolerance: 0.5%

## What reactance does an LCR meter see from {L} mH at {f} kHz?

::: misses
- [any] $2\pi fL$.
:::
:::
:::
