Inductors in Circuits
A small relay is switched by a transistor. It works for a day, then the transistor dies. Nothing in the circuit exceeds 12 V, so where did the voltage that destroyed it come from? From the relay coil: an inductor resists changes of current, and when the transistor tries to stop the current in a microsecond, the coil produces whatever voltage it takes to keep it flowing. This lesson gives the inductor's circuit law, its energy, the continuity rule that explains the kick, and the diode that tames it. The physics of flux and Faraday's law is in Magnetism, Induction and Inductance; real parts (cores, saturation, winding resistance) in Capacitors and Inductors as Components.
The element law
An ideal inductor links a flux with its own current. Faraday's law gives the voltage across it, with the passive sign convention (current entering the + terminal):
The inductor is the dual of the capacitor: swap and , and , and every statement carries over.
- Constant current, zero voltage. In a DC steady state, , so an ideal inductor is a short circuit.
- Current cannot jump. A step of current would need an infinite voltage. So ; the voltage can jump.
- Memory. The inductor's state is its current.
The stored energy is
Intuition: voltage follows the slope of the current
When a current ramps up linearly, the voltage is constant and positive; when it ramps down, the voltage is negative. The faster the change, the larger the voltage.
Series and parallel
Inductors combine like resistors (assuming no magnetic coupling between them; coupled coils are the subject of Mutual Inductance):
Worked example 1: voltage from a current waveform
Given: carrying the triangle of the figure: in , back to at .
Find: , the peak energy, and the voltage if the were interrupted in .
Solve:
Check: volt-seconds balance: , so the current ends where it started. Any inductor in a periodic steady state must have zero average voltage, a rule used constantly in power electronics. The is the ideal-model answer; in reality the switch breaks down or an arc forms first, which is exactly how the transistor of the opening story died.
The flyback diode
With a diode across the coil (cathode to the supply end), the coil current has a path when the switch opens. The coil voltage reverses only to about one diode drop, above the supply rail, and the stored energy is burned in the winding resistance and the diode. With winding resistance and diode drop , the coil current obeys , so
The price is a slower release: the relay drops out later. Faster clamps (a Zener in series with the diode) trade a higher clamp voltage for a quicker release.
Worked example 2: the relay coil
Given: , coil with , switch closed long ago, flyback diode .
Find: the coil current, the stored energy, and how long the current takes to reach zero after the switch opens.
Solve: in DC steady state the ideal part of the coil is a short, so and . The time constant is , and
Check: is about three time constants, reasonable for a decay that ends early because of the constant diode drop. The switch sees at most instead of kilovolts.
In Python: the element law, the kick and the clamp
import numpy as np
L = 50e-3
for t0, t1, i0, i1 in [(0, 4e-3, 0.0, 0.2), (4e-3, 8e-3, 0.2, 0.0)]:
print(f"{t0*1e3:.0f}-{t1*1e3:.0f} ms: v = {L*(i1 - i0)/(t1 - t0):+.2f} V")
for dt in [1e-3, 1e-6, 1e-8]:
print(f"interrupt 0.2 A in {dt:.0e} s: v = {L*0.2/dt:.3g} V")
V1, R, VD = 12.0, 20.0, 0.7
I0 = V1 / R
tau = L / R
t_off = tau * np.log(1 + I0 * R / VD)
print(f"coil: I0 = {I0:.2f} A, energy = {0.5*L*I0**2*1e3:.2f} mJ, tau = {tau*1e3:.2f} ms")
print(f"with flyback diode: current reaches zero after {t_off*1e3:.2f} ms")
for t in [0, 1e-3, 2.5e-3, 5e-3]:
i = (I0 + VD/R) * np.exp(-t/tau) - VD/R
print(f" t = {t*1e3:3.1f} ms: i = {float(i)*1e3:6.1f} mA")
print(f"series 10+22 mH = {10+22} mH, parallel = {1/(1/10 + 1/22):.3f} mH")0-4 ms: v = +2.50 V
4-8 ms: v = -2.50 V
interrupt 0.2 A in 1e-03 s: v = 10 V
interrupt 0.2 A in 1e-06 s: v = 1e+04 V
interrupt 0.2 A in 1e-08 s: v = 1e+06 V
coil: I0 = 0.60 A, energy = 9.00 mJ, tau = 2.50 ms
with flyback diode: current reaches zero after 7.25 ms
t = 0.0 ms: i = 600.0 mA
t = 1.0 ms: i = 390.7 mA
t = 2.5 ms: i = 198.6 mA
t = 5.0 ms: i = 50.9 mA
series 10+22 mH = 32 mH, parallel = 6.875 mH
Interactive: a triangle of current makes a square of voltage
The netlist lab drives the inductor with the triangle current of worked example 1 (a current source; the resistor stands in for a scope probe and draws a negligible ). The node voltage is the inductor voltage.
The lab integrates with backward Euler ("method": "be"); the default trapezoidal rule rings numerically at the sharp corners of this waveform, a known quirk of that method that SPICE users also meet. At the lab reads about across the inductor, at about . Doubling doubles the square wave.
Guided lab: measure an inductance from its time constant
Hand calculation. Put a inductor in series with and drive it from a function generator with a to square wave at . The total resistance is plus the generator's output resistance plus the winding resistance, say : . Then , and the half period of is 8 time constants, long enough to settle.
Simulation. The netlist lab with V1 in 0 PULSE(0 5 0 1u 1u 0.5m 1m), R1 in a 160, L1 a 0 10m shows the voltage across the inductor jumping to and decaying with ; the details are in RL Circuits.
What you would measure. Scope across the resistor (its voltage is times the current; put it at the grounded end). Read the time to reach 63 % of the final value, then . Measure the winding resistance with a DMM first. Expect within the part's tolerance, often to ; the scope's timebase adds only about 1 %, but reading the 63 % point by eye adds a few percent.
Hazards and safe setup. Signal-generator levels only. When you switch DC through any coil (relays, solenoids, motors), always fit the flyback diode, even on a 5 V bench supply: the kick can reach tens of volts and damage a transistor or a meter on a low range. Do not open a circuit carrying current through a large inductor with your fingers across the gap.
Pitfalls
- Assuming the inductor voltage is continuous. Only its current is.
- Opening an inductive circuit without a path for the current. That is the kick; plan where the energy goes.
- Forgetting winding resistance. A real coil in DC steady state is a resistor, not a short. It sets the current and the time constant.
- Saturation. Above its rated current a cored inductor's collapses, and the current rises much faster than the ideal law predicts.
Practice
- A inductor has across it. How fast does its current rise, and how long until it carries from zero?
- A coil with winding resistance is on a supply. Find the current and energy.
- Why must an inductor's average voltage be zero in a periodic steady state?
Answer
- ; .
- ; .
- Over one period . Periodic means the current returns to its start value, , so over a period: zero average.
Test yourself
In a DC steady state, an ideal inductor behaves like…
- an open circuit
- a short circuit
- a current source of zero amps
- a capacitor
What quantity of an inductor is continuous at a switching instant?
- its voltage
- its current
- its power
- its resistance
A flyback diode across a relay coil is connected with its cathode…
- to the end of the coil at the positive supply
- to ground
- to the transistor's base
- in series with the coil
The current in a inductor rises at . The voltage across it is…