Inductors & the Switch-Off Spike

A coil, a supply and a switch. Close the switch and step through the current rising. Open it with nothing across the coil, with a diode, or with a diode and a resistor, and watch where the current goes and what voltage the switch has to survive.

Loading interactive simulation...

Lesson

The theory — Inductors & the Switch-Off Spike

An inductor is a coil whose magnetic field opposes any change in the current through it. The voltage across it is v = L di/dt, so a steady current needs no voltage at all and a sudden change needs an enormous one. L is the inductance, in henries. A long solenoid of N turns, cross-section A and length ℓ, wound round a core of relative permeability μᵣ, has L = μ₀μᵣN²A/ℓ. A current I stores the energy U = ½LI² in the field. In series with a resistance R on a supply V, the current approaches V/R with the time constant τ = L/R.

What each symbol means

L
inductance, in henries: the volts needed per ampere-per-second of change in the current
N
the number of turns. L goes as N², because each turn both makes the field and links it
μᵣ
relative permeability of the core: 1 for air, and the factor by which a core raises L
I₀
the steady current with the switch closed, Vₛ/R
R
the resistance of the winding itself, which every coil has and which burns the energy in the end
Rₛ
a resistor in series with the diode, which raises the clamp voltage and speeds the release
C
the capacitance across the open switch: the transistor's own and the wiring's. Small, and the smaller it is the higher the spike
τ
L/R, the time constant: the time scale of the rise after the switch closes, and roughly of the fall through a diode alone
Assumes
The coil is a long solenoid: the field inside is taken as uniform and the field outside as zero, which overstates L for a coil only about twice as long as it is wide, as the default one is. The core neither saturates nor loses energy to eddy currents. The open switch is a perfect insulator with a capacitance across it; a real transistor rated below the peak breaks down, a real contact arcs, and a MOSFET's built-in diode would stop the swing below ground. In the two diode circuits that capacitance is left out: at 30 mA it charges 1 nF to the clamp in C × V ÷ I₀, 0.425 µs with the diode alone and 1.425 µs with 1 kΩ, against releases of hundreds of microseconds. The diode is the Shockley model from the diode page, at 25 °C. Down to a tenth means the current falls to 10% of I₀ and stays there, which for a relay is 1% of the pull. Rewinding for another voltage assumes the same space holds the same amount of copper.

Open the switch and the current keeps going 🖖

Press Nothing across the coil and step to the moment the switch opens. An instant earlier 30 mA was flowing, and it cannot stop at once: v = L di/dt would need an infinite voltage to stop it in no time. So it keeps flowing into the only thing left, the 1 nF of capacitance across the open switch, and the voltage climbs until that current has stopped. By then the capacitance holds 64.89 µJ: the field's 63.96 µJ, plus what the supply, still connected, pushed in, less what the winding burned on the way. The peak is 360.2 V, from a 12 V supply. Press Only 100 pF across the switch: a tenth of the capacitance has to take nearly the same energy, and the peak reaches 1,134 V. Whether a real switch survives that depends on its rating: a transistor rated for less breaks down, and a pair of contacts strikes an arc across the opening gap.

The diode protects the switch and lets the coil go sooner 🖖

With nothing across it, and if the switch survives, the coil does not let go quickly. Its current falls to a tenth within 17.70 µs only because the energy has moved into the capacitance, and it comes straight back the other way. It swings between the two until the winding's resistance has burned it, and the winding burns it only while it sits in the coil, about half of each swing. That takes 1.614 ms. Press Flyback diode: the switch sees 12.74 V, the supply plus one diode drop, and the current circulates round the coil and the diode and is down to a tenth in 674.7 µs. A resistor in series with the diode trades the other way. Press Diode plus 1 kΩ: 219.8 µs, at a peak of 42.74 V. In the table, every larger resistor raises the clamp and shortens the release.

A 48 V coil kicks no harder than a 12 V one 🖖

Wind the same bobbin for 48 V instead of 12 V and it takes four times the turns of a wire with a quarter of the cross-section. Inductance goes as the square of the turns, and so does resistance, because the wire is four times longer and four times thinner. So L/R stays at 355.3 µs, the current falls to a quarter, and the field holds the same 63.96 µJ; the ampere-turns that pull the armature stay at 150. Press Same coil wound for 48 V: with nothing across it the switch peaks at 368.3 V, against 360.2 V for the 12 V winding. The size of the coil and the power it is wound for set the kick, and the voltage rating barely enters. The diode is where it shows: its 0.74 V brakes a 5 V winding harder than a 48 V one, so the diode frees the 5 V winding in 547.3 µs and the 48 V winding in 777.0 µs.

Problem solved in full

  1. Sizing the resistor beside a flyback diode 6 steps

    A transistor rated for 60 V switches the 12 V coil on this page: 400 Ω and 0.1421 H, with a diode across it. What is the largest resistor from the E12 series (1.0, 1.2, 1.5, 1.8 kΩ and so on) you can put in series with the diode and keep the switch under 60 V? How long does the current then take to fall to a tenth, against the diode alone, and how much heat does the resistor take each time the coil is switched off?

    Open this problem in the tool

    1. With the switch closed the current is I₀ = 12 V ÷ 400 Ω = 30 mA, and the field holds ½LI₀² = ½ × 0.1421 H × (30 mA)² = 63.96 µJ.

    2. At the instant the switch opens the coil still carries 30 mA, now through the diode and Rₛ. The switch sees the supply, the diode's drop at 30 mA and the resistor's share: 12 V + 0.738 V + 0.03 A × Rₛ.

    3. For that to stay under 60 V, Rₛ ≤ (60 − 12.738) V ÷ 0.03 A = 1,575 Ω. The largest E12 value below it is 1.5 kΩ, which gives 57.74 V; 1.8 kΩ would give 66.74 V.

    4. The current now decays through R + Rₛ = 1,900 Ω, on the time scale L ÷ 1,900 Ω = 74.80 µs. Treat the diode's drop as a constant 0.738 V and the current is i = (I₀ + V_D/R′)e^(−t/τ′) − V_D/R′, with V_D/R′ = 0.3885 mA. It reaches 3 mA at t = 74.80 µs × ln(30.39 ÷ 3.388) = 164.1 µs.

    5. Set Diode + resistor with Rₛ = 1,500 Ω on the tool, which follows the diode's real curve: 164.5 µs. The diode alone took 674.7 µs, so the resistor makes the release 4.10 times faster.

    6. Of the 63.96 µJ, the resistor takes 49.29 µJ, or 77.07%. At the instant the switch opens it dissipates I₀²Rₛ = (30 mA)² × 1,500 Ω = 1.350 W, and a few hundred microseconds later almost nothing.

    Answer

    1.5 kΩ, which puts the switch at 57.74 V, 2.26 V inside its rating. The current is down to a tenth in 164.5 µs instead of 674.7 µs, and the resistor takes 49.29 µJ each time. The tool stops at a single switching. Click the relay ten times a second and the resistor's average is 49.29 µJ × 10 per second = 0.4929 mW; the 1.350 W at the instant of switching is gone within a few hundred microseconds.

Learning path

What is not a resistor

References (1)