both halves of H bridge function, but when connected they cause a short?
potatoface
Posts: 23
Hello everyone. I built two sides of an H bridge controller, following below picture:
They both work individually, spin up a DC brushed motor without problems or any heat (30 amp mosfets, pchan and nchan). I can toggle them both with my propeller chip at 3.3 volts and 5 volts.
but when i connected them together like below picture (sans caps), they short (the atx power supply im using shuts off, and the mosfets get hot or fry)
Perhaps I need more diodes in the circuit? all mosfets have internal ones, so Im confused as to what is causing the short.
are the pulldown resistors at fault? are both sides of the h bridge being turned on slightly with residual voltage?
From what I observe, the pulldowns in the propeller chip do their job and keep the gates on each H bridge side from floating.
I can toggle the gates with just a 5volt power rail and they mosfets stay on, unless I pull them low with a 100 k resistor or the propeller's input pins (which have a pulldown I assume)
any help is appreciated!
I desperately want to get my robot to move, but I cant even get my H bridge to work!
They both work individually, spin up a DC brushed motor without problems or any heat (30 amp mosfets, pchan and nchan). I can toggle them both with my propeller chip at 3.3 volts and 5 volts.
but when i connected them together like below picture (sans caps), they short (the atx power supply im using shuts off, and the mosfets get hot or fry)
Perhaps I need more diodes in the circuit? all mosfets have internal ones, so Im confused as to what is causing the short.
are the pulldown resistors at fault? are both sides of the h bridge being turned on slightly with residual voltage?
From what I observe, the pulldowns in the propeller chip do their job and keep the gates on each H bridge side from floating.
I can toggle the gates with just a 5volt power rail and they mosfets stay on, unless I pull them low with a 100 k resistor or the propeller's input pins (which have a pulldown I assume)
any help is appreciated!
I desperately want to get my robot to move, but I cant even get my H bridge to work!
Comments
A. You built the H-bridge correctly.
B. You are routing the current wrongly.
As far as routing, there is at least one way to make an H-bridge into a short circuit, maybe more. Also, those diodes in the MOSfets do operate 100% of the time.
MOSfets may not play nice when one attempts to directly drive from logic.. pull-downs and pull-ups are often required and some delay to prevent shoot through.
sorry. i should have edited that. im actually using 12 volts in the circuit,
the top two mosfets are p chan, the bottom n chan, (if you look at the large picture)
these mosfets turn on with 5 volts. I dont need 12 + 5 in my understanding.. could you explain a little more what you meant?
I cant imagine how it would improve anything though. 5 volts is 5 volts logic, unless Mosfets require high amps to turn on, which is against my understanding.
So, if you want a good answer.... we need to know exactly which MOSfets are being used.
A lot of people just want to drive a MOSfet bridge directly from the 3.3v logic of the Propeller and run into problems that don't exist at 5.0v logic.
While I really wanted to build my own H-bridges for a long time, I now realize that Pololu provides MOSfet h-bridges that are far superior to whatever I might build on my own and with a smaller footprint.
It is nice to know the theory. But having a good reliable build may divert you from DIY.
I don't see any pullup resistors on the top pair of the h-bridge, or pull-down on the lower pair of the h-bridge.
This link may help for more detailed refinements.
http://www.modularcircuits.com/blog/articles/h-bridge-secrets/h-bridge_drivers/
https://www.sparkfun.com/datasheets/Components/General/FQP27P06.pdf
the two mosfets in question.
Im going to tie all inputs to ground, and plug in the power supply. if it shorts out still, i know its not an input problem, and more of a design flaw somewhere that causes a short.
You know, its such a simple circuit. I can't believe Im having so much trouble with it. Something is off, and it will hit me like a brick when I finally figure it out.
Look on a real electronics site for information about H bridges. If you used a P channel for the high side you won't need voltages that are higher than the motor supply voltage but you will probably need a small NPN to drive the P channel etc etc.
There are a lot of circuits around and even quite a lot of ICs that do this but I managed to dig up a circuit I published a few years ago that can be run directly from a single I/O per half-bridge. I may edit this and bring it up to date.
EDIT: just saw your post, the P channel still needs to be able to turn off, that is the votlage between the +supply and the gate must drop to a very low level relative to the + supply of course. You cannot drive this directly from logic I/O.
peter, both of my half bridges are functional they way they are from Captain Cobblers website, even from 3.3 volts logic. obviously i wont run them under heavy load with 3.3 volts logic, but they do both seem to function.
Simple H bridge designs in professional published books follow that almost exactly, and this one even includes filter capacitors, I don't see how it could be so "cobbled to the point of inducing extreme disgust from the electronics community"
The link you gave was this one wasn't it? The filter caps are nothing at all special and in fact if you are running from an SLA battery then they offer no great benefit. I'm going back on your posts to see if there was another circuit used.
thats the right one.
Then I'm telling you straight, that circuit cannot work, it may work if it were running the motor from 5V or so but the top transistor which is hopefully a P channel cannot turn off if you are running the supply at 12V and the gate at 0..5V, it will always stay on. There is also no reason why if he could publish to the internet that he could not have used a free CAD or something to do a proper drawing. There are so so many of these misleading "cobbled" circuits around on the internet.
see...you just told me plainly: there is the reason why its always on, and thats probably the cause of the problem. this is what I was looking for. I didnt know that you needed a larger potential difference between the supply and the gate voltages.
so in order for the mosfet to turn fully off, should I bump the supply voltage from 12 volts to 24?
No exact opposite, the circuit probably worked at 5V and when they published it they just "thought" it would work at 24V. To run at this voltage you will need NPNs to drive the P channel but then they will need an inverted signal from the one that's driving the N channel, so another NPN perhaps or a 74HC14 gate
EDIT: BTW, if the circuit is driving the MOSFETs properly and the MOSFETs have a low Rds(on) then they won't be getting hot at all and you won't burn your fingers. However to drive them at higher PWM frequencies efficiently you will need more than this simple circuit.
But I have given up. The ready made stuff is excellent.
Here is a thread that may help with making your parts work.
http://forums.parallax.com/showthread.php/142009-Building-a-proper-h-bridge-from-scratch
BJT and Darlington pair solutions are easier, but have huge voltage drops that waste power... especially for motors driven at less that 12 volts.
MOSfets are the way to go, but one can't cobble something together an expect good results.
And I strongly suspect that a good set of MOSfets might be easier to build with having BJTs accepting the 3.3v logic and driving the power stage at ample higher voltage. In other words, a mixed solution might be easier to DIY than an all MOSfet solution.
These days there are tons of h-bridge circuits on the internet that are incomplete or just plain wrong. The knowledge base has deteriorated. I'd love to see someone publish a good text on motor control with MOSfets, but nothing has appeared so far.
driver chips(*) to generate the gate signals, use n-channel MOSFETs throughout - the driver chips
bootstrap a gate supply above the V+ rail for the high side MOSFETs, so long as you use PWM on
the high-side with < 100% duty cycle. The are driver chips that support upto 600V H-bridge and
take 5 and 3V logic inputs. Simple. (Actually a 600V MOSFET H-bridge isn't simple, but 12 or 24V
isn't hard to do). With SLA supply you will need over-current sensing/shutdown.
(*) For instance IRS2001 IRS2004 FAN7388 HIP4081
It is possible to do a 12V H-bridge using n-channel and p-channel, but you need level-shifting NPNs and
its hard to get the fast switching needed for efficient PWM.
I'm sure there are other sites just as good, or better, or worse.
http://www.bristolwatch.com/ele/h_bridge.htm
yeah thats probably another part of my confusion too. so I build these two halves according to the picture, which was a bad idea anyway, and somehow they switch current...but how can they work with the bottom n channel. there is no inverted signal or negative voltage.
I really really need to find a good H bridge tutorial. im tempted to purchase a motor controller pre-built, but building is a great learning process.
thanks for the tips on everything.
That's a good approach.... IMO I think using two Half-Bridges are a better way to go than to use a crisscross configuration. Also if you want to take the design a step further, use a separate power supply for the mosfet gate drives. This keeps voltage sagging from heavy current loads ( i.e. start, stop, stall) from creating a thermal runaway condition if the transistors are not able to saturate under a load.
EDIT....
You MUST use a circuit with an ENABLE regardless if you are using PWM or not to prevent Shoot-through(ST). Even changing direction abruptly can cause ST. What you want to do is set the enable so that it is disabled, any time that you are changing direction, and allow for plenty of settling time on the direction of the H-Bridge before re-enabling the enable line ... especially when using pull-ups on the PMOS transistors. Settling time can be reduced if the PMOS are driven instead of pulled-up. PWM should be applied to the enable, and NOT the direction.
It uses the nMOSFETs to switch the complementary pMOSFETs. The circuit does require that VDS(SAT) for the pMOSFETs be very low. (If this is what Beau meant by a "criss-cross" circuit, I'm curious as to why he doesn't like it.) The values for R1/R2 and R3/R4 should be selected to keep the pMOSFETs' gate voltage within datasheet specs.
Here's the truth table:
Always go to the idle state first before changing direction.
-Phil
Going with two independent half-bridges eliminates this problem, and provides dynamic braking instead of a PMOS-NMOS direct short.
Also, the criss-cross in the schematic you provided is extremely hard on the NMOS transistors if the direction needs to suddenly reverse and as the motor slows down to reverse, the PMOS transistors are allowed to operate in their linear region during this transition producing a lot of heat.
BTW, does anyone have a good rule of thumb re PWM frequency? It's been my belief that a low PWM frequency would be more efficient than a very high one. I have found that a motor I'm working with (4.5mH as measured by my Australian LCR meter) seems to work very nicely at about 120 - 140 Hz and all mosfets stay nice and cool. But if I up the freqency to around 1KHz or more the motor runs somewhat slower and the PMOS really warm up fast even though the PWM is applied to the NMOS, using the circuit I found at bristolwatch.com.
"BTW, does anyone have a good rule of thumb re PWM frequency?" - If you know the architecture of your motor and have Tachometer feedback from your motor, then the PWM period should match the number of poles on the armature relative to the speed. This creates a minimal noise other than the motor noise itself. But typically the frequency of the PWM is set due to audible noise issues. You generally want something above human hearing, but at the same time, you need to take the mosfet and the driving circuit into consideration. Capacitive effects and design constraints (i.e pull-up resistors) may prevent you from driving the PWM that fast.
i shall just keep working on designs.
The one I posted can be built on a perf board if you like, just use suitable TH equivalent components. The N and P aren't specified in the circuit as there are so many available but maybe someone would like to recommend one or two for you. For the N channel you could use the IRF3708 IIRC etc. The suitability of any circuit depends a lot on the PWM frequency and how you drive it, as mentioned for is instance to pause between changing direction etc. Any common NPN will do (2N2222 etc)
I shall try that!