Charging: $V(t)=V_0\!\left(1-e^{-t/\tau}\right)$
Discharging: $V(t)=V_0\,e^{-t/\tau}$
$\tau=RC,\quad I(t)=\dfrac{V_0}{R}e^{-t/\tau}$
Adjust R, C, and V₀ to see exponential charging and discharging curves update instantly. Observe the time constant τ=RC and see why 5τ means "fully charged."
Charging: $V(t)=V_0\!\left(1-e^{-t/\tau}\right)$
Discharging: $V(t)=V_0\,e^{-t/\tau}$
$\tau=RC,\quad I(t)=\dfrac{V_0}{R}e^{-t/\tau}$
The core behavior comes from Kirchhoff's voltage law and the definition of capacitor current. For a charging capacitor, the voltage across it increases as charge builds up, reducing the current flowing from the source.
$$V(t) = V_0 \left(1 - e^{-t/\tau}\right)$$$V(t)$ = Capacitor voltage at time $t$ (V)
$V_0$ = Supply voltage (V)
$\tau$ = Time constant, $\tau = R \times C$ (seconds)
$e$ = Euler's number (~2.718), the base of the natural logarithm.
This equation describes the "S-shaped" charging curve you control with R and C.
When discharging, the capacitor itself acts as the voltage source, and the current flows through the resistor until the stored energy is depleted.
$$V(t) = V_0 \, e^{-t/\tau}$$$V(t)$ = Capacitor voltage at time $t$ (V)
$V_0$ = Initial voltage on the capacitor (V)
The same time constant $\tau = RC$ governs the speed of decay. The current during discharge is $I(t) = -\frac{V_0}{R}e^{-t/\tau}$ (the negative sign indicates direction opposite to charging).
Timers and Flashing Lights: The predictable delay of an RC circuit is perfect for creating time intervals. For instance, the blinking rate of an LED in a cheap novelty toy is often set by an RC circuit charging up to the trigger voltage of a transistor.
Camera Flash Units: A large capacitor is charged by the camera's battery over a few seconds (a slow charge with high R). It then discharges through the flashbulb almost instantly (a very fast discharge with low R), releasing a burst of bright light.
Debounce Circuits: Mechanical buttons "bounce" electrically when pressed. An RC circuit can smooth out these rapid voltage spikes into a single, clean transition, ensuring your digital circuit registers only one button press.
Analog Filters: By exploiting the frequency-dependent behavior of capacitors, RC circuits form the basis of simple low-pass or high-pass filters. These are fundamental in audio equipment to block bass or treble sounds, and in signal processing to remove noise.
First, the expression "a capacitor stores 'voltage' like a battery" is not strictly accurate. What a capacitor stores is "charge"; a voltage appears across its terminals as a result. Recall the relationship $Q=CV$. For the same capacitance C, a greater charge Q leads to a higher voltage V. This is the fundamental origin of the charge/discharge curve. A common mistake is ignoring the voltage across the resistor R during charging. Because current is flowing during charging, a voltage drop occurs across the resistor due to Ohm's law. The supply voltage $V_0$ is divided between the "capacitor voltage $V_C$" and the "resistor voltage $V_R$" ($V_0 = V_C + V_R$). While it's easy to focus only on $V_C$ in the graph, tracking the change in $V_R$ makes it easier to understand the decay of the current.
Next, note that the time constant τ=RC is not the "time to complete charging". At time τ, charging is about 63% complete; at 3τ it's about 95%, and at 5τ it's about 99%. In practice, you decide the time considered "almost complete" based on the required precision of your circuit. For example, in a power supply circuit's smoothing capacitor, a design that waits until 5τ is common. Also, while simulators use ideal power sources and components, real power sources have output current limits, and capacitors have an "Equivalent Series Resistance (ESR)". Especially in circuits like camera flashes that require instantaneous high current, this ESR becomes a cause of heat generation and reduced efficiency. When experimenting with the preset values, please regard them as the "basic form of ideal behavior".