Capacitor
Capacitors: How They Work, How to Choose One, and How to Test It
A capacitor is a passive electronic component that stores energy in an electric field. In its simplest form, it has two conductive plates separated by an insulating material called a dielectric. When a voltage is applied, charge accumulates on the plates, creating an electric field. The capacitor can then release energy back into a circuit. Capacitors are used for decoupling, filtering, timing, coupling signals, smoothing rectified supplies, motor circuits, and many other tasks.
The unit of capacitance is the farad (F), named after Michael Faraday. One farad is large for many everyday electronics circuits, so common values are microfarads (µF), nanofarads (nF), and picofarads (pF). The relationship is 1 µF = 1,000 nF and 1 nF = 1,000 pF. A component marked 104 is commonly 100 nF in the three-digit ceramic-capacitor code: 10 followed by four zeros in picofarads gives 100,000 pF, or 100 nF.
Capacitors are not interchangeable just because their capacitance values match. Their voltage rating, tolerance, dielectric, polarity, equivalent series resistance (ESR), temperature behavior, ripple-current capability, and physical size can all matter. This guide explains the fundamentals and shows how to choose, connect, and test capacitors in low-voltage electronics. Large capacitors may retain dangerous charge after a device is unplugged; never assume a circuit is safe simply because power has been removed.
1. Capacitance and the basic relationship
Capacitance describes how much charge is stored per unit voltage. The basic equation is Q = C × V, where Q is charge in coulombs, C is capacitance in farads, and V is voltage across the capacitor. For example, a 100 µF capacitor charged to 5 V stores Q = 100 × 10⁻⁶ × 5 = 500 µC of charge. This does not mean the capacitor is a source of constant voltage; its terminal voltage changes as charge enters or leaves.
The energy stored by an ideal capacitor is E = ½CV². Notice that energy depends on the square of voltage. Doubling the voltage quadruples stored energy for the same capacitance. This is one reason voltage ratings and safe discharge practices matter. A small capacitor used for signal filtering and a large capacitor in a power supply can behave very differently in terms of stored energy, even if both are described by the same basic equations.
Capacitance depends on the physical structure, plate area, distance between plates, and dielectric material. In general, larger effective plate area and a dielectric with higher permittivity increase capacitance, while greater separation reduces it. In real components, temperature, applied voltage, frequency, and aging may change the effective value.
The printed value is therefore a nominal value, not a promise that the capacitance will be exactly that number in every condition. A ceramic capacitor with a high-permittivity dielectric can lose significant effective capacitance under DC bias. For precision timing or analog circuits, check the manufacturer's curves and tolerance rather than relying only on the label.
2. What happens when a capacitor charges and discharges?
In a simple series RC circuit, a resistor limits the current that flows while a capacitor charges. The product R × C is called the time constant, τ (tau). If R is in ohms and C is in farads, τ is measured in seconds. After one time constant, a capacitor charging from a step voltage has reached about 63.2% of its final voltage. After about five time constants, it is very close to its final value for many practical purposes.
For example, a 10 kΩ resistor and a 100 µF capacitor give τ = 10,000 × 0.0001 = 1 second. The ideal capacitor reaches about 63% of the applied step after one second and roughly 99% after five seconds. During discharge through the resistor, voltage falls exponentially. This behavior is used in delays, reset circuits, smoothing, envelope circuits, and simple filters.
The resistor matters. Connecting an uncharged capacitor directly across a low-impedance supply can produce a large inrush current, limited mainly by the source and wiring resistance. That can stress switches, connectors, diodes, and the capacitor itself. In circuits that repeatedly charge and discharge, the current waveform and component power ratings should be checked.
A capacitor does not “store current”; it stores energy and charge. Current flows during changes in voltage, and an ideal capacitor's current is related to how quickly its voltage changes: i = C × dV/dt. A constant voltage across an ideal capacitor results in no continuing current after the initial transient, though real capacitors have leakage and other non-ideal effects.
3. Common capacitor types
Ceramic capacitors are small, inexpensive, and widely used for high-frequency bypassing and decoupling. Small values such as 100 pF, 1 nF, and 100 nF are common. Class 1 ceramics generally offer stable behavior, while high-capacitance Class 2 types can vary more with voltage and temperature. Many small ceramic capacitors are non-polarized.
Aluminium electrolytic capacitors provide relatively high capacitance for their size and cost. They are commonly used for bulk energy storage and low-frequency smoothing. Most are polarized: the positive and negative terminals must be connected correctly. Reversing polarity can cause heating, leakage, venting, or rupture. Their capacitance tolerance and ESR may be larger than those of some other types.
Tantalum capacitors offer high capacitance density and are polarized. They can fail short or overheat when overstressed, so derating and correct polarity are important. Follow the manufacturer's recommended voltage margin and surge-current guidance.
Film capacitors use plastic film as the dielectric and are often useful in timing, signal, pulse, and AC applications. Many have stable characteristics and are non-polarized. Safety-rated X and Y capacitors are specially designed for particular mains-connected applications; ordinary capacitors must not be substituted for them.
Supercapacitors have very high capacitance and can store more energy than conventional capacitors, but they typically operate at low cell voltages and have substantial leakage compared with ordinary capacitors. Series-connected cells may require balancing. Their high capacitance does not mean they can replace a battery in every application; voltage range, energy density, current capability, and self-discharge differ.
4. Read the value and voltage rating
Ceramic capacitors often use a three-digit code. The first two digits are significant figures and the third is the number of zeros, with the result expressed in picofarads. Code 101 means 100 pF; 102 means 1,000 pF or 1 nF; 104 means 100,000 pF or 100 nF; and 105 means 1,000,000 pF or 1 µF. Some parts use letters for tolerance or other codes, and not every marking follows this simple system, so confirm ambiguous markings with the datasheet.
Larger electrolytic capacitors commonly print capacitance and rated voltage directly, such as 470 µF 16 V. The 16 V marking is the maximum rated working voltage under the manufacturer's specified conditions, not the voltage that the component automatically provides. In a 5 V circuit, a correctly specified 10 V or 16 V capacitor may be suitable, but the choice also depends on ripple current, temperature, life expectancy, and transients.
Use voltage margin rather than designing right at the rating. The appropriate margin depends on capacitor technology and circuit conditions; tantalum and some ceramic applications need special attention to derating. A higher voltage rating alone does not guarantee a better component if size, ESR, ripple current, or temperature requirements are unsuitable.
Polarity markings vary. An electrolytic capacitor often has a stripe identifying the negative terminal, while the longer lead on a new radial part is often positive; do not rely on lead length after it has been trimmed. Check the body marking and datasheet. On a PCB, a plus sign or shaded area may identify a terminal, but footprints differ. Verify before soldering.
5. Capacitors in real circuits
Decoupling and bypassing: Digital ICs draw brief current pulses when internal transistors switch. A small capacitor placed close to the IC's supply and ground pins provides a local path for these fast current changes and reduces supply disturbance. A common starting point is 100 nF per IC power pin group, with bulk capacitance nearby when required. The correct layout and value depend on the datasheet and board design; distance and loop area matter as much as the printed value.
Power-supply smoothing: After rectification, a bulk capacitor helps supply current between waveform peaks and reduces ripple. Its value depends on load current, ripple frequency, and acceptable ripple voltage. A larger capacitor can reduce ripple but increases inrush current and may increase stress on the rectifier or transformer.
AC coupling: A capacitor can pass changing signal components while blocking a steady DC offset. With a resistor, it forms a high-pass filter. The cutoff frequency for a simple first-order RC high-pass network is approximately f_c = 1/(2πRC). Signals below the cutoff are attenuated more than signals above it.
Low-pass filtering and timing: A resistor and capacitor can attenuate high-frequency changes, smooth sensor readings, or create a delay. However, a passive RC network loads its source and is not a substitute for a designed active filter where accuracy or drive capability matters.
Motors and switching: Some AC motors require capacitors specified for their exact motor application. These are not the same as ordinary low-voltage decoupling parts. Motor capacitors can be hazardous and may remain charged; use the manufacturer's specified replacement and qualified service procedures.
6. Worked examples
Example A: selecting a decoupling capacitor
Suppose a sensor module's documentation recommends a 100 nF ceramic capacitor between its supply and ground. Select a part with the appropriate capacitance, a voltage rating comfortably above the rail, and suitable temperature and dielectric characteristics. Place it close to the module's supply pins with short connections. A capacitor several centimetres away may still help at lower frequencies but will be less effective at suppressing very fast current loops.
Example B: estimating an RC delay
A 10 kΩ resistor charging a 100 µF capacitor gives a time constant of one second. If a microcontroller input watches the capacitor voltage, the input may cross its logic threshold before five seconds; the exact delay depends on the threshold, initial voltage, leakage, tolerances, and input circuit. Therefore an RC circuit is a useful demonstration, but not a precision timer without calibration or a more suitable timing method.
Example C: estimating filter cutoff
For R = 10 kΩ and C = 100 nF, the ideal first-order cutoff is 1/(2π × 10,000 × 100 × 10⁻⁹), approximately 159 Hz. A signal far below this frequency is strongly attenuated by a high-pass version of the network; a signal far above it is passed more readily. For a low-pass version, the pass/attenuation relationship is reversed.
These calculations assume ideal components and a simple unloaded network. Real sources and loads add resistance and capacitance, shifting the result. For sensor inputs, confirm that the filter does not slow the signal too much or interfere with sampling. For fast digital edges, an arbitrary capacitor can distort timing or increase driver current, so use a circuit-specific recommendation.
7. How to test a capacitor
First, identify the capacitor and the circuit it belongs to. For a board-level test, turn the equipment off, disconnect it from every power source, and follow the manufacturer's service procedure. Capacitors can remain charged after unplugging. High-voltage power supplies, microwave equipment, camera flashes, and some motor systems can retain dangerous energy. If you are not trained to service such equipment, do not open it or attempt to discharge internal capacitors.
For a low-voltage educational circuit, verify that the supply is disconnected and that the capacitor voltage has fallen to a safe level using a correctly rated meter. Where discharge is required, use an appropriately rated resistor and a procedure designed for the capacitor's voltage and energy; do not short the terminals with a screwdriver. Never assume a capacitor is discharged simply because a few seconds have passed. Recheck voltage before touching conductors.
A multimeter with a capacitance function may measure the component after it is isolated from the circuit. In-circuit readings can be misleading because other components create parallel paths. A capacitance reading near the nominal value does not prove the capacitor is healthy: high ESR, leakage, or breakdown under operating voltage may remain undetected.
An LCR meter can measure capacitance and, depending on the instrument, ESR or dissipation factor at a selected frequency. An ESR meter is useful for some electrolytic-capacitor faults, but its readings depend on test frequency and circuit context. If a capacitor is swollen, leaking, corroded, cracked, or has a damaged safety vent, replace it with a suitable part rather than trying to rehabilitate it.
8. Common failure modes and troubleshooting
Wrong polarity: A polarized capacitor installed backwards may heat, leak, or fail. Disconnect power safely and correct the orientation only after verifying the circuit and the replacement part. Do not continue powering a board with a visibly damaged capacitor.
Underrated voltage: A transient or supply peak can exceed the rating. Check the worst-case voltage, including startup, load release, and inductive switching. A capacitor rated for the nominal rail may still be unsuitable if spikes are present.
Excessive ripple current or temperature: Ripple current creates internal heating due to losses. High temperature and unsuitable operating conditions shorten electrolytic life. Select parts based on ripple-current and temperature ratings, not capacitance alone.
Unexpected resets: A microcontroller may reset when a motor or radio transmits because the supply dips. A bulk capacitor near the load can help, but first check the regulator, source current capability, wiring resistance, ground return, and transient behavior. Capacitors cannot compensate for an undersized or poorly regulated supply in every case.
Wrong value or placement: Too much capacitance on a signal can slow transitions; too little bulk capacitance can allow ripple. A decoupling capacitor placed far from the IC may not control high-frequency noise effectively. Follow the board reference design and datasheet.
A capacitor tests correctly but the fault remains: The failure may be elsewhere, or the capacitor may fail only at voltage or temperature. Check for shorted diodes, regulator faults, bad solder joints, and excessive load only with a safe, methodical diagnostic process. Avoid replacing parts at random; record measurements and compare them with a known-good circuit when available.
9. Choosing a replacement
Match the capacitance to the circuit's required range and consider the original design. Match or exceed the required voltage rating while respecting the technology-specific derating guidance. For polarized parts, match polarity. Check dimensions, lead spacing, mounting style, temperature rating, expected lifetime, ripple-current rating, ESR, and any safety certification.
Do not replace an X or Y safety capacitor in a mains-connected product with a generic film or ceramic capacitor. Safety-rated capacitors are tested for specific failure behavior and placement across line/neutral or line/earth boundaries. Similarly, do not replace a motor-run capacitor with a random electrolytic part. Use the exact class and rating specified by the equipment manufacturer.
A larger capacitance is not always harmless. It can increase inrush current, alter startup timing, affect regulator stability, or slow a signal. A much lower ESR part can also change circuit behavior in designs that rely on a particular capacitor's impedance. For a beginner's decoupling capacitor, a standard suitable ceramic part is often straightforward; for a power supply or motor, the surrounding design matters considerably more.
When soldering a replacement, observe polarity and avoid overheating the body. Inspect for solder bridges and damaged pads. After installation, test the circuit using a current-limited supply where practical and monitor for abnormal heat, smell, or noise. If the original capacitor failed catastrophically, determine why before replacing it; an underlying overvoltage or short circuit can destroy the new part too.
10. Frequently asked questions and recap
Can a capacitor work on AC and DC? It depends on the type and application. Non-polarized film and suitable ceramic capacitors are commonly used with AC signals within their ratings. Polarized electrolytics generally require correct DC polarity and must not be used with substantial reverse voltage. Special AC motor and safety capacitors are designed for specific conditions.
Does a capacitor block DC? In an ideal steady-state circuit, a capacitor blocks continuous current after it has charged, while allowing current during changes in voltage. Real capacitors have leakage, and their behavior depends on frequency and the surrounding circuit.
Can I use a 100 µF capacitor instead of 100 nF? Not automatically. The capacitance is 1,000 times larger and can change startup, filtering, timing, inrush current, and circuit stability. Match the design value unless the circuit designer explicitly allows a range.
Why is a capacitor marked 25 V usable in a 5 V circuit? The rating indicates the maximum permitted working voltage under specified conditions, not the output voltage. A 25 V part may be used on 5 V if other characteristics and physical requirements suit the application, though it may be larger than needed.
Is capacitance the only thing a meter should check? No. ESR, leakage, dielectric absorption, temperature behavior, and voltage-dependent faults can matter. The right test depends on the circuit and symptom.
Practical checklist
- Confirm capacitance, voltage rating, dielectric, polarity, and physical fit.
- Place decoupling capacitors close to the IC supply pins.
- Use the correct capacitor type for power, signal, motor, or safety applications.
- Isolate power and verify discharge before testing or handling.
- Treat mains-powered equipment and large energy-storage capacitors as potentially hazardous.
Capacitors are simple in principle but influential in real designs. Understanding their charging behavior, non-ideal properties, ratings, and placement helps you build more stable electronics and troubleshoot faults without replacing parts blindly.