Custom H Bridge Design

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 :stuck_out_tongue:

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 :stuck_out_tongue:

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:

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?

The protection resistor is meant to protect the Arduino pin being fried if full motor voltage reaches the other end. At the Arduino end that current will flow through the pin's protection diode - too much current and that diode will fry. 2k2 is a guestimate, datasheet may give you enough info.

Don't they also act as pull down resistors? They prevent the gates of the Mosfets from floating and becoming unpredictable, keeping them off/on until the micro controller 'wakes up' and can set the appropriate voltages??

sigh

3rd time I've written this post...

I finally got around to breadboarding the H bridge today. It works! I tested it using 3x 1.5v batteries for logic control, taking terminals from the power/ground rails. Used P types for the high side and N types for the lowside. I've attached a picture (note the DS0026 and resistors aren't connected).

I was hoping to use the DS0026 and test with the arduino today but I don't have the software on these computers. I'll hopefully be able to do that tomorrow. I need to buy some more mosfet drivers anyway, as the DS0026 is obsolete, and was thinking that this would be a good replacement:

http://docs-europe.electrocomponents.com/webdocs/0d0d/0900766b80d0d8a8.pdf

Lowside, 1.5A Peak Current, Non inverting. Good choice to drive the mosfets you think?

I think the diodes I'm using for the h-bridge are a bit too beefy. Their forward current rating is 7.5A. I chose them because, as the motors are likely to draw 5~6.5A, I thought 7.5A rated diodes would be a safe choice. But it's occured to me that, as the diodes are in place to prevent back emf from the motors, it may be possible to use lower rated (and therefore, cheaper) diodes for this purpose? I've attached the datasheet for the diodes I'm using at present. Any feedback on this would be brilliant.

I'm looking to get PCB boards made up for the motor driver circuits. Any general advice to follow / pot holes to avoid on this one? I've made the track widths as large as possible to accomodate the high current draw.

Cheers folks.

7.5A diode.pdf (134 KB)

AUV_140x75_small (PCB).pdf (5.86 KB)

Why not just use the arduino to drive 4 pins in various configurations?

Because one day, probably the first time you run the code, you'll get the order of digital writes wrong and poof :slight_smile:


Rob

Ha, yeah, true.

Any information with regards to my latest questions chaps? If all looks good I'm going to order the rest of my components tomorrow.