Electromagnetism
Capacitors
Stores charge in an electric field — Q = C·V, the timing element of electronics
A capacitor stores electrical charge in an electric field between two conducting plates separated by an insulator (dielectric). Charge stored Q = C·V, where C is capacitance (farads). Critical for filtering, timing, energy storage in circuits, and AC analysis. Common in every electronic device — phones, computers, cars, power supplies.
- DefinitionQ = C · V
- UnitsF (farad) = C/V; usually pF, nF, µF, mF
- Parallel-plateC = ε₀·κ·A/d (κ = dielectric constant)
- Energy storedU = ½·C·V² = ½·Q·V = Q²/(2C)
- Series capacitors1/C_total = Σ(1/C_i) — opposite of resistors
- ParallelC_total = ΣC_i — opposite of resistors
Interactive visualization
Press play, or step through manually. The visualization is yours to drive — try it before reading on.
Watch the 60-second explainer
A condensed visual walkthrough — narrated, captioned, under a minute.
Capacitor basics
Two conducting plates separated by an insulator (dielectric). When voltage V is applied, charge Q accumulates:
Q = C · V
C is capacitance, units of farads (F). 1 F is huge; typical values are pF, nF, µF, mF.
Parallel-plate capacitor
C = ε₀ · κ · A / d
- ε₀ = 8.854 × 10⁻¹² F/m (permittivity of free space).
- κ = dielectric constant (≥ 1).
- A = plate area (m²).
- d = separation (m).
Capacitance scales with area, dielectric constant, and inversely with separation.
Common dielectrics
| Material | κ (relative) | Breakdown E (V/m) |
|---|---|---|
| Vacuum | 1.000 | ~3 × 10⁷ (in practice) |
| Air | 1.0006 | 3 × 10⁶ |
| Paper | 3.5 | ~1 × 10⁷ |
| Polyethylene | 2.3 | 2 × 10⁷ |
| Mica | 5-7 | ~2 × 10⁸ |
| Glass | 4-7 | ~1 × 10⁷ |
| Ceramic (titanate) | 10-1000+ | 1-10 × 10⁶ |
| Tantalum oxide | ~25 | ~10⁸ |
| Water (pure) | ~80 | — |
Energy stored
U = ½ · C · V² = ½ · Q · V = Q² / (2 · C)
For a 100 µF capacitor at 12 V — U = ½ · 100e-6 · 144 = 7.2 mJ.
Supercapacitors (1 F at 5 V) — U = ½ · 1 · 25 = 12.5 J.
Series and parallel
| Configuration | C_total | Notes |
|---|---|---|
| Series | 1/C_total = Σ(1/C_i) | Less than smallest; shares charge |
| Parallel | C_total = ΣC_i | Sum; shares voltage |
| Two equal in series | C/2 | — |
| Two equal in parallel | 2C | — |
(Opposite of resistors — series resistors add; series capacitors are less.)
AC behavior
For sinusoidal voltage V(t) = V_peak·cos(ωt), capacitor current:
I(t) = C · dV/dt = -C · ω · V_peak · sin(ωt)
Magnitude relation — V_peak / I_peak = 1/(ω·C) = X_C (capacitive reactance).
Phase: I leads V by 90° (current peaks before voltage peak).
| Frequency | X_C for 1 µF |
|---|---|
| 0 (DC) | ∞ (blocks) |
| 60 Hz (line) | 2.65 kΩ |
| 1 kHz | 159 Ω |
| 1 MHz | 0.159 Ω |
| 1 GHz | 0.159 mΩ |
JavaScript — capacitor calculations
// Charge stored
function chargeStored(C, V) { return C * V; }
// Energy stored
function capEnergy(C, V) { return 0.5 * C * V * V; }
// Parallel-plate capacitance
function parallelPlateC(area_m2, separation_m, kappa = 1) {
const epsilon_0 = 8.854e-12;
return epsilon_0 * kappa * area_m2 / separation_m;
}
// 1 cm² plates, 0.1 mm gap, air
console.log(`Air gap C: ${parallelPlateC(1e-4, 1e-4).toExponential(2)} F`); // 8.85 pF
// Series capacitors
function seriesC(C_array) {
return 1 / C_array.reduce((sum, C) => sum + 1/C, 0);
}
// Parallel capacitors
function parallelC(C_array) {
return C_array.reduce((a, b) => a + b, 0);
}
console.log(`100µF + 100µF series: ${(seriesC([100e-6, 100e-6]) * 1e6).toFixed(0)} µF`); // 50
console.log(`100µF + 100µF parallel: ${(parallelC([100e-6, 100e-6]) * 1e6).toFixed(0)} µF`); // 200
// RC charging
function rcChargeVoltage(V_source, R, C, t) {
return V_source * (1 - Math.exp(-t / (R * C)));
}
// 12 V, 1 kΩ, 100 µF: τ = 0.1 sec
const tau_rc = 1000 * 100e-6;
console.log(`After τ: ${rcChargeVoltage(12, 1000, 100e-6, tau_rc).toFixed(2)} V`); // 7.59 (~63%)
console.log(`After 5τ: ${rcChargeVoltage(12, 1000, 100e-6, 5*tau_rc).toFixed(2)} V`); // 11.92 (~99%)
// Capacitive reactance
function reactanceCap(f_Hz, C) {
return 1 / (2 * Math.PI * f_Hz * C);
}
console.log(`1 µF at 60 Hz: ${reactanceCap(60, 1e-6).toFixed(0)} Ω`); // ~2653
console.log(`1 µF at 1 MHz: ${reactanceCap(1e6, 1e-6).toFixed(3)} Ω`); // 0.16
// Time to charge supercapacitor (1 F at 5V via 1A current source)
function chargeTime(C, V, I_charge) {
// Q = CV; t = Q/I
return C * V / I_charge;
}
console.log(`1F to 5V at 1A: ${chargeTime(1, 5, 1)} s`); // 5 sec
// LC oscillator
function lcResonance(L, C) {
return 1 / (2 * Math.PI * Math.sqrt(L * C));
}
// 1 µH inductor, 1 nF capacitor
console.log(`L=1µH, C=1nF: f = ${(lcResonance(1e-6, 1e-9) / 1e6).toFixed(2)} MHz`);
// Voltage across capacitor in voltage divider
function capDividerVoltage(V_in, C1, C2) {
// Series caps; voltage divides inversely as C
return V_in * C1 / (C1 + C2);
}
Where capacitors matter
- Power supply filtering. Smooth out AC ripple after rectification.
- Decoupling. Place near IC power pins to absorb transient current spikes.
- Timing circuits. RC oscillators, 555 timer, monostable circuits.
- Energy storage. Camera flashes, defibrillators, supercapacitors for vehicles, regenerative braking.
- Filters. Low-pass, high-pass, band-pass filters in audio, RF, signal conditioning.
- Coupling and decoupling. Pass AC signals between stages while blocking DC offsets.
- Tuned circuits. Combined with inductors for resonance — radio tuners, antennas.
Common mistakes
- Confusing series and parallel for capacitors. Opposite of resistors — series capacitors give LESS C; parallel give MORE.
- Polarity errors. Electrolytic caps are polarized; backwards connection often destroys them (sometimes explosively).
- Ignoring breakdown voltage. Each capacitor has a max V; exceed it and dielectric breaks down (cap fails). Use cap rated 2-3× operating V.
- Forgetting leakage current. Real caps have small leakage. Big problem for long-term holding circuits, less so for dynamic ones.
- Using DC analysis on capacitor in AC. AC capacitor passes current proportionally to frequency. DC blocks it.
- Treating capacitor energy ½CV² as work done by source. Source does work CV². Half goes into capacitor; half lost to wire resistance during charging.
Frequently asked questions
How does a capacitor store energy?
Charges accumulate on opposing plates — positive on one, negative on other. Electric field between them stores energy. U = ½CV² (or equivalently ½QV, Q²/2C). Higher voltage = more charge stored = more energy. Capacitor releases this energy when discharged through a load.
What's a dielectric and why does it matter?
An insulating material between the plates. Increases capacitance by factor κ (dielectric constant). κ ranges 1 (vacuum) to ~10⁵ (some special materials). Common — air ~1; paper ~3; mica ~6; ceramic 5-1000+; tantalum oxide ~25. Dielectrics also withstand high E-fields (breakdown limit) — important for high-V capacitors.
How do capacitors behave in DC vs AC?
DC steady state — capacitor blocks current (open circuit). Charges and holds. AC — capacitor allows current; behaves like impedance Z = 1/(jωC). At low f, blocks. At high f, conducts. This is why capacitors are used as "DC blocks" — pass AC, block DC. Foundation of audio coupling, power supply filtering.
What's RC time constant?
τ = R·C. Time for capacitor to charge to ~63% of final voltage (or discharge to 37% of initial). After 5τ, ~99% complete. RC sets timing in many circuits — RC oscillators, low-pass filters (cut off at f = 1/(2πRC)), timing relays.
How do capacitors filter power supplies?
AC ripple after rectification needs smoothing. Large capacitor across the DC output charges up to peak, holds during ripple troughs. Output is much smoother. Modern switch-mode supplies use small caps + magnetics for the same purpose at higher efficiency.
Why series capacitors have lower total C?
Effectively, series capacitors in line have each carrying same charge Q. Total V = sum of V across each = sum of Q/C_i. So total V = Q · Σ(1/C_i), giving C_total = 1/Σ(1/C_i) (less than smallest). Parallel capacitors share voltage but not charge — total C = sum (more than largest).
What types of capacitors exist?
Ceramic — small, cheap, high-frequency. Electrolytic — high capacitance per size, polarized (must connect correctly). Tantalum — small + high C. Film — paper/plastic, stable. Supercapacitors — extremely high C (1+ F!), used for short-burst energy. Variable — used in radios for tuning. Each has trade-offs (size, cost, V rating, leakage, temperature stability).