LearnTronics
Transistor Relay Driver and Flyback Diode
Recipe #9 — transistor relay driver with flyback diode
This is one of the most useful places to see several earlier lessons meet: transistor switching, inductors, relays, and diodes.
Why the diode matters
A relay coil stores energy in its magnetic field. When the transistor abruptly turns off, the coil tries to keep its current flowing. Without another path, that can create a large voltage spike.
D1 is connected so it is normally reverse-biased. When the coil's voltage reverses at turn-off, D1 conducts and gives that current a safer path to decay.
The protection changes timing
A simple flyback diode protects the transistor well, but it also lets the coil current decay relatively slowly. That can make the relay release a little more slowly.
This is a good example of a real engineering tradeoff: protection method, voltage stress, and release time can all matter.