Relay Driver Protection Diode

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Post Reply
chapter30
Posts: 59
Joined: Mon Jan 24, 2005 1:01 am
Location: Detroit, MI
Contact:

Relay Driver Protection Diode

Post by chapter30 » Sat Feb 05, 2005 3:19 pm

Can anyone tell me how to calculate the correct value for the supression (protection from flyback voltage) diode to be used in an NPN transistor (simple) relay driver circuit?<p>I'm controlling a relay with a 125 Ohm coil that requires 40mA to energize. I have built a lot of circuits like this but I always just use any Zenor diode that I have on hand. I never have any problems but I want to know the correct way to figure this.

jimandy
Posts: 570
Joined: Sat Dec 04, 2004 1:01 am
Location: Birmingham AL USA
Contact:

Re: Relay Driver Protection Diode

Post by jimandy » Sat Feb 05, 2005 3:33 pm

Probably just a plain jane (or joe) 1n4001 would do. There should be no sustained current as the "flyback" dissipates quickly. No need to use a zener.<p>BTW - the term "flyback" raises a bit of alarm as the term is more often associated with a high voltage circuit in a TV (Flyback transformer, etc).<p>I think those in industrial electronics would call the diode in your application a "snubber". - or maybe not.
"if it's not another it's one thing."

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Relay Driver Protection Diode

Post by philba » Sat Feb 05, 2005 3:58 pm

pretty much what jim said. for a relay, size the diode about 4X the voltage and you'll likely be ok.<p>couple of points.<p>Often the diode is called a back emf supression diode. snubber, too. <p>If you deal with large transients (lots of current or V close to limits), you might want to use schottky diodes which are faster. These are typical in hbridges driving motors.

bodgy
Posts: 1044
Joined: Tue Dec 04, 2001 1:01 am
Location: Australia
Contact:

Re: Relay Driver Protection Diode

Post by bodgy » Sat Feb 05, 2005 6:12 pm

adding to Philba, can also be known as a 'free
wheeling diode'<p>If you want to get really down and dirty (and a headache) Phillips have a massive tome that can be downloaded on this very subject in their semiconductor primer series (8 volumes in all)<p>Colin<p>[ February 05, 2005: Message edited by: bodgy ]</p>
On a clear disk you can seek forever.

cato
Posts: 366
Joined: Sun Sep 07, 2003 1:01 am
Contact:

Re: Relay Driver Protection Diode

Post by cato » Sun Feb 06, 2005 5:47 am

Reverse voltage is only an issue while you are powering the relay. So, the voltage is your relay coil drive voltage. I don't see why you would need to 4x that. I would thing 2x would be more than enough. <p>In the forward direction what you need is recovery speed and instantaneous current capability. I think the 125 ohm coil resistance will limit the current... some cushion over what ohms law tells you should do...

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Relay Driver Protection Diode

Post by philba » Sun Feb 06, 2005 2:05 pm

emf spikes dude. You'll get more than V back. Especially with motors. But, hey, if you want to run right up to get spec'd limit, please don't let me stop ya!

jimandy
Posts: 570
Joined: Sat Dec 04, 2004 1:01 am
Location: Birmingham AL USA
Contact:

Re: Relay Driver Protection Diode

Post by jimandy » Sun Feb 06, 2005 3:01 pm

Well, without flogging this dead horse to death (?) I'll add another 2 cents worth, accurate or no, to help flesh out this discussion.<p>1. In working with the more ordinary 5v or 12v relays driven by transistors that may be subject to back EMF damage, the "snubber" diode must only have a reverse voltage breakdown spec greater than the relay driving voltage. Most diodes do. – example the ubiquitous 1n4001 is spec'd at 50V and that's a pretty darn cheap diode.<p>2. The back EMF occurs when the power is REMOVED from the relay and that's what the snubber is there for. In looking at the datasheet for the aforesaid cheap diode I can't find a max fwd voltage, indeed, the fwd voltage could apparently goes as high as it wants (except for arcing) as long as the max fwd current and attendant power dissipation specs are not violated.<p>3. Aggregating the thoughts of 1) and 2) above, we hardly ever have to worry about selecting a special diode for a snubber when working with low voltage relays, and it is not what happens when the really turns on that is the concern.<p>Thought question. What if you used an LED for a snubber? Would it work? Would it be fun to watch it "blink" when the relay was turned off?
"if it's not another it's one thing."

User avatar
dr_when
Posts: 208
Joined: Thu Oct 28, 2004 1:01 am
Location: Milwaukee
Contact:

Re: Relay Driver Protection Diode

Post by dr_when » Mon Feb 07, 2005 4:18 am

Curious that no one mentions the inductance of the energized coil as being related to the magnitude of the spikes, which BTW, can be quite large compared to the input voltage.
"Who is John Galt?"

rshayes
Posts: 1286
Joined: Tue Mar 04, 2003 1:01 am
Contact:

Re: Relay Driver Protection Diode

Post by rshayes » Mon Feb 07, 2005 7:01 am

Without the diode, the magnitude of the spike will depend on the coil inductance, the coil resistance, the coil current, and the stray capacitance of the coil and the other circuit parts. The coil resistance and coil current are usually known, the other factors are not. The rate that the transistor turns off may also be a factor if it is slow enough.<p>When the diode is added, the voltage is limited to the sum of the power supply and the forward drop of the diode at the relay current. Something like the 1N4001 is adequate, the 1N914 and similar signal diodes are a little bit light for carrying 40 milliamps.

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Relay Driver Protection Diode

Post by philba » Mon Feb 07, 2005 7:50 am

since there was some contradiction going on I'll try to summarize in a concise manner.<p>When using an electromagnetic coil with a driver transistor one must take into account EMF kickback. As the driving current of the coil is stopped, the collapsing magnetic field induces a reverse (or back) electromagnetic force (BEMF). The magnitude of BEMF is, indeed, related to the inductance of the coil and thus, the strength of the field. This force can easily exceed the driving force (i.e. voltage) of the driving current. With out any way to dissipate, the BEMF will push against the driver transistor and can destroy the driver transistor . A diode across the coil will allow BEMF to dissipate. The diode rating needs to be able to handle the voltage level of the BEMF. Unless you can do the necessary calculations, over spec'ing by 4X is usually safe. Note that 4X 12V is 48V so our friend the 1N4001 will do just fine (though I keep lots of 1N4004s on hand and they'll do fine as well).<p>On switching speed. If you have particularly strong BEMF, you will want the diode to kick in faster (some BEMF will always get through). This is where Schotty Diodes are used. Most, if not all, relays do not need this speed. But motors and solenoids that also have mechanical energy to dissipate will. When you shut of the power to their coils, they act like generators and produce a lot more BEMF.<p>Phil<p>[ February 07, 2005: Message edited by: philba ]</p>

Will
Posts: 310
Joined: Tue Feb 11, 2003 1:01 am
Location: Katy Texas
Contact:

Re: Relay Driver Protection Diode

Post by Will » Tue Feb 08, 2005 11:58 am

Let's see if I can show how much I know and how little I understand by jumping in here. When we have a current flowing in an inductance - which we have here (The relay coil) then, By Lenz's Law ' Any change in the current will produce a voltage which tends to oppose the current change. This due to the collapsing magnetic field in the inductance creating the effect of a conductor moving in a magnetic field. Which explains, of course, how electric generators work. The voltage is proportional to the Inductance and the rate of change (dI/dt) of current i.e V = L.di.dt.
When a current is switched off with a clean break i.e. an air gap then ideally, since that would produce an infinite rate of current change then it would produce an infinite voltage (Back emf) In practice the actual voltage produced is limited by circuit stray capacitance and other effects. But it still liable to reach 1000 or more volts (Of very short duration in the case of a signal relay) This is how car ignition coils work. They are in fact transformners with few (High current) primary turns and many secondary turns. When the primary current is broken by the contact breaker the collapse of the large magnetic around it links with the multi-turn secondary winding and produces a spike of thousands of volts (Enough to ionize the air/vapor in a twenty thou spark plug gap thus creating an ignition spark.
The energy flowing in an inductance is defined as L.I^2/2 (Inductance times current-squared divided by two) - in our case if the inductance were 20 micro-henry and the current 40 mA then the stored energy would be 2.0^10^-6 * (40*10^-3)^2
= 3.2 * 10^-8 joule = 32 nano-joule. If we used a IN 4001 diode then IO believe max steady current to be 1.0 Amp and If, the forward voltage to be 1.6 volts i.e. W max = 1.6 Watts = 1.6 joule/sec. If we have a IN 4001 connected in reverse across the relay coil (So that the 12V dc coil supply volts is reverse biassing the doide then - when the relay current is interrupted the
reverse volts so created by Lenz Law will work to continue the current throught the relay coil, through the fiode and back to the coil positive connection. The created reverse volts can not increase the coil current above it's original value (If it was maintained at it's original value the would be no rate of change of current and thus no back emf) so that, it, as a theoretical max it was limited to the 40 mA quiescent current then the back emf would be limited to 12 volts.
If the inductance energy discharge was completed at it's average value (Which it would not be) then it would take 3.2 * 10^-8 (Joules) divided by 1.6 joules/sec = 20 nano-secs to discharge the energy. I think that says that the In 4001 would be more than adequate for the application. I wonder how much of that is correct ?
BB

Ron H
Posts: 360
Joined: Tue Dec 18, 2001 1:01 am
Location: Boise, ID
Contact:

Re: Relay Driver Protection Diode

Post by Ron H » Tue Feb 08, 2005 2:32 pm

1N4148/1N914 is more than adequate for a 5V (or 12V), 40ma relay snubber. As Will says, the peak current will never exceed the steady-state relay current, since that current, which was flowing through the (transistor) switch, is simply diverted through the diode until the current decays.
Take a look at the 1N4148 datasheet. You may be surprised at how robust it is.<p>[ February 08, 2005: Message edited by: RonH ]</p>

richfloe
Posts: 24
Joined: Sat Aug 16, 2003 1:01 am
Contact:

Re: Relay Driver Protection Diode

Post by richfloe » Tue Feb 08, 2005 4:41 pm

OK, gotta throw about 2 cents in.<p>Voltage rating of diode? Whatever the voltage that powers the coil is (plus a reasonable overhead).<p>What about the terrible voltage spike that might conceivably hit 100v?!? The diode clamps it, that was the whole point of the diode. <p>When the field collapses, the diode becomes forward-biased (conducting mode), drops a half a volt and that't the end of it. As long as it can stand the surge current, it lives.<p>Of course, considering the price difference between a 1n4000 and a 1n4003 (in bulk), who even has 1n4000's around anymore?<p>Rich

Post Reply

Who is online

Users browsing this forum: No registered users and 27 guests