Why a relay has a flyback diode, and why it slows release
A flyback diode gives the coil current a path, so the switch sees 12.7 V instead of hundreds. TE's note shows the cost: slow release, and welded contacts.
A relay coil is an inductor. When the transistor driving it turns off, the current in the coil cannot stop, and the coil raises whatever voltage it takes to keep it flowing. Without a path that voltage lands on the transistor. TE’s relay application note puts the size of it plainly:
As the electrical current in a relay coil is interrupted, an induced voltage transient of the order of hundreds or even thousands of volts may be generated across that coil as its magnetic flux, which is linked by the coil turns, collapses. This induced voltage, plus the coil supply voltage […] appears across the coil interrupting switch in a simple series switching circuit.
— TE Connectivity / P&B, 13C3264
The diode across the coil — flyback, freewheeling, catch, snubber; one part, four names — is the path. It is reverse-biased while the coil is energised and does nothing. The instant the switch opens, the coil’s lower end swings positive, the diode conducts, and the coil current circulates through it while the stored energy burns off. The coil voltage is pinned at one forward drop, so the switch sees the supply plus about 0.7 V. That is the whole reason for the diode, and for a 12 V relay it turns a transistor-killing transient into 12.7 V.
What the same note goes on to say is less well known: the diode is also the slowest possible way to let the coil go, and on a power relay that slowness can weld the contacts. The fix is a Zener in series with the diode. On a 12 V, 400 Ω, 0.4 H coil it brings the release from 1.90 ms down to 0.35 ms, for a switch voltage of 36.7 V. The relay coil suppression calculator gives those numbers for any coil; this article is where they come from.
How the flyback diode works
While the relay is on, the coil carries the supply over its resistance — 30 mA for a 12 V, 400 Ω coil — and stores ½LI² in its magnetic field, 180 µJ if the inductance is 0.4 H. The diode sits across the coil with its cathode (the banded end) on the positive supply. In that orientation the supply reverse-biases it, so it carries nothing and drops nothing while the relay is held in.
At turn-off the transistor stops sinking current. The coil, which was sourcing 30 mA into the transistor, keeps sourcing it; the only thing that can change quickly is the voltage. The bottom of the coil rises until something conducts, and the diode conducts at 0.7 V above the supply. From then on the 30 mA circulates around the coil-diode loop and decays as the coil’s own resistance and the diode’s forward drop absorb the energy:
For the example coil τ is 1 ms, and the current reaches zero at
Throughout those 2.9 ms the switch sees 12.7 V and no more. The diode has done its job completely. TE calls this “maximum protection to the solid state switch” — and then adds the clause that the rest of this article is about: it “may have very adverse effects on the switching capability of the relay”.
Why the diode can shorten the relay’s life
A relay releases when the magnetic pull on the armature falls below the spring force trying to open it. The pull follows the coil current, so nothing mechanical can begin until the current has dropped to the relay’s must-release level — 10 % of rated is a typical datasheet figure. With a plain diode that takes
and the current keeps falling slowly after it. TE’s note explains why the slowness matters, and the reason is the contacts, not the coil:
It is equally important to realize that when the contacts of a typical power relay make, connecting very fast rising (e.g., resistive) medium or high current loads to the voltage source, a minute molten interface occurs between the mating contacts, giving rise to a microweld or stick condition that must be separated at the next opening transfer.
Breaking that micro-weld is a job for the armature’s momentum. The armature accelerates on the difference between the spring force and the decaying magnetic force, and the slower the current decays, the smaller that difference is over the travel:
A slowly decaying magnetic flux (the slowest is experienced with a simple diode shunt across the coil) means the least net force integral available to accelerate the armature open. In fact, rapid loss of the opening forces supplied by stiff NO contact springs, coupled with slowly decaying magnetic forces, can actually cause a period of net force reversal where the armature velocity is slowed, stopped, or even momentarily reversed […]
However, the loss or even reversal of armature velocity (under conditions of simple diode shunting as described above), and accompanying loss of armature momentum needed to help break the contact stick, can result in failure to break the stick, and a contact “weld” is experienced.
Omron’s relay technical pages say the same in one line — relays with a diode across the coil “tend to experience increased release times” — and add a warning that matters for anyone reading a datasheet: the ratings were not taken this way. TE: “It is normal industry practice to test relays and subsequently establish performance ratings without coil suppression. When application conditions require the suppression of coil induced voltages, it is recommended that the relay’s performance be evaluated with the suppression that will be used.”
None of this means the diode is wrong. For a signal relay switching milliamps there is no micro-weld to break and the extra millisecond of release is invisible. It matters for a power relay making into a heavy resistive or capacitive load, and it matters more the more often it does so.
The fix: a Zener in series with the diode
The current decays slowly because the coil is only allowed 0.7 V to push against. Let it push against more and it decays faster. A Zener diode in series with the flyback diode does that — the diode’s cathode still to the positive supply, the Zener’s cathode toward the switch, so the two anodes meet in the middle: the coil current still has its loop, but the loop now holds the coil at the Zener voltage plus the diode drop, and the same equation with V_C = V_Z + V_F in place of V_F gives a much shorter time. TE’s description:
However, near optimum decay rate can be obtained by using a Zener diode in series with a general purpose diode. When the coil source is interrupted, the coil current is shunted through this series arrangement, maintaining a voltage equal to the Zener voltage (plus forward diode drop) until the coil energy is dissipated.
For the example coil with TE’s 24 V Zener:
Five times faster to the release level, and the current is gone entirely by 0.4 ms instead of trailing on to 2.9 ms. The energy moves too: with the plain diode 163 of the 180 µJ is dissipated in the coil’s own resistance and 17 µJ in the diode; with the 24 V Zener 137 µJ lands in the Zener and only 43 µJ in the coil. At ten operations a second that is 1.4 mW in the Zener, which any 500 mW part shrugs off; it is the peak current, the full 30 mA, that it has to be able to take, and every Zener can.
The price is on the transistor. The switch now sees the supply plus the Zener plus the diode drop, 36.7 V here, and Omron’s transistor-selection rule doubles that:
In the case of diode and zener diode: (Upper-limit of pickup voltage + 0.6
- breakdown voltage) × 2 ≈ V_CEO ≈ V_CBO
— Omron, relay technical information
with a footnote that the 2 “must be determined by the user”. At face value a 24 V Zener on a 12 V coil asks for a 73 V transistor. That is why Omron’s own guidance is more modest — the Zener “should be about the same as the supply voltage” — and the trade-off curve shows why that is a good place to stop.
The release time falls steeply over the first supply’s worth of Zener voltage and slowly after it, while the switch voltage rises in a straight line. A 12 V Zener gets 0.57 ms and asks for 24.7 V at the switch, which a 40 V transistor blocks with margin. Going to 24 V buys another 0.23 ms and costs another 12 V of rating. Choose the Zener from the transistor, not from the coil: take the highest voltage the switch blocks with margin, subtract the supply and the diode drop, and that is the Zener.
Which diode, which way round
The diode carries the full coil current the instant the switch opens, so its average-current rating has to exceed the coil current; Omron’s wording is “an average rectified current greater than the coil current”. For the reverse rating Omron gives two figures. The headline rule is “a reverse breakdown voltage of more than 10 times the circuit voltage”; the relaxed one, which follows it in the same paragraph, is that a “reverse breakdown voltage two to three times that of the supply voltage can be used in an electronic circuit where the circuit voltage is not particularly high”. A 12 V or 24 V relay driver is the second case, and the calculator uses the three-times figure: 36 V or 72 V, which a 1N4148 meets for coils under 200 mA and a member of the 1N400x rectifier family meets for larger ones — check the reverse rating of the member chosen rather than assuming the lowest. There is no reason to reach for anything faster, because the coil’s current changes over milliseconds.
The orientation is the one thing that must be right. Cathode — the banded end — to the positive supply. A diode fitted the other way round is a short across the coil the moment the transistor turns on, and the transistor or the diode fails first. On a 12 V relay module the diode is wired across the coil pins, band toward the pin that goes to +12 V; on a 24 V one the same, toward +24 V. The supply voltage changes nothing about the wiring, only the rating.
Many drivers bring their own. The ULN2003’s seven Darlington outputs share a set of clamp diodes brought out on the COM pin; TI’s datasheet says the part “is able to drive inductive loads and suppress the kick-back voltage through the internal free-wheeling diodes” when the COM pin is tied to the coil supply — left floating, there is no clamp at all. Those diodes drop 1.7 V typical at 350 mA rather than 0.7, which shortens the release a little (1.55 ms for the example coil), and a Zener can go in series with the COM pin to shorten it further, within the outputs’ 50 V rating. Relays sold with a built-in diode are the plain-diode case with no way to add the Zener; if release speed matters, buy the version without.
AC relays: no diode
A diode across an AC coil is a short circuit on every negative half-cycle. Omron’s suppressor table marks the diode and the diode-plus-Zener as not applicable to AC and gives two options that are: a varistor across the coil, which clamps symmetrically, and an RC network. Both add some release delay of their own; Omron notes that the varistor circuit “also delays somewhat the release time”. For a DC relay driven from a DC source — which is what a transistor or a microcontroller pin ever drives — the diode question does not arise on the AC side, only on the load the contacts switch, and that load needs its own protection across the contacts, not across the coil.
How to check that it is working
A multimeter’s diode test confirms the part is a diode and which way it faces: about 0.6 V one way, open the other. It does not confirm the circuit. For that, put a scope on the transistor’s collector or drain and switch the relay off. With the diode working the node steps up to the supply plus a diode drop and sits there for the decay time — 2.9 ms for the example coil — then settles at the supply. A spike above that, even a short one, means the diode is not across the coil in the loop the current takes: too far away with inductance in the wiring between, or on the wrong pins of a relay module.
The same capture shows the release time. Put a small resistor in the transistor’s emitter or a current probe on the coil lead and the current’s fall to the release level is visible directly; compare it against the relay’s mechanical release specification and the load the contacts break. If the number is uncomfortable and the switch has voltage headroom, the Zener is a one-part change.
Worked numbers
The example throughout, so it can be checked against the calculator:
coil 12 V, 400 Ω, 0.4 H I0 = 30 mA, E = 180 µJ, τ = 1.0 ms
must-release 10 % of rated V_rel = 1.2 V
diode 0.7 V switch 12.7 V t_rel 1.90 ms t_0 2.90 ms
12 V Zener switch 24.7 V t_rel 0.57 ms t_0 0.67 ms
24 V Zener switch 36.7 V t_rel 0.35 ms t_0 0.40 ms
transistor (12 + 0.6 + 24) × 2 = 73 V for the 24 V Zener (Omron)
(12 + 0.6 + 12) × 2 = 49 V for the 12 V Zener
diode I_F(AV) > 30 mA, V_R ≥ 36 V
The inductance is the one input a relay datasheet rarely gives. It has to be measured — an LCR meter across the coil with the armature seated — and it is not constant: as the armature opens the air gap grows and L falls, so the tail of the decay is faster than the fixed-L model shows. The time to the release level is computed with the armature still seated, and that is the number to trust.