Interested in learning about wireless power? Subscribers can get up to 80% off my course Wireless Power to the People - Wireless Charging 101 on udemy using the coupon code "UA-cam" www.udemy.com/wireless-power-to-the-people-wireless-charging-101/?couponCode=UA-cam
@afrotechmods. This video understood clearly about why diode need across motor. I have one doubt what if we connect motor to MOSFET source to ground. In this situation diode is required?
@@ThornStarR98x_blackheart A decent one. That 4007 he's using will probably do just fine. A 4001 may do as well. You just want a diode that can handle the spike. If you want to be precise you can measure the impedance of your motor and see how high the spike may be. But I am not an electrical engineer, just a hobbyist.
This video is the reason why I love your channel. I understood inductive spiking in less than 5 min. My lecturer spent 90 min explaining this concept and showering us with total BS formulas with no meaning and at the end everyone left the class without understanding the what the inductive spiking was. Cheers, keep it up.
I don't know who you are but have been around electronics all my life and this is one of the most informative videos I have ever had the pleasure to watch! I cannot thank you enough. It's application at work is far reaching! Thank you!
Compliments on a clear presentation of the function of a Free Wheeling Diode. I will link this explanation for the electronic laymen/vintage car owners, who I am currently working with to solve a vehicular electrical problem where the stimulus is release of the horn or backing light relay, but no FWD is present. You and I both know what the first line of defense must be...snub that spike!! Cheers from Connecticut!
500 comments already, maybe someone has written about it, but: we should keep in mind that, although parallel diode is "a must", adding it makes the current in the coil fade away quite slowly. U = -L(di/dt), so if U is like 0.7V on a silicon diode (or even less on a Schottky diode), the current remains significant for quite a while after the transistor gets switched off. In many cases this might be not important, but if we need fast reaction, it is advisable to use a Zener diode in series with "normal" one (cathode to cathode or anode to anode), in order to increase U in the formula above. Alternatively an appropriately calculated resistor may be used. I personally learned that when I was designing solenoid driver for kind of a printing head, and the first version, where a regular silicon diode was used, dosed much more ink than was desirable and than would result from the duration of the driving pulse. (In turn, when a Zener diode is used, power dissipated on it must be taken into account, especially if pulse repetition rate is high).
Interesting! Thank you for your comment. I had never encountered a situation where the decay time was important but I can see how this would be needed in such a situation.
@@Afrotechmods In fact in most cases the decisive factor which determines the decay speed is the internal resistance of the coil, not the voltage drop on the diode, but in some rare cases it may be not enough as in the case described above. Solenoids are particularly nasty here as they release at much lower current than is needed for them to trigger.
@Afrotechmods By the way, my motor was a 60W motor DC motor. A short story : when I was young, I had blown up a BLDC driver circuit that I had had build just by the way you suggested. I had a diode to block reverse currents to the power supply. The brilliand thought was an addition of the last moment when I said "Hey, when we plug it, someone may put the power supply cables in reverse and blow it up", so I put the diode. It was not still that bad, because the board in order to stop the motor....
Very interesting. About 8 years ago I had some projects with the ignition coils on my car and I observed the Voltage on the primary side of them with an O-scope and it had the same pattern.
I'm in the process of converting an automobile to full electric, and I have been building an open source DC Motor controller. This video was hugely helpful to me in understanding WHY I need to add capacitance across the bus bars of the IGBTs. I had already done so, but I was just a monkey imitating what a thinking person had done before me. Now I at least have an inkling of the theory underpinning it. Thank you.
And this clearly explains what an brilliant (but not so great at teaching) instructor tried to explain in an hour last week in less than 5 minutes. Love it.
@KIBProductionz Actually, you would get a negative voltage spike at the node where the FET and the inductor are connected to each other. This phenomenon forms the basis of a buck-boost converter.
@ntomata0002 You can also try this for dramatic results: Put an extra diode in series with your power supply, and do not use any bulk capacitors. Then connect the motor & flyback diode as normal after this extra diode. This diode will tell you if any current ever goes back to the supply. If no current goes back to the supply then this diode will make no difference right? But view the voltage just after this diode, and you will see large positive voltage spikes on the flyback diode's cathode!
3:11 when transistor switch is off, there is no way for the current to go through the power source because that power source is connected only by one end to the inductive load. So energy does not go back to the power source at this moment. Here energy only recirculates through the inductive load.
@@SinanAkkoyun when transistor switch is off, the coil is gonna push the electrons though the diode only and current will continue until all the inductive energy is dissipated in that coil, diode and conductors that connect them. The battery does not participate here because switching off that transistor switch cuts off that battery from the circuit.
@pufarinu It's a parasitic diode, created by the process used to make the MOSFET. i.e. it's not deliberately put there. It may be a good thing or a bad thing depending on the application.
@gollumondrugs Yes, it does make it more efficient. Ignore what all these other people are saying. Try it with and without a diode and you will see that your RPM/torque will go up and your average input current will go down.
@ntomata0002 Next, if you add a bulk capacitor after the power supply's series diode, you will see all those spikes go away. This is because it only takes a small amount of capacitance to 'absorb' the freewheeling current in a small motor. So by doing this experiment you can prove that current not only recirculates back into the motor but also a small amount will be returned to the power source, and in most cases a capacitor or rechargeable battery will absorb it without a big voltage spike.
@ntomata0002 Also, try running a large motor, then switch the transistor off, then forcibly slow down or stall the motor and you will get a massive spike on the supply line unless you have sufficient capacitance to deal with it.
I was building a driver for flyback transformer and my diode just disintegrated and I had no idea why. Luckily I decided to watch some of your videos again. Apparently the schematic I was using was faulty and I just put my diode the other way around which led to a build up of huge energy on the negative side of it. Thanks man! I'll replace it and see if it works this time :D
@ntomata0002 I probably should have mentioned the motor's mechanical inertia too. If you have a motor rolling along, then you turn the fet off, that motor is going to act like a dynamo for a short while until it stops.
@Afrotechmods .....in the free wheeling diode. Because the current to the windings of the motor was not slowly dissipated and through the immediate stop it had a large ΔI/δt it produced the free wheeling current. It is the same overshot of 1V that appears in the basic circuit when you turn off the transistor briefly before the ramp. By using a diode in series with the power supply, there were no dramatic results either. When stopping, it was a very brief overshoot of about 10V....
@Afrotechmods The inertia just adds to the stored energy to the motor, it doesn't change the picture. The energy exists and disipates to the friction, motor windings and the diode itself. It doesn't return to the source in this particular example because the current has a low voltage drop to flow through the diode.In other configurations (in H-bridges for example) that the only path for the current to flow is through the power supply, it indeed returns to the source.Just not in the above example
@Schmiki24 All power MOSFETs that I know of have that diode. However other FETs such as a JFET do not have the diode. Whether you should add your own additional diode in parallel depends on your application. Parasitic body diodes tend to be kinda "crappy", i.e. slower response time and higher forward voltage drop than a nice discrete schottky diode. So if you were building an H bridge, putting some good schottkys in parallel with each mosfet could get you a little more efficiency.
@Afrotechmods .....but it was observed in both sides of motor which suggests that it was not produced by the motor (if it was the case then the voltage in the motor should be raised, but instead if followed the usual ramp). The overshot was due to the inductance of the cables that continued to bring some current even after the FET was off, current that charged the Drain-Source capacitance of the FET and stayed for some time unable to return to the power supply.
@ntomata0002 Oh, and when I refer to a 'large' motor, I mean 150W+. But for the little experiment I just outlined a smaller motor will work too. No pager motors though ;)
Afrotechmods, So i built your 555 timer PWM circuit, and put it on my variable tension friction drive bike project i built. I had the backwards diode in the circuit, it ran fine, I had 24 volts on this 280 watt motor with a powerful fet, and i hit a bump in the road and my solder connection on my diode broke off and i basically had no protection for that fet so the fet exploded in the housing, i went back home, and realized it was over 100 volts of spiking on the drain. Inductive spiking is very real.
@Afrotechmods I tested all. I used an IRF630 (200V) prepared for the worst. With the basic configuration there was no overshot because the back emf of the motor continued to produce voltage as a generator with the same voltage and direction as the power supply when it was disconnected, dissipated by a smooth ramp as the speed of the motor decreased until 0 after 500ms. When forcing the motor to stop, there was a small overshot in the end of the ramp of about 1V, it was the current flowing.......
Wow you make such great videos, i learned a lot from just watching a couple of them. You really know your electricity, but whats different is you can actually explain it so even idiots like me can understand it, thanks
There is no extra current spike coming from the inductor, only a voltage spike. The peak current through the inductor will be the same as whatever the current through the motor is in the steady state on situation.
gonna say thank you, because literally yestarday i was wonderiong about what happened when an inductance find itsself in an OC and it is previously charged and a constant voltage source is applied. Thank you very much
The snubber diode will dramatically slow down *release* of things like relays. The current flow back through the diode maintains the magnetic field for a few milliseconds. Sometimes the diode is augmented with a resistor and capacitor; which causes the spike to be slightly higher than clipped completely with the diode, but also drops the magnetic field more quickly since you consume the energy in the resistor rather than feeding back to either the supply and/or the relay itself.
Very interesting. I just watched a video about waterhammer, a phenomenon in fluid dynamics, where a huge spike in pressure occurs when a valve is closed too quickly. The resemblance of the diagramms are uncanny
Very well explained . The motor I am using is 3kv dc motor 24 volts it is a golf cart motor . and max current is almost 150 amps , please advise what kind of a freewheeling diode will be good to save the IGBT it blows up very now and then
@Afrotechmods .... fast it shorted out the 3 phases of the motor, so no currents flowed ever backwards. The disaster came when my partner suggested that the motor stopped too fast, so I thought that instead of shorting the phases I could use a PWM scheme of fast alternation of short circuits and free wheeling in order to make a more controllable stop. The free wheeling returned current to the power supply, which it couldn't reach the large power supply capacitor, so instead it gathered to....
@Afrotechmods I spotted it after watching the video again, by the oscilloscope outputs it looks like the inductance to your motor was strong and the roll inertia weak, my motor was the opposite, the inductance current clamped by the diode was dissipated within some msecs, while the motor continued to roll for 500msec working as a generator (producing voltage but no current).
@Afrotechmods I believe that my experimental results was in accordance with the theory of electronics and closer to ideal results because I used more ideal components (a good quality servo motor, MUR415 ultra fast diodes and twisted cables for the power supply). If you used slower diodes, or a motor with noisy brushes it is possible to have additional spikes and not so ideal response.
@ms63129 All circuits are RLC circuits in some way or another. The parasite resistances, capacities and inductancies might be too small or too large to practically figure them in a model but that doesn't mean they are not there. The shape of the voltage spikes, as seen in 1:36 clearly corresponds to an RLC circuit.
Hi! Should I place a flyback diode parallel to a non isolated dc-dc boost converter's inductor, the same way you did in the video, or this would change the behaviour of my converter? I can send a link of my non isolated dc-dc converter to have a look if you want. Thank you.
@Afrotechmods I guess you talk about a DC motor, just like in the example? I also guess with the diode in the circuit because without it the overshot burns the transistor or if you use soft gate driving and high voltage transistor without the diode you can save it, but the motor will stall almost instanly. According to my knowledge and experience just slowing down the motor doesn't causes spikes, only if you turn it faster or to the oposite side, but because I respect your opinion I will try it.
@Afrotechmods If you refer to turning on and off the transistor with the diode and without it, with the diode the circuit is much more efficient because the stored energy in the motor instead of disipating in an instand to the transistor, it continues to flow for some time. It will not increase the Efficiency = (Output power) / (Input power) compared to the motor full runing.The efficiency will indeed increase if you use steady lower current instead of full on / full off for reduced output power
I noticed even with the diode you didn’t have a square wave it was more of a chair shape. I just wondered how you explain that. I have just built a similar mosfet driver for a spindle motor upgrade on my mini CNC on my channel so your video came around just in time. Thanks
@dmjita It's like turning off a vacuum-cleaner.. it takes time to slow down, because the electrons in the metal have been drawn out; this creates a vacuum of positively charged atoms that need to replace their electrons. Thus you get a high positive energy spike.
This can also be applied to a regulator (boost, buck, and linear), since reverse current is still an issue. Simply use the diode concept on the input and output of the regulator. Look into power diodes for higher currents common to switchers.
@ForViewingOnly those voltages will force the transistor to conduct (like sparking inside it, if the volts are higher) and they can damage the thin iron oxide layer (the gate)
@3:14 You can think of this phenomenon as follow: Say the Wheel of fortune is massive and large. When you give it a push it rotates fast and with energy. If you use your hand to make it stop suddenly it may break your hand (God forbid) - this is because the Wheel is stored with big energy and dosnet want to stop at sudden. However is you try to catch is with your hand and go with the Wheel without stopping it duddenly and move your hand with the Wheel and then slowly stop it then you may succeed, but in this second approach you have moved your hand with the wheel initially. So the first method will cause the transistor switch to burn and second approach will not cause the transistor switch to burn. The diode in this case resembles the moving of your hand along with the Wheel of fortune.
2 things: 1. The diode simply shorts out the reverse voltage/current spike across the motor coil, doesn't flow back into the circuit. 2. If the coil belongs to a relay, it would extend a relay's life if a zener diode were used in addition to the catch diode, and the zener voltage should be below the transistor's maximum voltage rating.
I didn't have a 1N400 diode handy when I was messing with my transistor controlled relay switch. I used an LED instead to put across the relay coil so when the relay switched the current would make the LED blink for a second. Do you think that is an ok solution? I kept thinking that the first "blink" drained a little of the current, but then the voltage/current wasn't high enough to make it blink again, so it ended up going back to the transistor.
Thanks for the reply man, it's a wheelchair and i'll be running 24 V motors which I measured a peak current of around 28 Amps, and an average of around 5 Amps, I guess a 5 Amp would do the job? Great videos by the way!
Please can anyone explain this or correct me…..the way I see this is that, in this example , the diode doesn’t ‘correct’ the reverse voltage issue it just ‘deals ‘ with it. If this is correct then I get it. BUT, it still allows voltage to travel backwards albeit taking the easier path and ‘saving’ the motor/component etc…..wouldn’t it be simpler to add the diode in series - in this way allowing normal current flow in normal use but then COMPLETELY stopping any reverse movement at all? A lot of diodes have 50/60v reverse ‘protection’ and so would survive in the right situation. Where’s the advantage in using parallel over series. Please help/advise as my head hurts 😩
Does inductive spiking occur if you just place the MOSFET transistor BEFORE the coil? Hypothesis: If there's a GROUND for the current to flow from the coil , the inductive energy(that will be converted to electrical energy) stored in the coil will flow from the coil down to ground, thereby eliminating(or reducing) voltage spikes.
In the video it mentioned that putting the diode in the opposite direction will burn the diode. In this case, if the load is a bipolar motor, is it better to use a zener diode?
Hi Afrotechmods, thanks for your video sharing but I have a question. If I parallel a diode with a dc motor, the spike will be reduce? or it is normal for the motor's PWM waveform contain spike or noise when it running? Appreciate for your reply, thank you very much^^
4:53 Thanks for all those clarifications. However pls allow an important clarification. When you mention that some of the current return to the source, presented as your circuit shows, this fact is untrue. When the MOSFET turn Off, the Drain node consist strictly of de diode anode and one only inductor terminal. In this case it is the entirety of the stored energy that is feed back into the diode. The other inductor cathode node is connected to the power source only with one wire, which render easy to see that no current could go back to source. Instead the whole current circulate in series through the diode and inductor. All the stored energy will end up in heat in those two components only. We often see in similar circuit configuration a diode cathode connected not on the inductor but rather onto another circuit capacitive configuration where the energy will be utilized for other things, like detection or running another active device. Such capacitor would then store the inductor energy. Often we also find these circuit configuration in PWM power transformation devices.
@Afrotechmods So, the obvious question after my short story, did you used instead of simple DC motor a BLDC with integrated electronics that makes them to look and work like simple DC motors but without brushes, like the ones in the computer fans or something similar?
Wow. Good tutorial and information. I am currently dealing with this and now I understand better. I am working on trying to use a mosfet to control a heated bed for my 3d printer. The printer is old and did not include a heat control. Thanks very much for your time and energy.
Is the addition of the freewheeling diode only applicable when the inductive loads are subjected to DC sources? because during the -ve half cycle of an AC supply, the diode would conduct, shorting the load, right?
Hahahaha, you crack me up! I enjoyed these tutorials so much!! Please don't stop uploading... I'd even pay for info like this! YOU ROCK!!! Where do you and this info come from??
I have a doubt, please. Suppose I don't want any high voltage to reach the battery (maybe is not rechargeable and delicate), what if I put a zener diode (say 10V) with the negative on the ground and the positive between load and the mostfet? Would it blow? Would it protect the mosfet? Thanks.
Excellent. I like the short form. But It would be nice to give a guide what parameters the diode should have (calculate). And maybe mention about AC inductive loads, and RC snubbers, or something. For a next video.
Actually when you break the inductive current, energy starts moving in d-s capacitance of mosfet increasing voltage on it. You can demonstrate it using mosfet with higher current ability and therefore with bigger capacitance or add external capacitor across d-s, the spike becomes less.
Just as a note, when the diode is across inductor it is shorting out inductor when it is doing self-induction on power-off moment. Which is a waste of energy. You can easilly drive inductor in full bridge mode and add voltage regulator circuit to recover the BEMF energy back to power source. And when inductor is running close or on resonance the COP will be approachong close to 1 minus energy wasted to resistance. Good luck!
Excellent video, but I can't quite get my head around why the inductive current would flow back to the power source. Is it because the point at the transistor drain becomes more positive due to the induced current, so current just flows to a less positive point? It's just difficult for me to imagine current flowing in what appears to be an open circuit. Thanks.
Wow very nice explanation 😀👍👍👍 I have a problem on my walkman.. the speed of motor for tape is not stable.. and i try make test tape at 1khz of sound and measure the speed of cassette is not stable.. i changes motor and pwm control nothing changes still same when i analyzed the circuit there are small mosfet and pwm and the motor act like inductor coil.. i measure the drain of mosfet yes! There are voltages spikes when the 2 coil of motor is ON and turn again into another coil has voltages spikes.. i see i have diode open. And i changes new the problem is sold 👍
Richard Smith You confused me even more. It's the diode's job to detour the power away. And the transistor's job to turn on and off the motor (open/close the circuit). So the question remains, how is current going to flow back to the power source since that part of the circuit is open, as shown in 2:02 (diagram on the left is the same as diagram on the right)?
runner180fxr The part it plays is WHAT you are detouring away from, not doing the detouring. Without that diode carrying away that access voltage, the voltage will spike the next time the circuit closes.
Observ45er Hi Observ45er, You were right! I built the circuit as I did before and used my current probe. I saw a negative current spike on the supply line just like the last time I built it and was about to take a screenshot to prove you wrong. But then I did some playing around. I dropped the switching frequency from 1+kHz to 100Hz and the negative current spike vanished. So it would have been related to something else in the circuit. I updated the video with an annotation.
How do you determine what value of diode to use, especially when you don't have a DSO that can capture the spike when it happens to look at the measurement? A small solenoid would have a smaller spike than a big motor, but in either case how do you know if you've selected a diode that will provide protection without itself being blown up by the spike?
Interested in learning about wireless power? Subscribers can get up to 80% off my course Wireless Power to the People - Wireless Charging 101 on udemy using the coupon code "UA-cam"
www.udemy.com/wireless-power-to-the-people-wireless-charging-101/?couponCode=UA-cam
@afrotechmods. This video understood clearly about why diode need across motor.
I have one doubt what if we connect motor to MOSFET source to ground. In this situation diode is required?
What can I do if the current is high?
My motor is consuming a total of 5Amp at around 7Volts.
@@ThornStarR98x_blackheart Why would it be different?
@@wwindsunrain Take two graphs for example...
7V 5A and other is 5V 7A then in second case what type of diode would we need for protection??
@@ThornStarR98x_blackheart A decent one. That 4007 he's using will probably do just fine. A 4001 may do as well. You just want a diode that can handle the spike. If you want to be precise you can measure the impedance of your motor and see how high the spike may be. But I am not an electrical engineer, just a hobbyist.
This video is the reason why I love your channel. I understood inductive spiking in less than 5 min. My lecturer spent 90 min explaining this concept and showering us with total BS formulas with no meaning and at the end everyone left the class without understanding the what the inductive spiking was. Cheers, keep it up.
A lot of YT videos take 30 minutes to present sixty seconds worth of content. You did it in under five minutes. Good job.
Every afrotech video is gold; not just good tutorial how-does electronics work but how it should be taught
1N4148 is a good catch diode for low power inductive loads (
I don't know who you are but have been around electronics all my life and this is one of the most informative videos I have ever had the pleasure to watch! I cannot thank you enough. It's application at work is far reaching! Thank you!
You are so underrated. There are not many youtubers who deserve to hear this ( there is so much crap online nowadays) but you are my favorite
"Every afrotech video is gold; not just good tutorial how-does electronics work but how it should be taught"
This.
Compliments on a clear presentation of the function of a Free Wheeling Diode. I will link this explanation for the electronic laymen/vintage car owners, who I am currently working with to solve a vehicular electrical problem where the stimulus is release of the horn or backing light relay, but no FWD is present. You and I both know what the first line of defense must be...snub that spike!! Cheers from Connecticut!
500 comments already, maybe someone has written about it, but: we should keep in mind that, although parallel diode is "a must", adding it makes the current in the coil fade away quite slowly. U = -L(di/dt), so if U is like 0.7V on a silicon diode (or even less on a Schottky diode), the current remains significant for quite a while after the transistor gets switched off.
In many cases this might be not important, but if we need fast reaction, it is advisable to use a Zener diode in series with "normal" one (cathode to cathode or anode to anode), in order to increase U in the formula above. Alternatively an appropriately calculated resistor may be used. I personally learned that when I was designing solenoid driver for kind of a printing head, and the first version, where a regular silicon diode was used, dosed much more ink than was desirable and than would result from the duration of the driving pulse. (In turn, when a Zener diode is used, power dissipated on it must be taken into account, especially if pulse repetition rate is high).
Interesting! Thank you for your comment. I had never encountered a situation where the decay time was important but I can see how this would be needed in such a situation.
@@Afrotechmods In fact in most cases the decisive factor which determines the decay speed is the internal resistance of the coil, not the voltage drop on the diode, but in some rare cases it may be not enough as in the case described above. Solenoids are particularly nasty here as they release at much lower current than is needed for them to trigger.
toyota efi-relay, on primary_coil-relay pararel with 320ohm_resistor with rating 1/4 or 1/2 watt resistor
Genuinely appreciate your efforts to simplify the concepts & educate the viewers.
@Afrotechmods By the way, my motor was a 60W motor DC motor. A short story : when I was young, I had blown up a BLDC driver circuit that I had had build just by the way you suggested. I had a diode to block reverse currents to the power supply. The brilliand thought was an addition of the last moment when I said "Hey, when we plug it, someone may put the power supply cables in reverse and blow it up", so I put the diode. It was not still that bad, because the board in order to stop the motor....
Love this guys voice and sense of humor.
Very interesting. About 8 years ago I had some projects with the ignition coils on my car and I observed the Voltage on the primary side of them with an O-scope and it had the same pattern.
I'm in the process of converting an automobile to full electric, and I have been building an open source DC Motor controller. This video was hugely helpful to me in understanding WHY I need to add capacitance across the bus bars of the IGBTs. I had already done so, but I was just a monkey imitating what a thinking person had done before me. Now I at least have an inkling of the theory underpinning it. Thank you.
this is the best explanation about the Snubber, Flyback and voltage spiking on you tube because it shows all in practical way. Thanx a lot!!
And this clearly explains what an brilliant (but not so great at teaching) instructor tried to explain in an hour last week in less than 5 minutes. Love it.
Best tutorial on this I've ever seen! And thanks for mentioning importance of diode speed; I never understood that before.
@KIBProductionz Actually, you would get a negative voltage spike at the node where the FET and the inductor are connected to each other. This phenomenon forms the basis of a buck-boost converter.
@ntomata0002 You can also try this for dramatic results: Put an extra diode in series with your power supply, and do not use any bulk capacitors. Then connect the motor & flyback diode as normal after this extra diode. This diode will tell you if any current ever goes back to the supply. If no current goes back to the supply then this diode will make no difference right? But view the voltage just after this diode, and you will see large positive voltage spikes on the flyback diode's cathode!
3:11 when transistor switch is off, there is no way for the current to go through the power source because that power source is connected only by one end to the inductive load. So energy does not go back to the power source at this moment. Here energy only recirculates through the inductive load.
Well actually as I understand the coil is gonna push the electrons no matter what, therefore charging the battery, or is that wrong?
@@SinanAkkoyun when transistor switch is off, the coil is gonna push the electrons though the diode only and current will continue until all the inductive energy is dissipated in that coil, diode and conductors that connect them. The battery does not participate here because switching off that transistor switch cuts off that battery from the circuit.
i was looking for this comment, so i´m not the only one how see this terrible mistake. Thanks
Everyone learning about transistors NEEDS to watch this, took me forever to find a video that explained this in a way that make sense!
@pufarinu It's a parasitic diode, created by the process used to make the MOSFET. i.e. it's not deliberately put there. It may be a good thing or a bad thing depending on the application.
@gollumondrugs Yes, it does make it more efficient. Ignore what all these other people are saying. Try it with and without a diode and you will see that your RPM/torque will go up and your average input current will go down.
Yup that'd work. I would also recommend a bulk capacitor after that diode though to cut down on EMI.
@ntomata0002 Next, if you add a bulk capacitor after the power supply's series diode, you will see all those spikes go away. This is because it only takes a small amount of capacitance to 'absorb' the freewheeling current in a small motor. So by doing this experiment you can prove that current not only recirculates back into the motor but also a small amount will be returned to the power source, and in most cases a capacitor or rechargeable battery will absorb it without a big voltage spike.
@ntomata0002 Also, try running a large motor, then switch the transistor off, then forcibly slow down or stall the motor and you will get a massive spike on the supply line unless you have sufficient capacitance to deal with it.
I was building a driver for flyback transformer and my diode just disintegrated and I had no idea why. Luckily I decided to watch some of your videos again. Apparently the schematic I was using was faulty and I just put my diode the other way around which led to a build up of huge energy on the negative side of it. Thanks man! I'll replace it and see if it works this time :D
@ntomata0002 I probably should have mentioned the motor's mechanical inertia too. If you have a motor rolling along, then you turn the fet off, that motor is going to act like a dynamo for a short while until it stops.
What an incredibly lucid, humourous explanation. Thank you.
at first my head started to hurt but then it was all clear. your tutorials are very very very very good.
Very good tutorial here. Brilliant explanation. They should show this at my school. Some people in my class just won't *get* this stuff...
@Afrotechmods .....in the free wheeling diode. Because the current to the windings of the motor was not slowly dissipated and through the immediate stop it had a large ΔI/δt it produced the free wheeling current. It is the same overshot of 1V that appears in the basic circuit when you turn off the transistor briefly before the ramp. By using a diode in series with the power supply, there were no dramatic results either. When stopping, it was a very brief overshoot of about 10V....
@Afrotechmods The inertia just adds to the stored energy to the motor, it doesn't change the picture. The energy exists and disipates to the friction, motor windings and the diode itself. It doesn't return to the source in this particular example because the current has a low voltage drop to flow through the diode.In other configurations (in H-bridges for example) that the only path for the current to flow is through the power supply, it indeed returns to the source.Just not in the above example
@Schmiki24 All power MOSFETs that I know of have that diode. However other FETs such as a JFET do not have the diode. Whether you should add your own additional diode in parallel depends on your application. Parasitic body diodes tend to be kinda "crappy", i.e. slower response time and higher forward voltage drop than a nice discrete schottky diode. So if you were building an H bridge, putting some good schottkys in parallel with each mosfet could get you a little more efficiency.
@Afrotechmods .....but it was observed in both sides of motor which suggests that it was not produced by the motor (if it was the case then the voltage in the motor should be raised, but instead if followed the usual ramp). The overshot was due to the inductance of the cables that continued to bring some current even after the FET was off, current that charged the Drain-Source capacitance of the FET and stayed for some time unable to return to the power supply.
@ntomata0002 Oh, and when I refer to a 'large' motor, I mean 150W+. But for the little experiment I just outlined a smaller motor will work too. No pager motors though ;)
Afrotechmods, So i built your 555 timer PWM circuit, and put it on my variable tension friction drive bike project i built. I had the backwards diode in the circuit, it ran fine, I had 24 volts on this 280 watt motor with a powerful fet, and i hit a bump in the road and my solder connection on my diode broke off and i basically had no protection for that fet so the fet exploded in the housing, i went back home, and realized it was over 100 volts of spiking on the drain. Inductive spiking is very real.
@Afrotechmods I tested all. I used an IRF630 (200V) prepared for the worst. With the basic configuration there was no overshot because the back emf of the motor continued to produce voltage as a generator with the same voltage and direction as the power supply when it was disconnected, dissipated by a smooth ramp as the speed of the motor decreased until 0 after 500ms. When forcing the motor to stop, there was a small overshot in the end of the ramp of about 1V, it was the current flowing.......
If I’d had UA-cam back in college, my life would have been easier! Nice job!
@ntomata0002 Nope, just a plain simple small DC brushed motor. There is some brief footage of it in the video at 4:16
Wow you make such great videos, i learned a lot from just watching a couple of them. You really know your electricity, but whats different is you can actually explain it so even idiots like me can understand it, thanks
this is why i only use relays with resistors in cars with EFI. good vid.
@steveBB30 Well you shouldn't be using a low side mosfet like in this diagram to switch any AC voltages so it's not really applicable.
There is no extra current spike coming from the inductor, only a voltage spike. The peak current through the inductor will be the same as whatever the current through the motor is in the steady state on situation.
gonna say thank you, because literally yestarday i was wonderiong about what happened when an inductance find itsself in an OC and it is previously charged and a constant voltage source is applied. Thank you very much
The snubber diode will dramatically slow down *release* of things like relays. The current flow back through the diode maintains the magnetic field for a few milliseconds. Sometimes the diode is augmented with a resistor and capacitor; which causes the spike to be slightly higher than clipped completely with the diode, but also drops the magnetic field more quickly since you consume the energy in the resistor rather than feeding back to either the supply and/or the relay itself.
Very interesting. I just watched a video about waterhammer, a phenomenon in fluid dynamics, where a huge spike in pressure occurs when a valve is closed too quickly. The resemblance of the diagramms are uncanny
Very well explained . The motor I am using is 3kv dc motor 24 volts it is a golf cart motor . and max current is almost 150 amps , please advise what kind of a freewheeling diode will be good to save the IGBT it blows up very now and then
Simple and easy to understand.
Your videos are flawless!!!
@pawningcity I already have one... search for PWM tutorial
What about in an H bridge where the high voltage pulses drive crazy the microcontroller, the mosfet driver and also other parts of the circuit?
How do I calculate the amp needed for the diode? The load is about 25 amps. Should i use a 25 amps diode too? Wonderful tutorial. Thank you.
@Afrotechmods .... fast it shorted out the 3 phases of the motor, so no currents flowed ever backwards. The disaster came when my partner suggested that the motor stopped too fast, so I thought that instead of shorting the phases I could use a PWM scheme of fast alternation of short circuits and free wheeling in order to make a more controllable stop. The free wheeling returned current to the power supply, which it couldn't reach the large power supply capacitor, so instead it gathered to....
@Afrotechmods I spotted it after watching the video again, by the oscilloscope outputs it looks like the inductance to your motor was strong and the roll inertia weak, my motor was the opposite, the inductance current clamped by the diode was dissipated within some msecs, while the motor continued to roll for 500msec working as a generator (producing voltage but no current).
Awesome as always . Makes me understand stuff so much clearer
Wow. You explained all I needed to know in under 5 minutes!
@Afrotechmods I believe that my experimental results was in accordance with the theory of electronics and closer to ideal results because I used more ideal components (a good quality servo motor, MUR415 ultra fast diodes and twisted cables for the power supply). If you used slower diodes, or a motor with noisy brushes it is possible to have additional spikes and not so ideal response.
@ms63129 All circuits are RLC circuits in some way or another. The parasite resistances, capacities and inductancies might be too small or too large to practically figure them in a model but that doesn't mean they are not there.
The shape of the voltage spikes, as seen in 1:36 clearly corresponds to an RLC circuit.
Hi! Should I place a flyback diode parallel to a non isolated dc-dc boost converter's inductor, the same way you did in the video, or this would change the behaviour of my converter? I can send a link of my non isolated dc-dc converter to have a look if you want. Thank you.
I really enjoy your videos super clear concise and formative please keep up the good work
@Afrotechmods I guess you talk about a DC motor, just like in the example? I also guess with the diode in the circuit because without it the overshot burns the transistor or if you use soft gate driving and high voltage transistor without the diode you can save it, but the motor will stall almost instanly. According to my knowledge and experience just slowing down the motor doesn't causes spikes, only if you turn it faster or to the oposite side, but because I respect your opinion I will try it.
The best description I've seen on this topic. Thanks so much for sharing so clearly.
@Afrotechmods If you refer to turning on and off the transistor with the diode and without it, with the diode the circuit is much more efficient because the stored energy in the motor instead of disipating in an instand to the transistor, it continues to flow for some time. It will not increase the Efficiency = (Output power) / (Input power) compared to the motor full runing.The efficiency will indeed increase if you use steady lower current instead of full on / full off for reduced output power
I noticed even with the diode you didn’t have a square wave it was more of a chair shape. I just wondered how you explain that. I have just built a similar mosfet driver for a spindle motor upgrade on my mini CNC on my channel so your video came around just in time. Thanks
@dmjita It's like turning off a vacuum-cleaner.. it takes time to slow down, because the electrons in the metal have been drawn out; this creates a vacuum of positively charged atoms that need to replace their electrons. Thus you get a high positive energy spike.
Cannot love your channel enough. Great work.
This can also be applied to a regulator (boost, buck, and linear), since reverse current is still an issue. Simply use the diode concept on the input and output of the regulator. Look into power diodes for higher currents common to switchers.
@ForViewingOnly those voltages will force the transistor to conduct (like sparking inside it, if the volts are higher) and they can damage the thin iron oxide layer (the gate)
@3:14 You can think of this phenomenon as follow: Say the Wheel of fortune is massive and large. When you give it a push it rotates fast and with energy. If you use your hand to make it stop suddenly it may break your hand (God forbid) - this is because the Wheel is stored with big energy and dosnet want to stop at sudden. However is you try to catch is with your hand and go with the Wheel without stopping it duddenly and move your hand with the Wheel and then slowly stop it then you may succeed, but in this second approach you have moved your hand with the wheel initially. So the first method will cause the transistor switch to burn and second approach will not cause the transistor switch to burn. The diode in this case resembles the moving of your hand along with the Wheel of fortune.
2 things:
1. The diode simply shorts out the reverse voltage/current spike across the motor coil, doesn't flow back into the circuit.
2. If the coil belongs to a relay, it would extend a relay's life if a zener diode were used in addition to the catch diode, and the zener voltage should be below the transistor's maximum voltage rating.
Very nice video. Well done. Very helpful illustrations. Clear and concise explanations.
Bravo.
I didn't have a 1N400 diode handy when I was messing with my transistor controlled relay switch. I used an LED instead to put across the relay coil so when the relay switched the current would make the LED blink for a second. Do you think that is an ok solution? I kept thinking that the first "blink" drained a little of the current, but then the voltage/current wasn't high enough to make it blink again, so it ended up going back to the transistor.
Thanks for the reply man, it's a wheelchair and i'll be running 24 V motors which I measured a peak current of around 28 Amps, and an average of around 5 Amps, I guess a 5 Amp would do the job?
Great videos by the way!
You get an upvote for "A diode by any other name" a very apt explanation for that silly rose idiom.
thanks so much , this is way more helpful than what i learned from the textbooks
Please can anyone explain this or correct me…..the way I see this is that, in this example , the diode doesn’t ‘correct’ the reverse voltage issue it just ‘deals ‘ with it. If this is correct then I get it. BUT, it still allows voltage to travel backwards albeit taking the easier path and ‘saving’ the motor/component etc…..wouldn’t it be simpler to add the diode in series - in this way allowing normal current flow in normal use but then COMPLETELY stopping any reverse movement at all? A lot of diodes have 50/60v reverse ‘protection’ and so would survive in the right situation. Where’s the advantage in using parallel over series. Please help/advise as my head hurts 😩
Does inductive spiking occur if you just place the MOSFET transistor BEFORE the coil? Hypothesis: If there's a GROUND for the current to flow from the coil , the inductive energy(that will be converted to electrical energy) stored in the coil will flow from the coil down to ground, thereby eliminating(or reducing) voltage spikes.
In the video it mentioned that putting the diode in the opposite direction will burn the diode. In this case, if the load is a bipolar motor, is it better to use a zener diode?
Hi Afrotechmods, thanks for your video sharing but I have a question. If I parallel a diode with a dc motor, the spike will be reduce? or it is normal for the motor's PWM waveform contain spike or noise when it running? Appreciate for your reply, thank you very much^^
4:53 Thanks for all those clarifications. However pls allow an important clarification. When you mention that some of the current return to the source, presented as your circuit shows, this fact is untrue. When the MOSFET turn Off, the Drain node consist strictly of de diode anode and one only inductor terminal. In this case it is the entirety of the stored energy that is feed back into the diode. The other inductor cathode node is connected to the power source only with one wire, which render easy to see that no current could go back to source. Instead the whole current circulate in series through the diode and inductor. All the stored energy will end up in heat in those two components only. We often see in similar circuit configuration a diode cathode connected not on the inductor but rather onto another circuit capacitive configuration where the energy will be utilized for other things, like detection or running another active device. Such capacitor would then store the inductor energy. Often we also find these circuit configuration in PWM power transformation devices.
@Afrotechmods So, the obvious question after my short story, did you used instead of simple DC motor a BLDC with integrated electronics that makes them to look and work like simple DC motors but without brushes, like the ones in the computer fans or something similar?
Wow. Good tutorial and information.
I am currently dealing with this and now I understand better.
I am working on trying to use a mosfet to control a heated bed for my 3d printer. The printer is old and did not include a heat control.
Thanks very much for your time and energy.
Is the addition of the freewheeling diode only applicable when the inductive loads are subjected to DC sources? because during the -ve half cycle of an AC supply, the diode would conduct, shorting the load, right?
4:19 Thanks for showing the "smoke monster" that shows up when you do it wrong so we'll know what to watch out for.
Lol, it's 4/20 when the real,smoke show occurs hahaha
Is there any alternative way to remove the inductive spiking? Any advance way or efficient way?
Hahahaha, you crack me up! I enjoyed these tutorials so much!! Please don't stop uploading... I'd even pay for info like this! YOU ROCK!!! Where do you and this info come from??
I have a doubt, please. Suppose I don't want any high voltage to reach the battery (maybe is not rechargeable and delicate), what if I put a zener diode (say 10V) with the negative on the ground and the positive between load and the mostfet? Would it blow? Would it protect the mosfet? Thanks.
Excellent. I like the short form. But It would be nice to give a guide what parameters the diode should have (calculate). And maybe mention about AC inductive loads, and RC snubbers, or something. For a next video.
Actually when you break the inductive current, energy starts moving in d-s capacitance of mosfet increasing voltage on it. You can demonstrate it using mosfet with higher current ability and therefore with bigger capacitance or add external capacitor across d-s, the spike becomes less.
Salute to the gentelman!
Well concised video short and simple which covers essentials matters cheers
Just as a note, when the diode is across inductor it is shorting out inductor when it is doing self-induction on power-off moment. Which is a waste of energy. You can easilly drive inductor in full bridge mode and add voltage regulator circuit to recover the BEMF energy back to power source. And when inductor is running close or on resonance the COP will be approachong close to 1 minus energy wasted to resistance.
Good luck!
appreciate the valuable information, i am 128hz pwm a 12v 18 amp dc motor, what is a suitable diode value? thank you
Excellent video, but I can't quite get my head around why the inductive current would flow back to the power source. Is it because the point at the transistor drain becomes more positive due to the induced current, so current just flows to a less positive point?
It's just difficult for me to imagine current flowing in what appears to be an open circuit.
Thanks.
Why do some inductive loads have capacitors across instead?
Also, are snobber circuits the same?
Wow very nice explanation 😀👍👍👍
I have a problem on my walkman.. the speed of motor for tape is not stable.. and i try make test tape at 1khz of sound and measure the speed of cassette is not stable.. i changes motor and pwm control nothing changes still same when i analyzed the circuit there are small mosfet and pwm and the motor act like inductor coil.. i measure the drain of mosfet yes! There are voltages spikes when the 2 coil of motor is ON and turn again into another coil has voltages spikes.. i see i have
diode open. And i changes new the problem is sold 👍
Could you use capacitors in parallel with the FET to help protect it? Ive been having some issues with a resonance circuit
Hi.
So the current will circulate in the closed loop and slowly dissipates as heat, and some also flows back to the source?
3:20 How is current going to flow back to the power source since the transistor is off, thus that part of the circuit is open?
The transistor plays no part in that diagram, other than trying to detour the power away before it traffic jams against that open circuit.
Richard Smith
You confused me even more. It's the diode's job to detour the power away. And the transistor's job to turn on and off the motor (open/close the circuit). So the question remains, how is current going to flow back to the power source since that part of the circuit is open, as shown in 2:02 (diagram on the left is the same as diagram on the right)?
runner180fxr The part it plays is WHAT you are detouring away from, not doing the detouring. Without that diode carrying away that access voltage, the voltage will spike the next time the circuit closes.
Observ45er
Thank you! Finally someone to confirm I'm not crazy. Also thank you for the thorough electronics lesson.
Observ45er
Hi Observ45er,
You were right!
I built the circuit as I did before and used my current probe. I saw a negative current spike on the supply line just like the last time I built it and was about to take a screenshot to prove you wrong. But then I did some playing around. I dropped the switching frequency from 1+kHz to 100Hz and the negative current spike vanished. So it would have been related to something else in the circuit. I updated the video with an annotation.
How do you determine what value of diode to use, especially when you don't have a DSO that can capture the spike when it happens to look at the measurement? A small solenoid would have a smaller spike than a big motor, but in either case how do you know if you've selected a diode that will provide protection without itself being blown up by the spike?