Wow... Grumpy Mike, when you are wrong, you really double down.
These examples use zener diodes because the effect of current decay is more pronounced than with a resistor.
Switching Inductive Loads with Safe Demagnetization - Application Note - Maxim
The diode must be able to handle the initial current at turnoff, which equals the steady-state current flowing through the inductor when the switch is closed. In addition, the voltage rating
for the diode needs to handle the swing between positive- and negative-voltage levels. A rule of thumb is to select a diode rated for at least the amount of current the inductor coil draws
and at least twice the voltage rating of the operating voltage of the load. For many applications, especially those found in industrial applications that have many output channels per IO
card, this diode is often physically quite large and adds significant extra cost to the BOM.
The other major disadvantage of the simple freewheel diode approach is that it lengthens the decay of current through the inductor. As explained in "Coil Suppression Can Reduce Relay
Life," this slow decay of current can create problems such as "sticking" between relay contacts. For applications where the current must decay quicker, an alternative solution is to use a
Zener diode as shown in Figure 4, which gives a faster current ramp rather than an exponential decay. When the switch opens, the current is shunted through the general-purpose diode
and Zener diode path, maintaining a voltage equal to the Zener voltage (plus forward diode drop) until the inductor energy is dissipated.
Coil Suppression Can Reduce Relay Life
This diode shunt provides maximum protection to the solid state switch,
but may have very adverse effects on the switching capability of the
relay. It is important to realize that the net force available to cause the
armature to open is the difference between the magnetic restraining
forces and the spring opening forces, that each of these is varying in a
manner to cause the net force to vary both with time and armature
position. It is this net force which gives rise to the armature system
velocity and energy of momentum as it attempts to effect armature and
contact spring transfer.
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 until the flux further decays, finally permitting available spring
“return” forces to cause transfer to continue.
The more rapidly the coil current decays, the less the magnetic hold
back, and thus the greater the armature momentum and contact stick
Obviously, this is optimized when no suppression is used. 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. This is illustrated in Fig. 3.
The Zener voltage value is chosen to limit the coil switch voltage to a
level acceptable to the switch rating. This affords the best compromise
both to coil switch protection and relay switching performance, and should
be employed to assure maximum relay performance and reliability while
providing protection to the control circuit from coil induced voltages.
Inductive Loads and Diode Protection
The best solution is to put a diode across the inductor, as shown at left. The diode must be able to handle the initial diode current, which equals the steady current that had been flowing through the inductor; something like a 1N4004 is fine for many cases.
When the switch is on, the diode is back-biased (from the dc drop across the inductor's winding resistance).
At turn-off the diode goes into conduction, putting the switch terminal a diode drop above the positive supply voltage.
The only disadvantage of this protection circuit is that it lengthens the decay of current through the inductor, since the rate of change of inductor current is proportional to the voltage across it.
For applications where the current must decay quickly (high-speed impact printers, high-speed relays, etc.), it may be better to put a resistor across the inductor, choosing its value so that Vsupply + IR is less than the maximum allowed voltage across the switch. For fastest decay with a given maximum voltage, a zener could be used instead, giving a ramp-down of current rather than an exponential decay.
Source: "The Art of Electronics" by Horowitz and Hill, Cambridge University Press, copyright 1980, ISBN 0-521-23151-5