Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

In most electrical circuits with a relay, a diode is connected in parallel to the coil of the relay. Why? Is it always a good practice?

share|improve this question
3  
The diode is a really good idea. It's called a freewheeling diode. This answer covers the details (and that's why I put this as a comment only): electronics.stackexchange.com/a/56323/930 Scroll to where it says "Some Background Info". In short, the diode takes the energy stored in the relay's coil when you switch the current off. Without the diode, the energy has no place to go and will cause a large and probably destructive voltage spike. –  zebonaut Feb 18 at 11:26
    
@zeb Freewheeling = flyback? –  JYelton Feb 18 at 21:49
    
add comment

3 Answers 3

Is it always a good practice?

It's nearly always good practice and it's very effective BUT, if you are needing a relay that deactivates as quickly as possible then there are alternative methods. The reason it is slow is because when the circuit to the relay coil opens, all the energy stored in the relay coil forces a current thru the flywheel diode until that energy is "spent".

The diode acts like a short circuit with a small forward volt-drop and with the resistance of the relay (maybe 100 ohms), it will delay the relay de-activating a few extra milli-seconds. This is not usually a problem but, if it is, then putting a resistor in series with the diode means the energy is "spent" significantly quicker.

The down side is that your controlling transistor has to "suffer" a voltage pulse that is significantly more than Vsupply + 0.7V - it may be twice the supply voltage when using a resistor but, in most circuits, finding a transistor that can be adequately rated is not usually a problem.

share|improve this answer
add comment

Since an inductor (the relay coil) cannot change it's current instantly, the flyback diode provides a path for the current when the coil is switched off. Otherwise, a voltage spike will occur causing arcing on switch contacts or possibly destroying switching transistors.

Is it always a good practice?

Usually, but not always. If the relay coil is driven by AC, a bi-directional TVS-diode (or some other voltage clamp) and/or a snubber (series RC) need to be used. A diode would not work in this case as it would act as a short-circuit during the negative half-cycle of the AC. (See also Red Lion SNUB0000 for application info)

For DC driven relays, a diode is usually used, but not always. As Andy aka pointed out, sometimes a higher voltage than what is allowed by a diode alone is desired for faster turn-off of the relay (or other such as solenoids, flyback transformers, etc.). In this case, a uni-directional TVS-diode is sometimes added in series with the flyback diode, connected anode to anode (or cathode to cathode). A series resistor could be used in place of the TVS-diode, but the clamping voltage is more deterministic if the TVS-diode is used.

If a MOSFET is used as the switching element, normally you still need the flyback diode as the body diode is in the opposite direction to do any good. An exception to this is a MOSFET that is "Repetitive Avalanche Rated" (such as IRFD220). This is normally drawn with a zener diode symbol for the body diode. These MOSFETs are designed to clamp the voltage at a level they can withstand, allowing the higher voltage for quicker coil turn-off. Sometimes an external uni-directional TVS-diode (or zener) is placed in parallel with the MOSFET for the same purpose, or if the MOSFET cannot handle the "Repetitive Avalanche Current" or "Repetitive Avalanche Energy", or if the avalanche breakdown voltage is higher than desired.

share|improve this answer
1  
+1 for mentioning what to do with an AC relay –  Chris Johnson Feb 18 at 13:02
add comment

When the current through a coil is switched off, the coil (being an inductor) will try to maintain the current. When there is no path for this current the voltage across the coil will increase rapidly, and the current will find a path, right through the isolation of a chip or transistor, destroying that component. The diode provides a path for this current, so the energy stored in the coil can be dissipated safely.

So yes, it is a good idea to provide a discharge path. A diode parallel to the coil is probably the most often used way, but there are other ways.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.