Capacitors Explained: Charging, RC Time Constant and Types
A capacitor stores energy in an electric field between two conducting plates separated by an insulator called the dielectric. Unlike a resistor, its voltage cannot change instantly; it rises and falls as charge flows in and out. That single property is why capacitors are used for power supply smoothing, timing, filtering, decoupling and coupling signals between stages. This tutorial covers the core equations, the RC time constant with worked numbers, and how to pick the right capacitor type.
Basic Equations
Charge stored: Q = C x V (coulombs) Current: i = C x dV/dt Energy stored: E = 0.5 x C x V^2 (joules) Reactance (AC): Xc = 1 / (2 x pi x f x C) Parallel: C_total = C1 + C2 + ... Series: 1/C_total = 1/C1 + 1/C2 + ...
The current equation is the key one. A capacitor passes current only while its voltage is changing. With steady DC it eventually blocks current completely; with AC it conducts, and the faster the signal changes, the lower its reactance. Note that the series and parallel rules are the opposite of those for resistors.
Worked example: reactance
Find the reactance of a 1 µF capacitor at 50 Hz and at 1 kHz.
At 50 Hz: Xc = 1 / (2 x 3.1416 x 50 x 1e-6) = 3183 Ω At 1 kHz: Xc = 1 / (2 x 3.1416 x 1000 x 1e-6) = 159 Ω
Worked example: stored energy
A 1000 µF capacitor charged to 25 V stores E = 0.5 x 0.001 x 625 = 0.3125 J. That is enough to make a loud spark and weld a screwdriver tip, so discharge large capacitors through a resistor before handling a powered-down board.
Charging and the RC Time Constant
When a capacitor charges from a DC source Vs through a resistor R, the current is large at first and falls as the capacitor voltage approaches Vs. The curve is exponential, governed by the time constant tau = R x C, in seconds when R is in ohms and C in farads.
Charging: Vc(t) = Vs x (1 - e^(-t / RC)) Discharging: Vc(t) = V0 x e^(-t / RC) Time to reach Vc while charging: t = -RC x ln(1 - Vc / Vs) Time constant: tau = R x C
| Time | Charge (% of Vs) | Discharge (% of V0 left) |
|---|---|---|
| 1 tau | 63.2% | 36.8% |
| 2 tau | 86.5% | 13.5% |
| 3 tau | 95.0% | 5.0% |
| 4 tau | 98.2% | 1.8% |
| 5 tau | 99.3% | 0.7% |
Engineers treat a capacitor as fully charged after five time constants.
Worked example: RC delay
A 10 kΩ resistor charges a 100 µF capacitor from 5 V. Find tau, the voltage after 1 s, and the time to reach 3 V.
tau = 10 000 x 100e-6 = 1.0 s Vc(1 s) = 5 x (1 - e^-1) = 5 x 0.632 = 3.16 V t(3 V) = -1.0 x ln(1 - 3/5) = -ln(0.4) = 0.916 s Fully charged after about 5 tau = 5 s
This is exactly how a simple power-on reset or a switch debounce network works: the slow rise of the capacitor voltage delays when a logic input crosses its threshold.
The same time constant also describes how an RC network filters signals. A resistor feeding a capacitor to ground forms a low-pass filter whose cut-off frequency is fc = 1 / (2 x pi x R x C). With 10 kΩ and 100 nF, fc = 1 / (2 x 3.1416 x 10 000 x 100e-9) = 159 Hz. Signals well below 159 Hz pass almost unchanged, while faster noise is attenuated. This is why a small RC filter is often placed in front of an analogue input that reads a slowly changing sensor.
When designing an RC delay, remember that the source must be able to supply the initial current. At the instant of switch-on the capacitor looks like a short circuit, so the peak current is Vs / R. With 5 V and 10 kΩ this is only 0.5 mA, but with 5 V and 10 Ω charging a large capacitor it is 0.5 A, enough to upset a weak supply.
Worked example: discharge
A 470 µF capacitor at 12 V discharges through a 2.2 kΩ bleeder resistor. tau = 2200 x 470e-6 = 1.034 s. After 5 s the voltage is 12 x e^(-5/1.034) = 12 x 0.0079 = 0.095 V, safe to touch.
Capacitor Types
| Type | Typical range | Polarised? | Strengths | Weaknesses |
|---|---|---|---|---|
| Ceramic C0G/NP0 | pF to a few nF | No | Very stable with temperature and voltage | Small values only |
| Ceramic X7R / X5R | nF to tens of µF | No | Small, low ESR, ideal for decoupling | Capacitance drops with DC bias and temperature |
| Aluminium electrolytic | 1 µF to many mF | Yes | High capacitance per rupee | Higher ESR, limited life, wide tolerance |
| Tantalum | 0.1 µF to hundreds of µF | Yes | Compact, stable | Can fail short if over-voltaged or reversed |
| Film (polyester, polypropylene) | nF to tens of µF | No | Low loss, good for timing and audio, AC rated types exist | Larger size |
Read markings carefully. Ceramic capacitors use a three-digit code where the third digit is the number of zeros in picofarads: 104 means 10 followed by four zeros = 100 000 pF = 100 nF = 0.1 µF. Electrolytics print the value, voltage and a stripe marking the negative lead.
Common Mistakes
- Forgetting unit conversion: 100 µF is 100 x 10^-6 F, and 100 nF is 100 x 10^-9 F.
- Assuming an X5R 10 µF ceramic still gives 10 µF at its rated voltage; check the DC-bias curve in the datasheet.
- Using an electrolytic for precise timing; its tolerance is often ±20%.
- Leaving out the 100 nF decoupling capacitor next to each IC supply pin.
- Touching a large charged capacitor in a switched-off power supply.
Summary
A capacitor stores charge Q = CV and energy 0.5CV^2, passes current only when its voltage changes, and has a reactance that falls with frequency. Through a resistor it charges and discharges exponentially with time constant RC, reaching 63% in one tau and about 99% in five. Pick ceramics for decoupling, film or C0G for timing and filters, and electrolytics for bulk storage, always with a voltage rating to spare.