I sometimes see a diode placed across relay contacts backwards. Can someone explain the purpose of this and when it’s necessary and when it’s not and why?
Please log in to post an answer.
All but one of the answers here didn't answer the OP question, which was about a diode across the CONTACTS, not the coil. As the one answer that addressed the issue indicated, the reason is to suppress arcing across the relay CONTACTS when the coil is de-energized (particularly if the contacts are connected to anotrher inductive load).
It is used to protect the components of the circuit from burning out from a release of the induced voltage when the relay is turned off. The energy stored in the magnetic field of the relay coil is now released and the voltage can get quite high and case a spark. If high enough, this can cause damage, but even if it’s a low voltage, it can cause RFI and cause a circuit to misbehave. This diode has a number of names, but I like calling it the flyback diode.
Example: I once built a 8080 based microcomputer and programed it to turn lights on and off in the house when we were on vacation. But, it was always glitching, the program would get lost and hang up. Until I realised I was not using any flyback diode on all the relays. Once these were installed the RFI noise was removed, or at least reduced enough, so that the computer would not lose its place in the program and all worked fine from then on.
Aside: A flyback transformer where this flyback voltage is put to good use, see: https://en.wikipedia.org/wiki/Flyback_transformer
I looked this up to find more for you, check out these web pages: This is a good explanation: https://resources.altium.com/p/using-flyback-diodes-relays-prevents-electrical-noise-your-circuits
Here’s a good article on Wiki: https://en.wikipedia.org/wiki/Flyback_diode
The diode is called a flyback diode. The purpose is to dump the energy from the relay coil when it is disconnected from power. The coil acts as an inductor and when the power is disconnected, as when a transistor turns off, the current can not change instantly. This results in the voltage across the coil spiking to try and keep the same current flowing.
The diode lets the current flow thru it when the power is turned off keeping the inductive kick from destroying the transistor. No current flows thru the diode when the coil is energized because it is reverse biased then.
Some relays have the diode built in and do not require an external one. If you replace the relay and there was no diode across it the old one may have had an internal diode. If your replacement does not have a built in diode you should add one externally.
When a voltage is removed from the relay coil, the magnetic field collapses, inducing an inverse pulse to flow. This inverse pulse can damage transistors and - more easily - ICs. The diode sorts this pulse so that it doesn’t damage any sensitive components.
If you are controlling a relay with any silicon device - e.g. transistor, IC, etc - you probably need to use a diode (called a snubber diode, by the way). If you are controlling the relay directly, say with a switch, then you don’t really need it.
When the energizing contacts of a relay (or any inductor) open, the collapsing magnetic field forces the current to keep flowing. If the applied voltage was large and the coil is large enough, a substantial voltage will build up across the ends of the coil. If the voltage is very large, it will cause damage to the circuit. The diode is to short the voltage and prevents damage.
Not across the contacts, but across the coil. It is called freewheeling or flyback diode. It provides a path for the high voltage created by the collapsing magnetic field when current is cut off. Otherwise the high voltage can destroy the driving circuit. Also used across solenoids and sometimes DC motors.
Mr. Abend asks about diodes placed backwards across relay contacts. NOTE that this technique is applicable only in DC circuits.
The diode is called a “snubber” and it serves to protect the relay contacts from overvoltage in inductive circuits. Relay contacts in DC circuits are subject to sparking as they open when they control an inductive load. This opening can occur intentionally, or can occur during contact closure due to contact bounce. Examples of inductive loads include motors, solenoids, or other relay coils.
Current and voltage in an inductive circuit are related by Faraday’s Law, one form of which is V = -L di/dt. It states that the rate-of-change of current (amperes per second) in an inductor is proportional to the voltage applied across the inductor and inversely proportional to its inductance (henries). The minus sign indicates that the inductor resists a change in current by opposing the applied voltage.
Consider a voltage applied across an inductor through a set of relay contacts: At the instant of contact closure, load current is zero. As time advances, and dependent upon the load inductance, the current through the inductor will increase at a constant rate determined by the ratio V/L. At some point, the inductor will saturate — i.e., it cannot be magnetized further — whence the limiting current will then be governed by the winding resistance.
Now consider what happens when the relay contacts open: The magnetic field in the inductor immediately begins to collapse, and as it does so, it will attempt to drive current back into the voltage source. But since the voltage source no longer exists — we have an open circuit — there is nothing (other than the inductor’s winding resistance) to limit the magnitude of the voltage induced, and this kickback voltage will therefore appear across the relay contacts that are in the process of opening — contacts that have, in fact, barely moved from their closed position. The polarity of the kickback voltage is opposite to that of the original voltage that was used to energize the inductor. The kickback voltage creates a spark that degrades the contact surface, and over time, this sparking can cause contact failure.
A backwards diode connected across the relay contacts will switch into conduction when kickback voltage is applied. In this case, the decreasing rate-of-change of inductor current will be governed by the inductor winding resistance (ignoring the forward voltage drop in the diode).
Practical examples: An inductor having an inductance of 1 henry and a winding resistance of 1000 ohms, energized by a 25-volt source. The rate-of-change of increasing current in the inductor will be 25 amperes per second (25 milliamperes per millisecond) and the limiting steady-state current will be 25 milliamperes — which will be attained in about one millisecond.
When the voltage source is removed, as by opening a relay contact protected by a snubber diode, the initial value of the inductor current will be the same as its limiting value earlier — 25 milliamperes. The decrease in inductor current over time (t) is an exponential function of winding resistance (R) and inductance (L) proportional to e (exp -tR/L).
When the switching device is a transistor, the snubber diode serves to protect the transistor from destruction due to the imposition of kickback overvoltage.
More often the diode is placed across the coil such that it is reverse biased. Its purpose is to absorb the counter EMF when the coil is de-energized . When the relay coil is energized it stores energy in its magnetic field. When the current is turned off that magnetic field reverses and tries to keep current flowing in the circuit. However, since the path is open that energy must dissipate. The energy can produce a rather high-voltage spike. This is how the Kettering ignition system works in early automobiles spark generation.
Since in most small electronics we do not want that high voltage to damage components the diode across the coil shorts out that reverse Electro-Magnetic-Field (EMF) and thus saves delicate components. You may find a diode or other suppressing component across contacts for the same reason. i.e. To prevent a spark which would shorten the contact life or damage other components.
In the automobile ignition system there is usually a capacitor placed across the points in the distributor. The ignition coil produces the spark when the contacts open because the magnetic field collapses sending that energy to the spark plug(s). I hope this helps you understand a little bit more about inductance in coils.
When a relay (or other) coil is de-energised, the stored charge can create a substantial back e.m.f. amounting to several hundred volts. This voltage can damage delicate components (FETs etc.) in the ciruit.
The reverse connected diode will clamp this voltage to 0.6 or 0.7 volts for a silicone diode. This limits any fast going high voltage spike in the circuitry.
The problem the diode is solving occurs when the current flowing through the relay coil is switched off. This on-to-off transition is relatively fast and the collapsing magnetic field (the field generated to actuate and hold the relay in its switched condition) generates a very high reverse voltage across the relay coil. The relay coil current is usually switched by a switching-transistor.
This reverse voltage can easily exceed the capacity of the switching-transistor’s reverse-breakdown voltage and, thus, destroy the transistor. To solve the problem, the backwards diode provides a forwards path for the collapsing current to cycle back through the relay, and thus the backwards current flow dissipates within the relay.
A diode is used on relays to keep back EMF from taking out the device driving the relay when power to said relay is turned off. When power to a coil goes off, the magnetic field collapses. This causes very high voltages and currents on the relay coil. They can go backwards into the drive circuit, damaging the active device. They are used where damage is very likely. Hope this helps.
The coil of a relay is a fairly large inductor. Inductors store energy in a magnetic field that builds up around the coil when current if flowing through the coil. If the current is turned off suddenly the magnetic field collapses and "induces" voltage in the coil, just like a generator. The stored energy has to go somewhere and the induced voltage tries to keep the current flowing in the same direction.
The voltage will continue to rise with a polarity opposite of what had been applied. That means the end of the coil that had been connected will generate a voltage much higher than, and added to, the supply voltage at the other end of the coil. That voltage can easily rise to a level high enough to damage the circuitry. The diode placed "backward" across the coil provides a path for that current. It effectively shorts out the voltage induced in the coil and allows the stored energy to dissipate in the diode and the wiring without reaching dangerous levels. The diode should be rated somewhat higher than the supply voltage and should be able to handle at least the same amount of current as the relay coil.
When is it necessary? The full answer requires quite a bit of math and physics but the short, simple answer is anytime an inductive device is switched off and on. It applies not only to relay coils, but also to motors, solenoids, and any other type of devices with coils/inductors. In some cases the switching circuit will have protective diodes built in. For instance, the ULN2803 darlington array IC is intended for driving such loads and has the diodes built in. The L293D (D for Diode) stepper motor driver / dual H bridge IC also has protective diodes built in.
The diode is there to protect any solid state device driving the relay. The current flow through the energized coil creates a magnetic field around the coil. When switched off the collapsing field results in an instantaneous polarity change in voltage across the coil. Without the diode this voltage can become quite large exceeding the voltage rating of the switching device. The changed polarity of the voltage induced into the coil forward biases the diode limiting or clamping the voltage rise to around 0.7 volts.
Sometimes referred to as a snubber diode or snubber circuit. Sometimes an RC circuit is used in this fashion but diodes have become more common. Some 12 V automotive relays include this diode internally, others do not. I would not replace one with a diode with one without. The diode is "backwards" because we do not want it to conduct until the voltage reversal across the coil happens. Automotive relays with the diode need to be connected so the internal diode is reverse biased. Typically shown as a rectangle with no polarity indications.