iS1VsRS2C12 V10 kΩ100 µFvC = 0.00 Vi = 0.00 mA
024681004812t (s)vC (V)CAPACITOR VOLTAGE vC(t)τ: 7.59 V (63.2 %)Vs = 12 VS1 off, S2 on0246810-1.2-0.600.61.2t (s)i (mA)CURRENT i(t)τ: 0.44 mAS1 off, S2 oni < 0: discharging
Lit wire with moving dashes: current is flowing; yellow dots move at a speed that follows the currentBlocks: source, switches S1 and S2, resistor and capacitor, each with its schematic symbol on topPlots: the capacitor voltage vC(t) and the current i(t) over 10 seconds+ / − marks and the arrow i are reference directions; pills show the live vC and iS1 closes at t = 0 and the capacitor charges toward 12 V with τ = RC = 1.0 s; at 5 s S1 opens, S2 closes and it discharges through R. The reference arrow i enters the capacitor's + plate, so i = C·dvC/dt (passive sign convention). While the capacitor discharges, vC falls, dvC/dt is negative and i comes out negative: the charge flows the other way round.

The capacitor and the switch

  1. A 12 V source, switch S1, a 10 kΩ resistor and a 100 µF capacitor form one loop. Switch S2 can join the resistor straight to the bottom wire. Both switches are open and the capacitor is empty.

Step response: charging

Natural response and the pattern

The working

# step 1/10 · circuit

source      Vs = 12 V
resistor    R  = 10 kΩ
capacitor   C  = 100 µF, empty: vC = 0
switch S1   open (closes at t = 0)
switch S2   open (closes at t = 5 s)

No closed path: no current yet.

The parts are ideal: the source holds 12 V, the switches flip instantly and the capacitor does not leak. S1 opens at the same instant S2 closes, at t = 5 s = 5τ. Every number in the figure is computed from this model.