Pwm MOSFET driver - Page 1
Forum section: electronics / projects

author: jackbob
author_rank: Regular Contributor
timestamp: October 08, 2011, 03:44:58 am
content: I am looking to build another pwm motor control about 500 amps and 150v. I have built countless 12v controllers but ran into a problem on this big controller. I am using an arduino to provide the signal and I have 20 irfp250 transistors. The there is no way the arduino can drive all of them by itself. I have seen many methoods using bjt gate drivers but when you turn off the arduino the mosfets put out full power. I found one way that worked, using op amps to drive the mosfets it worked but never done it before and it seems alittle shady. Any other ideas on how to drive the gates. I tried optocouplers too and no luck with 150v rails.Thank you,Jacob

author: amspire
author_rank: Super Contributor
timestamp: October 08, 2011, 04:41:05 am
content: First thing is to look at how quickly you need the mosfets to switch on and off.Lets say you want them to switch off in 1uSec.That means the voltage on the drain will rise from 0V to 150V in 1uS which means 1.5 x 108V/sec.Now the combined drain to gate capacitance is 20 x 300pF = 6000pF.So to turn off the fets, the gate drive has to sink 6000 x 10-12x 1.5 x 108= 0.9 A. If you have 10V on the gate to trun the fets on, then the additional current needed to discharge the gate source capacitance is another 0.4A making 1.3 amps in total.Now if you let the mosfets switch off in 1uSec, then while they are switching off, they might dissipate a total of 0.02 Joules. That is a first pass approximation. If the PWM switching rate is 20KHz, then the power being wasted in the Mosfets due to switching losses while turning off is 20,000 X 0.02 = 375 Watts. I will add another 375W for the turning on losses making about 750W. This does not include the resistive losses while the fets are on.This might be way too much, so to make the FETS dissipate only 70W switching losses, you might want to turn them on and off in 100nS. That will need 13A from the gate driver rather then 1.3A.Turning the FETs on will take a similar current to turning off.So forget microcontroller outputs and optocoupler outputs - you need to work out what switching speeds you need to meet the efficiency you require, and from that, you driver probably made from a pair of MOSFETs to cope with the gate current or alternatively, lots of lower power gate drivers.Then you will need to calculate what kind of drive is needed to drive the gate drivers.Richard.

author: jackbob
author_rank: Regular Contributor
timestamp: October 08, 2011, 05:18:19 am
content: I would much rather run high gate currents than waste and dissapate that much heat. However to drive the gates you need a positive voltage and if I use mosfets to drive the gates then they would need to be driven with a negative voltage at the gate. The arduino only puts out 5v pulses. I suppose I could take 5v arduino signal, invert it to -12v pulses with an op amp to drive the gate mosfets, then use the gate mosfets to drive the big mosfets at 12v and around 10 amps.

author: jackbob
author_rank: Regular Contributor
timestamp: October 08, 2011, 05:42:34 am
content: I drew a quick schematic to show what im talking about. I drew it off the top of my head so the values of the resistors and such may not be exact but general. I left out pull down resistors too. It takes the 5v pulse and inverts it to -12v in the op amp, then goes to a preamp mosfet gate which drives the gate of the irfp250. I only drew one output transistor to keep it simple for now.

author: amspire
author_rank: Super Contributor
timestamp: October 08, 2011, 07:37:21 am
content: You need both pull up and pull down driver FETS - that circuit you drew has nothing to turn the output FETs off, and you cannot just use a resistor to ground - the pull down has to be active.The easiest way is to use FET driver IC's which have a high current pull up/pull down output, and also are designed so that both output FETs don't turn on at the same time..The link below is a collection of App notes from Microchip. It is all relevent, but look at AN898 on page 12 in particular. The driver chip mentioned in this note - the TC4422 - is a good one, but many other companies make such chips.http://ww1.microchip.com/downloads/en/AppNotes/00898a.pdfIt is important that you control the peak gate currents - don't just connect a driver chip up and expect it to magically not blow up.So you want to put a series resistor to the gate of each power FET to control the peak current.You will need a supply for the gate driver that will have to be able supply the average current needed, along with some generous capacitors to take the 10+ Amp surges. A lot depends on the pulse rate from the PWM - it could be 20,000 pulses per second. It could be 1 pulse per second - I don't know. It is obviously a massive DC motor with a lot of momentum, and so you should be able to get away with a fairly slow pulse rate. If it is a low rate, you can afford to turn the power fets off slowly, as long as the high dissipation at the instant of switching does not affect their reliability.But it is still important to realise that whatever the PWM pulse rate, it does not change the peak gate currents when the power FETs are turning on and off. That will be set by the series gate resistors, and the supply voltage of the gate drive circuit.Richard.

author: jackbob
author_rank: Regular Contributor
timestamp: October 08, 2011, 10:02:12 am
content: You couldn't have found anything better. Looks perfect for the job. I will order them asap but i just want to make sure I got it right. With this driver you wouldn't need preamp transistors right? It puts out 9 amps so i would assume not, but of course you need resistors between each gate on the irfp 250's and the driver. I would probably put one driver per 10 mosfets, so 2 drivers total. Maybe 4 drivers because the output current is only 2 amps cont. I made another quick cheap schematic.. I know its not exact perfect but the general idea. The power supply will be a 32 amp supply with godly capacitors... i love capacitors. As far as frequency goes the arduino has a fixed freq. of 1khz pwm. I am trying to find a way to change it but if I can't I will find a new pwm ic or microcontroller. The higher the frequency the more gate current required but lower losses in heat and the lower the frequency the more heat but less gate current on the fet right?Thanks fr your help,Jacob

author: jackbob
author_rank: Regular Contributor
timestamp: October 08, 2011, 10:07:55 am
content: Almost forgot that great schematic.

author: amspire
author_rank: Super Contributor
timestamp: October 08, 2011, 10:25:44 am
content: The good news is that 1kHz means you can divide all the power dissipation numbers I gave you by 20. You still have to calculate the power due to the on resistance of the MOSFETS.This also means you can consider going back to a slower rise time. 750 watts / 20 = about 38watts - much better. I think 1kHz should be fine, but I am sure you can find a way to change the switching frequency. DC motors are regularly controlled with this kind of circuit, so the suppliers may have some advice about good switching frequencies.The lower the switching frequency, the lower the power dissipation.The slower the MOSFETS switch the higher the dissipation. Bascially they don't disipate anything when they are off. They only dissipate the I2Ronheat when they are on. It is when they are half on or off that they are dissipating massive amount of power.Richard

author: IanJ
author_rank: Unknown
timestamp: October 08, 2011, 11:04:58 am
content: Hi all,I''ve been playing with home designed dual channel 50amp @ 30vdc capable design of my own......hi current designs like this aren't my forte but so far so good, it's working. I'm driving a couple of wheelchair motors.My design is also controlled by an Arduino (PWM), however, although I've built low current h-bridges before where the mosfets are directly driven from the Arduino, I elected to use TC4431/4432 and on top of that I also decided I don't trust the Arduino to NOT turn on both low & high sides at the same time (instant smoke!). So I used a simple logic circuit to built in an interlock and also give me a discrete direction control at the same time.PS. I used the TC4431/4432 pair as they are 30v capable.Here's my schematic, still a work-in-progress:-

author: Zero999
author_rank: Super Contributor
timestamp: October 08, 2011, 02:06:15 pm
content: Quote from: jackbob on October 08, 2011, 05:42:34 amHow can the op-amp give -12V out when there's no negative power supply?The driver MOSFET is configured as a source follower so will have a high voltage loss.There's nothing to discharge the MOSFET's capacitance so it may never turn off.You need a push-pull driver.You didn't post your BJT design. The one attached will work Yours was probably inverting so turned on the MOSFETs when the power to the MCU went down.The attached schematic will work put you'll probably need a higher output current to drive so many MOSFETs. Your best bet is to buy a proper driver IC.

author: jackbob
author_rank: Regular Contributor
timestamp: October 08, 2011, 06:18:41 pm
content: I will try 1 kHz but the sound it produces would be annoying. IanJ, cool design I probably use contactors or build a mosftet h bridge to change directions. With 30 amps it won't kill to have mosfets on both sides as you did but I have 20 on one side as it is so I will find a way around having to put more an h bridge. How do you like the arduino 1khz? Hero999, the output was inverted -12 relative to the positive rail not ground... I know it's kinda funky, I'm not using that design anymore.

author: IanJ
author_rank: Unknown
timestamp: October 08, 2011, 07:26:09 pm
content: Quote from: jackbob on October 08, 2011, 06:18:41 pmI'm running my Arduino at the standard PWM freq. i.e. 488Hz. Of course this can be adjusted, but as yet I'm not sure I will as the wheelchair motors I'm using seem to work fine at that, from zero to full speed.The only advice I'd give, given the amount of FET's you are looking to use and the power/energy therein is make sure you build in as much precautions against failure (therefore fire & smoke) as possible.I'm building a home-built off-road Segway and so I'm not finished yet in terms of modifying my design with this in mind.As has been mentioned, the TC range of driver IC's are good, they'll take a chunk of manual work out of your design.Ian.

author: jackbob
author_rank: Regular Contributor
timestamp: October 08, 2011, 07:49:04 pm
content: Yes it is very important to watch for failures especially on this scale. Do you know how to change the arduino frequency? I'm sure there is a way but I don't know how.

author: IanJ
author_rank: Unknown
timestamp: October 08, 2011, 07:58:04 pm
content: Quote from: jackbob on October 08, 2011, 07:49:04 pmhttp://softsolder.com/2009/02/21/changing-the-arduino-pwm-frequency/http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1152547089http://arduino.cc/en/Tutorial/SecretsOfArduinoPWMIan.

author: jackbob
author_rank: Regular Contributor
timestamp: October 09, 2011, 12:52:55 am
content: So i drew up this schematic on how i will use the TC4422. I will drive 10 mosfets with each one and use a 10 ohm resistor on the gates of each fet. I also put a 10k pull down on each one just to make me feel good to prevent if something goes weird and I loose 12v power, the mosfets will turn off. I left out the input 12v filter caps and the output diodes to protect the mosfets in this schematic. Does anybody have any recommendations at all. It just seems way too simple but I guess that's what those TC4422's are for. Is there anything I should add or change like resistors, or resistor values, add op amps, transistors, or anything?Thanks,Jacob

author: jackbob
author_rank: Regular Contributor
timestamp: October 09, 2011, 01:10:08 am
content: After I posted the schematic I went back to look at it and I added a 47k resistor between the arduino pwm output and ground to prevent problems if I loose arduino power or something else like that.

author: jahonen
author_rank: Super Contributor
timestamp: October 09, 2011, 08:45:09 am
content: Quote from: jackbob on October 09, 2011, 12:52:55 amRemember to put hefty low-inductance bypassing for the gate driver chips, like 10µ smd ceramic capacitors. It might cause all kinds of problems if the power supply of the gate drivers droop when gate is driven high.Regards,Janne

author: jackbob
author_rank: Regular Contributor
timestamp: October 10, 2011, 10:05:40 am
content: I am starting to draw schematics for the project and already ordered well over a hundred dollars in parts. This thing is full force now. I decided to build it in a plexiglass box. I will post many pictures when I begin building it. I might start a new topic for it. One problem I have is a heatsink. I have a great one in my amplifier that could handle all 20 transistors but don't want to take apart my amp for it. I scored some very nice 24v blowers that will cool the thing like to tomorrow. Anyways thank you to everyone who helped me and gave feedback I really appreciate it.Jacob

author: Zero999
author_rank: Super Contributor
timestamp: October 10, 2011, 09:10:07 pm
content: Quote from: jackbob on October 08, 2011, 06:18:41 pmI know I'm nitpicking but that's a confusing way of putting it. You mean the output was inverted or 180oout of phase.Quote from: jackbob on October 09, 2011, 12:52:55 amThat's a much better design.What's the motor driving? Is it safety critical? Could it starting accidentally cause an injury or damage to property?If the answer is yes, think about what could happen if a MOSFET failed short circuit, a common failure mode, or there's a bug in your program. If this is to be used in something like a lift or an electric vehicle you need to consider the safety implications of devices failing and bugs in the software.

author: jackbob
author_rank: Regular Contributor
timestamp: October 11, 2011, 08:31:52 am
content: As of now it's just a project I want to make for hobby it might be used to drive a high power go kart or such. I would like to make it safe as possible, as if it were being used in a car. I got a good thought but don't know how to do it. I have a power inverter that is 1500watts and if you go a little over 1500w it will shut down. It obviously somehow senses how much power is flowing which is what I want to do to my controller. I want to make it so if I go over say 500 amps for a few seconds it will shut down or regulate power. I will also have a toggle switch within reach at all times which will control a contactor in case of a major failure. I thought about adding a relay between the gates and drivers which is controlled by the arduino and only closes when the potentiometer is moved to control the speed ( don't know if this is a good idea just a thought). I have a thermistor to control fan speed an will shut down the control if things get too hot. Any more suggestions or thoughts on how to make it more safe or how to do that power sensing I mentioned above?Thanks,Jacob

author: Zero999
author_rank: Super Contributor
timestamp: October 13, 2011, 08:23:19 pm
content: You need a propper emergency stop button.One thing you could do is have a contactor which is on whenever the car is turned on. You could then use another MCU to monitor the MOSFET to ensure it's turning off in-between the PWM pulses and turn off the contactor off if it detects the MOSFETs have failed in the on state or there's a bug in the code on the other MCU causing the MOSFET to be permanently on.

author: jackbob
author_rank: Regular Contributor
timestamp: October 13, 2011, 11:16:31 pm
content: Wow that's a little more advanced. I'm just beginningin mcu's. I understand what you are saying but have not a clue where to start as far as setting up a mcu to do that. I also decided to add a snubber circuit of resistors and 1800v caps between the Gate and source to prevent MOSFET failure from high voltage spikes generated by the motor. If you know how to set up that mcu to monitor the mosfets I would greatly appreciate your help in doing it. I would prefer to use an atmega 328 or 316 if possible. I am not the best at programming them and I have only used arduino programming. I am currently using a 328 and all the outputs are used now.

author: amspire
author_rank: Super Contributor
timestamp: October 14, 2011, 12:58:29 am
content: If you are connecting capacitors anywhere across the mosfets, you wont need 1800V, especially on the gate.if any voltage exceeds any of the mosfet maximum voltages, then your mosfet is probably dead. Without checking the specs, the maximum gate voltage is probably less then 50V.The gate already has plenty of capacitance, so adding more will just put more load on the gate driver.What you need is that the gate driver has to be powerful enough to prevent the gate voltage from rising.Richard.

author: jackbob
author_rank: Regular Contributor
timestamp: October 14, 2011, 02:50:25 am
content: @ amspire, oops I wasn't thinking when I wrote that, I meant the drain and source. The caps will absorb any transient voltage spikes generated by the motor when it turns off. I will put diodes between the motor inputs too, they will help cut out voltage spikes. There will be resistors in series with the caps as they are on every snubber design I have seen.Jacob.

author: amspire
author_rank: Super Contributor
timestamp: October 14, 2011, 04:12:28 am
content: The drain source of those MOSFETS is 200V, so you have to keep the peak voltages on the drain below that. So you still don't need anything more then that.So you may need a snubber, but remember, the snubber adds to the switching loses in the Mosfets.It is hard to design a snubber without knowing the characteristics of the motor transients.Richard

author: jackbob
author_rank: Regular Contributor
timestamp: October 14, 2011, 06:38:47 am
content: Yes it's a trade off for switching losses. Every snubber I have seen has caps at least 1kv. You have a good point though. It shouldn't reach higher than what I'm putting into the motor. I have not ordered snubber caps yet (they are very expensive for capacitors) and have a few nice ac caps rated at 275v. Will those do?

author: amspire
author_rank: Super Contributor
timestamp: October 14, 2011, 07:02:20 am
content: You cannot let the drain voltage rise above 200V - unless you get higher voltage MOSFETs.Higher voltage caps are nice, but if the voltage on the snubber caps every gets to 250V, then you probably have 20 blown mosfets.Richard.

author: jackbob
author_rank: Regular Contributor
timestamp: October 14, 2011, 07:15:35 am
content: Yes so the higher voltage is just extra room for the caps. It won't ever get that high. So I will just use 275v caps I won't ever be running higher than 160v on the input. I ordered all the parts to build this speed control. The only thing I'm still working on is how I will do safety. I mentioned it above and am looking for ways to make it safe as possible and how to stop a failure if it happens. Mcu monitoring seems best but I am just gettinginto mcu's and am not experienced enough to do that. It should probably be a topic under microcontrollers if I want to get into that.Jacob

author: Zero999
author_rank: Super Contributor
timestamp: October 14, 2011, 07:41:39 pm
content: Quote from: jackbob on October 13, 2011, 11:16:31 pmThere's no nee for that, just connect a diode in reverse parallel with the motor.QuoteIt's actually very simple. When the MOSFET is on, the drain voltage should be near 0V and when it's off it will be near the supply voltage minus the motor's EMF. All you need to do is monitor the MOSFET to verifiy it's off when it's supposed to be and if it's not turn the main contactor off. The reason why I suggested using another MCU is because it can supervise the other MCU to ensure it's behaving as expected.

author: jackbob
author_rank: Regular Contributor
timestamp: October 15, 2011, 12:00:52 am
content: Do you know how to set this up though. Would I have a seprate mcu monitoring the outputs of the pwm mcu then comparing it to the drain voltage. How would it be set up. I don't know how to monitor a mcu with annother mcu.Thanks,Jacob.

author: Zero999
author_rank: Super Contributor
timestamp: October 15, 2011, 06:01:32 pm
content: The simplest way would be just to measure the drain voltages and configure the MCU so the duty cycle never gets to 100% so the MOSFETs are still being periodically turned off to test they still work. You don't even need another MCU, a simple missing pulse detector will probably work. The most common way to make this is a 555 timer but you could also use a comparator such as the LM393 or even a simple MCU.

author: jackbob
author_rank: Regular Contributor
timestamp: October 15, 2011, 09:08:55 pm
content: Ah a missing pulse detector is what it's called. Thanks I will look into it, there is a lot about them on the Internet.Thanks again,Jacob.

author: jackbob
author_rank: Regular Contributor
timestamp: October 18, 2011, 03:25:18 am
content: I made a small quick prototype of the pwm controller and tested it on 12v running a little rc motor and it works great. It's using irfp150's in the prototype because I'm only running 12v. I realized just how important the diodes in parallel with the motor are. Without it while it's not fully on or off the mosfets won't last a minute without catching fire, I felt them and they were cookin. So I put the diode in and the fets go all night not even slightly warm. I need some really good diodes in the final project. Bad news is I had a bad diode at first and blew up one of my tc4422 but it was for sure the diode that caused it. I will need to order more of those but they come very quick so I'm not worried.

author: amspire
author_rank: Super Contributor
timestamp: October 18, 2011, 03:40:28 am
content: Sounds odd that you are getting so much heat, and one diode has blown. What frequency are you switching the MOSFET's at?

author: jackbob
author_rank: Regular Contributor
timestamp: October 18, 2011, 04:16:27 am
content: It didn't blow the diode, the first diode I tried was already blown just a bad one I porbably put back in the drawer on accident. I am switching at 500 Hz and yes without the diode the fets will fry eggs. But just a little 3 amp diode in parallel with the motor and bingo the fets don't even seem to get warm and it runs great. Keep in mind I have no heatsinks on them now but even if I did the fets get way too hot. But as Long as the diode is there with the motor everything runs great. A quick look on the oscilloscope and there are very high voltage peaksat the motor without the diode and those probably make the fets hot. With the diode the output at the motor looks great.

author: amspire
author_rank: Super Contributor
timestamp: October 18, 2011, 06:18:24 am
content: It would be good if you can get an oscilloscope to look at the waveforms on the drain.It sound like when the MOSFETs turned off, the inductance of the motor winding caused a transient spike that exceeded 200V. This caused the MOSFETs to go into avalanche breakdown (like a zener diode) which is not destructive, but dissipates a lot of heat. If you were using a higher frequency, the MOSFETs probably would not have survived.Richard

author: jackbob
author_rank: Regular Contributor
timestamp: October 18, 2011, 10:34:01 pm
content: Yes that's what it is the peaks are pretty high and I have done this at higher frequencies before with transformers and it just blows the fets. When I build the final project how many amps in diodes should I have and what should they be rated at like 300v?

author: amspire
author_rank: Super Contributor
timestamp: October 19, 2011, 01:22:54 am
content: It is very hard to know until you have found the characteristics of the motor.If you have a digital oscilloscope, what you probably want to do, if possible is have the motor and the 150V and a big 150V DC switch (has to be a genuine DC switch, no an AC rated switch). Across the motor, put a hefty 400V reverse biased diode - say 30A - in series with a power resistor. Something like 1 ohm, 20 watts.Run the motor and capture the waveform across the motor when you switch it off. Try it unloaded and loaded.From the captured waveforms, you can get an idea as to how much energy will need to be absorbed from the motor inductance. And from that you can calculate whether you can keep the voltage below 200V or not.It may be that the motor's manufacturer already has good specs on the motor.Richard.

author: jackbob
author_rank: Regular Contributor
timestamp: October 19, 2011, 02:24:27 am
content: Is it possible to over correct the issue too? Can I have too many diodes or would it be okif I had extra. I see what you mean by testing and looking at the waveforms, but I don't want to generate too high of peaks during testing and blow up the fets then. I don't want to hook it up for testing at 150v without diodes and hope it doesn't blow my fets and I can see the waveform, you see the problem there? Thanks,Jacob.

author: amspire
author_rank: Super Contributor
timestamp: October 19, 2011, 02:36:25 am
content: That is why I was suggesting using a switch to do the initial testing. you only need to capture the waveform of one switch off.If you don't have a switch, arrange so you can yank one of the wires off the motor and capture the waveform.The point is it is best to know real data before you buy your mosfets, high current switching diodes, power resistors and maybe big capacitors. If you want to be safe, you could get 600V MOSFETS, but you will need a lot of them.With your slow switching speed, you could look at one IGBT instead of 20 mosfets. Probably worth a look.Richard

author: jackbob
author_rank: Regular Contributor
timestamp: October 19, 2011, 02:57:56 am
content: If the transistors give me problems or they give me a fireworks show I will go for igbt's. So far on small scale everything is good but that may change on the real thing.

author: papanasos
author_rank: Newbie
timestamp: March 11, 2017, 10:25:44 pm
content: Could you please explain how did you calculate the additional current (0.4A) required to discharge the gate source capacitance?