The Direct Answer: What Does a Capacitor Actually Do?

A capacitor stores electrical energy in an electric field between two conductive plates separated by a dielectric insulator. In DC circuits, what a capacitor does is block steady current while smoothing voltage ripples and providing instantaneous transient current to ICs. In AC circuits, it passes alternating signals while blocking DC bias, with its impedance dropping as frequency rises. Think of it as a localized water pressure tank on a plumbing line: it doesn't generate water, but it absorbs sudden pressure spikes and fills in during momentary demand drops, keeping the flow to your microcontroller perfectly stable.

Let's look at the math on the bench. When an ESP32-WROOM-32 module transmits a WiFi packet, it draws a transient current spike of about 250mA for roughly 2μs. If you only have a standard 100nF (0.1μF) ceramic bypass capacitor on the 3.3V rail, the voltage drop is calculated using ΔV = (I × Δt) / C:

ΔV = (0.25A × 0.000002s) / 0.0000001F = 5.0V drop

A 5V drop on a 3.3V rail instantly brownouts the chip, causing a continuous reset loop. This is exactly why we pair high-frequency 100nF ceramics with bulk 47μF capacitors to handle the low-frequency energy demand. For a deeper look at the foundational physics, the All About Circuits DC textbook chapter on capacitors breaks down the electrostatic field mechanics in excellent detail.

Decoding the Silkscreen: How to Read Capacitor Markings

Reading capacitor markings is a rite of passage. Unlike resistors, capacitors use a fragmented mix of direct printing and cryptic codes depending on their physical size and dielectric.

Ceramic MLCCs (The 3-Digit Code)

Through-hole and small SMD ceramic capacitors use a 3-digit EIA code representing picofarads (pF). The first two digits are the significant figures, and the third is the multiplier (number of zeros).

  • 104: 10 followed by four zeros = 100,000pF = 100nF = 0.1μF. (This is the most common bypass cap in electronics).
  • 473: 47 followed by three zeros = 47,000pF = 47nF.
  • 221: 22 followed by one zero = 220pF.

Following the numbers, you will often see a letter indicating tolerance: J (±5%), K (±10%), or M (±20%).

Aluminum Electrolytics

Because they are physically larger, electrolytics print the values directly: 470μF 25V. The critical marking here is the negative stripe. The stripe, often containing minus signs (-), indicates the cathode. Applying reverse polarity to an electrolytic capacitor will cause the internal electrolyte to boil and the casing to violently vent.

Tantalum SMDs

Tantalum chips print the value in microfarads and a voltage letter code, but the polarity is reversed compared to aluminum. On a tantalum capacitor, the solid bar or stripe indicates the POSITIVE (anode) side. Mixing these up is a guaranteed way to start a small fire on your workbench.

Dielectric Showdown: Which Type for Which Job?

Not all capacitors are created equal. The dielectric material inside dictates the component's behavior under temperature, voltage, and frequency stress. Here is how to select the right chemistry for your BOM.

Table 1: Passive Component Dielectric Selection Matrix
Type / Dielectric Construction Tolerance Tempco (Temp Stability) Typical Use Case
Ceramic (C0G/NP0) Calcium zirconate ±5% ±30 ppm/°C (Ultra-stable) RF filters, precision oscillators, resonant tank circuits.
Ceramic (X7R) Barium titanate ±15% ±15% over -55 to 125°C General-purpose decoupling, I2C pull-up filtering, snubbers.
Aluminum Electrolytic Etched foil / liquid electrolyte -20% / +80% High drift, sensitive to cold Bulk power supply filtering, audio coupling, motor start/run.
Tantalum (MnO2) Sintered tantalum powder ±10% Stable, but prone to thermal runaway Low-profile bulk decoupling on dense PCBs, medical devices.
Film (Polypropylene) Metalized plastic film ±1% to 5% Extremely stable, low ESR AC motor run caps, high-current switching, audiophile crossovers.
Warning on DC Bias Derating: High-K ceramic capacitors (like X5R and X7R) suffer from severe DC bias derating. A 10μF X5R 0805 capacitor rated for 6.3V will actually measure only about 2μF when you apply 5V of DC bias across it. Always check the manufacturer's DC bias curve (available on tools like the Murata SimSurfing portal) when sizing ceramics for power rails.

Bench War Story: The 12V Motor Drive Meltdown

Theory is clean; the bench is messy. Let's walk through a real-world scenario where misunderstanding capacitor impedance destroyed a prototype.

The Setup

We were driving a 12V brushed DC motor with a 2A stall current using a discrete MOSFET H-bridge switching at 20kHz via PWM. To smooth the supply rail, the schematic called for a standard 1000μF 25V aluminum electrolytic capacitor across the main 12V bus.

The Numbers

At 20kHz, the impedance of a capacitor is Z = 1 / (2πfC). For 1000μF at 20kHz, the theoretical reactance is a tiny 0.008Ω. However, standard electrolytics have high Equivalent Series Resistance (ESR) and Equivalent Series Inductance (ESL). The specific generic cap we grabbed from the bin had an ESR of 0.15Ω and an ESL that caused its self-resonant frequency to peak around 40kHz. At 20kHz, the ESR dominated the impedance.

The Outcome

During stall conditions, the H-bridge pulled 2A pulses. The ripple current through the capacitor generated heat (P = I2 × ESR). The internal temperature spiked, vaporizing the liquid electrolyte. The capacitor's pressure relief vent popped, spraying corrosive fluid across the PCB. Worse, the high ESL meant the cap couldn't react fast enough to the 20kHz switching edges, allowing 4V inductive spikes to ring on the bus, eventually punching through the gate oxide of the high-side MOSFETs.

What Went Wrong (The Fix)

We needed bulk energy storage and high-frequency bypassing. The fix was twofold: we swapped the standard electrolytic for a low-ESR (0.02Ω) Panasonic FR series 1000μF cap to handle the RMS ripple current without overheating, and we added a 1μF X7R ceramic in parallel, placed physically within 3mm of the MOSFET drain pins. The ceramic provided the low-ESL path for the 20kHz high-frequency edges, saving the silicon. For more on managing ripple current in power designs, Adafruit's capacitor guide offers excellent practical layout advice.

Autopsy of a Dead Cap: Visual Failure Modes

When a circuit fails, the capacitor is often the victim, but sometimes it's the murderer. Here is how to read the physical remains.

  • The Domed Electrolytic: If the top of an aluminum can is bulging upward, or there is a crusty brown/black residue around the base, the cap has vented. Cause: Exceeded ripple current, reverse polarity, or operating near a heat sink that boiled the electrolyte over time. ESR will measure open or extremely high.
  • The Invisible MLCC Short: Multi-Layer Ceramic Capacitors (MLCCs) fail silently. They look perfectly normal, but they dead-short the power rail to ground. Cause: PCB flex cracking. If you place a large ceramic cap too close to a board edge or a mounting hole, the mechanical stress of pushing the board into an enclosure cracks the brittle barium titanate layers inside. The Murata FAQ on ceramic capacitor cracking details how piezoelectric stress causes these latent shorts.
  • The Charred Tantalum: Tantalum capacitors fail catastrophically. If you see a blackened, melted crater on the PCB where a small tan rectangle used to be, a tantalum went into thermal runaway. Cause: A voltage transient exceeded its rated voltage. Unlike ceramics, tantalums cannot heal from dielectric breakdown. They require a strict 50% voltage derating (e.g., use a 10V rated cap on a 5V rail).

The Substitution Matrix: Swapping Parts Safely

Supply chain shortages happen. When the exact BOM capacitor is out of stock, you have to substitute. Use this decision matrix to avoid blowing up your board.

  1. Voltage Rating: You can always substitute a higher voltage rating for a lower one (e.g., using a 50V cap instead of a 25V cap). The physical size will be larger, and the ESR might change, but it is electrically safe. Never substitute a lower voltage rating.
  2. Capacitance Value (Bulk Decoupling): For power rail bypassing (the 10μF or 47μF caps near voltage regulators), substituting a higher capacitance is generally fine and often beneficial. Just ensure the regulator's datasheet doesn't specify a maximum output capacitance that could destabilize the control loop.
  3. Capacitance Value (Timing & Filters): If the capacitor is part of an RC timing circuit (like a 555 timer oscillator), an active filter, or an LC resonant tank, the value must be exact. Swapping a 10nF for a 22nF will halve your oscillator frequency. Stick to ±5% tolerance parts here.
  4. Dielectric Swaps: You can safely swap C0G for X7R in general bypass applications, but never swap X7R for C0G in RF or timing circuits (X7R introduces microphonics and voltage-dependent capacitance shifts). Never substitute Y5V or Z5U dielectrics for X7R. Y5V capacitors lose up to 80% of their nominal capacitance at room temperature under nominal DC bias; they are essentially useless for modern logic decoupling.

Understanding what a capacitor does goes far beyond memorizing 'it stores charge.' It requires matching the dielectric's physical limitations to the electrical stresses of your specific circuit. Read the datasheets, derate your tantalums, and always keep a low-ESR ceramic stash on your bench.