protect transistor from relay coil

How do I calculate the resistor value needed in parallel with a relay coil to protect the switching transistor from the coil back EMF (I do not want to slow operation by using a flyback diode).

The relay is a SS-112D, coil resistance of 320Ω, 12V rated voltage, nowhere on the data sheet mentions coil inductance.

The switching transistor is a 2N3904, Absolute max rating Vce of 40V.

The relay is closing for ~100ms twice per minute, and I left it running over night. I woke up this morning realizing I’d forgotten to put ANY protection in for the transistor, expecting it to be blown, but everything was fine.

How come the transistor isn’t blown?
How do I calculate the resistor to be used to ensure back EMF doesn’t reach 40V?

The coil will try to "maintain the current" for a short period of time...

12V/320 Ohms is 37.5mA. A 37.5mA through 1K is 37.5V.

Then when you power the coil, you'll have an extra 12mA through the resistor.

How come the transistor isn't blown?

Luck? It's hard to say exactly what it would take to blow the transistor. Maybe with excessive voltage and about 40mA its never going to die... For example, if you apply 41V it's probably not going to hurt it, but it might and it's bad engineering to exceed the ratings.

Common practice is to use a diode, instead of the resistor.
The diode should have the cathode to the Vcc and the anode on the transistors collector.
I.e. its connected in “reverse” parallel on the relay coil, not passing current under working conditions.

This way the diode will only pass current, when the EMF voltage exceeds Vcc on the collector, which is voltage damaging the transistor.
In effect, the diode is shortcircuiting the EMF to the Vcc line, thereby protecting the transistor.

The diode is not critical, but should be able to withstand the EMF energy.
Any 1N400x variety diode will do perfect, as they have large pulse current cpabilities.

The welknown small signal diodes 1N4148 / 1N4448 are also widely used, with small relays circuits.
It will do fine in your application, judging from the relay coil current.

DVDdoug:
The coil will try to “maintain the current” for a short period of time…

12V/320 Ohms is 37.5mA. A 37.5mA through 1K is 37.5V.

Then when you power the coil, you’ll have an extra 12mA through the resistor.
Luck? It’s hard to say exactly what it would take to blow the transistor. Maybe with excessive voltage and about 40mA its never going to die… For example, if you apply 41V it’s probably not going to hurt it, but it might and it’s bad engineering to exceed the ratings.

I have had this explained to me before, except I was told the voltage potential will reach the 37.5V induced voltage plus the source voltage. So this would be 49.5V. I actually added a 1K resistor for the last few hours this morning, having done the same calculation as you except adding Vcc realizing it was over 40V but deciding it’d do for the time being seeing as it was ok all night with nothing.

So ~10V over might have been lucky, but with nothing? That’s why I came back and asked the question again. A transistor switched ‘off’ must pose a huge resistance, I would expect the voltage to rise into the thousands with no protection? How did that not blow the transistor?

Common practice is to use a diode, instead of the resistor.
The diode should have the cathode to the Vcc and the anode on the transistors collector.
I.e. its connected in “reverse” parallel on the relay coil, not passing current under working conditions.

I have looked at a flyback diode too but have read this can have adverse effects on the relay. Voltage above Vcc is routed back through the coil, delaying the time it takes to collapse. My main concern is as this causes the field to collapse slower, the release time is longer and for this application this is less desirable.

You can use the diode with a resistor. In this way, the ON current is no greater, but the resistor speeds shut-off time at the expense of greater voltage.

You can calculate voltage rise as already shown here, add to Vcc, and that is what will appear across the transistor. So you can select the resistor so that voltage never goes above about 3/4 of the transistor maximum VCEO rating. That means Voltage Collector-Emitter Open.

I can’t say why your transistor didn’t blow. I agree that it would be bad engineering practice to continue and just hope it is OK.

You can also use a zener diode with a diode, back-to-back, so that the current drops at a constant rate (rather faster than RL circuit alone for the same voltage).

Anders53: the point is to turn off the coil faster than with a diode (which is slow, not usually an issue unless driving a solenoid that needs rapid recovery such as in a dot-matrix printer)

You arrange for a higher back EMF (but within the safe limits of the transistor), to cause the dI/dt to be higher on switch-off.

Its important to calculate the power dissipation with these circuits, since rapid rates of switching are involved.

I have had this explained to me before, except I was told the voltage potential will reach the 37.5V induced voltage plus the source voltage. So this would be 49.5V.

Nope! First of all, you just turned-off the 12V so it's not there anymore. ;) If the 12V isn't suddenly turned-off, you don't get the back-EMF. Second, when the coil goes from a power-sink to a power-source with the current flowing in the same direction, the voltage is reversed. Of course, the reverse-voltage is why a diode works and it's why it's called back-EMF.

MarkT: You can also use a zener diode with a diode, back-to-back, so that the current drops at a constant rate (rather faster than RL circuit alone for the same voltage).

Anders53: the point is to turn off the coil faster than with a diode (which is slow, not usually an issue unless driving a solenoid that needs rapid recovery such as in a dot-matrix printer)

You arrange for a higher back EMF (but within the safe limits of the transistor), to cause the dI/dt to be higher on switch-off.

Its important to calculate the power dissipation with these circuits, since rapid rates of switching are involved.

I don't have a Zener on hand so I think I will go with polymorphs idea of a diode in series.

So lets say I use a 560Ω resistor in series with a diode, do I just calculate the power dissipation for the resistor, since the diode is of very low resistance? Or is it necessary to also calculate for the diode? If we call the current coil 35mA, on collapse with a 560Ω in parallel there will be 19.6V across the resistor, at 35mA is 686mW, this is the number I need to check is within limits? The smallest power rating for these series of resistors is 1W. I don't know which one it is but 1W worst case scenario is still within limits right?

DVDdoug:
Nope! First of all, you just turned-off the 12V so it’s not there anymore. :wink: If the 12V isn’t suddenly turned-off, you don’t get the back-EMF. Second, when the coil goes from a power-sink to a power-source with the current flowing in the same direction, the voltage is reversed. Of course, the reverse-voltage is why a diode works and it’s why it’s called back-EMF.

I thought it becomes a circuit with the source and coil back EMF in series, with an ‘open gap’ between the collector and emitter. Therefore they would add to give Vce - no?

I have had this explained to me before, except I was told the voltage potential will reach the 37.5V induced voltage plus the source voltage. So this would be 49.5V.

Nope! First of all, you just turned-off the 12V so it’s not there anymore. :wink: If the 12V isn’t suddenly turned-off, you don’t get the back-EMF. Second, when the coil goes from a power-sink to a power-source with the current flowing in the same direction, the voltage is reversed. Of course, the reverse-voltage is why a diode works and it’s why it’s called back-EMF.

Yes, the voltage is reversed across the relay coil, but the other end of the coil is attached to 12V. So it adds.

So lets say I use a 560Ω resistor in series with a diode, do I just calculate the power dissipation for the resistor, since the diode is of very low resistance? Or is it necessary to also calculate for the diode?
If we call the current coil 35mA, on collapse with a 560Ω in parallel there will be 19.6V across the resistor, at 35mA is 686mW, this is the number I need to check is within limits? The smallest power rating for these series of resistors is 1W. I don’t know which one it is but 1W worst case scenario is still within limits right?

The pulse of power is -very- short, so unless you are firing the relay coil on and off so quickly that it can barely switch in time, you can use a resistor a lot smaller than that.

Since the power in the diode is barely a fraction of this, you can get away with even a 1N914 or 1N4148, I think. The thing to keep in mind, however, is that glass diodes such as those tend to fail open more often, where plastic bodied higher current diodes like the 1N400x series tend to fail shorted more often. Tend to. In this case, I doubt it is a concern.

19.6V + 12V = 32V is the voltage that the transistor must withstand, VCEO.

Who knows how slow things are with a normal kickback diode…

All I know from the relay datasheet is that “on” delay is 5msec, and “off” delay is 7msec.

And that the OP wants 100msec “on” time.

So is a normal kickback diode adding more than 98msec?
If less than that, it can be solved in software.

How about contact bounce. Is that a problem for the load.

I remember from an article a long time ago that a zener (~36volt?) over the transistor was the fastest.
Leo…

edit: Some good info here.
Conclusion: Gain with optimum snubber network is marginal. < 7msec.
In this case easier to solve in software.

JoshNZ: So lets say I use a 560Ω resistor in series with a diode, do I just calculate the power dissipation for the resistor, since the diode is of very low resistance? Or is it necessary to also calculate for the diode?

OK, do let's say you use a 560Ω resistor in series with a diode. Ignoring voltage drops in semiconductors.

The relay coil was 320Ω, powered at 12V. The current is approximately 37 mA. That current over a 560 ohm resistor will produce 21V. added to your 12V supply gives 33V, well within the transistor specification. The relay will open (or more correctly, the current will collapse, which is absolutely not the same thing) three times faster than if you used the diode alone, which is probably "as good as it gets" (remember - this is also three times faster than the relay current turns on).

The diode only ever has to carry 37 mA and be subjected to 12V in reverse. A 1N914 should be fine, though as polymorph muses, a 1N4001 series diode just might be more reliable. Impulse power in the resistor peaks at 0.79W, but unless it is repetitive (using PWM?), the nature of a resistor is that it just isn't going to cause any heating at all.

Case closed, I would think (but no reason not to have another dozen discussion points). :grinning:

Wawa:
edit: Some good info here.

Interesting article Wawa. I found the linked article investigating the change of capacitance with voltage of ceramic capacitors particularly interesting.

Russell.

Paul__B:
OK, do let’s say you use a 560Ω resistor in series with a diode. Ignoring voltage drops in semiconductors.

The relay coil was 320Ω, powered at 12V. The current is approximately 37 mA. That current over a 560 ohm resistor will produce 21V. added to your 12V supply gives 33V, well within the transistor specification. The relay will open (or more correctly, the current will collapse, which is absolutely not the same thing) three times faster than if you used the diode alone, which is probably “as good as it gets” (remember - this is also three times faster than the relay current turns on).

1.75 times faster, the voltage across the winding is 21V compared to 12V.

Why do you think you need to speed up the switch-off speed of the relay? Is it really important?, or have you just heard that it is possible, and want to implement it per se.

In nearly 40 years in the electronics industry, I've never used anything other than a diode across the coil of a relay.

If the switch off speed is really important, then maybe you should consider solid state switching, rather than a mechanical relay.

+1 All the hassle for a gain of 7msec at best. Use a reed relay if you have to, or do it the solid state way. Leo..

Why do you think you need to speed up the switch-off speed of the relay?

In this project any chatter or bouncing, and especially latching, would render it useless. So it is more of a precaution, basically I didn't want any inconsistency.

As well as that, I read a bit about it and found this in a data sheet of another relay I was using.

When connecting a coil surge protection circuit to these relays, we recommend a Zener diode with a Zener voltage of 24 V or higher, or a resistor (680Ω to 1,000Ω). When a diode is connected to the coil in parallel, the release time will slow down and working life may shorten. Before use, please check the circuit and verify that the diode is not connected in parallel to the coil drive circuit.

I did more digging and found the reason being the armature spring is tuned (with no protection) to 'break' the tiny weld that can occur between contacts in high current situations when closing. As well as that bouncing or chatter further wears the contacts.

With that said I figure it doesn't make sense to use a diode on a relay other than in a situation where failure isn't consequential, and lifetime doesn't matter, especially when a resistor is just as easy and probably cheaper.

I went with a 1W 560Ω resistor and a 1N4007 diode just because it's what I had on hand. Over kill on both parts I guess but it's fine. Cheap, and it works great.

Thanks for everyones help! Gave me what I was after. Josh

MarkT: 1.75 times faster, the voltage across the winding is 21V compared to 12V.

Wow! I had to think on that overnight. You had me worried for a moment! Had I calculated wrong?

But - it is in fact - more or less - three times faster.

Did it not occur to you that when the transistor turns off and the diode "catches" the coil, the voltage is not 12V, but zero (or at most, 0.8V with the diode drop)?

OK now. With a diode across the coil, the coil is discharging through its own resistance - 320 ohms. Remember the term "RL" in the formula?

When you use a diode and a 560 ohm resistor, the coil is discharging through 320 plus 560 or 880 ohms - that is not 1.75 times but if you are going to be fussy, 2.75 times. Rule of thumb, nearer to three times. Got it now?


OK, English grammar check: Three times as fast. Was that the problem?

And that is why it has worked great for 3/4 of a century now, only using the back EMF diode over the relay.

Your real concern would be to find the best suited diode type for the job. I almost forgot, that many of my workhours years ago was spent on replacing 1N400x or the smaller switch diodes, on relay boards. Apparently these diodes have a better quality these days.

I wonder if a modern schottky diode would do any better, because of its lower on-resistance and much lesser diode drop ?

Anders53: I wonder if a modern schottky diode would do any better, because of its lower on-resistance and much lesser diode drop ?

Read the first part of the article of the link in post #10. Schottky isn't any better here than the 1N4004. Leo..