guys, this is a high side driver. i bet if a scope was hooked up, one would see that the mosfet is not turning on 'hard'
iv been there, done that :oops:
if one is switching 12v, you need about 18 volts or so to properly switch the mosfet (i was using a irf9540 i think)
switch to a low side driver, and your problem might go away
from irf5305 datasheet
VGS(th) Gate Threshold Voltage -2.0 ––– -4.0 V VDS = VGS, ID = -250μA
so you would need to provide atleast 16v to your driver chip power pins
not a rookie anymore, still learning tho
No, the 4427 is a low side driver, but here it's used in a high side configuration. It doesn't matter as long as the switched voltage is well below the maximum allowable gate voltage (and above the threshold voltage, and in the range of the driver chip, +6 to +20 V).
The 5305 is an enhancement mode P-channel MOSFET, so with +12 V at the source the gate voltage needs to be +8 V or lower to ensure that it's on. Increasing the voltage to the driver chip may cause the MOSFET to turn off a bit faster, lowering switching losses, but this should not be necessary.
Now you all know why I'd perfer to use an application specific IC, such as the National Semiconductor LMD18201 H-Bridge 3 amp driver IC.
I got 5 free samples from National and it worked on first application of system voltage.
Also, you should take a look at the datasheet for the LMD18201 and take note of the Bootstrap circuit. You might see why you are blowing MOSFETs.
While the datasheet diesn't usually show every detail of the internal circutry, it will give you some insite on the circutry needed to control the un-tamed creatures lurking in the jungle.
You can avoid reality, for a while. But you can't avoid the consequences of reality! - C.W. Livingston
A bootstrap circuit isn't needed unless you want to switch voltages above 20 V or use an NMOS as the high side switching device. But NMOS devices usually have a lower on resistance than PMOS, so it may be a good idea to replace the 5305 with e.g. an IRF3708 anyway.
The LMD18201 looks useful but it seems a bit expensive and has a leg pitch that isn't breadboard friendly. It won't eliminate the need for capacitors.
Thanks again for all the encouragement and help!
I've drawn out a new version where I've tried to incorporate all of the advice to the best of my ability.
You can see it below. Comments?
Again, thanks for the help, I hope I'm getting there! I hope I get to wire this up soon (new parts are here!)
If I'm not mistaken, you need a GND reference from the 4227 IC to the battery, as well as the uC. Else, your FET will be on or off all of the time, depending on wheter it's a 'P' channel or 'N' channel.
Thanks Carl. What I haven't shown (but alluded to in the note) is that the uC also gets it's power and ground from the battery. So essentially the GND to the 4427 is from the battery. Does that make sense? I thought this was what someone suggested, I assume because it might be less noisy.
It looks good Tim, have you tried it yet? The 4427 is now protected by the 100R resistror so it should not blow. As others sugested you may want to put a 12 V car lamp (20W??) in series with the 12 V from the battery as it will give you some current limiting. As I suggested before you may want to try and get it all working by using a 100R, 5W resistor instead of the motor and see what happens. Once you know that the voltage to the motor's output does what you want the start using the motor, still with the lamp in place to start, then remove it BUT put a fuse in it's place so that if you have a bad short the battery doesn't explode in your face :(
Ampertronics Pty. Ltd.
* Electronic Design * Custom Products * Contract Assembly
Add a ceramic capacitor of 220 nF in parallel with the 1000 uF cap. Electrolytic capacitors have a relatively high ESR and are therefore not well suited for dealing with the high frequency transients.
Lose the gate resistor, or at least lower its value considerably. A high gate resistance will cause the switching times to increase, thereby increasing the time the MOSFET spends in the linear region, and this will increase the switching losses. The rise and fall times of the MOSFET that are specified in the datasheet are for Rg = 6.8 ohm, and the output impedance of the 4427 is 7 ohm, so it should work well as it is. The gate resistor will not likely protect the 4427 anyway, since it's overvoltage at Vcc (or undervoltage at GND) that causes it to fry. The input impedance of the gate is high enough to prevent any destructive currents to pass through that way.
I really don't think the 1 ohm resistor is needed. The main reason to have a decoupling capacitor at the 4427 is not that the IC needs a stable voltage, but that it needs to be able to charge/discharge the MOSFET gate capacitance without disturbing Vcc too much. For the FET you're using, a single ceramic capacitor of 1 uF should be enough.
I appreciate the continued help! I was too busy to try it this weekend :( , but I guess the upside is I might get some more pointers before I solder it. I hope to get to it tomorrow night.
BUT put a fuse in it's place so that if you have a bad short the battery doesn't explode in your face
Lose the gate resistor, or at least lower its value considerably
The gate resistor will not likely protect the 4427 anyway
it's it's overvoltage at Vcc (or undervoltage at GND) that causes it to fry
I really recommend a gate resisitor for protection
during transients. In the switching-moment the
miller-capacitance (drain-gate) may lead to
a high gate current that may cause latchup via the
drivers output even if the driver is latchup-immune
up to 500mA.
If everything works out fine, the gate resistor may be decreased.
I recommend a capacitor 0.1uF directly accross the
gnd-Vcc connections of the driver.
Sorry John, I hadn't noticed that post. I guess I should have reviewed the whole thread before posting that. :oops: If possible pin swapping is the reason to use a gate resistor, then it should better be 100 Ohm. The 1.5 A mentioned in the datasheet of the 4427 is the peak current it can provide, not what it can handle continuously.
Can anyone say what the pinout of the 5305 really is? I can't find it in the datasheet - have I missed something? The web site of my supplier states that the pinout is G D S (http://www.elfa.se/en/, search for irf5305), but the spice model found at IRF's web site seems to indicate that it's D G S. Tim, do you have a multimeter with a diode tester? If so, you should be able to figure out which pin is which by looking for the anti-parallel diode going from D to S.
What is your suggestion to remove these overvoltages/undervoltages? Isn't the SR506 schottky + the internal zener inside the fet suppose to do this?
Here is a slightly revised drawing and some comments. Again, the help has been great!
I recommend a capacitor 0.1uF directly across the gnd-Vcc connections of the driver.
Can anyone say what the pinout of the 5305 really is?
BTW, I've used these same MOSFETS hooked up the same way to drive small 12V motors, so I doubt I've got the pins wrong.
Additional advice noted (and appreciated):
1) 1R may not be needed
2) The gate resistor may not be needed, but would provide some protection if MOSFET pins are mixed up or may protect the gate during transients
My recommendation to place a 0.1uF cap directly
between the drivers supply connections is here really
to be taken literally.
I try to explain:
If currents change very fast, its important
to take into account, that all conductors (wires etc.) have some inductance. Accross this inductance
a voltage builts up if currents change. So to say that "something is connected" gets more or less meaningless at higher frequencies.
Assume you switch 20Amps linearly within 10ns (Experts today do this). The current slope is
dI/d=20A/10ns. Assume you place a normal piece
of wire in this current path (for example the drain line of your MOSFET) that is 1 cm long (not quite
long), this has (roughly by rule of thumb) an
inductance of 10nH. The induced voltage accross this short connection is somewhere in the order of
U=L * dI/dt = 10nH * 20A /10ns = 20V (!!!)
If you use a fast gate-drive without
gate-resistor, the MOSFET switches really fast.
If current rises fast, this may give nasty voltages
in all conductors.
Therefor its often necessary to avoid any additional wiring (stray) inductance. A direct placement of capacitors accross the driver-chip helps here to really keep the voltage for the chip constant during switching.
(The world in your case will not be that bad, because the wiring inductance of all your wires will limit the current slope, but nevertheless, fast rising currents can be dangerous.)
I believe in your case switching losses are not so important. Assume you switch 10000 times per
second. And the switching lasts for 1 us (quite slow)
and during switching you have 20A*20V=400W losses, mean switching loss is 400W*1us*10000 *(1/s)=4W,
which can be handled by a small heatsink,
and the loss-power will be much less than the 400 W !
Thats why I would suggest a slower gate-driver
with gate-resistor, perhaps constructed by some discrete transistors.
(Its the same as in digital: Never switch faster than necessary !)
Therefore in the test-phase I always prefer to switch
a little slowly.
Thanks for explaining all that ossi!
So then would this be better:
EDIT: added replacement picture, as previous was broken. This is an old thread, but it was a hugh help to me, so I wanted to updated incase it helped others.
I think its better, but I would also like to hear,
what others think. Making errors is quite common to me.
Here’s an image from the datasheet
It's looking pretty good now, but I have one more (very minor) suggestion: Switch positions for the 4.7uF and 0.1uF capacitors. It probably won't make much of a difference in this application, but in general it's better to locate the smaller caps (lower ESR/higher frequency) closest to the IC.
The folks flying ducted fan model jets have electronic speed controls the size of a postage stamp PWMing 40 amps on brushless motors, so SOMEONE knows how to make this technology work correctly.....
Imagecraft compiler user
A stupid question on the mosfet driver chip rating. I see these chips rated from 1.5A up to 12A or so. One manufacturer states that somehow the switch rating is related to the mosfet max ampere rating. The microchip data sheet seems to implicate the mosfet gate capicitance as the determining factor.
The OP will be switching a 20A mosfet with a 1.5A switch part. Can someone explain how this works?
Sure they know:
Small loops avoiding inductance. Rugged drivers.
Proper decoupling. Efficient protection. And be sure: They are not beginners.
In many application-notes of power-electronics
devices you find good hints with recommended
layouts of PCBs, but often they tell not all
details why their layout is so good. And without
thinking about it, you miss some detail and have
the crash !
Okay ossi, thanks.
It's looking pretty good now...
A stupid question on the mosfet driver chip rating. I see these chips rated from 1.5A up to 12A or so. One manufacturer states that somehow the switch rating is related to the mosfet max ampere rating.
Ok, some thoughts to "driver current rating"
Many want to switch (turn-on resp. turn-off)
a MOSFET fast. This requires charging or
discharging the gate. The more current
(flowing in or out) the faster you are.
The larger the gate-capacitance the slower you are.
MOSFETS for larger currents often have a larger gate-capacitance than MOSFETS for smaller currents
(at the same voltage rating). Therefore at the same speed a "larger" MOSFET requires a larger driver.
Gate-capacitace is dependent on voltage ! So the
picture above is only qualitatively right.
Its not so easy to get it down to precise numbers.
Gate capacitance of MOSFETS is often specified at the
same voltage level. Therfore some river-manufacturers
not only specify maximum output current, but also
say: "will switch 1000pF within 25ns".
Dependent on the voltages and currents at the
switching instance the gate-driver will have
to deliver additional current due to the Miller-effect (see Miller-capacitance).
The driver gets the current from its supply.
If your supply (due to stray-inductance ) is not
able to deliver it: Game-over
(This is, where a good capacitor near the chip helps)
The wiring-loop: driver, MOSFET-gate, return-path
must be of low inductance, otherwise the driver will not deliver the current: Game over
(Good layout of current loops helps)
If the main-current-loop and the gate-current loop share some impedance (usually in the DRAIN-wiring), voltage accross this impedance reduces effictive-gate voltage, if this is too much: Game over
(Good layout of current loops helps)
The faster you want to switch, the more important is all that. But its possible also without a PCB but
with breadboard-techniques !
Well, I told you:
I am slow and lazy, so I always switch as slow as possible.
Lazy means: I switch as seldom as possible,
so at low frequency !
Well, I told you:
I am slow and lazy, so I always switch as slow as possible
If it's possible to add a prescaller to slow down the PWM frequency, should I? I assume it's possible, but should wait to get home to check the datasheet (forgive me for not checking now). Currently I'm using phase correct 8bit PWMs on a 1MHz ATMega16, which translates to about 2KHz PWM frequency.
Some golf cart controllers switch in the audio range because the L of the motor wont let them switch faster. So you get to listen to the controller sing/whine. Power supplies try to switch faster than 20KHz so normal carbon based units wont be irritated by the sound. Does your meter have an L and C setting? Whats the L of your motor??
2 kHz is low enough, when not too low, because
you can hear it.
Ossi, thanks for the explanation. So, it sounds like the higher amp mosfet drivers, are for big fets, driven at very high speeds. And since the speed here will only be in the very low khz range, no problem. Will someday pretend to understand those datasheets.
EDIT: Usual late post,sorry
A few notes:
1. Looking at the spec-sheet of the motor, and using a ruler to extend the lines in the graph: max. current will be ~ 50 Amp. Tim is using a flywheel, and drives the motor with pwm. When it starts @ 0 rpm, and a pwm-signal is applied, the current will be in the range of pre-mentioned 50 A. Not 1 or 2 or 20 A, but 50 !
Two components will get a hard time: the fet, and the schottky. I think that (at least) two of both would be a good idea.
2. It was pointed out earlier (by Mneary IIRC): the battery-voltage under pwm-load from such a motor will be anything but DC: the spikes on the battery-voltage will be high, and contain quite some energy. Now let's look at Tim's first question: the driver got fried. IMO not because of the current it had to supply to the gate of the fet, but due to overvoltage. So I strongly recommend to put that 1 ohm resistor in the Vcc line to the driver, and yes, also a 1 ohm resistor in the 12v-line to the voltageregulator. As pointed out earlier: an inductor would be even better, but if that's not available, a 1 ohm resistor (250 or 400 mW suffies) will do.
3. The voltage regulator (with the cap's around it) : 12v direct from the battery, and ground from the star-point on motor-minus.
There is one other thing that worries me: is the diode in the fet fast enough to handle the spikes ? It's not a schottky .....
Edit: Ossi showed the power-losses in the transients. Then there is still the Rds-on .... also earlier mentioned; if you do some math, you'll see that a heatsink will be necessary.
They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/
Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips
The 'hidden' advantage of parallel FETS is that each will carry approximately 1/4 of the poweer (static) as one, since you're cutting the resistance in half and sharing the resulting (half) power between two devices. A third FET gets you to 1/9. The only downside is that the gates will take longer to charge. You don't need to worry about balancing the drain currents; if the RdsON are different, the circuit self-balances (unlike the bjt).
In this circuit the diode in the FET isn't supposed to conduct, so its speed isn't critical. However, be sure that the Schottky can handle 50A spikes.
Plons has been nudging me towards more than one fet and he might be right.
As for the Schottky, here's a few specs from it's data sheet:
Max recurrent peak reverse voltage: 60V
Max RMS voltage 42V
Max ave forward rectified current (@TL=90 deg C): 5A
Peak forward surge current 8.3ms half sine-wave...: 150A
I'm not sure, but I'm hoping the last one is what I need to worry about for those 50A spikes. Look okay?
Oh to have more time! I've placed the components, but didn't have time to add wires and solder. Watching part of what might have been Andre Agassi's last match (US Open Tennis) was part of the problem. Plons did persuade me to put two mosfets in parallel. If I add a second mosfet in parallel, do I have to change anything else (e.g., capacitors, driver)?
Any suggestions on needing a second Schottky based on the specs above?
Also, Bob asked a while ago if my meter had C and L settings, and what's the L (inductance?). Unfortunately meter doesn't seem to have those.
I did try to get a better reading of the coil resistance after Plons reread of the datasheet suggested 50A at startup. Reading it directly was too low for my meter, which is not surprising as discussed previously. So I made a simple voltage divider using a AA battery, a one ohm resistor, and two of these motors in series:
1 ohm resistor
I found the A-B voltage was about equal to the B-C voltage, which suggests each motor is about 1/2 and ohm. I didn't expect this to be very accurate, and indeed A-B voltage + B-C voltage didn't match A-C voltage that well. But I thought it would put me in the ball park. The actual voltage readings were A-C = 1.41, A-B = 0.71, and B-C = 0.83. So if we believe it's 1/2 ohm, I believe that would mean about 24A at start up or stalled. Does that make sense, or is this too inaccurate to consider?
I think Plons has extrapolated a graph of amps vs. RPM (under different loads) down to zero (past point of stalling). Is that a better way to get the 0 RPM current? The site where I bought it (http://www.robotmarketplace.com/marketplace_motors_ame.html) lists the stall current at 22A
Ossi (and others), are there any of these RC motor controller circuits I can find on line? I did a quick search, but haven't found anything showing a circuit that seems to fit my application.
I think Plons has extrapolated a graph of amps vs. RPM
So I made a simple voltage divider using a AA battery, a one ohm resistor, and two of these motors in series:
If I add a second mosfet in parallel, do I have to change anything else (e.g., capacitors, driver)?
The Schottky is more than sufficient, no need to add another one.
As for heatsinks, they will have to be able to dissipate around 10 W each if you go with two mosfets (assuming I = 25 A, Rds = 60 mOhm, and switching losses around 1 W), or just below 40 W if you use just one mosfet. The Wakefield 637-20ABP looks suitable in the former case, and 647-25ABP in the latter. They're a bit bulky, but you'll probably need a fan if you want smaller heatsinks. Mouser carries the first of them, Farnell has both.
It works!!!! :D It even sings! :wink:
Thanks or all the help! I built the circuit as described in the last drawing I posted, except I put two MOSFETs in parallel. Seems to be running just fine and not even getting warm. Sorry for the delay, but it took me awhile to get it built, and then the freaks site was out yesterday.
One thing that surprised me is that when I unhook the battery that powers the motors and the microcontroller, the spinning motor (with flywheel) seems to generate enough power to keep the LCD on the circuit (and I assume the microcontroller) running for a few seconds before it fades out. Is that anything I should worry about? Just had another thought: Could it be the mF capacitor running down?
Another question: Can a circuit like this be built on a PCB? I assume it can, but how wide do the traces need to be? Would it be better with 2 oz copper?
My plans for this project do include a few more smaller motors, and for those I have ordered some 5Amp H-bridges. There are the ones described in
This Thread. They were only about $4, but I orderd four from Arrow and paid about $8 in shipping.
Do you have an oscilloscope at hand ?
If so, Its now time to make some measurements.
This will show you how waveforms look like.
Measure maveforms under various loads and operating conditions.
This will help to get an impression
how waveforms look alike if the things are ok.
Than you have compare-values if something goes
It is a well known fact, that spinning motors may supply circuits.
I have heard, that hard-disks use the energy of the main-spindle to power the head-arm to get it driven to the "home position" in an sudden power-off condition.
Energy people use this energy-recovery when braking.
And if not properly designed, this energy may blow
up your circuit.
Unfortunately I do not have an oscilloscope, but wish I did to do some testing. I'll take some current readings on my DMM, but it doesn't update quickly enough to get much of a sense of what's happening at startup. I'm assuming the readings while it's running is something like the average across the PWM cycles.
The next 'feature' would be to add a comparator across a .01 ohm resistor with a trimpot ref so you can adjust the overcurrent limit. And a status led on the output of the comparator... Green if OK, red if in current limit
Thanks for the interesting suggestion Bob. Took me a bit of Googling and reading to understand, but I think I get it. Also got me thinking about rigging up an ADC from an AVR to try to measure current (via a shunt) as a poor man's (low frequency) oscilloscope. Judging from the numberous related postings, ideas like that seem tempting to many. However, now that this is working, I'm too anxious to start doing things with these motors to fine tune this any more.
© 2021 Microchip Technology Inc.