If you are asking what is a capacitor for on a circuit board, the short answer is that it stores electrical energy in an electric field and releases it on demand. Physically, it consists of two conductive plates separated by an insulating dielectric. In practical electronics, a capacitor acts as a local energy reservoir, a DC blocker, and an AC signal router. It resists changes in voltage, which makes it the primary tool for smoothing power rails, coupling audio signals, and setting oscillator frequencies.

Unlike resistors, which dissipate energy as heat, capacitors store and return energy. The governing equation is Q = CV (Charge = Capacitance × Voltage), but on the workbench, you select them based on impedance, equivalent series resistance (ESR), and dielectric absorption. Below is a deep dive into the four core jobs capacitors perform, how to select the right chemistry, and how to read the cryptic markings on their casings.

The Four Core Jobs in Real Circuits

While the physics remains the same, the application dictates the exact part you pull from your component drawer. Here is what a capacitor is actually doing in your design:

  • Decoupling (Bypass): Placed within 2mm of an IC's VCC pin, a capacitor supplies instantaneous current during high-speed switching. For example, when an ESP32-WROOM-32 transmits a WiFi packet, it can draw 300mA+ spikes lasting microseconds. A local 100nF (0.1µF) MLCC provides this charge before the main power supply can react, preventing brownout resets.
  • Coupling (DC Blocking): Capacitors pass AC signals while blocking DC bias. In an audio amplifier, a 10µF film capacitor might sit in the signal path to block a 2.5V DC offset from a DAC, allowing only the 20Hz–20kHz AC audio waveform to reach the speaker.
  • Filtering (Smoothing): Used to shunt high-frequency noise to ground or smooth low-frequency ripple. A 470µF aluminum electrolytic capacitor on a 12V DC power supply absorbs the 120Hz voltage dips left behind by a full-wave bridge rectifier.
  • Timing and Waveform Generation: Paired with a resistor, a capacitor's predictable charge/discharge curve (the RC time constant, τ = R × C) sets frequencies. A 10kΩ resistor and a 1µF capacitor yield a 10ms time constant, commonly used to set the pulse width in a 555 timer astable circuit.

Capacitor Type Selection Matrix

Choosing the wrong dielectric chemistry is a common rookie mistake. A 10µF ceramic capacitor and a 10µF electrolytic capacitor will behave entirely differently at 100kHz. Use this matrix to match the component to the job.

Type / Chemistry Typical Range Tolerance Tempco / Stability ESR Profile Best Application
MLCC (Class II / X7R) 100pF – 100µF ±10% to ±20% ±15% over -55°C to +125°C Very Low (<50mΩ) High-frequency decoupling, digital logic bypass
MLCC (Class I / C0G) 1pF – 10nF ±0.5% to ±5% 0 ±30 ppm/°C (Ultra Stable) Ultra Low RF filters, precision oscillators, snubbers
Aluminum Electrolytic 1µF – 10,000µF -20% to +80% Poor (Wide drift, temp sensitive) High (50mΩ – 2Ω) Bulk power filtering, low-freq audio coupling
Tantalum (Solid) 100nF – 1000µF ±10% to ±20% Moderate Low-Medium Space-constrained bulk decoupling (Warning: flammable)
Metallized Film (PP) 1nF – 10µF ±1% to ±5% Excellent (±30ppm/°C) Ultra Low Audio coupling, motor run, high-voltage snubbers
Bench Tip: Never use a Class II MLCC (like X7R or X5R) for precision timing or active filters. Due to a phenomenon called DC bias effect, a 10µF X5R capacitor might only provide 2µF of actual capacitance when 5V DC is applied across it. Always use C0G/NP0 ceramics or Film capacitors for precision analog circuits.

Decoding the Markings: What the Codes Mean

Capacitor markings are notoriously inconsistent depending on the physical size and chemistry. Here is how to read the three main formats you will encounter at the bench.

1. The 3-Digit Ceramic Code (EIA Standard)

Small MLCCs and ceramic disc capacitors use a three-digit multiplier code based on picofarads (pF). The first two digits are the significant figures, and the third digit is the multiplier (number of zeros).

  • 104: 10 × 10,000 pF = 100,000 pF = 100nF = 0.1µF
  • 472: 47 × 100 pF = 4,700 pF = 4.7nF
  • 221: 22 × 10 pF = 220 pF

2. Tolerance and Voltage Letters

You will often see a letter trailing the numeric code. This indicates the tolerance band.

  • J = ±5%
  • K = ±10%
  • M = ±20%
  • Z = +80% / -20% (Common for bulk decoupling electrolytics)

3. Electrolytic and Tantalum Direct Print

Larger through-hole and SMD electrolytics print the value directly (e.g., 470µF 25V). Crucial safety note: On aluminum electrolytic capacitors, the painted stripe with minus signs indicates the negative (cathode) lead. On SMD tantalum beads, the painted stripe indicates the positive (anode). Reversing a tantalum capacitor will result in a violent short circuit and fire.

Voltage Derating Rule: Never run a capacitor at its absolute maximum rated DC voltage (WVDC). As a standard practice, derate by at least 20% for ceramics and 50% for tantalums. If your circuit runs on a 12V rail, use a 16V or 25V ceramic, and a 25V or 35V tantalum.

Safe Substitution Rules When the Exact Part Is Missing

When you are prototyping or repairing a board and the exact BOM part is out of stock, you can substitute components safely if you follow these electrical boundaries:

  1. Voltage Rating (Always Substitute UP): You can safely replace a 25V capacitor with a 50V capacitor of the same capacitance, assuming the physical footprint fits. Never substitute a lower voltage rating.
  2. Capacitance Value (Context Dependent): For power supply decoupling, substituting a slightly higher value (e.g., using 0.22µF instead of 0.1µF) is generally safe and can improve low-frequency noise rejection. However, for active filters, oscillators, or RC timing circuits, you must match the exact value within the specified tolerance, or the circuit's frequency response will shift.
  3. Dielectric Chemistry (Do Not Cross-Stream): Never replace a C0G/NP0 ceramic with an X7R in an RF or precision filter circuit; the temperature drift will detune your circuit. Never replace an electrolytic with an MLCC in a linear voltage regulator output without checking the datasheet—some older LDOs require the high ESR of an electrolytic for loop stability.
  4. ESR Matching in Switching Regulators: If you are repairing a buck converter, the output capacitor ESR is often calculated into the control loop compensation. Swapping a standard electrolytic for an ultra-low ESR polymer cap might cause the regulator to oscillate. Check the manufacturer's datasheet for ESR requirements.

Failure Modes and Visual Symptoms

Capacitors are the most common point of failure in aging electronics. Knowing how to spot a dying capacitor visually can save you hours of oscilloscope debugging. According to SparkFun's component guides and field repair data, here is what to look for:

Aluminum Electrolytic: The Dried-Out Bulge

The Cause: The liquid electrolyte inside slowly evaporates over time, a process accelerated by heat (ripple current and nearby heat sinks). As the electrolyte dries, the capacitance drops and the ESR skyrockets, causing the power supply to ripple and overheat.
Visual Symptom: The top aluminum vent dome bulges upward. You may also see crusty brown or black electrolyte leaking from the bottom rubber seal onto the PCB.
The Fix: Desolder and replace with a fresh, low-ESR, high-temperature (105°C rated) capacitor, such as the Panasonic FR or Rubycon ZL series.

MLCC (Ceramic): The Invisible Flex Crack

The Cause: Ceramic capacitors are brittle. If the PCB flexes during assembly, connector insertion, or physical impact, the ceramic body cracks. Moisture enters the crack, leading to a dead short.
Visual Symptom: Often invisible to the naked eye. Under a microscope, you may see a hairline crack radiating from the solder joint into the ceramic body. The board will exhibit a dead short on the power rail.
The Fix: Replace the component. To prevent recurrence, avoid placing large MLCCs near board edges or mounting holes where mechanical stress is highest.

Tantalum: The Scorched Earth

The Cause: Tantalum capacitors fail catastrophically when subjected to reverse polarity, high inrush currents, or voltage spikes exceeding their derated limit. The dielectric breaks down, creating a highly exothermic short circuit.
Visual Symptom: The epoxy casing is melted, charred, or completely blown apart, leaving a permanent black scorch mark on the PCB silk screen.
The Fix: Clean the PCB with isopropyl alcohol. When replacing, consider swapping the tantalum for a modern high-capacity MLCC or a polymer aluminum capacitor to eliminate the fire hazard entirely.

Understanding reactance and impedance is the key to mastering these components. A capacitor is not just a passive placeholder; it is a dynamic, frequency-dependent resistor that dictates the stability, noise floor, and timing of your entire design. Always verify your substitutions with a multimeter or ESR meter before applying power.