EEVblog 1409 - The DANGERS of Inductor Back EMF

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi in a previous tutorial video on dc circuit transients we took a look at capacitors and inductors and how they store energy capacitors store energy in a dielectric material using an electric field and inductors like are used in relays for example store energy in the magnetic field in the coil and any ferrite or you know high permeability material that happens to be used at the core and of course an inductor can be a coil in a relay like this for example it could be like a uh just a like a common mode or uh just a regular uh wound choke like this it could be a switching uh transformer in a switch mode uh power supply for example these are all magnetic inductive components so we're going to have a look at one of the traps of these and i mentioned this in the tutorial video but i didn't have time to give you a practical demonstration so we're going to show a couple of traps one of which you probably haven't seen demonstrated before which is really interesting but today we're going to take a look at some practical examples of in this particular case using a relay and some of the traps involved in this but it like i said it doesn't have to be a relay it could be a switching transformer it could in a switch mode power supply it could be a motor for example and a similar trap is involved because of faraday's law of electromagnetic induction which we briefly covered in the previous video but i'll just mention it here again and basically uh e which is the electromotive force basically the voltage is minus n is just the number of turns if you've only got like a single wire uh that your magnetic field is around then obviously n is one and you can take it out of the equation but it's basically minus d phi dt which sounds complicated because it's differential calculus essentially but it's not it's easy to understand d phi dt is just the change the difference or the change in uh magnetic flux over time that's all it is and that of course is in uh weber's per second but we won't go into the details now as i mentioned in the previous video the interesting thing is this why is this negative here well this is lenses law and lenses law basically says that the induced voltage is opposite to what actually caused the magnetic buildup in the first place so if we've got a basic circuit with a switch in npn transistor like this obviously you've seen this circuit before you uh put a base current in here switches the transistor on acts as a short circuit current flows from our power supply through the relay of the coil and the relay activates and changes the contact so that current flows down through there and there will be a minimum uh like turn on voltage of the relay here and here's a data sheet uh showing that it might be you know 80 or something like that if the turn on voltage as soon as it hits that voltage it switches on and of course you would leave that uh current flowing through there if you want the switch position like permanently over here like this you've got to keep the current flowing like that but when you switch the relay off you uh ground this there's no more current flowing here that really switches off but the magnetic field built up in this relay coil it's got to go somewhere it doesn't vanish instantly you can turn this transistor off instantly but the magnetic field has to go somewhere and that energy has to go somewhere in the form of current going somewhere through a path or in the form of a voltage that just gets higher and higher and higher something has to give the stored energy in that magnetic field has to go somewhere just like if you short out a battery there's energy built up in that battery you'll you know get sparks and there's a lot of energy in there and you can short it out and the same thing happens with the coil there's x amount of energy build up and something's got to happen to it and this is what faraday's law of electromagnetic induction is about and in particular lenses law lenses law says that the volt that the induced voltage in the inductor in in this particular case the relay coil will the voltage will actually be opposite to what actually produced it so when we've got the transistor switched on of course the voltage will be positive and negative like this it's flowing through and of course you know this is our ground voltage reference where we're actually measuring from so everything is positive in regards to that but that's not what happens when we turn the switch off like this the magnetic field collapses when that collapses the voltage will go negative so this will then become negative and this will become positive and assuming you don't have a diode like this this current that was flowing through here like this it will still continue to flow because the inductor when you switch it on opposes the flow of current but when you switch it off it wants to keep the current flowing so it's still the current still flows out of here but the switch is off so it's got nowhere else to flow so this voltage at this point here must rise to follow faraday's law and lenses law over here so if the current keeps flowing like this this voltage now becomes positive and it'll rise and rise and rise in theory it'll rise to infinity but of course in practice you never get infinites so where that's what we're going to look at today what happens when you open this transistor switch what happens to this magnetic field stored in here it can really ruin your day unless you put in a diode and that's what we're going to look at you might have heard these called back emf diodes freewheeling diodes snubber diodes flyback diodes there might be other names too leave it in the comments if you've got a scene a different name for these but basically what this diode solves is the problem with back emf because when you open this switch here this current has to flow somewhere and if it's got nowhere to flow then this voltage just rises to the moon right and you can get hundreds or even thousands of volts as we're going to demonstrate here today but if you put a back emf diode in here the current has somewhere to flow like this it flows in there and it stops this voltage rising to infinity and which can blow the so the transistor that's connected to it can blow any circuit that you use to drive in and this is why you'll find these diodes actually packaged inside relay driver chips like the uln2003 for example you'll find that there's a basically a common uh terminal for the diode and there's a whole bunch of different diodes in there one for each output and this is designed if you're using those eight outputs to drive eight relays then you need eight back emf or snubber or flyback or freewheeling diodes and the reason they're also called freewheeling diodes is because you can imagine that the stored energy in the inductor is like a big flywheel so imagine this is a big flywheel that's just spinning and spinning and spinning and spinning like this because you're spinning in this direction because you're putting in energy from the current it's spinning and spinning and then when you re when you stop spinning it you remove the current the flywheel still wants to keep going and this is why you put in a reverse diode like this to give it a path so it can flow like that and then it'll stop very quickly because you're loading it down and the back emf diode will of course conduct all that current stop the voltage from rising dramatically and it will absorb all of the energy that was stored in the coil and it will absorb it very quickly so it doesn't damage your circuits and this is the importance of back emf and freewheeling diodes there can also be a clamping diode as well it would be another name and flyback actually comes from you'll actually find a back emf diode on the primary side of a switching power supply like this and you can see inside there is the coil of wire and the two contacts that's the center and it's just when you activate the relay it just pulls this armature across and moves that contact from one side to the other okay so what we've got is a 12 volt relay here we've got a 12 volt power supply we've got an npn bipolar transistor and another mosfet rubbish it's a 2sc 26r10 and that's important and we'll change that around later to show you it's a high voltage transistor 300 volt rated you'll see there's a reason for that i've got a pulse generator over here which just generates like a one hertz a couple hundred millisecond uh pulse like this over and over 50 ohm terminator just for your transmission line aficionados then a base resistor 1k and that will turn on the transistor i've got a current sensing resistor down here so that lets us hook this up to our scope and look at our emitter current flowing down here because it may actually be different well it will be different spoiler alert to the relay current up here and i've got another magnetic current probe up here which is a relay current probe i just realized i put that in the wrong spot it it's actually in here so that we can get the current flowing around this when we release our relay anyway and here's our circuit here we've got our omran relay you can see it i've just this led just shows which contact it's just switching back and forth clunk clunk that's our switching transistor i don't have the freewheeling back emf diode in there at the moment we've got our current sensor up there and uh just a few probes to measure the current and voltages oh and i've got another probe off here going off to the collector voltage uh so we can see because this is what we're really concerned about today what happens to the voltage at this point and will we blow up our driver okay so i've got it going here switching at a one hertz repetition rate as you can probably hear and that's exactly what you expect uh when we switch on the relay here this is our input pulse this is our emitter current this is in uh 2 milliamps per division and this up here is our current probe showing it's through the coil you can see these two match like this i can actually uh clean this up because i'm actually uh using um the a high current probe available in the ev blog shop by the way it's excellent this mixing uh current probe here great for doing stuff like this not for really low currents like we're dealing with here but i can fix that by just going into the acquisition here and going into average mode there you go you can see that they're practically identical they've even got that same little blip in there so obviously the emitter current is going to match the uh coil current up here because well it's it's the same right the current it just flows down in the circuit the current through the coil is the same as the current through the emitter here so you'd expect the waveforms to be the same that's just my averaging again we'll just go back to sample mode there so it's just going to be a bit noisier so i'll just expand that emitter current there and you can see you might notice just ignore this little blip here this is the exponential rise that we saw in the inductor when an inductor is not energized and then you put a current through it your ie put a voltage across it in this case which causes a current to flow it doesn't change instantly because here's our input pulse changes instantly our transistor this is our transistor it's switching on instantly but the current actually through the transistor and hence through the coil as well does not switch on instantly it follows that exponential curve like that it's going to follow that precisely i guarantee it now the reason that we're getting this little uh blip in here is because this has to do with the magnetics of the coil and how it's physically starting to do some work at this point it actually reaches the um what's called the trip current of the relay and then it's it's doing work it's pulling the armatures so that's the point there where the armature is actually kicking in and then it goes up but if that wasn't there if it wasn't physically doing any mechanical work then if it was just an inductor just the coil itself you would get a perfect exponential rise just as the formula predicts but all the interesting stuff happens on this negative edge when we de-energize the coil so i'll just switch to the negative edge there and now we can zoom in and have a look at some interesting stuff that's happening here so as you can see our emitter current the current through our transistor doesn't suddenly fall because this is our input to our transistor it doesn't just go to zero like this as you'd expect there's actually still a significant amount of time where the current does something we're only talking 10 micro seconds here we're not talking much but the devil's in the detail so let me actually switch on channel 2 which is the collector voltage so we're looking at the emitter current which is the blue there the collector voltage which is the green now the interesting thing to note with the collector voltage is what scale we're looking at 100 volts per division 100 200 300 400 500 600 700 volts this is not a mistake i am using a 100 to one probe there's my high voltage hundred to one probe which you've seen in my uh probe video i've actually done a video actually comparing different types of oscilloscope probes a high voltage probe and this remember is with no back emf diode on there and that's what you get if you forget to put your back emf diode it rises to hundreds and hundreds of volts it could even be thousands of volts now this is actually even exceeding the data sheet value of our transistor so no we're not damaging our transistor because there's actually not a huge amount of energy in uh this coil so even if you didn't have a high voltage probe and you hook this up to your oscilloscope which has a nominal like 300 volt peak input you're still not going to damage your oscilloscope because it's not a lot of energy and it only lasts you know tens of microseconds something like that so it's not a lot but this is what happens the voltage rises so if our input switches off here why does it take like five micro seconds here for our uh voltage to rise and our current to actually drop like this well this is actually a a quirk of bipolar transistors it's what's called the storage time and not all data sheets will have it but here's a data sheet that actually does have it and i'll show you uh this transistor in a minute and this storage time of bipolar transistors it's in the order of you know microseconds uh it's not long but it this what's is what limits the switching uh frequency of bipolar transistors generally they actually um have this like delay they actually retain the current in there for a short amount of time the base current they essentially retain that and keep the transistor switched on it does take some time for them to switch off in this case about five microseconds just be aware of that with bipolar transistors all right so i've stopped that so let's have a look at what's going on here uh as you can see we've got our collector voltage here it's going up to 700 volts so it's breaking down so after our delay time there after our storage delay time then the collector voltage starts to rise like this right up to you know 700 volts a peak and then the blue trace here you can see our emitter current down here through the 10 ohm resistor so it's flowing through the transistor because the transistor is broken down it's only a 300 volt rated transistor so we're going to get some flow through this emitter resistor down here but you'll notice that it that the emitter current ends at the same point as when the transistor when when the collector voltage here starts to go back down so the transistor's gone well i'm done breaking down i'm going to stop breaking down so there's no more current flowing through the transistor like this but you can see that it takes significant amount of time for the actual collector voltage here to actually decay it could be like maybe hundreds of microseconds even it takes a you know it takes a significant amount of time it's gone right off the uh screen there and that would be due the transistor is not breaking down anymore that would be due to other parasitics in the uh breadboard in the physical uh construction of the breadboard so what i'm going to do now is put in the back emf diode in here across the relay coil and that will conduct all of the current and keep it within here and clamp the voltage at this point to 12 volts plus a diode drop i can do this safely even at 700 volts because as i said you're not going to feel it because it's a low amount of energy bingo you see the green trace which is our high voltage trace it's dropped down to nothing you might be able to see hang on there we go what are we at now two volts are per division two four six eight ten twelve point six that's our diode drop twelve point six volts there and it's clamped we have now saved ta-da we've now saved our poor transistor or our driving circuit whatever it is from the hundreds of volts peak that we had before it's now going to clamp at 12 plus whatever the dire drop could be up to a volt or whatever depending on you know whatever and that diet can be pretty much any type just a uh fast switching uh signal diode you don't need anything more than that because the energy is like it's it's naf all the area under that curve for like 10 microseconds is nothing so you don't need like a big one in 404 or something like that i generally prefer to use this fast faster switching diodes that's all you need so you know a 914 4148 so that's why in every relay driver circuit you'll find a back emf diode or a freewheeling diode or a snubber diode or a flyback diet and you can see why it's called a snubber diode because it snubs the voltage instead of going up hundreds and you know hundreds and hundreds of volts right off here it just it snubs it or clamps it also called a clamping diode and you don't actually need a high voltage rated diode in there because the act of putting the diode in circuit means that the collector voltage it will never ever rise up to those hundreds of volts because the current is clamped through the diode now let me show you something really cool we're going to make an rf transmitter we're going to ruin our day by replacing our high voltage transistor there which is still breaking down with an even wimpier one i've got like a pn100 this is like a 40 or 50 volt rated uh transistor let's whack that in there and see what happens this is really neat so there it is that's now in circuit and we've got our back emf diode in there so nothing has really changed here except for the fact you can see we're on the same time base 10 microseconds our storage delay here isn't nearly as much uh one microsecond there so because this is a higher speed transistor than that high voltage one we had before so there's less storage time but you can see it's doing exactly the same thing it's clamping at that like 12.6 volts there there it is no worries we've saved our circuit but let's take out that back amf diode shall we and ta-da look at that whoa this is heavy what's going on in fact we've got a whole lot of action happening here for ah a good more than a millisecond look at this um there's a whole bunch of stuff if we can't see anything here we're going to have to actually zoom in to see what's what and we're just going to take a look at what's happening in here so the green is our collector voltage again and that is the interesting one we want to look at 20 volts per division so 20 40 60 80 oh you know 90 odd volts it's ramping up there after our delay uh time there of one storage delay of one microsecond so at this point the current to our relay is switched off and the voltage starts to rise just like it did before until the transistor breaks down it's like it's only rated like 60 50 60 volts or something but survived a bit more so at this point the transistor breaks down and basically um shorts out pretty much because our car our voltage at at this point has dropped down to zero and the only way it can drop down to zero is if it if it goes through this transistor and is pulled low by this 10 ohm current sensor resistor here so it's basically the transistor's just broken down it's conducting but because it's broken down and the voltage starts to drop like this because it's shorted out then well where's the voltage to continue to keep it broken down it's not the voltage is dropping drastically drastically until the transistor goes oh i've got no high voltage on me anymore i'm not broken down i'm going to start up again and then it starts up again and then again and again and it oscillates we've got ourselves an rf oscillator at well what sort of frequency we can measure that is about 1.5 megahertz so we've now got ourselves a little rf transmit for however many said like almost a millisecond this thing is going to be acting as this like little mini rf transmitter isn't that cool and you could really come a gutter if you don't put in your back emf diode you can actually something like this can start oscillating and of course the oscillation frequency is going to uh depend on like the parasitics of your parasitic capacitance of your breadboard and circuit and other stuff and in other cases it may not oscillate as we saw before even though the previous transistor broke down but this one certainly does do that i'm going to do this live i'm going to replace the pn100 with a classic 3904 they're practically equivalent i mean the pm100 is like a an equivalent it stopped going and there we go it's it's similar sort of duration but and i expect our frequency to change a little bit and hold your tongue at right angle good enough for australia ah almost two megahertz now and you can see how that's slowly rising up there i'm not sure why it's doing that but uh the the reason why it changes here i would imagine that that's actually the physical relay actually uh you know moving back so that's going to make a difference in the properties of the coil so you'd expect some sort of change there but you can see it eventually reaches a point where it's going well i don't have enough uh sustaining voltage in the coil in here to actually break down the transistor anymore so we're talking 20 40 you know 60 something volts something like that energy in the coil eventually drains out oscillating it like this you know it's not free energy here the energy comes from uh the magnetic field built up in there and its magnetic field is slowly uh decreasing uh through all this switching and other losses and it just doesn't have enough energy anymore and then it eventually just tapers off just like we saw before and because the transistor is not breaking down anymore we're now getting into uh just you know the parasitics of the breadboard and the circuit actually just slowly discharging that it's just leaking out and that takes you know 10 milliseconds or something and i can actually fix that off operation if i put a capacitor across the collector and emitter let me there there we go there's a capacitor across the collector and emitter and it's well doing something else weird now because of the uh parasitics of our circuit so there you go i promised to show you something neat you may not have seen before a transistor relay rf transmitter cool huh big trap for young players and if you zoom out to your regular time base to see your thing like you might think oh it's just it's just a spike that could be i don't know my like a big inductive earth loop or whatever and you know yeah no worries right and you wouldn't think anything of it and this rf if you don't have the back emf diet in there then if you don't actually go in there and check the negative edge of that you wouldn't know that all of this magic is happening in there can be hundreds of volts like and an rf transmitter as well a very brief one and that could like couple into other parts of your circuit and really ruin your day and unless you actually zoomed in there and really had a good look at what's going on there you wouldn't never know now here's the interesting bit and why i've included this current probe in here like this normally the emitter current down here matches the inductor current but with the back emf diode installed you'll notice that we're at 10 milliseconds per division it takes 10 20 odd milliseconds at least for the orange relay current here so this is the current circulating in the back emf diode here it takes much longer for this to actually decay down because the energy stored in there it can keep that voltage up longer and keep that current flowing and our blue waveform here that's our emitter our current it's dropped to zero but it's there's still that huge delay while that current is circulating in that driver there this is why it takes longer when you include a back emf diode it takes much longer to switch the relay off now i'll physically remove that like that and if i rescale that just to start the averaging again you'll notice that it's where exactly the same scale as before but now the relay turns off much quicker and just as a brief aside a back emf diode like this is technically not the best solution for this there are other solutions out there but it's the simplest and the cheapest and some relays might actually be uh polarized the coil is polarized because if it is polarized then it'll have an internal back emf diode in there but technically um a backing morph diode like this can actually because the current's actually flowing around here and it can flow around for quite some time then this can actually keep the relay actually energized and it can take longer for the relay to switch off and in some cases there might be some extra contact bounce or something like that due to the back emf diode but of course you've got to protect your circuit so you can't just have nothing in there but sometimes you can have just a resistor in there if under certain circumstances sometimes you can uh put in an extra zener diode like that that's probably like the best case uh solution is then it's going to switch off quicker and you can put like a a varista in there and a like a tvs like mob type device or something like that some sort of clamp device but yeah back emf is just your traditional solution cheap and simple but you've got to know there are technically some downsides and it's not just the coil either you may actually want to put a clamp across switches because one of the problems if you're driving an inductive load you know it could be a motor or something like that with a relay or some other you know large inductive load you can actually get arc in across your contacts here when it opens up you can get high voltage arc in it's exactly the same back emf problem so you might want to put a clamp across here and you might see this as a capacitor uh resistor snubber uh for example that that goes across switches so if you've ever seen a capacitor and resist it in series across like a switch in scr or or some sort of switch contacts or something something like that you know they're doing that as a clamping solution because inductive loads doesn't matter what it is not just talking about relays here an extra cool bonus thing i've got my microphone right next to the relay without the back emf diode so listen to that and now listen what happens when i plug in my back emf diet i do nothing else ready it's changed it's lower amplitude listen clunk clump it's louder cool huh i'll leave uh people in the comments to figure out why that's happening so that's pretty cool huh and back emf diodes they are a big deal gotta have them otherwise that kal pesky collapsing magnetic field and bloody faraday and lens they're gonna come and bite you you cannot beat the laws of physics captain um that collapse in magnetic field if there's nowhere for the current to flow through our diode then well the voltage must go up you must obey the formula i hope you liked it if you did give it a big thumbs up as always discuss down below catch you next time
Info
Channel: EEVblog
Views: 134,010
Rating: 4.9591393 out of 5
Keywords: eevblog, video, back emf, inductors explained, inductors in circuits, inductor vs capacitor, diode, freewheeling diode, clamp diode, relay, relay back emf, flywheel diode, flyback diode, flyback diode explained, flyback diode relay, transistor breakdown voltage, relay coil, lenzs law, lenzs law of electromagnetic induction, lenzs law explained, faradays law, faradays law of electromagnetic induction, rc snubber circuit, snubber diode
Id: hReCPMIcLHg
Channel Id: undefined
Length: 29min 51sec (1791 seconds)
Published: Sun Jul 25 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.