RC Charge & Discharge Simulator — Capacitor Charging, Discharging & Leakage Interactive

Interactive RC circuit simulator with a magnified capacitor foil stack, a three-position charge/discharge/isolate switch, exact first-order charge integration, optional parallel leakage, a model-verification bench, timestamped event log and a knowledge-check quiz.

← Electronics Labs
About this tool — how it works & FAQOpen ▾Close ▴

About the RC Charge & Discharge Simulator

This simulator models a DC supply, a series timing resistor, an electrolytic-style capacitor and a three-position charge/discharge/isolate switch, integrated with an exact linear RC equation rather than a lookup table. Sweep supply voltage, resistance and capacitance, switch between charging, discharging and isolating the circuit, and optionally add a parallel leakage path to see how it changes both the time constant and the final equilibrium voltage.

What the simulator shows

• A real-time 3D cutaway workbench with a DC charging supply, a three-position charge/discharge/hold switch, a series timing resistor, a magnified capacitor can with vent score, insulating sleeve, sealing bung and foil/dielectric stack, an optional parallel leakage path, and a voltage/current recorder — with home view, focus-selected-part, toggleable full enclosure, exploded view, auto-rotate, expand and show/hide-labels controls, tappable numbered components with callouts matching the companion diagram. • Six live controls: charging supply voltage (1–24 V), charge/discharge resistor (100–10,000 Ω), capacitance (100–5000 µF), a switch-position selector (charge from supply / discharge through resistor / isolate series path), an enable-parallel-leakage checkbox, and a leakage resistance slider (1,000–100,000 Ω). • Play/pause, single-step (0.1 s) and larger-step (1 s) time controls, plus a playback-speed selector (10x slow motion, real time, 10x faster, 1 minute per second). • Reset laboratory plus dedicated Charge, Discharge and Isolate/hold actions, with a live sequence narrative, operating-point summary and switch-state tokens. • Eight live metrics: capacitor terminal voltage, signed series-path current, net charge-storage current, leakage current, stored charge, stored electric energy, the finite time constant (0 for an ideal hold), and the present-mode equilibrium voltage. • A Curves & measurements tab with capacitor-voltage-vs-equilibrium and current-composition charts (series, storage and leakage current), the full RC integration equation model, and snapshot measurements. • An Experiments tab with four guided scenarios (one time constant, discharge continuity, leakage limits final voltage, ideal hold), a model-verification bench of independent automated checks, and a timestamped event log with a copyable trial report. • A Learn & assess tab with guided lessons (establish the charging path, store charge and energy, change paths without a voltage jump, compare ideal hold with leakage), a knowledge-check quiz and a written scope/reference statement.

Why capacitor voltage never jumps, even when the switch does

The simulator integrates an exact linear RC equation each step: Vc(t+Δt) = V∞ + [Vc(t) − V∞]·exp(−GΔt/C), where V∞ = Gseries·Vdrive/G is the equilibrium voltage for the present switch mode and G is the total conductance (series plus any enabled leakage). Because this equation is continuous in voltage, flipping the switch from charge to discharge changes the target V∞ and the sign of series current instantly, but capacitor voltage itself moves smoothly toward the new target rather than jumping — exactly what the Discharge Continuity experiment is built to demonstrate.

Stored charge and stored energy are tracked from that same continuous voltage: Q = CV and E = ½CV², so energy grows with the square of voltage even though charge grows linearly with it. The One Time Constant experiment gives a concrete checkpoint — a 1000 µF capacitor through a 1000 Ω resistor should reach about 63.2% of its 12 V target after exactly one time constant (1 s).

How leakage changes both speed and final voltage

With leakage disabled and the switch in isolate, conductance G drops to zero and the model holds charge exactly constant — an ideal capacitor with nowhere for stored charge to go. Enabling parallel leakage adds a second conductance path that is active in every switch mode, including isolate, so it both shortens the effective time constant and pulls the equilibrium voltage below the source voltage; the Leakage Limits Final Voltage experiment shows equal series and leakage resistances splitting a 12 V drive down to a 6 V final equilibrium with a 0.5 s effective time constant.

The model is scoped to exact linear RC integration with optional shunt leakage only: there is no equivalent series resistance (ESR), dielectric absorption, ripple heating, polarity-reversal behavior, venting or other component-failure modeling, and the foil spacing and charge symbols in the 3D view are a magnified teaching overlay rather than a manufacturing cross-section.

Frequently asked questions

Why does capacitor voltage stay continuous when I flip the charge/discharge/isolate switch?

The model integrates an exact linear RC equation, Vc(t+Δt) = V∞ + [Vc(t) − V∞]·exp(−GΔt/C), where the switch position only changes the target equilibrium voltage V∞ and the sign of series current. A finite current cannot move finite stored charge instantaneously, so capacitor voltage always evolves smoothly toward the new target rather than jumping the instant the switch changes — the Discharge Continuity experiment demonstrates this directly.

What is the difference between stored charge and stored energy in this simulator?

Stored charge is Q = CV, which scales linearly with capacitor voltage, while stored energy is E = ½CV², which scales with the square of voltage. Both quantities are read live in the metrics panel, and the Learn & assess quiz specifically distinguishes charge from energy to reinforce this difference.

How does enabling parallel leakage change the circuit's behavior?

With leakage enabled, a second conductance path drains charge continuously, in every switch position including isolate. This both shortens the effective time constant and lowers the equilibrium voltage the capacitor settles at, since charging current is now shared between the storage path and the leakage path — the built-in experiment shows equal series and leakage resistances splitting a 12 V source down to a 6 V equilibrium.

What is the difference between charging current and net storage current?

Charging current is the total series-path current flowing from the source, while net storage current, Istorage = Iseries − Ileak, is what actually accumulates as stored charge on the capacitor once leakage is subtracted by Kirchhoff's current law. With leakage disabled the two are equal, but enabling leakage makes them differ, which is exactly the quiz question the Learn & assess tab poses.

Related tools & guides