It is a necessary component in many circuits with inductive loads: the flyback diode.
Besides rectifier circuits and reverse polarity protection, there are a lot of other important diode circuits. Today, we are going to look at the so-called 'flyback diodes'. Let's discover what they are and why they are often essential.
For understanding what a flyback diode does, I built a small example circuit. It consists of a push button, a MOSFET and a relay. It is powered with a 9 V battery. If you push the button the MOSFET turns on and enables the relay.
Next to the components above there is another one: a reverse biased diode in parallel to the relay. This is the flyback diode. The diode is not required for the function of the circuit. At first sight, it might even seem unnecessary. This is not the case. It is essential for the protection of the circuit. More specific the protection of the MOSFET.
Why does the MOSFET need this protection, and how does the diode give it? To understand that we need to first understand what 'flyback' is.
Inductive flyback refers to the phenomenon of a voltage spike that occurs when the power to a coil is cut and the magnetic field around it collapses. According to Faraday's law of induction a change in the magnetic field causes a current to be induced in the coil. As stated by Lenz's law this current opposes to the change in the magnetic flux. In practice this means that the collapsing magnetic field induces a current that sustains the magnetic field for a bit longer. It is therefore also called back EMF or counter electromotive force because it counteracts the decrease in current through the coil.
Due to the induced current the upper end of the coil is now negatively charged in relation to the lower end. You can look at the battery and the coil as two voltage sources in series. The voltage of the battery and the voltage induced in the coil add up to an overall voltage, that can be much higher than the original supply voltage. The effect is also known by many other names like, inductive spike, back EMF or kickback.
Let's see what happens in our circuit. I measured the voltage from the MOSFETs drain to source (red) and gate to source (blue). As soon as I release the tactile button the gate-to-source voltage drops to 0 V and the MOSFET shuts off. The relay coil is now unpowered and due to induction voltages up to 70 V occur across to the MOSFET while the magnetic field collapses. The FQP30N06L MOSFET I used is rated for a maximum of 60 V. Repeated voltage spikes of this magnitude will sooner or later destroy it.
The purpose of the flyback diode is to protect the MOSFET from the inductive flyback. It starts to conduct and with that limits the voltage across the coil. It is effectively short-circuiting it. The diode needs to be properly dimensioned to withstand this. However, since the flyback only last a fraction of a second this is usually not a problem.
With the flyback diode in place the MOSFET is now protected.