Custom H Bridge Design

Hello folk,

I’m trying to design a custom H bridge to drive my motors.

They draw atleast 6.5 amps, running off a 12v supply. I’m using an arduino mega 2560, which I understand gives an output of 5v at 40mA.

I’ve had a go at designing a PCB board, and would like some advice.

I was wondering if someone could be kind enough to check my circuit and choice of components and make sure it would work? I’ve posted the datasheets of the components i’ve chosen. Each circuit has 4 diodes, 2 NPN mosfets and 2 counterpart PNP mosfets.

I’ve attached the circuit I want to create, my attempt on the PCB board, and the data sheets. I’d be very grateful…

Cheers.

h-bridge.JPG

NPN mosfet.pdf (135 KB)

7.5A diode.pdf (134 KB)

AUV_140x75 (PCB).pdf (18.2 KB)

Have to add, you can see in the original H bridge schematic that there are CMOS 4011 Quad NANA drivers present in the circuit.

I’m not 100% sure how to implement these, but I found a schematic, which I’ve attached. It seems to be what I’m looking for?

logic control.jpg

The MOSFET's, for one, are not a good choice. Their on-resistance is too high (0.55 ohms). With 6.5A of current flowing their power dissipation could be as high as 6.5^2 * 0.55 = 23.2W. That will fry the MOSFET in short order.

-- The Arduino Drum Machine: 14-track MIDI drum machine sequencer / groove-box

Rugged, thanks for that. I've chosen better mosfets based on what you said. The IRF3706PBF has a drain resistance of 0.0085 ohms, so i should dissipate 0.359W - which should be acceptable.

I also found this article, which has been really helpful: http://www.modularcircuits.com/h-bridge_secrets1.htm

I understand the principle of having different quadrants active to get a desired function, but why all the logic gates? Why not just use the arduino to drive 4 pins in various configurations? The article tries to explain it but it's a bit much to wrap your head around.

I'm thinking it's along the lines of, the P type mosfets are 'on' by default, such that, when a gate voltage is applied, they're turned off? N types are simpler, they're off and supplying the 5v to gate turns them on - therefore the NAND gates are all about manipulating the logic appropriately.

I suppose then it's a choice of whether i actually NEED the P types, and whether or not my N types can do the job I'm asking of them...

KE7GKP, I agree regarding the PCB board - I'm just testing the water regarding PCBs at the moment. I used larger tracks (1.3mm) due to high current draw, and tried preserve the schematic as best as possible on the PCB.

Are you saying you're driving the FETs from a 4011 NAND gate??? That's a recipe for blowing up all of your MOSFETs.

High power MOSFETs have large input capacitances (20nF or so is the ballpark). To charge up these gates fast enough (lets say 100ns for now) means a driving current of 2A per device. The 4011 might be able to produce 5mA or so. Thus the switching time will be 80us or so during which both top and bottom MOSFETs are switched on shorting out the power supply and perhaps drawing 100Amps from its filter/decoupling caps...

This is likely to fuse the MOSFETs, then the 4011, then the Arduino.

First piece of advice - protection circuitry is required between the Arduino signals and the H-bridge (even a 2k2 resistor in each signal line might be enough).

Second piece - switch the MOSFETs fast, something like a MIC4422 buffer is a good idea to drive that gate capacitance. It can drive upto 9A which is plenty and it takes logic level inputs. Certainly something more like amps than milliamps is necessary or your MOSFETs will spend lots of time in the linear region and overheat/burn. You need lots of ceramic decoupling close to the gate-driver to do this successfully, at least ten times the combined gate capacitance.

Thirdly have suitable delays (hardware or software) so that it is impossible to have both the top and bottom MOSFETs on simultaneously. This situation is called 'shoot through' and causes all sorts of chaos. If you switch in 250ns or so the delay only needs to be a few hundred ns.

There are H-bridge driver chips that do all the work for you BTW, like the HIP4081, and they let you use all n-channel MOSFETs.

You should also be aware of the Open Source Motor Controller project http://www.robotpower.com/osmc_info/

There are H-bridge driver chips that do all the work for you BTW, like the HIP4081, and they let you use all n-channel MOSFETs.

Well, maybe not all the work:

"The HIP4080 and HIP4081 H-Bridge Driver ICs require external circuitry to assure reliable start-up conditions of the upper drivers. If not addressed in the application, the H-bridge power MOSFETs may be exposed to shoot-through current, possibly leading to MOSFET failure. Following the instructions below will result in reliable start-up."

On reflection I think I may have sounded too negative above, but I know from experience that when high current switching is involved there is little margin for error - when testing circuits definitely limit the current initially with series resistors and look for issues like shoot-through and voltage and current spikes before letting the high currents flow - even a beefy device is going to fry very quickly if you let it directly short the supply. You need to spend time thinking about failure modes and protection circuitry.

Thanks for the advice, very informative.

First piece of advice - protection circuitry is required between the Arduino signals and the H-bridge (even a 2k2 resistor in each signal line might be enough).

I can understand how a resistor would limit the current flowing in the circuit, but wouldn’t that also waste alot of energy - energy that i’m trying to use to drive the motors?

Edit to add- No it wouldn’t, because the resistors would be in the logic lines and not in the loop that drives the motors!!

Second piece - switch the MOSFETs fast, something like a MIC4422 buffer is a good idea to drive that gate capacitance. It can drive upto 9A which is plenty and it takes logic level inputs. Certainly something more like amps than milliamps is necessary or your MOSFETs will spend lots of time in the linear region and overheat/burn. You need lots of ceramic decoupling close to the gate-driver to do this successfully, at least ten times the combined gate capacitance.

Yeah I found out a bit about this later, the technician i spoke to recommended something similar ( due to current output ) so I’m trying to source on at the moment. Although the chip you suggested does look ideal - but is it available to buy?

Thirdly have suitable delays (hardware or software) so that it is impossible to have both the top and bottom MOSFETs on simultaneously. This situation is called ‘shoot through’ and causes all sorts of chaos. If you switch in 250ns or so the delay only needs to be a few hundred ns.

Hmm, I think I understand what you are saying. Basically, whenever I want to utilize the other two FET’s, make sure I leave suitable time between turning two of them off, allow all current to leave the circuit, before turning the other 2 on? I don’t think we’re going to be doing running the motors using PWM so the only chance that ‘shoot through’ will occur is when changing directions, I presume.

There are H-bridge driver chips that do all the work for you BTW, like the HIP4081, and they let you use all n-channel MOSFETs.

You should also be aware of the Open Source Motor Controller project Robot Power OSMC Project Info

Yeah, ideally I’d like a solution I could just buy - but they cost too much. We’re looking for 6, so even at a tenner each that’s still £60 + delivery - double the price of making 6 of my own…

Again, thanks for the feedback.

Hmm, I think I understand what you are saying. Basically, whenever I want to utilize the other two FET's, make sure I leave suitable time between turning two of them off, allow all current to leave the circuit, before turning the other 2 on? I don't think we're going to be doing running the motors using PWM so the only chance that 'shoot through' will occur is when changing directions, I presume.

In that case you might get away with it because the average power dissipated will be low - be aware though that the high-current spikes will potentially cause odd problems. You can easily boost the gate drive current with a pair of transistors as emitter followers BTW - see this application note http://www.diodes.com/_files/design_note_pdfs/zetex/dn80.pdf

Thanks. That seems like a useful way of doing it.

I'm actually a mechanical engineer (soon to be) and our project this year has involved a bit of electronics which I stupidly volunteered to do! We don't have much of our budget left so I'm trying to do this the simplest (and cheapest) way possible, without risking damage to the arduino.

I've stumbled across this thread on the old forum: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1249661296 and I noticed the chap uses capacitors in the circuit (specifically 1 at ground) and I was wondering if someone could explain why, and suggest a suitable capacitance for this application.

I'm thinking now about just using four N-type mosfets for simplicity. I have some mosfet drivers (but none with voltage inverter capability) and I'd need those to run the P-type mosfets. It's dragging on a bit now and I just want to get it done.

I think i'll spend the weekend on this and if i can't get it running I might go for plan B and use DPDT relays instead, as we only have about 4 weeks to get this finished.

What capacitors? I don't think you want any capacitors in there except maybe across your power supply (close to the H-bridge) to smooth out the voltage to the motors.

Given the other info you've mentioned, I would suggest getting an off-the-shelf motor driver. Whatever you cook up using MOSFET's and cobbled together circuits from the Internet are quite likely to smoke if you even get something the slightest bit wrong. Electronics, unlike mechanical systems, are very unforgiving. MOSFET's especially are very sensitive to electrostatic discharge and I have yet to see a soon-to-be engineering student have the proper respect for this.

You want a 12V 10A motor driver. Buy it. You will spend more money trying to build your own and your project will be late.

-- The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons

Why don't you be a bit more negative, haha!! would love to buy one off the shelve but at ~£20 each they're too expensive. We need to drive 6 motors in forward and reverse, so if I can't get this H Bridge to work, I'll use the relays.

Not a soon to be engineering student, I graduate in May, but we've only touched on the basics of electronics and it was very early on the course.

At the moment, I have the following: 5 x P-type FQP27P06X 10 x N-type IRLU8726 10 x STPS745D 7.5 A Diodes.

And I have 6 high current mosfet drivers, but non with inverting capability, so like I said, i think i'll try and get it going with an N type in each quadrant. As has been suggested, I'll put 2k2 resistors in each of the logic lines. I'll have a bash over the weekend.

Why don’t you be a bit more negative, haha!! would love to buy one off the shelve but at ~£20 each they’re too expensive. We need to drive 6 motors in forward and reverse, so if I can’t get this H Bridge to work, I’ll use the relays.

I speak from experience :slight_smile: If you can get this working without relays I’ll be the first to line up and congratulate you.

Your MOSFET choices look OK but you don’t have enough for 6 motors.

What “high current MOSFET drivers” are you using?


The Aussie Shield: breakout all 28 pins to quick-connect terminals

Yeah, I realise what I'm trying to do isn't easy but better to have tried and failed and all that :-P

I don't the part number here at the moment, the datasheet is at uni, but we wanted something similar to this: http://www.national.com/ds/DS/DS0026.pdf (which unfortunately is now obsolete).

I'll post the datasheet of the one we've bought first thing tomorrow morning.

Yeah I only bought the minimum spend at first to try and get one working on a breadboard. If all goes well, I'll order the rest of the components, enough for 6.

I don't the part number here at the moment, the datasheet is at uni, but we wanted something similar to this: http://www.national.com/ds/DS/DS0026.pdf (which unfortunately is now obsolete).

That type of part will not work for an H-bridge with all N-type MOSFET's. The "upper MOSFET" driver must turn on the gate relative to the MOSFET's source terminal, which is not ground.

You will either need to mix P-type and N-type MOSFET's or use something like an HVIC driver (e.g., Fairchild FAN7382 or similar).

-- The Quick Shield: breakout all 28 pins to quick-connect terminals

So if I tried to use all N types, I wouldn't be able to turn on any of the high sides using that driver? If you're saying the gate voltage is relative to the source of the mosfet, what gate voltage would be required, given that the source of the highside is connected to the drain of the low side?

Actually, this statement seems to make sense regarding that:

Let's spend some time on this choice for the high-side elements. As said before, N-channel devices would be desirable for this role for their lower losses, but there's a problem: for them to operate properly, their source must be connected to the motor leads and their drain to the power rail. When a P-channel device is used, its source will be connected to the power rail and its drain to the motor leads. Now, the problem is that both devices are controlled by their gate-source voltages. For P-channel devices it means that if the gate is connected to the power supply, the device will be closed (gate-source voltage is 0) and if the gate is grounded the device is opened (provided the power-supply is actually enough to open the device), since gate-source voltage is equal to the power supply voltage.

For an N-channel device however the picture is more complicated. If you connect the gate to ground or to source, the device is closed (gate-source voltage is below or equal to 0). But where to connect it to open the device? The power supply is not enough, since, when the device is open, it's source and drain are roughly at the same potential. Since the drain is connected to power, the source will be at that potential as well, but than gate should be higher than that to keep the device open. In fact at minimum 5V higher for so-called logic-level MOSFETs and 10-15V higher for normal MOSFETs. This is a significant problem, that voltage somehow has to be generated. In most cases some kind of a charge-pump is used for that, either in a stand-alone or a boot-strapped configuration. The latter however is only useful if the bridge is driven in the 'locked anti-phase' mode (see later). In any case, these high-side drivers usually cannot deliver as much current as a regular low-side driver can, which means longer turn-on and -off times for the high-side (lower current takes longer to charge-discharge the gate-capacitance). In high-frequency operation, where switching loss is a significant factor, a P-channel MOSFET might be a better solution because of this. In low-frequency, high-current operation, where switching loss is not a problem, but channel-resistance is, N-channel transistors are usually a better compromise.

I'll go and have a ponder over that for a few hours :-P

So if I tried to use all N types, I wouldn't be able to turn on any of the high sides using that driver? If you're saying the gate voltage is relative to the source of the mosfet, what gate voltage would be required, given that the source of the highside is connected to the drain of the low side?

Exactly the problem HVIC drivers like the FAN7382 I mentioned are designed to solve: support for a diode-capacitor "bootstrap circuit" that drives the high-side N-type MOSFET with a gate voltage always above the source, whatever the source may be even as it changes. Study the datasheet for that chip carefully, you are likely to learn as much as the explanation you will be pondering for the next few hours (though both are useful).

-- The Arduino Drum Machine: MIDI development system with 14-track MIDI drum machine sequencer / groove-box software

The tricky part of the design is getting the high-side driver to 'float' with the output signal (which might be a 24V, 50V or whatever switching waveform) AND have it controlled from some circuitry at ground potential. Typically current-control (or opto isolation) is used.

The h-bridge in the below schematic is an interesting design.

http://www.openservo.com/moin.cgi/Schematic2

Ok. I managed to get a look at Intermediate Robot Building by Robert Cook, which I looked at following this article: http://www.robotroom.com/HBridge.html There was alot of good information in the book.

What put me off the P-types was the fact their gate voltage was listed as negative. That made me think you required a negative voltage at the gate and so i though i'd require an inverting mosfet driver. But I realise now that wouldn't be necessary.

If I used the two P-type Mosfets I mentioned earlier on the high side, and the two low N-types on the low side I should (according to the book) be able to use a MIC4426.

I use 2 resistors in the logic lines. Rugged you suggested using 2k2 ohm resistors, any reasons why so high? I'm assuming this is to automatically tie down the inputs and so set the initial state of the h driver. The two high side mosfets are initially closed (i.e. on). Supplying a voltage to them will turn them off. The opposite is true of the N-type. To prevent shoot through (essentially a short circuit) I have to make sure there's a suitable delay between opening and closing each side of the driver.

If i use one MIC4426 chip, and tie the highside and lowside inputs together for the left and right side of the bridge, according to Mr Cook, there will be a brief period of shoot through as the Ptype turns off and the Ntype comes online. This is only a real problem, however, if I'm making use of PWM. (I think that's what Mark was trying to explain?).

I'll post a revised schematic later tonight.

Anyone have any ideas how much current a standard breadboard can handle :P?