Lesson 2.4 · Module 2: Reactive Components in Time & Frequency
Inductors & the Flyback Diode Explained
A relay coil switched on and off by a transistor. Coils hate sudden stops, and this lesson shows the huge voltage spike that can kill the transistor — and the diode that prevents it.
Think of it like this: An inductor is like a heavy spinning water wheel. Slam the pipe shut and the moving water hammers the valve.
The live, interactive simulation for this lesson opens here when JavaScript is on.
Key ideas
- An inductor stores energy in a magnetic field and tries to keep current flowing.
- When the switch opens suddenly, that current has nowhere to go, so the voltage spikes to tens or hundreds of volts.
- A flyback diode gives the current a safe loop to fade away in, clamping the spike.
Try this in the simulation
- With no diode fitted, watch the drain voltage spike on the scope each time the transistor turns off.
- Tick “Flyback diode fitted” and see the spike disappear.
- Hover any wire or part in the circuit to see its live voltage and current. Click to pin the readout.
Why does an inductor need a flyback diode?
An inductor, such as a relay coil or a motor winding, stores energy in a magnetic field and fights any change in its current. If you switch it off suddenly, the current has nowhere to go and the voltage across the coil spikes to many times the supply, enough to destroy the transistor that switches it. A flyback diode placed across the coil gives the current a safe loop to fade away in and clamps the spike.
What you’ll learn
- What an inductor stores, and the energy formula ½ × L × I².
- Why switching off a coil makes a large voltage spike.
- How a flyback diode clamps the spike, and how to fit it the right way round.
- How to see the spike on a virtual oscilloscope with and without the diode.
The formula, letter by letter
Shown with this lesson’s starting values. In the simulation the numbers change as you move the sliders.
- Voltage across the coil (V · volt)
- Inductance (H · henry) : How strongly a coil resists a change in current.
- A tiny change in (no unit) : d in front of a letter means a tiny change in it. dV/dt is how fast V changes per second; dI/dt is how fast current changes (A/s).
- Current (while it changes) (A · ampere) : A lower-case i is a current that changes over time.
- Time (s · second) : Time since something started.
- Voltage at the MOSFET drain (V · volt)
- Avalanche voltage (V · volt) : The voltage where a MOSFET breaks down and starts conducting by force.
- Energy (J · joule) : An amount of energy.
- Coil current (A · ampere)
Common questions
What is a flyback diode?
A diode connected across a coil, so that it does nothing while the coil is switched on, and gives the coil’s current a path to circulate in when the switch opens. It is also called a freewheel or snubber diode.
Which way round does a flyback diode go?
Backwards compared to the supply: its cathode (the striped end) connects to the positive side of the coil. That way it blocks while the coil is on and conducts only during the spike.
Why do relays and motors make voltage spikes?
Both are coils. A coil’s current cannot stop instantly, so when the switch opens the collapsing magnetic field forces the voltage up until the current has somewhere to flow.
Keep going
- Next lesson: 3.1 Diodes & LEDs: Forward Voltage and the I-V Curve
- Related components: Inductor, Diode, Relay, MOSFET