Author Topic: Understanding Relays  (Read 2920 times)

0 Members and 1 Guest are viewing this topic.

Offline PotatoBoxTopic starter

  • Regular Contributor
  • *
  • Posts: 129
  • Country: ca
Understanding Relays
« on: November 27, 2016, 04:09:44 am »
Hello everyone, I'm trying to understand using a diode to protect a micro controller from the relay.

In the photo I've attached (please excuse the poor drawings), from watching tutorial videos, the diagram above is the correct way of protecting the relay. But, why is it wired that way? I would have thought it would have been wired like it is in the 2nd diagram. Since diodes only allow current flowing one way, and the relay shoots back massive current once current is taken away from the coil, the diode in the 2nd diagram would take care of it, shouldn't it?
 

Offline CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 5239
  • Country: us
Re: Understanding Relays
« Reply #1 on: November 27, 2016, 04:32:48 am »
The current attempts to continue to flow.  The voltage will rise as high as needed to support this current flow.  When the diode is connected as shown in your first drawing the current will flow through the diode, and the voltage will be one diode drop for current to continue flowing in the coil, allowing it to decay slowly.  When voltage is again applied to the coil the diode steers in to the coil and current increases per the normal inductive time constant.

In your second configuration the diode provides no path for continued current flow.  The voltage across the coil will increase until it enables current to flow in some path.  This may be an output transistor in your drive circuit as it reaches breakdown, it may be between turns of the coil due to arcs in that location, or it may be arcs between external wiring.  Arcs and/or breakdown of transistors doesn't guarantee that the magic smoke will get out, but it has a high probability of doing it, if not on first exposure then on some later relay operation.  That is why a protection diode is almost always included when a coil is switched in this manner.  In some cases a capacitor is used, but this will create a resonant circuit with the coil potentially causing other problems.
 

Online tautech

  • Super Contributor
  • ***
  • Posts: 28385
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Understanding Relays
« Reply #2 on: November 27, 2016, 04:34:55 am »
Hello everyone, I'm trying to understand using a diode to protect a micro controller from the relay.

In the photo I've attached (please excuse the poor drawings), from watching tutorial videos, the diagram above is the correct way of protecting the relay. But, why is it wired that way? I would have thought it would have been wired like it is in the 2nd diagram. Since diodes only allow current flowing one way, and the relay shoots back massive current once current is taken away from the coil, the diode in the 2nd diagram would take care of it, shouldn't it?
How high does back EMF get?
Answer: as high as it needs to, to break down/cross any current path.

Diode across the coil is the correct back EMF control method, not in series with the coil.
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 

Offline ruairi

  • Frequent Contributor
  • **
  • Posts: 302
  • Country: us
Re: Understanding Relays
« Reply #3 on: November 27, 2016, 05:01:01 am »
W2AEW has an excellent video on this topic

 

Offline Seekonk

  • Super Contributor
  • ***
  • Posts: 1938
  • Country: us
Re: Understanding Relays
« Reply #4 on: November 27, 2016, 12:12:08 pm »
That explanation may not have been obvious.  The second diagram is exactly the same as the first.  Current still flows in the same direction, except this time it is through your driver circuit.  Possibly destroying it.  The diode in the second circuit does nothing to protect it.

Parallel diodes do slow down a relay if ultra fast speed is important.  In those cases a mov or other device is used to limit the voltage to some value can tolerate.
 
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12298
  • Country: au
Re: Understanding Relays
« Reply #5 on: November 27, 2016, 12:42:30 pm »
I would have thought it would have been wired like it is in the 2nd diagram. Since diodes only allow current flowing one way, and the relay shoots back massive current once current is taken away from the coil, the diode in the 2nd diagram would take care of it, shouldn't it?

When the relay is turned on, your thinking would be correct - but it's not really helpful.

The diode is there for when the relay gets turned off.


When a relay goes from being off to on, current flows and a magnetic field builds up in the coil that attracts the armature which operates the switching.  With power being maintained, the magnetic field is maintained and the relay holds position.

What happens when power is removed from the relay, however, is quite something else.

The magnetic field now does not have an electric current to maintain it, so the magnetic filed will collapse.  Building up the magnetic field is a comparatively slow process - limited by the current supplied by the circuit it is in.  However a collapsing magnetic field is limited only by the physics of the situation ... and occurs very quickly.  Some simple arithmetic will tell you that the faster a magnetic field changes around a conductor, the greater the potential is generated.  Because of this, a relay powered by even 12V can generate hundreds or even thousands of volts when it gets turned off.  It's called "Back EMF".  Fortunately, the polarity of this back EMF is opposite to the supply voltage, so the reverse diode across the coil is ideal to short out the back EMF and plays no part when the relay is powered.


If you wonder about the magnitude of back EMF - just think about the ignition coil(s) in your car.  They operate in the same way - "charging up" a magnetic field from 12V and then (when switched off) generating over 10KV in back EMF to zap through a spark plug...  (Diesel vehicle drivers, please ignore.)
« Last Edit: November 27, 2016, 01:07:09 pm by Brumby »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf