H-Brigde – Do It Yourself

created by date: 15/12/2010

15/12/2010 H-Brigde – Do It Yourself

…if you must to!

H-Brigdes are quite basic piece of hardware, steering them is where fun begins. For all those of you who prefer easy solution that just work please look into L293 or L298 which can drive two motors with current up to 1A or 2.5A per motor. Or you can use VNH3SP30TR-E for currents up to 30A.

Little introduction

If h-bridge is common and basic piece of hardware why is it so hard to build one that is working? There is a lot of answers to this but most common are:
  • wrong component chosen
  • errors in controlling FETs
  • over current which is result of wrong components
  • too fast switching
Some of these errors are easy to fix like over current is just a matter of doubling MOSFET count. Also switching them too fast with PWM can be easily overcome by simply dividing PWM frequency (at least in AVR it is easy).
But for a moment lets just back up from whole H-Bridge thing with at least 4 MOSFETs. Have you considered using one FET and a relay? If you don’t need rapid direction changes and you wouldn’t miss breaking function than this easier and cheaper solution is for you. When it comes to handling currents it is usually limited mostly by MOSFET parameters. Since we can use only one FET we would chose N channel MOSFET. They are faster, handle bigger currents and there is a lot more of them available.
But going back to H-Bridge, we usually will use both N channel and P channel MOSFETs. P channel FETs are slower when it comes to switching and usually can handle smaller currents. For example FETs used in schematic above uses BUZ11 N channel MOSFET which can handle 30A but the P channel MOSFET IRF9530 can handle only 12A.
Remember that this parameter ( the rdson ) is for 25C when IC substrate gets hot it starts to be more resistive so the Amperes that can flow are reduced. It is best to assume that we will be using MOSFETs at their 70% to be sure that they won’t blow. And sure they do that quite often. Especially when you switch them wrong ( remember A&D or C&B ?).

Digging deeper

MOSFETs are voltage controlled devices. It means that when you would like to control then from AVR (or other 5V source) you will have to chose MOSFETs that are logic-level operated. It means that they can work on such small voltage (Gate voltage). Also you need to know that 5V is not enough to fully open FET. Look at the Transfer characteristic chart, you can see that at 5V it is only open in1/10. This means that FET is not fully open and its resistance is 10 times higher than when fully opened. So if you use 5V and try to run and full load you will blow your MOSFET. This also depends on voltage between Drain and Source (Vds). This makes using N-MOSFET hard at high side of H-Bridge (D & C parts). To use then there we need to use charge pump to drive Gate higher than +V voltage. It should be driven +V + 10V more then when used on low side. Fortunately there are specialized IC for driving N-MOSFETs on high side (for example LTC1155).
To further add to this little nightmare MOSFET Gate is like a capacitor so to drive it fast you need more current to charge Gate capacitor. 

So to sum up:

  • N-MOSFET conducts when Gate is at least 5V+ (when Source is connected to GND, when you connect Source to V+ then Gate must be operated at +V + 5V at least) and have fast fall and rise times
  • P-MOSFET conducts when Gate is at GND potential (0V) and are a bit slower than N channel FETs

Some examples

So now that we have some knowledge lest try some examples. First one is basic H-Bridge made from N-MOSFETs and P-MOSFETs utilizing TC429 high current MOSFET driver and some NAND gates to ease interfacing with AVR. This design doesn’t provide STOP function.
Using TC429 enables us to add MOSFETs to simply extend current we can work with. So in this example we can work with 15A when we provide cooling to the circuit. When we double FETs count we will be able to work with 30A thanks to high current drivers. If you can’t find TC429 you can use other MOSFET driver with inverted output or move inverting gates IC1A and IC1B to low side drive.
Remember to always add protection Shottky diodes. When you stop providing motor with current it will behave like inductor trying to sustain current flow. If you use diodes they will provide a way for voltage spike to dissipate instead of destroying MOSFETs.