Shop OBEX P1 Docs P2 Docs Learn Events
both halves of H bridge function, but when connected they cause a short? — Parallax Forums

both halves of H bridge function, but when connected they cause a short?

potatofacepotatoface Posts: 23
edited 2014-03-10 17:58 in General Discussion
Hello everyone. I built two sides of an H bridge controller, following below picture:

derp2.png


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)

derp.png

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!
418 x 657 - 117K
500 x 579 - 92K

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-03-09 01:30
    It seems obvious to me.

    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.
  • potatofacepotatoface Posts: 23
    edited 2014-03-09 01:37
    It seems obvious to me.

    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.
    ill keep tinkering with it then, If all else fails, ill just make an H bridge from relays and use the mosfets for power.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-03-09 01:39
    Ummmm. you seem to be using just one MOSfet for all four devices, no complementry devices. That affects what the shutoff voltages should be.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-03-09 03:03
    I don't know how you tested this but if the top MOSFET is the same as the bottom one then it won't work (even if it's P channel it won't work). The bottom MOSFET may turn on with 3.3V between the gate and source if it happens to be a logic level device but you are trying to put +24V on the high side of the motor which means the source of the high side MOSFET will be at +24V so therefore to turn on the top one you need 3V more than that on the gate or 27V of high-side drive. What were you thinking.
  • potatofacepotatoface Posts: 23
    edited 2014-03-09 03:17
    I don't know how you tested this but if the top MOSFET is the same as the bottom one then it won't work (even if it's P channel it won't work). The bottom MOSFET may turn on with 3.3V between the gate and source if it happens to be a logic level device but you are trying to put +24V on the high side of the motor which means the source of the high side MOSFET will be at +24V so therefore to turn on the top one you need 3V more than that on the gate or 27V of high-side drive. What were you thinking.

    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?
  • potatofacepotatoface Posts: 23
    edited 2014-03-09 03:22
    Ummmm. you seem to be using just one MOSfet for all four devices, no complementry devices. That affects what the shutoff voltages should be.
    Do you suggest I build a driver circuit for this?
    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.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-03-09 04:28
    Unlike BJTs, any H-bridge built with MOSfets needs to work very closely with what the specifications on the PDF are.

    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/
  • potatofacepotatoface Posts: 23
    edited 2014-03-09 04:35
    http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Components/General/FQP30N06L.pdf
    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.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-03-09 04:39
    That's an N channel non-logic level MOSFET by the look of it and it must be very old, I haven't been able to find the data on it. But a ISL9N10AD3 would indicate it is a 30V 10A N channel made by Intersil. The fact that it is only rated at 10A for such a large package is also another indicator of it's age, there are much smaller devices these days that are many times better. The cobbler who cobbled up this circuit obviously never got it to work either but maybe they want others to think they did, or know something.

    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.
  • potatofacepotatoface Posts: 23
    edited 2014-03-09 05:01
    That's an N channel non-logic level MOSFET by the look of it and it must be very old, I haven't been able to find the data on it. But a ISL9N10AD3 would indicate it is a 30V 10A N channel made by Intersil. The fact that it is only rated at 10A for such a large package is also another indicator of it's age, there are much smaller devices these days that are many times better. The cobbler who cobbled up this circuit obviously never got it to work either but maybe they want others to think they did, or know something.

    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"
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-03-09 05:06
    potatoface wrote: »
    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.
  • potatofacepotatoface Posts: 23
    edited 2014-03-09 05:09
    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.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-03-09 05:18
    potatoface wrote: »
    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.
  • potatofacepotatoface Posts: 23
    edited 2014-03-09 05:24
    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?
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-03-09 05:29
    potatoface wrote: »
    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.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-03-09 07:05
    MOSfets have vastly improved lately. It is quite common to see someone using older parts and trying to just make it work regardless of the realities that there are better solutions. I have boxes full of old stuff that I'd prefer to use over buying something new.

    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.
  • Mark_TMark_T Posts: 1,981
    edited 2014-03-09 08:02
    If you are building an H bridge with MOSFETs these days you use H-bridge or half-H-bridge MOSFET
    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.
  • Hal AlbachHal Albach Posts: 747
    edited 2014-03-09 10:12
    If you still want to build your own mosfet bridge here is a site that actually explains in good detail the operation and includes a very simple bridge which I wired up and works very well. I even modified it slightly to add the enable mosfet and used it for PWM, which worked like a charm.
    I'm sure there are other sites just as good, or better, or worse.
    http://www.bristolwatch.com/ele/h_bridge.htm
  • potatofacepotatoface Posts: 23
    edited 2014-03-09 11:51
    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.

    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.
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2014-03-09 13:09
    Hal Albach,

    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.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-03-09 13:46
    This is the circuit I was going to recommend:

    attachment.php?attachmentid=107446&d=1394397945

    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:
    A   B
    0   0  Idle: motor off
    0   1  Forward
    1   0  Reverse
    1   1  DO NOT USE!
    

    Always go to the idle state first before changing direction.

    -Phil
    400 x 400 - 4K
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2014-03-09 14:20
    "...If this is what Beau meant by a "criss-cross" circuit, I'm curious as to why he doesn't like it...." - Any criss-cross design lends itself to a destructive mode...
    A   B
    1   1  DO NOT USE!
    

    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.
  • Hal AlbachHal Albach Posts: 747
    edited 2014-03-09 14:39
    In post #6 the OP indicated that he is using 12 Volts, not 24. Would that not simplify the bridge design?
    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.
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2014-03-09 14:55
    Hal Albach,

    "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.
  • potatofacepotatoface Posts: 23
    edited 2014-03-09 18:34
    yep

    i shall just keep working on designs.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-03-09 18:41
    potatoface wrote: »
    have any of you ever built a simple H bridge that did not require a prefab board? are there simple 12 volt designs out there, with mosfet brands and resistor amounts all included? surely i cant be the only one to want to power something from 12 volts.

    it would be nice if someone built a simple one from a schematic, said "yep this one works for about 30 amps. Im posting it on my website with a list of the components I used"

    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)
  • potatofacepotatoface Posts: 23
    edited 2014-03-10 17:58
    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!
Sign In or Register to comment.