Go Down

Topic: How does the diode protect the transistor in this circuit? (Read 2715 times) previous topic - next topic

ba58smith

Working my way through the tutorials, and trying to truly understand what all the comonents do in each one. I'm stumped on this one, though. (I've attached an image of it, and it's also on Page 71 of this Guide: http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Kits/SFE03-0012-SIK.Guide-300dpi-01.pdf)

Here's how it looks to me: 5V is provided to the bottom side of the of the relay's coil, but can't go anywhere because the transistor is open, preventing the 5V from getting to GND (and because of the diode, which allows voltage to flow only in the opposite direction). When the transistor is switched "on", the 5V can get to GND, and the coil is activated. So far, so good. And the diode doesn't seem to enter into the basic functioning of the circuit, right?

But the diode is there to prevent damage to the transistor, from the voltage spike that can come out of the coil when power to it is shut down (that's what the Sketch comments say). My question is, HOW does it protect the transistor?

When Pin 2 goes LOW, the transistor goes "open", so any voltage coming from the coil can't go THROUGH the transistor, because it's no longer connected to GND. But I guess the voltage going TO the transistor is what might damage it. So how does the diode protect it? IOW, why is the voltage spike coming out of the top of the coil going to go through the diode, and back to the bottom (5V) side of the coil, instead of to the transistor?

Thanks for anyone's simple explanation.
Brian Smith
Arduino Newbie 2015

DrAzzy

When you turn off power to an inductive load, current wants to keep flowing- this produces (with the way it's wired there) a positive spike on what was the low side of the load - this can be many times the applied voltage (this sort of behavior is taken advantage of to make boost converters). The fly back diode lets this brief pulse flow harmlessly to the other side of the coil, instead of potentially damaging the transistor (as it can be higher than the max rated voltage of the transistor).

Read about inductive loads for more info
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

ba58smith

That almost explains it well enough for my still-ignorant brain. I was going to ask WHY it does what you said, but I did a little more Googling, and found this: https://en.wikipedia.org/wiki/Flyback_diode - which answers the question well enough. Essentially, the circuit  consisting of the coil and the diode runs that excess energy around in a circle, dissipating a little each time around, until no more inductive load is created. Of course, this happens in a tiny fraction of a second.

Thanks! Now, hopefully I'll remember a flyback diode anytime I incorporate a solenoid, relay, or any other component that has an inductive load.
Brian Smith
Arduino Newbie 2015

Grumpy_Mike

I find it easier to understand like this:-

When current flows through a coil it generates a magnetic field. When this current is suddenly turned off there is nothing to support the field and it starts to collapse. As it collapses the magnetic lines of force cut through the coil. That is how electric generators work, magnetic lines of force cutting through a coil. The way physics works is that the polarity of the voltage this collapsing field produces is opposite in polarity to the polarity that generated the field in the first place.

Hence the coil produces a voltage which is opposite or the reverse of the original voltage that produced it. As the field is collapsing it does that a lot faster than the field was originally made to grow and hence the reverse voltage is higher than the voltage used to create the field in the first place.

I hope you find this useful.   

BorislavLukanov

haha, yeah, and pressure is applied from the water provider silos that must go normalizing into the atmosphere, but the fuse is blocking the pipe so the server doesn't work : D AHAHAHAHHAHAHAHA

BorislavLukanov

And don't forget that the compressor that puts more pressure on the nozzle. hehehehehe

ba58smith

I find it easier to understand like this:-

When current flows through a coil it generates a magnetic field. When this current is suddenly turned off there is nothing to support the field and it starts to collapse. As it collapses the magnetic lines of force cut through the coil. That is how electric generators work, magnetic lines of force cutting through a coil. The way physics works is that the polarity of the voltage this collapsing field produces is opposite in polarity to the polarity that generated the field in the first place.

Hence the coil produces a voltage which is opposite or the reverse of the original voltage that produced it. As the field is collapsing it does that a lot faster than the field was originally made to grow and hence the reverse voltage is higher than the voltage used to create the field in the first place.

I hope you find this useful.   
Grumpy Mike,

It's useful, in that it explains what's happening with the coil, and why. But you've left me with a volttage in the coil that's higher than, and opposite to, the voltage that created it. That explains why a coil can produce a voltage spike when you cut power to it - because that voltage is all dressed up with nowhere to go!

But my original question was "why does it choose to go through the flyback diode and back to the input side of the coil, instead of to the transistor?" Asked a different way, "How / why does the diode protect the transistor?" If you have a simple explanation for that, I'll be a happy man! Thanks.
Brian Smith
Arduino Newbie 2015

MarkT

The inductor acts to maintain the current that's flowing, in other words it will push the current out with whatever force is necessary if you try to stop it suddenly.  With a diode across the inductor the force that is necessary is
0.7V, which is what happens.  The alternative path through the transistor involves exceeding the breakdown
voltage of the transistor, which being a lot more than 0.7V, means the current just diverts from the transistor
to the diode when the transistor switches off.

The hydraulic analogy is called "water hammer", where you rapidly shut off a water valve on a high speed flow
and the momentum of the water hammers the pipe.

Inductors act like current has momentum.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

TomGeorge

Everything runs on smoke, let the smoke out, it stops running....

ba58smith

... With a diode across the inductor the force that is necessary is
0.7V, which is what happens.  The alternative path through the transistor involves exceeding the breakdown
voltage of the transistor, which being a lot more than 0.7V, means the current just diverts from the transistor
to the diode when the transistor switches off.
That's it! So simple - the diode requires less "force" (voltage) to open up to the flow of electrons than does the trannsistor. Is it safe to assume that different diodes have different voltage requirements, or are they all about the same 0.7? And now I know another important term to help me pick the right transistor / diode combination: the breakdown voltage of the transistor.

Thanks so much!
Brian Smith
Arduino Newbie 2015

ba58smith

Hi,
This might help;
http://www.douglaskrantz.com/ElecFlybackDiode.html

Tom.. :)
Tom, that's a fantastic explanation! Every little bit, in nice little words that I can understand. I looked at several of this guy's other articles, hoping to find something like that to explain transistors, capacitors, and all those other little "ors" that go into so many circuits, but didn't find any. I'll search for more from him, though - his explanation was perfect for me.
Brian Smith
Arduino Newbie 2015

Grumpy_Mike

Quote
Is it safe to assume that different diodes have different voltage requirements, or are they all about the same 0.7?
Well 0.7 is the highest forward voltage and it applies to diodes made of silicon. These are by far and away the most common form of diode. It is always the same for a silicon diode. We used to make diodes out of Germanium and that gave a forward voltage of about 0.25V but these days they are rare.

These days a Schottky diode can have an even lower voltage of between 0.15 to 0.45V depending on the current and construction. https://en.wikipedia.org/wiki/Schottky_diode So these are sometimes used for a quicker quenching of the back EMF.

Not to be confused with the similar sounding Shockley diode which is not to be used for flyback applications.

ba58smith

Thanks, Grumpy Mike - and everyone else who chimed in on this one. All in all, a very satisfying Q & A for me!
Brian Smith
Arduino Newbie 2015

BorislavLukanov

are you sure that an inductor generates voltage while is applied voltage to it? If you'r trying to understand the logic of the circuit maybe the unclear function of a component could confuse you.....

BorislavLukanov

the electricity doesn't CHOOSE where to pass ... ! It follows precise lows of physics!

Go Up