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.
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.
@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.
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.
@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!
@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 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.
@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.
@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.
@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 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.......
@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.
@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.
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.
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
@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
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.
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
@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 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.
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
@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
@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.
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??
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.
@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)
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.
@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.
@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).
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.
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.
@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.
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
@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 ;)
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.
@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....
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.
Thanks. I went ahead and purchased some of both your recommended diodes. I'm playing around with joule thiefs and other things, so hopefully there will be useful for something.
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
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!
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!
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.
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.
Should there be a 0.1 uF ceramic in parallel with the diode? I wish to switch a large motor (24 vdc, 5 amp). Oh right...love your work. so helpful to so many.
Love your videos! I had never though about trying this on one of my flyback transformer drivers, particularly my 555 based driver where I keep killing MOSFET's.
@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?
@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.
Thank you for this great simple explanation! I wonder, though, why inductors (even just air-cored coils) take so long to build and collapse their magnetic fields? I would have imagined that this electromagnetic process would be practically instantaneous compared to the frequencies from a signal generator. What causes such large delays?
The short answer is because the inductor stores energy and the resistor doesnt. So the more energy stored the longer it takes to release the energy back into the circuit. In this case as a current to oppose the change in current that it sees. (ie like after someone turns off the power switch) the inductor stores energy in the form of a magnetic field. Just like a capactor opposes change in voltage the inductor opposes change in current. A capacitor will keep a something on for a couple of seconds after you turn the power off. It acts like a battery after the circuit voltage source is removed. Inductors do the same except for current.
Thanks, I hadn't thought of the time it takes for the induced current to drain the energy away from the coil's magnetic field. I suppose if you were quick enough and pulled a powered-up inductor out from the rest of the circuit, it would ring for a while as the magnetic field turned into an electric dipole and back again, until the current dissipates as heat or EM radiation.
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 👍
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.
so after you place the flywheel diode, you still have noise on your waveform...the inductive spike is gone but you have oscillation on the high side of your square wave, my question is: How can you get rid of that oscillation on the square wave?
While the inductor is dissipating all of it's energy the voltage being probed is vcc minus the voltage drop of the inductor plus the voltage drop of the diode, which comes to a bit over vcc. Then as the last of the energy dissipates the voltage drops down to vcc again. As for the funky waves, i think it's some kind of resonance from the inductor.
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.
A lot of YT videos take 30 minutes to present sixty seconds worth of content. You did it in under five minutes. Good job.
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.
Every afrotech video is gold; not just good tutorial how-does electronics work but how it should be taught
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!
1N4148 is a good catch diode for low power inductive loads (
Genuinely appreciate your efforts to simplify the concepts & educate the viewers.
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!!
Everyone learning about transistors NEEDS to watch this, took me forever to find a video that explained this in a way that make sense!
Love this guys voice and sense of humor.
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
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.
Best tutorial on this I've ever seen! And thanks for mentioning importance of diode speed; I never understood that before.
@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.
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.
@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!
@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.
Awesome video! Saved my circuit for the school project I was working on
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
What an incredibly lucid, humourous explanation. Thank you.
@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.
@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.
@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.
@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....
Yup that'd work. I would also recommend a bulk capacitor after that diode though to cut down on EMI.
If I’d had UA-cam back in college, my life would have been easier! Nice job!
@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.......
@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.
@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.
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
@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.
Wow. You explained all I needed to know in under 5 minutes!
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
@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
I really enjoy your videos super clear concise and formative please keep up the good work
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.
@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.
Cannot love your channel enough. Great work.
at first my head started to hurt but then it was all clear. your tutorials are very very very very good.
Awesome as always . Makes me understand stuff so much clearer
Simple and easy to understand.
Your videos are flawless!!!
Very good tutorial here. Brilliant explanation. They should show this at my school. Some people in my class just won't *get* this stuff...
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
Very nice video. Well done. Very helpful illustrations. Clear and concise explanations.
Bravo.
The best description I've seen on this topic. Thanks so much for sharing so clearly.
@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 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.
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
thanks so much , this is way more helpful than what i learned from the textbooks
@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
@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.
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??
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.
@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)
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.
@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.
@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).
@pawningcity I already have one... search for PWM tutorial
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.
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.
@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.
@ntomata0002 Nope, just a plain simple small DC brushed motor. There is some brief footage of it in the video at 4:16
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
I love your videos! So informative and some humor thrown in as well.
Thank you very much for all your lessons, including this one!
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
@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 ;)
Salute to the gentelman!
Well concised video short and simple which covers essentials matters cheers
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.
This explanation is gold !!
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....
You get an upvote for "A diode by any other name" a very apt explanation for that silly rose idiom.
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.
Thanks. I went ahead and purchased some of both your recommended diodes. I'm playing around with joule thiefs and other things, so hopefully there will be useful for something.
Very informative and concise as always. Keep 'em comming!
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
I love your videos, very educational and entertaining :)
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.
this is why i only use relays with resistors in cars with EFI. good vid.
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!
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!
Best 5 min video ever
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.
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.
Should there be a 0.1 uF ceramic in parallel with the diode? I wish to switch a large motor (24 vdc, 5 amp). Oh right...love your work. so helpful to so many.
yay i always happy when you upload a video :3
Love your videos! I had never though about trying this on one of my flyback transformer drivers, particularly my 555 based driver where I keep killing MOSFET's.
@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?
@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.
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?
Thank you for this great simple explanation! I wonder, though, why inductors (even just air-cored coils) take so long to build and collapse their magnetic fields? I would have imagined that this electromagnetic process would be practically instantaneous compared to the frequencies from a signal generator. What causes such large delays?
They are practically instantaneous, as you say. What delay are you talking about ?
Joey Mac he said it takes some time for the current to stop flowing . why can't an inductor react as quickly as a resistor?
The short answer is because the inductor stores energy and the resistor doesnt. So the more energy stored the longer it takes to release the energy back into the circuit. In this case as a current to oppose the change in current that it sees. (ie like after someone turns off the power switch) the inductor stores energy in the form of a magnetic field. Just like a capactor opposes change in voltage the inductor opposes change in current. A capacitor will keep a something on for a couple of seconds after you turn the power off. It acts like a battery after the circuit voltage source is removed. Inductors do the same except for current.
Thanks, I hadn't thought of the time it takes for the induced current to drain the energy away from the coil's magnetic field. I suppose if you were quick enough and pulled a powered-up inductor out from the rest of the circuit, it would ring for a while as the magnetic field turned into an electric dipole and back again, until the current dissipates as heat or EM radiation.
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 👍
Best one soo far!!❤
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.
so after you place the flywheel diode, you still have noise on your waveform...the inductive spike is gone but you have oscillation on the high side of your square wave, my question is: How can you get rid of that oscillation on the square wave?
Adam Josserand good question...
Reduce conductor lengths, use a decoupling capacitor, use ferrite beads/chokes etc
yeah low pass. the signal. but it runs into problems of not being so square anymore.
While the inductor is dissipating all of it's energy the voltage being probed is vcc minus the voltage drop of the inductor plus the voltage drop of the diode, which comes to a bit over vcc. Then as the last of the energy dissipates the voltage drops down to vcc again. As for the funky waves, i think it's some kind of resonance from the inductor.