Home / Circuit lab / RC charging

RC charging and discharging simulator

A capacitor charging through a resistor doesn't fill at a steady rate. It starts fast and slows down. Change R and C, flip the switch, and watch the curve.

Intermediate

chargedischarge

Controls

Readings

What's going on

When the switch connects the supply, the full supply voltage is across the resistor, so current starts at V ÷ R. As the capacitor charges, there's less voltage left across the resistor, so the current falls and charging slows. The result is an exponential curve: Vc = V × (1 − e−t/RC).

The time constant τ = R × C sets the speed. After one τ, the capacitor reaches 63.2% of the supply. After five τ, it's above 99.3%, which engineers usually treat as full. Discharging follows the same curve upside down: after one τ, 36.8% is left.

RC timing is everywhere: switch debouncing, power-on reset circuits, the 555 timer, and simple filters. With 10 kΩ and 100 µF, τ is one second.

How this simulation works

The curves come straight from the exact equations above, with an ideal supply, resistor and capacitor. Real capacitors leak a little, and electrolytic capacitors often have a tolerance of ±20%, so real timings can differ by that much. The trace always takes three seconds to draw, so very fast circuits are shown in slow motion and very slow ones are sped up. The axis shows the real time.

Keep exploring