Simulate RC circuit charging and discharging in real time. Plots voltage, current, and stored energy curves. Time constant τ, max energy U, and charge Q calculated automatically.
Parameters
Capacitance C
1 pF – 1000 μF (log scale)
Resistance R
1 Ω – 1 MΩ (log scale)
Supply voltage V₀
V
Initial voltage V_i
V
Mode
Frequency f
Hz
Results
—
Time constant τ = RC [s]
—
V at t=τ (63.2%) [V]
—
Max energy U = ½CV² [J]
—
Charge Q = CV₀ [C]
Vc
Theory & Key Formulas
Charging (initial voltage V_i, supply V₀):
$$V_C(t) = V_0 + (V_i - V_0)e^{-t/RC}$$
Discharging: $V_C(t) = V_i \cdot e^{-t/RC}$
Time constant: $\tau = RC$; at $t=\tau$: $V_C \approx 0.632\,V_0$ (charging from 0)
Energy and charge: $U = \dfrac{1}{2}CV^2$, $Q = CV$
What is RC Circuit Dynamics?
🙋
What exactly is this "time constant" I see in the simulator? It says τ = RC.
🎓
Basically, the time constant τ is the natural speedometer of an RC circuit. It tells you how fast the capacitor charges or discharges. In practice, after one time constant (t = τ), the capacitor's voltage will have changed by about 63.2% of the way from its starting point to its final value. Try moving the R and C sliders in the simulator above—you'll see the curve stretch or shrink instantly.
🙋
Wait, really? So if I set R=10kΩ and C=100µF, τ is 1 second. Does that mean it's fully charged in 1 second?
🎓
Not quite! It's a common point of confusion. After 1τ, it's about 63% charged. For "fully" charged, engineers use 5τ, which gets you to 99.3%. So with your 1-second τ, you'd need about 5 seconds. A great example is the power-on delay for a simple electronic timer. Watch the voltage plot in the simulator—see how it asymptotically approaches the supply voltage V₀? That's the 5τ rule in action.
🙋
Okay, that makes sense for voltage. But what about the energy plot? The formula says U = ½CV². Why doesn't the energy curve look the same as the voltage curve?
🎓
Excellent observation! Because energy depends on the square of the voltage ($U \propto V^2$), it changes in a different way. For instance, when the voltage is at 63% (at t=τ), the stored energy is only about $0.63^2 \approx 40\%$ of the maximum. This is crucial for applications like a camera flash, which needs to know how much energy is available to fire. Try changing the initial voltage V_i in the simulator and watch how the energy plot's starting point and shape respond.
Physical Model & Key Equations
The core behavior is governed by the solution to the differential equation for the capacitor voltage, derived from Kirchhoff's voltage law and the capacitor's current relationship (i = C dV/dt).
Where:
• $V_C(t)$: Capacitor voltage at time $t$ (Volts)
• $V_{\text{final}}$: The voltage the capacitor approaches (V₀ for charging, 0V for discharging)
• $V_i$: Initial capacitor voltage at $t=0$
• $R$: Resistance (Ohms, Ω)
• $C$: Capacitance (Farads, F)
• $\tau = RC$: The time constant (Seconds)
The instantaneous energy stored in the capacitor's electric field is calculated from its instantaneous voltage.
$$U(t) = \frac{1}{2}C \left[ V_C(t) \right]^2$$
Where $U(t)$ is the stored energy in Joules. This shows that energy is proportional to the square of the voltage, so it builds up and dissipates at a different rate than the voltage itself. The maximum possible stored energy is $U_{max}= \frac{1}{2}C V_0^2$.
Frequently Asked Questions
The time constant τ is an indicator of the response speed of an RC circuit, calculated as τ = R × C. During charging, it is the time for the voltage to reach approximately 63.2% of its final value; during discharging, it is the time for the voltage to drop to approximately 36.8% of its initial value. On the simulator's graph, you can visually confirm τ by using this change point as a reference.
In AC input mode, instead of a DC step input, an AC voltage such as a sine wave is applied. The voltage and current of the capacitor change periodically, allowing you to observe phase differences and the effects of impedance in real time. This is useful for understanding the frequency characteristics and transient response of RC filters.
Increasing R or C increases the time constant τ, making charging and discharging slower. Conversely, decreasing them makes it faster. Additionally, the maximum stored energy is proportional to C and the square of the voltage, so increasing C also increases the energy value. Use the simulator to change the values and compare changes in the curve's slope and the time to reach the target value.
This simulator is based on an ideal RC circuit model (ignoring internal resistance and stray capacitance), so it perfectly matches theoretical values. In actual circuits, errors occur due to component tolerances and wiring resistance, but it provides sufficient accuracy for design guidelines and learning principles. It can also be used to adjust parameters before conducting experiments.
Real-World Applications
Power Supply Filtering: RC circuits are fundamental low-pass filters in power supplies. They smooth out voltage ripples from a rectifier. The cutoff frequency $f_c = 1/(2\pi RC)$ determines which AC noise components are attenuated. Engineers use simulators like this to choose R and C values that provide sufficient smoothing without excessive voltage drop.
Camera Flash & Strobe Lights: The capacitor charges up from a battery over several seconds (high R for slow, safe charging) and then discharges through the flashbulb in milliseconds (very low R for a high-power pulse). The energy plot is critical here to ensure $U = \frac{1}{2}CV^2$ meets the light output requirement.
Timing Circuits & Pulse Generation: The predictable charging curve is used to create precise delays or time windows. For example, the time it takes to reach a specific threshold voltage can trigger another circuit. This is the basis for 555 timer ICs in monostable mode, used in everything from kitchen appliances to automotive electronics.
SPICE Simulation Pre-Check: Before running a complex circuit simulation in software like LTspice, engineers perform hand calculations using the RC time constant to predict behavior and sanity-check their results. This simulator provides that intuitive, immediate feedback on how parameter changes affect the system's transient response.
Common Misconceptions and Points to Note
First, be aware of the common misconception that "charging or discharging completes at the time constant τ." At time τ, the capacitor voltage only reaches about 63% (charging) or about 37% (discharging) of the target value. In practice, as your senior colleague likely mentioned, we consider it "complete" at 5τ, but in high-precision measurement circuits, for example, you need to allow for an even longer time. Relying on a rough sense of "about τ" is risky.
Next, don't overlook the heat loss generated when selecting the resistor R. In a simulator, you can freely change the resistance value, but in a real circuit, for instance, if 1A flows through a 10Ω resistor, the power dissipation becomes $P=I^2R=10W$. A small chip resistor would burn out instantly. Don't reduce R too casually just because you want to move energy faster. Pay special attention to large currents during discharge.
Finally, do not simulate beyond the capacitor's "rated voltage." While tools let you freely set the supply voltage V₀, real capacitors always have a "withstand voltage." For example, applying 20V to a capacitor rated for 16V risks smoke or rupture in the worst case. If you learn from simulation that "increasing the voltage dramatically increases energy," your next step should be to develop the habit of checking the safe operating range in the actual component's datasheet.