Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Relay protection with diode.

Status
Not open for further replies.

bananasiong

New Member
Hi,
If a relay is switched by a NPN transistor, a reversed diode is needed to avoid the back EMF from destroying the transistor. How if a PNP is used? The direction of the back EMF seems to be going to the ground (or it is not generated?). So is a diode needed to protect the transistor?

Thanks
 
bananasiong said:
Hi,
If a relay is switched by a NPN transistor, a reversed diode is needed to avoid the back EMF from destroying the transistor. How if a PNP is used? The direction of the back EMF seems to be going to the ground (or it is not generated?). So is a diode needed to protect the transistor?

Thanks

yes same thing.. cathode of diode at most positive supply
 
Last edited:
If PNP is used, cathode of diode at most positive supply, how about anode? At the junction of the collector and the coil?
 
Yes, I know about this. For NPN, the load (coil) is at the collector, so the negative spike come from the collector; for PNP, the emitter is tight to Vcc and the coil is from the collector to ground. So the spike goes to ground?
If a diode needed for PNP, is the connection same as what Optikon said, cathode to the Vcc? Then anode to ground or collector?

Thanks
 
bananasiong said:
Yes, I know about this. For NPN, the load (coil) is at the collector, so the negative spike come from the collector; for PNP, the emitter is tight to Vcc and the coil is from the collector to ground. So the spike goes to ground?
If a diode needed for PNP, is the connection same as what Optikon said, cathode to the Vcc? Then anode to ground or collector?

Thanks

Diode always goes directly across the relay windings and the physically closer to the coil contacts the better. The direction of the diode is such that it is reversed biased when normal voltage is applied to the coil.

PS: The reverse voltage spike when the coil is de-energized is real as I've seen it on a scope, usually around 4X of normal applied voltage and of a reverse polarity.... It reallys causes a jump in the ground system if not shunted with a diode. The suppression diode also tends to slow down the release time of the relay but that is normally not a problem.

Lefty
 
Last edited:
Yes, I know about this. For NPN, the load (coil) is at the collector, so the negative spike come from the collector; for PNP, the emitter is tight to Vcc and the coil is from the collector to ground. So the spike goes to ground?
Just reverse it for PNP. eg: For an NPN, the anode is always connected to the end of the coil that goes to the collector. For a PNP, the cathode is always connected to the end of the coil that goes to the collector. In both cases the remaining end of the diode goes to the remaining end of the coil.
 
Leftyretro said:
PS: The reverse voltage spike when the coil is de-energized is real as I've seen it on a scope, usually around 4X of normal applied voltage and of a reverse polarity.... It reallys causes a jump in the ground system if not shunted with a diode. The suppression diode also tends to slow down the release time of the relay but that is normally not a problem.

Lefty
Ya, I've tested this with a scope as well by connecting one end of the coil to the common, the other end of the coil to Vcc, and normally close to ground. I saw negative voltage spike. When a diode is added, the pulses is smoother from the CRO, but the frequency is lower, I can hear from the switching of the lever of the relay.
 
Instead of memorizing rules, think of it like this:
Assume the transistor switch is ON, and steady-state current is flowing through the coil. The current in an inductor cannot change instantaneously, so when you turn off the switch, the current needs an alternate path, or a huge voltage will instantaneously develop across the coil. The diode simply needs to be connected so that it provides an alternate path for the coil's decaying current.
BTW, the diode current starts out at whatever was flowing through the coil when the switch is opened, and decays to zero (unless the switch is turned on before zero is reached).
 

Attachments

  • flyback diode.PNG
    flyback diode.PNG
    15.2 KB · Views: 634
gramo said:
The diode offers the back EMF a safe current path. With it installed, the current (generated by back EMF) will now oscillate through the diode and then back to the winding of the relay, dissipating it safely, rather than putting other external components at risk
That's not quite true, the current circulates round the loop slowly dieing away.

Adding a capacitor and a resistor will cause damped oscillation; this called a snubber networked and it's best to have it critically damped.
 
The only real difference is a diode causes the current to be damped through the sustaining of the existing electromagentic field and any resistive losses. If that magnetic field has anywhere to go or something to do (as it usually does) it will. People here have chided me on using a common inductor value for an electromechanical speaker because the voice coil doesn't act as a pure inductance because it has physical world material it can manipulate to dissipate what could otherwise be an incredible voltage spike. Modern IC's don't require overvoltages of a very high amount to cause harm. A proper clamp diode in an active system often doesn't even require a flyback diode. The reverse bias current of a diode is so small though people seldom say 'you don't need that' and it does add a saftey factor under worst case conditions.
 
Sceadwian said:
The reverse bias current of a diode is so small though people seldom say 'you don't need that' and it does add a saftey factor under worst case conditions.
I don't understand what you mean by this sentence.
 
Even the heading appears mis-guiding-- as the diode is to protect the driving transistor from back emf generated by the inuctance of the relay coil--
 
A reverse biased diode has a leakage current, an inductor with a protection diode will practically have it's diode reverse biased all of the time.. As I said it's so minimal it's not considered. Thought it was pretty clear.
 
Found a nice little blurb on the net earlier

From http://www.kpsec.freeuk.com/components/relay.htm

Transistors and ICs (chips) must be protected from the brief high voltage 'spike' produced when the relay coil is switched off. The diagram shows how a signal diode (eg 1N4148) is connected across the relay coil to provide this protection. Note that the diode is connected 'backwards' so that it will normally not conduct. Conduction only occurs when the relay coil is switched off, at this moment current tries to continue flowing through the coil and it is harmlessly diverted through the diode. Without the diode no current could flow and the coil would produce a damaging high voltage 'spike' in its attempt to keep the current flowing.
**broken link removed**
 
Sceadwian said:
A reverse biased diode has a leakage current, an inductor with a protection diode will practically have it's diode reverse biased all of the time.. As I said it's so minimal it's not considered. Thought it was pretty clear.
No it's not clear. What is puzzling me and possibly others is the relevance of the reverse current to the topic in question.

Certainly the diode has a small (negligible) reverse current when the relay coil is energised.

But the main point is that the diode conducts in the forward direction when the coil circuit is opened - thus clamping the back EMF to about 0.7 Volt and thus it protects the switching transistor.
 
ljcox said:
No it's not clear. What is puzzling me and possibly others is the relevance of the reverse current to the topic in question.

Certainly the diode has a small (negligible) reverse current when the relay coil is energised.

But the main point is that the diode conducts in the forward direction when the coil circuit is opened - thus clamping the back EMF to about 0.7 Volt and thus it protects the switching transistor.
I think what he was saying is that the diode is sometimes not needed, but it has negligible effect when reverse-biased (no adverse effects to consider), so it is cheap insurance.
It wasn't very clear to me either.
 
Sceadwian said:
A reverse biased diode has a leakage current, an inductor with a protection diode will practically have it's diode reverse biased all of the time.. As I said it's so minimal it's not considered. Thought it was pretty clear.

Still makes no sense?, and the reverse leakage current on a silicon diode is so tiny as to be of no interest - also it's only reverse biased when the relay is ON.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top