t = 0 slow motion

New to circuits? Choose Series resistors in Presets, click a part to read its voltage and current on the multimeter, and change its value in Properties. The oscilloscope below plots voltages against time; CH1 and CH2 are its two inputs and "/div" is the size of one grid square.

Where the energy goesaverage over whole cycles

1. Ohm's law and power

Think of voltage $V$ (volts) as the push, current $I$ (amperes) as the flow of charge, and resistance $R$ (ohms, Ω) as how hard the part resists the flow. The current $I$ through a resistor is proportional to the voltage $V$ across it. The power it turns into heat (or, in a lamp, light) follows directly:

$$V = IR,\qquad P = VI = I^2R = \frac{V^2}{R}$$

A real cell has EMF $\varepsilon$ and internal resistance $r$: its terminal voltage $V = \varepsilon - Ir$ falls as the current rises. Set the internal resistance on the battery and watch the voltmeter.

2. Kirchhoff's laws

  • KCL (current law): a node is a junction where wires meet. The currents leaving any node sum to zero: $\sum_k I_k = 0$. Charge is conserved.
  • KVL (voltage law): the voltages around any closed loop sum to zero: $\sum_k V_k = 0$. Energy is conserved.

3. Series, parallel and the divider

$$\begin{gathered}R_{\text{series}} = R_1 + R_2 + \dots,\qquad \frac{1}{R_{\parallel}} = \frac{1}{R_1} + \frac{1}{R_2} + \dots\\ V_{\text{out}} = V_{\text{in}}\frac{R_2}{R_1 + R_2}\end{gathered}$$

Series elements share the same current; parallel elements share the same voltage. The divider formula assumes nothing draws current from the output; a load resistor in parallel with $R_2$ pulls $V_\text{out}$ down.

4. Capacitors, inductors and time constants

A capacitor stores charge, $Q = CV$, so $i = C\,dv/dt$: its voltage cannot jump. An inductor stores magnetic energy, $v = L\,di/dt$: its current cannot jump. Switching a DC source $V_s$ into series RC or RL circuits gives exponential responses:

$$\begin{gathered}v_C(t) = V_s\left(1 - e^{-t/\tau}\right),\ \tau = RC\\ i_L(t) = \frac{V_s}{R}\left(1 - e^{-t/\tau}\right),\ \tau = \frac{L}{R}\end{gathered}$$

After one time constant the response reaches 63.2% of its final value; after $5\tau$ it is within 1%. Discharging through $R$, $v_C = V_0e^{-t/\tau}$, down to 36.8% after one $\tau$. Stored energies are $\tfrac12 CV^2$ and $\tfrac12 LI^2$.

5. AC, phasors and impedance

For a sinusoidal source $v(t) = V_p\cos(\omega t + \phi)$ with $\omega = 2\pi f$, every voltage and current in a linear circuit is a sinusoid of the same frequency, so we can represent each by a complex phasor $\tilde V = V_p e^{j\phi}$: an arrow whose length is the amplitude and whose angle is the phase. Engineers write $j = \sqrt{-1}$ because $i$ already means current. Derivatives become multiplication by $j\omega$, and each element has an impedance $Z = \tilde V / \tilde I$:

$$Z_R = R,\qquad Z_C = \frac{1}{j\omega C},\qquad Z_L = j\omega L$$

Impedances combine like resistances. The RMS value of a sinusoid is $V_{\text{rms}} = V_p/\sqrt2$, and the average power delivered is $P = V_{\text{rms}}I_{\text{rms}}\cos\varphi$, where $\varphi$ is the phase angle between voltage and current.

6. The RC low-pass filter

$$\begin{gathered}H(j\omega) = \frac{\tilde V_C}{\tilde V_{in}} = \frac{1}{1 + j\omega RC}\\ |H| = \frac{1}{\sqrt{1 + (\omega RC)^2}}\\ f_c = \frac{1}{2\pi RC}\end{gathered}$$

A low-pass filter lets slow signals through and blocks fast ones, because the capacitor has less time to charge at high frequency. At the cut-off frequency $f_c$ the output is $1/\sqrt2$ of the input (−3 dB) and lags by 45°. Above $f_c$ the gain falls at 20 dB per decade, which means the output shrinks 10× for every 10× rise in frequency. (Gain in decibels is $20\log_{10}|H|$.)

7. Series RLC resonance

$$\begin{gathered}Z = R + j\left(\omega L - \frac{1}{\omega C}\right)\\ f_0 = \frac{1}{2\pi\sqrt{LC}}\\ Q = \frac{1}{R}\sqrt{\frac{L}{C}} = \frac{f_0}{\Delta f}\end{gathered}$$

The reactances $X_L = \omega L$ and $X_C = 1/(\omega C)$ are the "AC resistance" of the inductor and capacitor; $Q$ (quality factor) measures how sharp the resonance peak is. At $f_0$ the inductive and capacitive reactances cancel, the impedance is purely $R$, the current is largest and in phase with the source, and the voltages across $L$ and $C$ are each $Q$ times the source voltage. A step input makes an under-damped RLC circuit ($R < 2\sqrt{L/C}$) ring at about $f_0$ while the envelope decays with time constant $2L/R$.

8. Diodes and LEDs

A diode conducts in one direction. Its current follows the Shockley equation $I = I_S\left(e^{V/(nV_T)} - 1\right)$ with $V_T = kT/q \approx 25.85$ mV at 300 K. An LED needs roughly 1.8 V (red) to 3 V (blue) before it conducts significantly, so it always needs a series resistor: $R = (V_s - V_F)/I_F$.

1. Voltage divider, with and without a load

9 V across $R_1 = 1$ kΩ and $R_2 = 2$ kΩ (preset "Voltage divider").

  1. Current: $I = 9/(1000 + 2000) = 3.00$ mA.
  2. Output: $V_{out} = 9 \times 2000/3000 = 6.00$ V. The voltmeter shows 6 V.
  3. Add a 2 kΩ load across $R_2$: $R_2 \parallel R_L = 1$ kΩ, so $V_{out} = 9 \times 1000/2000 = 4.50$ V. Loading matters.
  4. Power in $R_1$ unloaded: $P = I^2R = (3\times10^{-3})^2(1000) = 9$ mW.

2. RC charging

A 5 V battery charges $C = 100$ µF through $R = 1$ kΩ when the switch closes (preset "RC charging", 50 ms/div).

  1. Time constant $\tau = RC = 1000 \times 100\times10^{-6} = 0.100$ s, i.e. two divisions on the scope.
  2. Initial current $I_0 = 5/1000 = 5.0$ mA (the capacitor starts at 0 V, so all 5 V is across $R$).
  3. At $t = \tau$: $v_C = 5(1 - e^{-1}) = 3.16$ V. At $t = 5\tau = 0.5$ s (the whole screen): $v_C = 4.97$ V.
  4. Final stored energy $\tfrac12 CV^2 = \tfrac12(100\times10^{-6})(25) = 1.25$ mJ. The resistor dissipates exactly the same amount during charging.
Tap the switch to close it and watch CH1.

3. Low-pass filter at its cut-off frequency

$R = 1$ kΩ, $C = 100$ nF, source 1 V peak (preset "RC low-pass filter").

  1. $f_c = 1/(2\pi RC) = 1/(2\pi \times 10^{-4}) = 1591.5$ Hz; the source is set to this frequency.
  2. $|H| = 1/\sqrt{1 + 1} = 0.707$, so CH2 shows 0.707 V peak.
  3. Phase $= -\arctan(1) = -45°$: CH2 lags CH1 by $T/8 = 78.5$ µs.
  4. Try 159 Hz ($|H| = 0.995$) and 15.9 kHz ($|H| = 0.0995$, −20 dB).

4. Series RLC at resonance

$R = 10$ Ω, $L = 10$ mH, $C = 1$ µF, source 1 V peak (preset "RLC series resonance").

  1. $f_0 = 1/(2\pi\sqrt{10^{-2}\times10^{-6}}) = 1/(2\pi\times10^{-4}) = 1591.5$ Hz.
  2. $X_L = X_C = \omega_0 L = 100$ Ω; $Z = R = 10$ Ω, so $I_p = 1/10 = 0.100$ A, in phase with the source.
  3. $Q = \frac{1}{10}\sqrt{10^{-2}/10^{-6}} = 10$; bandwidth $\Delta f = f_0/Q = 159$ Hz.
  4. $V_{L,p} = V_{C,p} = I_pX = 10$ V: ten times the source voltage. Select the capacitor and read the multimeter.

5. Wheatstone bridge balance

10 V across two dividers: $R_1 = 1$ kΩ over $R_3 = 1.5$ kΩ, and $R_2 = 2$ kΩ over $R_4 = 3$ kΩ.

  1. Left midpoint: $10 \times 1.5/2.5 = 6.00$ V. Right midpoint: $10 \times 3/5 = 6.00$ V.
  2. The bridge voltage is 0: the bridge is balanced because $R_1/R_3 = R_2/R_4$.
  3. Change $R_4$ to 3.3 kΩ: right midpoint $= 10\times3.3/5.3 = 6.23$ V, so the meter reads $-0.23$ V. Strain gauges and sensors are read this way.

The lab solves the circuit with phasors (complex modified nodal analysis) at each frequency, giving the ratio of the CH2 signal to the CH1 signal. Choose the signals with the oscilloscope selectors; usually CH1 is the source and CH2 the output. DC sources are treated as short circuits and LEDs as off.

Start a challenge to load its starting circuit. It is checked continuously; the badge turns green when you succeed.

Experiments

  1. In "RC charging", measure the time for CH1 to reach 3.16 V by counting divisions on the screen. Change $R$ to 2 kΩ and predict the new time.
  2. In "RLC series resonance", sweep the source frequency from 1 kHz to 2.5 kHz and record the ammeter's peak current. Plot it: that is the resonance curve.
  3. Switch the integration method to Backward Euler in the RLC preset with a coarse time base. Backward Euler adds numerical damping, so the amplitude is under-predicted; trapezoidal preserves it.
  4. In "Parallel resistors", place a voltmeter across each branch, then an ammeter in each branch. Verify KCL at the top node.

Modified nodal analysis (MNA)

Wires merge grid points into nodes. One node is ground (0 V). The unknowns are the other node voltages plus the current through every voltage source, ammeter and closed switch. KCL at each node and the voltage constraint of each source give a linear system

$$\begin{bmatrix}\mathbf{G} & \mathbf{B}\\ \mathbf{B}^T & \mathbf{0}\end{bmatrix}\begin{bmatrix}\mathbf{v}\\ \mathbf{j}\end{bmatrix} = \begin{bmatrix}\mathbf{i}\\ \mathbf{e}\end{bmatrix}$$

A resistor between nodes $a$ and $b$ adds $+G$ to $G_{aa}$ and $G_{bb}$ and $-G$ to $G_{ab}$ and $G_{ba}$ ("stamping"). Each voltage source adds a row and column of $\pm1$ entries to $\mathbf{B}$ and its value to $\mathbf{e}$. A tiny conductance ($10^{-10}$ S) from each node to ground keeps floating parts of the circuit solvable. If the matrix is still singular, the circuit contains a loop of ideal sources (for example, a wire across a battery).

Companion models for time stepping

Capacitors and inductors are replaced at each time step $h$ by a conductance in parallel with a current source that remembers the previous step:

ElementBackward EulerTrapezoidal
Capacitor$G = C/h,\ i_n = G(v_n - v_{n-1})$$G = 2C/h,\ i_n = G(v_n - v_{n-1}) - i_{n-1}$
Inductor$G = h/L,\ i_n = i_{n-1} + G v_n$$G = h/2L,\ i_n = i_{n-1} + G(v_n + v_{n-1})$

Backward Euler is very stable but damps oscillations; the trapezoidal rule is second-order accurate and preserves the amplitude of LC ringing, but can show small numerical oscillations right after an abrupt switching event. The time step is one thousandth of the oscilloscope sweep.

Non-linear elements

LEDs use the Shockley equation. At each time step the lab linearises the diode about its current operating point (a conductance $G_d = dI/dV$ plus a current source) and repeats the solve (Newton–Raphson) until the voltage converges, limiting each update to avoid exponential overflow. An LED is modelled without series resistance and fails if its current stays above 60 mA.

Current animation

Dots move in the direction of conventional current. Their speed grows with the logarithm of the current, so microamps and amps are both visible; it is not proportional to the electron drift velocity (which is less than a millimetre per second in copper). Currents in wires come from KCL at each grid point.