Skip to content
LearnTronics menu

LearnTronics

Transistor Relay Driver and Flyback Diode

Tutorial Index

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.

TRANSISTOR RELAY DRIVER + FLYBACK DIODE control RB B C E NPN +V K1 relay coil D1 flyback coil current
Relay-coil symbol: relay coils are drawn several ways on schematics. This page uses a rectangular coil symbol rather than a wavy inductor symbol so it is not mistaken for an AC waveform. K1 identifies the relay.
Normal operation: control signal drives transistor → transistor energizes K1 → K1 operates its contacts.

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.

Try these yourself

Why is the diode placed across the relay coil? TRANSISTOR RELAY DRIVER + FLYBACK DIODE control RB B C E NPN +V K1 relay coil D1 flyback coil current
The flyback diode gives the inductor current a path to decay and clamps the otherwise large reverse voltage spike.
During normal steady operation with the relay energized, the flyback diode is usually:
Its polarity is chosen so it does not conduct while the supply is normally energizing the coil.
Which earlier component lesson explains the voltage spike?
A relay coil is an inductor. It resists a sudden change in current and can generate a large voltage when its current path is abruptly interrupted.