When you are designing a soft-start circuit, sizing a bleeder resistor for a high-voltage power supply, or setting the timing for a 555-based oscillator, you cannot rely on rule-of-thumb guessing. You need the exact charging and discharging of capacitor formula to predict how voltage and current behave over time. While the math is rooted in first-order differential equations, applying it on the workbench requires strict unit tracking and an understanding of where the ideal math breaks down against real-world parasitics.
The Core Equations and Symbol Definitions
The behavior of a capacitor in a DC circuit is governed by the RC time constant, denoted by the Greek letter tau (τ). One time constant (τ = R × C) is the time it takes for the capacitor to charge to approximately 63.2% of the source voltage, or discharge to 36.8% of its initial voltage. After five time constants (5τ), the circuit is considered to have reached steady state (99.3% charged or 0.7% remaining).
For a charging circuit (a capacitor initially uncharged, connected to a DC source via a resistor), the voltage across the capacitor at any time t is:
Vc(t) = Vs(1 - e-t/RC)
For a discharging circuit (a charged capacitor disconnected from the source and shorted through a resistor), the voltage is:
Vc(t) = V0e-t/RC)
| Symbol | Parameter | Standard SI Unit | Practical Bench Unit |
|---|---|---|---|
| Vc(t) | Voltage across the capacitor at time t | Volts (V) | Volts (V) |
| Vs | Source voltage (charging circuit) | Volts (V) | Volts (V) |
| V0 | Initial voltage (discharging circuit) | Volts (V) | Volts (V) |
| e | Euler's number (mathematical constant) | ~2.71828 | ~2.71828 |
| t | Elapsed time | Seconds (s) | Milliseconds (ms) or Microseconds (μs) |
| R | Resistance in the charge/discharge path | Ohms (Ω) | Kilo-ohms (kΩ) |
| C | Capacitance | Farads (F) | Microfarads (μF) or Nanofarads (nF) |
| τ | RC Time Constant (R × C) | Seconds (s) | Milliseconds (ms) |
Rearranged Forms: Solving for Time, Resistance, and Capacitance
On the bench, you rarely need to find the voltage at a random time. Usually, you know the target voltage and need to size the resistor or capacitor to hit a specific timing window. By applying the natural logarithm (ln) to both sides of the core equations, we can isolate the variables. According to standard circuit theory resources like Electronics Tutorials, these rearranged forms are the workhorses of RC design.
- Solving for Time (Charging):
t = -RC × ln(1 - (Vc / Vs)) - Solving for Time (Discharging):
t = -RC × ln(Vc / V0) - Solving for Resistance (from Charging Time):
R = -t / (C × ln(1 - (Vc / Vs))) - Solving for Capacitance (from Charging Time):
C = -t / (R × ln(1 - (Vc / Vs)))
Bench Work: Two Solved Problems with Strict Unit Tracking
The most common point of failure in RC calculations is unit mismatch. You must convert all practical bench units into base SI units (Farads, Ohms, Seconds) before plugging them into the formula.
Problem 1: Timing a Relay Delay (Charging)
Scenario: You have a 12V DC source, a 2.2 kΩ resistor, and a 470 μF electrolytic capacitor. You want to know the exact voltage across the capacitor 2 seconds after the switch is closed.
- Convert to base SI units:
R = 2.2 kΩ = 2,200 Ω
C = 470 μF = 470 × 10-6 F = 0.00047 F
Vs = 12 V
t = 2 s - Calculate the time constant (τ):
τ = R × C = 2,200 × 0.00047 = 1.034 seconds - Apply the charging formula:
Vc(2) = 12 × (1 - e-2 / 1.034)
Vc(2) = 12 × (1 - e-1.934) - Solve the exponent:
e-1.934 ≈ 0.1445
Vc(2) = 12 × (1 - 0.1445) = 12 × 0.8555 - Final Result:
Vc(2) ≈ 10.27 V. (This makes sense, as 2 seconds is roughly 2τ, and at 2τ the cap should be at ~86.5% of 12V, which is 10.38V. The slight difference is due to rounding the exponent).
Problem 2: Sizing a Bleeder Resistor for Safety (Discharging)
Scenario: A 48V solar charge controller uses a 10,000 μF bulk capacitor. For safety, you need a bleeder resistor that drops the capacitor voltage from 48V to a safe touch voltage of 5V within 3 seconds of power-off. What resistance do you need?
- Convert to base SI units:
C = 10,000 μF = 0.01 F
V0 = 48 V
Vc = 5 V
t = 3 s - Rearrange the discharging time formula to solve for R:
t = -RC × ln(Vc / V0)
R = -t / (C × ln(Vc / V0)) - Calculate the natural log term:
ln(5 / 48) = ln(0.10416) ≈ -2.261 - Plug in the values:
R = -3 / (0.01 × -2.261)
R = -3 / -0.02261 - Final Result:
R ≈ 132.6 Ω. You would select a standard 130 Ω or 120 Ω power resistor to ensure it drops below 5V slightly faster than the 3-second requirement.
Real-World Scenario: When the Math Meets Parasitics
The charging and discharging of capacitor formula assumes ideal components. Let us look at a real-world bench failure where ignoring parasitics led to a vaporized component.
The Setup: I was designing a precharge (soft-start) circuit for a 48V e-bike motor controller. The controller had a massive 2,200 μF low-ESR input capacitor bank. To prevent the battery management system (BMS) from tripping on inrush current, I needed to limit the initial surge to 5A and precharge the caps to 95% before a MOSFET bypassed the resistor. Target precharge time: < 100ms.
The Numbers:
Target current limit = 5A. R = V / I = 48V / 5A = 9.6 Ω (I used a standard 10 Ω resistor).
C = 2,200 μF = 0.0022 F.
τ = 10 × 0.0022 = 0.022 seconds (22ms).
To reach 95% charge (3τ), the math dictated a time of 66 milliseconds. I grabbed a standard 1/4W carbon film 10 Ω resistor from my bench bin, wired it up, and applied power.
The Outcome: The resistor instantly cracked with a loud pop, venting magic smoke. The BMS tripped anyway, and the MOSFET never fired.
What Went Wrong: The ideal formula calculates the steady-state RC curve, but it fails to account for the instantaneous thermal mass (I2t rating) of the physical component. At t=0, the uncharged capacitor acts as a dead short. The continuous power dissipation through the resistor at t=0 was P = I2R = 52 × 10 = 250 Watts. Even though this surge only lasted for ~66ms, the total energy dumped into the resistor was roughly 16 Joules (250W × 0.066s). A standard 1/4W carbon film resistor can typically survive a surge of only 2 to 4 Joules. The carbon element literally vaporized from thermal shock.
The Fix: The math for the timing was correct, but the component selection was wrong. I replaced the carbon film resistor with a 10 Ω, 5-Watt ceramic-encased wirewound resistor specifically rated for high surge energy (like the Vishay ZWS series). Wirewound resistors have the thermal mass to absorb that 16-Joule spike without failing. Furthermore, as noted in All About Circuits' guide on inrush current, you must also account for the capacitor's Equivalent Series Inductance (ESL), which can cause high-frequency ringing that the basic RC exponential formula completely ignores.
Assumptions, Unit Traps, and Realistic Magnitudes
To use the charging and discharging of capacitor formula effectively, you must understand its boundaries.
When the Formula Applies (and Its Assumptions)
The standard exponential equations assume:
- An ideal DC voltage source with zero internal resistance. If your source sags under load (like a weak battery), Vs is no longer constant, and the curve flattens.
- A purely resistive path. If there is significant wiring inductance or capacitor ESL, the circuit becomes an RLC network, potentially causing underdamped ringing (overshoot) rather than a smooth exponential curve.
- No dielectric absorption. In real electrolytic and high-K ceramic capacitors, the dielectric material absorbs some charge and releases it slowly. If you short a 'fully discharged' capacitor an hour later, you will measure a ghost voltage. The ideal formula predicts 0V at 5τ, but reality leaves a residual charge.
- Constant capacitance. Class II ceramics (like X7R or Y5V) exhibit severe DC bias effects. A 10 μF X7R capacitor might actually measure 2 μF when 50V is applied across it, radically altering your τ mid-charge.
Which Unit Mistakes Break the Math
The absolute most common error is the microfarad trap. Plugging '470' into the C variable instead of '0.00047' will result in a time constant that is one million times too large. If your calculation says a small PCB capacitor takes 4,500 seconds to charge, you forgot to convert μF to Farads.
The second trap is mixing time scales. If your oscilloscope timebase is in milliseconds, but your RC calculation yields seconds, you will misinterpret the waveform. Always convert 't' to seconds for the calculation, then convert the final answer back to your scope's timebase.
What a Realistic Answer Magnitude Looks Like
Developing an intuition for τ will save you from decimal errors. For bulk power filtering (e.g., 1,000 μF caps and 10 Ω resistors), τ is typically in the 1ms to 100ms range. For audio coupling or signal timing (e.g., 0.1 μF caps and 10 kΩ resistors), τ is usually in the 1ms to 10ms range. For high-frequency RF decoupling (e.g., 100 pF caps and 50 Ω paths), τ drops into the nanosecond range. If your math yields a τ of 50 seconds for a standard 555 timer circuit, stop and check your unit conversions.






