Electronics / Theory / Capacitors
Theory 04

Capacitors A resistor opposes current; a capacitor opposes change in voltage. That single inversion explains decoupling, smoothing, timing and filtering — and why a 3p ceramic beside a chip is the difference between a circuit that works and one that is mysteriously flaky.

needs FundamentalsRC calculator
Tier 0 · Groundwhat it does

Storing charge

Module 0.1

Two plates and an insulator

Blocks DC, passes AC — the opposite instinct to a resistor

Charge accumulates on two conductive plates separated by an insulator. No current crosses the gap, yet current flows into and out of the capacitor as the voltage across it changes. Hence the two headline behaviours:

  • Blocks DC — once charged to a steady voltage, no more current flows.
  • Passes AC — a constantly changing voltage means constantly flowing current. The higher the frequency, the more freely it passes.

Capacitance is measured in farads, which is an enormous unit — real parts are microfarads (µF), nanofarads (nF) and picofarads (pF).

TypeTypical rangePolarised?Used for
Ceramic1pF – 1µFNoDecoupling, filtering, timing
Electrolytic1µF – 10,000µFYesBulk supply smoothing
Tantalum0.1µF – 100µFYesCompact bulk; fails dramatically if reversed
Film1nF – 10µFNoAudio, precision timing

Reading small markings: ceramics use a three-digit code in picofarads — 104 means 10 followed by 4 zeros = 100,000pF = 100nF = 0.1µF. That part number is so common it is worth memorising on sight.

Module 0.2

The three jobs you will actually meet

Decoupling, bulk, timing
  • Decoupling — a 100nF ceramic right beside every chip's power pin. Digital chips draw current in sharp spikes as they switch; the wires to the supply have enough inductance that the rail momentarily dips. The local capacitor supplies those spikes from inches away. It is the most common component on any board, and omitting it produces intermittent faults that feel like software bugs.
  • Bulk smoothing — a larger electrolytic (say 100µF) at the power input, absorbing bigger, slower demands such as a motor starting or a radio transmitting.
  • Timing and filtering — with a resistor, an RC time constant sets how fast a voltage rises. Debouncing a switch, a soft-start, a 555 blink rate, or a simple low-pass filter smoothing a noisy sensor reading.
Placement matters more than value. A decoupling capacitor works because it is physically close to the pin — its benefit comes from the short loop. On a breadboard, put it across the chip's own power pins, not at the far end of the rail.
Tier 1 · Mechanicstiming

RC time constants

Module 1.1

Charging through a resistor

One formula, several uses
τ = R × C          (tau, in seconds, with R in ohms and C in farads)

after 1τ  -> 63% of the final voltage
after 3τ  -> 95%
after 5τ  -> 99%, treated as settled

// 10kΩ with 100µF
τ = 10000 × 0.0001 = 1 second

RC time constant calculator

The same arrangement is a low-pass filter: slow changes get through, fast ones are smoothed away. The cutoff frequency is f = 1 / (2πRC), shown in the calculator above. Swap the positions of R and C and you get a high-pass filter instead, which passes changes and blocks the steady level — that is how audio coupling works.

Module 1.2

A worked use: switch debouncing

Why one button press registers as five

Mechanical contacts physically bounce for a few milliseconds when they close, so a microcontroller polling fast enough sees several presses. Two fixes, and you should know both:

  • Hardware: a 10kΩ pull-up with a 100nF capacitor across the switch gives τ = 1ms, smoothing the bounce into a single clean transition.
  • Software: after detecting a change, ignore that input for ~20ms. Free, adjustable, and usually the right answer.

Knowing the hardware version matters even if you use software, because it explains a whole family of "my input is noisy" problems — and the same RC smoothing applies to analogue sensor lines, where software cannot help you.

Drill 1

Your microcontroller resets whenever a relay switches. You already have a 100nF ceramic near the chip. What is the most likely fix?

Bulk capacitance, and probably a better supply. The 100nF handles fast, small switching spikes; a relay coil energising is a comparatively large, slow demand that a small ceramic cannot cover. A big electrolytic near the input acts as a local reservoir. Note the two capacitors do different jobs at different timescales, which is why real boards have both — and if the reset persists, the supply itself is undersized.
Tier 4 · Failthe dangerous bits

Polarity, rating, ageing

Module 4.1

How capacitors fail

The one component that can genuinely burst
Polarity. Electrolytics and tantalums have a stripe marking the negative leg, and the shorter lead is negative. Fitted backwards they heat, bulge and eventually burst — tantalums can do so with real enthusiasm. Check every one before powering up; it takes five seconds and saves an evening.
  • Voltage derating. On a 12V rail use a 25V part, not a 16V one. Running near the rated voltage shortens life dramatically. Capacitors are cheap; the debugging is not.
  • Bulging or leaking electrolytics are a classic fault in older equipment — a domed top means it is finished, and this is genuinely one of the most common repairs in consumer electronics.
  • Capacitance drops with age and heat, and ceramics lose capacitance under DC bias — a 10µF ceramic at its rated voltage may deliver only a few µF. Not a first-project concern, but it explains odd behaviour later.
  • Stored charge. Large capacitors hold a dangerous charge after power is off, which is why you never poke inside a mains supply even unplugged.
Referencesearchable

Glossary