Technical Article

Info Byte: Preventing Relay Burnout with Flyback Diodes

March 31, 2022 by David Peterson

Inductive loads, such as solenoids and contactors, can cause arcs and failures back into electromechanical switching devices, causing costly downtime. The solution is cheaper than you think.

Imagine a scenario where a relay output card of a PLC is being used to drive DC solenoids for large hydraulic cylinders. Every few months, the card fails, causing downtime and the needless expense of replacement relay cards.

Needless, you say?

What is Flyback Voltage?

Devices that move a switch or plunger with electricity use the concept of electromagnetism, where a coil of wire, while consuming current, generates a magnetic field. That magnet is strong enough to move a flap of metal or even a spring-loaded plunger. Bigger loads require more current.

When this electromagnet is generated, the magnetic field is stored inside the load. In other words, you used a current to make a magnetic field, and the magnetic field is now stored inside that plunger. When the coil current is switched ‘off’, the magnetic field stored inside the plunger still exists, and for a brief moment, it tries to generate a voltage back on the coil.

(Small) flyback spark replicated in my lab with a solenoid load - in reality, sparks may be much larger than this!


When Is Flyback Voltage Good?

In some cases, this generated reverse voltage is a very useful feature. A spark plug in a car works on the principle of 12 volts from the battery energizing a coil at just the precise moment (either from a distributor, an electronic coil pack, or even a coil on each plug). As the battery voltage is removed, the coil attempts to drive electricity back through the circuit - here, the path provided is right across the gap of the spark plug.

But that 12 volts is not enough to generate a spark across several millimeters. Fortunately, the voltage generated by a coil is many times larger than the original charge voltage, and the current lasts only momentarily until the magnet field collapses.


Circuit schematic with diode

Figure 1. A circuit schematic showing the polarity relation between the solenoid load and a typical flyback diode, common in this scenario. An actual wiring example is shown later.


When Is Flyback Voltage Bad?

Back in an industrial setting, this fact of reverse voltage being many times larger than the original voltage is worrisome. If the control circuit is 24 volts, the reverse flyback voltage may be well over 100 volts. This is certainly enough to create sizable sparks if there is a small gap in the circuit. It may have been useful for a spark plug to ignite fuel - but hazardous in a control system.

The gaps exist in the form of electromechanical control devices, namely switches and mechanical relays. As the relay or switch contacts are opening, the gap increases from zero to several millimeters over a period of milliseconds, providing plenty of time for the ideal spark gap to generate a visible arc.

I have seen this phenomenon inside a control cabinet with the lights turned off, and the visual display of sparks inside the clear ice cube relays was quite dramatic. If the relay is small, like those on a PLC relay output card, the sparks will deteriorate the relay quickly, leading to frequent failure.


Relay size comparison

Figure 2. Compared to a DIN mount 4PDT relay, the small size of a circuit board relay shows how relatively sensitive these devices can be.


If you seem to continually have a single I/O point failing on a module, yet the current is well within the rated limits, perhaps the culprit is a DC-powered coil device generating sparks when de-energized.

How Can I Prevent Flyback Voltage?

There are several methods of preventing this problematic phenomenon. Some are simple, cheap solutions that cover the symptoms, but other solutions can prevent the problem entirely.

Snubber Diodes and Circuits

These small, inexpensive devices go by several names: snubber, flyback, free-wheeling, surge, protection, and others. They can be ordered in bulk from an electronic part distributor for mere pennies, where the name ‘rectifier diode’ indicates the ideal robust rating required.


Diode comparison

Figure 3. Two diodes on the left of the relay - top is a 1N4001 from a component distributor, the lower is a purpose-built model for use on the relay socket.


Many manufacturers, being aware of this problem, design integrated solutions, with the diode installed directly into the wiring of a terminal block or right inside the coil-based device itself. Just look for the word ‘diode’, and be sure to install with the right polarity.

Diodes are solid-state devices with only two wires, and electricity can only flow in a single direction. They are installed in parallel with the inductive load, so that when the load is energized from the controller, the diode is reverse biased and allows no bypassing of current through itself.


Installed diode

Figure 4. An example circuit showing a diode connected to a double-level terminal block. Red/Black and Blu/WhtBlu are used to show the polarity of the load, compared with the diode (note the gray stripe on the diode body).


However, the moment the control voltage is removed, the magnetic field attempts to generate a voltage on the coil, with the coil now becoming almost like a high-voltage battery. Instantly, this forward biases the diode, allowing current to travel in a short loop, coil-to-diode. The diode is able to withstand large currents for a very short time, so the magnetic field (and current) is safely exhausted in the blink of an eye.

Because the diode holds the voltage to less than one volt, the voltage will never increase to a level of spark generation, so the fear of hazard is removed.

A variation of the diode is a resistor-capacitor (RC) series circuit, allowing the field to discharge at a predictable rate. This circuit may also be installed in parallel with the control device, allowing the current to harmlessly drain around the switch or relay contact.

Solid-State Switch Devices

PLC output modules can be purchased with DC outputs rather than relay outputs. This may be an effective solution for some scenarios, but the advantage of relay outputs is the high current rating required for large solenoids. Many DC output cards simply can’t handle that amount of current.

DC output modules supply current through transistors which limit the reverse voltage arc hazard. With a high degree of off-state resistance and high voltage tolerance for a very brief time, only an extremely high sustained voltage spike would be a terminal case. But the high current required to drive the load is by no means brief, and spells (and often smells) trouble for a normal transistor output.

AC-Powered Loads

Although 24 volts DC is a common control voltage, the flyback phenomenon disappears with AC voltages, since the inductor coil is not charged to a constant value then suddenly discharged when de-energized.

Many solenoids can be found with 120 AC and 24 AC voltages, the installation and troubleshooting methods remain largely unchanged, and the relay cards may still be used. Obviously, a change of voltage source and the replacement of the devices can lead to undesirable downtime but may be worth your while in the long run.

Final Thoughts

Moving objects is almost always done by the ‘magic’ of magnetic fields. Although they can accomplish incredible tasks, they can certainly alter our normal processes with some unexpected behavior. Don’t let a problem go uncorrected when the solution may be simpler and less expensive than you expected!


Love relays? So do we! Check out our whole collection of relay content:


Have you ever found a simple solution for a seemingly complex problem? Let us know about your creative solutions in the comments, I’d love to hear them.

1 Comment
  • oliverb April 10, 2022

    Two important snags to watch for:
    1: adding a flyback diode to a relay increases “id10t errors” as it is now possible to wire the relay backwards and burn out the driver.
    2: adding a flyback diode to a contactor coil may increase the time it takes to open and potentially reduce its ability to break high currents, increasing contact wear on the contactor.
    Bidirectional TVS devices are available, these restrict the flyback voltage instead of eliminating it. This is often a better solution, though the TVS gets hot in operation so it must be sized for the application. The DC contactor coils I’ve seen had TVS devices factory-fitted by default.

    Like. Reply