When designing timing circuits, debounce filters, or power hold-up networks, you need exact voltage predictions. The charging and discharging capacitor equations dictate how voltage across a capacitor changes over time in a DC resistor-capacitor (RC) network. The core charging equation is Vc(t) = Vs(1 - e-t/RC) and the discharging equation is Vc(t) = V0e-t/RC. These formulas assume an ideal capacitor, a constant DC voltage source, and a step-function input. Below, we break down every symbol, provide real-world component data, and solve bench-level problems with strict unit tracking.
The Core Charging and Discharging Capacitor Equations
The exponential nature of capacitor charging means the voltage changes rapidly at first, then asymptotically approaches its final value. The product of resistance and capacitance (R × C) defines the time constant, denoted by the Greek letter tau (τ). After one time constant (1τ), a charging capacitor reaches 63.2% of the source voltage, while a discharging capacitor drops to 36.8% of its initial voltage. After 5τ, the circuit is considered fully charged or discharged (99.3%).
Every symbol in the charging and discharging capacitor equations is defined in the reference table below. Never plug values into these formulas without verifying their units against this table.
| Symbol | Parameter | Standard SI Unit | Physical Meaning |
|---|---|---|---|
| Vc(t) | Capacitor Voltage at time t | Volts (V) | The instantaneous voltage across the capacitor terminals. |
| Vs | Source Voltage | Volts (V) | The constant DC supply voltage charging the capacitor. |
| V0 | Initial Voltage | Volts (V) | The starting voltage on the capacitor before discharging begins. |
| R | Resistance | Ohms (Ω) | Total series resistance limiting the current flow. |
| C | Capacitance | Farads (F) | The charge storage capacity of the component. |
| t | Time | Seconds (s) | Elapsed time since the charge/discharge cycle began. |
| e | Euler's Number | Dimensionless (~2.71828) | The base of the natural logarithm, defining the exponential curve. |
| τ | Time Constant | Seconds (s) | The time required to reach 63.2% of the final voltage (τ = RC). |
Bench Assumption Check: These equations assume an ideal capacitor with zero Equivalent Series Resistance (ESR) and zero Equivalent Series Inductance (ESL). In high-speed or high-current pulse applications (like driving a MOSFET gate), the ESR of an aluminum electrolytic capacitor will cause an immediate voltage step at t=0 that this ideal formula does not predict. For precision timing, always use C0G/NP0 ceramic or film capacitors.
Real-World Component Data and Time Constants
Theory is useless if you don't know what component values look like on a real workbench. The table below maps standard RC combinations used in modern embedded and power designs to their calculated time constants. Notice how drastically the physical capacitor chemistry changes based on the required τ.
| Application Scenario | Resistance (R) | Capacitance (C) | Time Constant (τ) | 99% Settling Time (5τ) | Recommended Dielectric |
|---|---|---|---|---|---|
| ESP32 EN Pin Hardware Debounce | 10 kΩ | 100 nF (0.1 μF) | 1 ms | 5 ms | X7R MLCC (0402/0603) |
| 555 Timer Monostable (1s Pulse) | 910 kΩ | 1 μF | 910 ms | 4.55 s | Polyester Film / MKT |
| Audio AC-Coupling High-Pass | 10 kΩ | 10 μF | 100 ms | 500 ms | Bipolar Electrolytic |
| 12V DC Motor Snubber Network | 47 Ω | 470 nF | 22.09 μs | 110.45 μs | C0G/NP0 Ceramic or Film |
| Power Supply Bulk Hold-Up | 50 Ω (Trace+ESR) | 4700 μF | 235 ms | 1.175 s | Aluminum Electrolytic |
According to All About Circuits' guide on RC time constants, selecting the right dielectric is just as critical as calculating the math. X7R ceramics exhibit severe DC bias derating—a 10 μF X7R capacitor at 12V might only provide 3 μF of actual capacitance, cutting your calculated τ by 70%. Always check the manufacturer's DC bias curves for MLCCs.
Rearranged Forms for Circuit Design
On the bench, you rarely need to find the voltage at a specific time. Usually, you know the target voltage threshold (like a microcontroller's logic-high trigger point) and need to solve for the required time, resistance, or capacitance. Here are the algebraically rearranged forms of the charging and discharging capacitor equations.
Solving for Time (t)
- Charging: t = -RC × ln(1 - (Vc / Vs))
- Discharging: t = -RC × ln(Vc / V0)
Solving for Resistance (R)
- Charging: R = -t / [C × ln(1 - (Vc / Vs))]
- Discharging: R = -t / [C × ln(Vc / V0)]
Solving for Capacitance (C)
- Charging: C = -t / [R × ln(1 - (Vc / Vs))]
- Discharging: C = -t / [R × ln(Vc / V0)]
Note: 'ln' denotes the natural logarithm (base e), not the base-10 logarithm ('log'). Using the wrong logarithm function on your calculator will yield completely invalid component values.
Worked Examples with Strict Unit Tracking
The most common point of failure in RC calculations is unit mismanagement. The formulas strictly require base SI units: Ohms, Farads, and Seconds. Below are two bench-level problems demonstrating explicit unit conversion and intermediate steps.
Problem 1: Designing an ESP32 Delayed Reset Circuit
Scenario: You need an ESP32-C3 development board to hold its EN (enable) pin below the 2.5V logic-high threshold for exactly 150 milliseconds after a 5V USB power source is connected to prevent brownout boot loops. You have a 10 μF capacitor. What resistor value is required?
- Identify Knowns and Convert to SI Units:
- Source Voltage (Vs) = 5 V
- Target Threshold Voltage (Vc) = 2.5 V
- Target Time (t) = 150 ms = 0.15 s
- Capacitance (C) = 10 μF = 10 × 10-6 F = 0.00001 F
- Select the Correct Rearranged Formula:
- We are charging from 0V toward 5V, so we use the charging equation solved for R:
- R = -t / [C × ln(1 - (Vc / Vs))]
- Calculate the Logarithmic Term:
- Vc / Vs = 2.5 / 5 = 0.5
- 1 - 0.5 = 0.5
- ln(0.5) ≈ -0.693147
- Solve for R:
- R = -0.15 / [0.00001 × -0.693147]
- R = -0.15 / -0.00000693147
- R = 21,640.4 Ω
- Select Standard Component: Choose the next highest E12 standard resistor value to guarantee the delay is at least 150ms. A 22 kΩ resistor will yield a delay of ~152.5 ms.
Problem 2: High-Voltage Power Supply Bleeder Resistor
Scenario: A 24V DC motor controller uses a 4700 μF bulk aluminum electrolytic capacitor. For safety, the capacitor must discharge to a safe-to-touch voltage of 5V within 3 seconds after power is removed. What is the maximum bleeder resistor value you can install across the capacitor terminals?
- Identify Knowns and Convert to SI Units:
- Initial Voltage (V0) = 24 V
- Target Safe Voltage (Vc) = 5 V
- Maximum Time (t) = 3 s
- Capacitance (C) = 4700 μF = 4700 × 10-6 F = 0.0047 F
- Select the Correct Formula:
- This is a discharging circuit. We use the discharging equation solved for R:
- R = -t / [C × ln(Vc / V0)]
- Calculate the Logarithmic Term:
- Vc / V0 = 5 / 24 ≈ 0.20833
- ln(0.20833) ≈ -1.5686
- Solve for R:
- R = -3 / [0.0047 × -1.5686]
- R = -3 / -0.007372
- R = 406.9 Ω
- Engineering Decision: To ensure the voltage drops faster than 3 seconds, you must use a lower resistance. Select a standard 390 Ω power resistor. Note: Calculate the steady-state power dissipation (P = V2/R = 242/390 = 1.47W) and specify a 3W or 5W wirewound resistor to handle the continuous thermal load while the machine is running.
Unit Mistakes That Break the Math and Realistic Magnitudes
When your calculated results look absurd, you almost certainly fell victim to one of three common unit errors. According to Electronics Tutorials' RC circuit analysis, maintaining dimensional consistency is the primary hurdle for students and junior engineers.
- The Microfarad Trap: Plugging '10' into the formula when you have a 10 μF capacitor. The formula demands Farads. 10 μF is 0.00001 F. Forgetting the 10-6 multiplier will make your calculated time constant one million times larger than reality.
- The Kilo-ohm Oversight: Using '47' instead of '47,000' for a 47 kΩ resistor. This shrinks your calculated time constant by a factor of 1,000.
- The Logarithm Confusion: Pressing the 'log' button (base-10) on a calculator instead of the 'ln' button (base-e). Because ln(x) and log(x) differ by a factor of ~2.302, your final component value will be off by over 200%.
Sanity Checking Realistic Magnitudes
Develop an intuition for what a realistic answer looks like in hobby and commercial electronics. In 95% of embedded timing, debounce, and audio coupling circuits, the time constant (τ) falls between 10 microseconds and 5 seconds.
If you are designing a simple 555-timer LED flasher and your math yields a time constant of 4,200 seconds (over an hour), you have almost certainly failed to convert microfarads to Farads. Conversely, if you are calculating the bulk hold-up time for a 10,000 μF power supply filter and your answer is 0.0004 seconds, you likely forgot to convert your milli-ohm ESR or kilo-ohm load resistance into base Ohms. Always write the units next to your numbers during the intermediate algebraic steps; the units must cancel out to leave only Seconds at the end of the calculation.






