Introduction: Build Your Own Inexpensive H Bridge

Build your own efficient H Bridge for driving motors, and other loads that need to be driven bidirectionally.

Start with an ebay purchase:

100PCS AO3401 A19T 4.2A/30V SOT23 P-Channel MOSFET SMD transistor ($2.50)

100PCS AO3400 A09T 5.7A/30V SOT23 N-Channel MOSFET SMD transistor ($2.50)

Arrange the transistors with 2ea. P type on top, and 2ea. N type below. Add an enable transistor. See circuit diagram. Solder the SMT transistors to the perfboard. Note they need to be slightly offset to fit to the 0.1" circuit board pads.

Finally, test out the H Bridge. The battery should put out no more than the microcontroller can handle. Put a small motor across the output, (with a parallel led with a series resistor if desired). Program an ATtiny85 or Arduino with the code provided. The motor should move one way for a few seconds, stop, and reverse direction. Install Schottky diodes across the transistors to limit reverse voltage spikes, especially for bigger motors. Note that you can simplify the wiring from the H Bridge to the ATtiny by combining gate drives on the left and right sides of the Bridge (connect the gate of the bottom right FET and top right FET to PB1, and bottom left FET and top left FET to PB0), and the sketch still works. Thus PB3 and PB4 are free for other uses.

If you want to use a higher voltage for the motor than the microcontroller uses, you need to add an additional 2 transistors to avoid shoot through, which will kill the H Bridge and, likely your microcontroller too. This is because the P mosfet gates won't get driven to a high enough level to insure turn- off, while the N mosfets would be driven fully on. Add the additional 2 transistors as shown in the circuit diagram.

Comments

tytower (author)2017-08-06

So you are just using them as diodes right? Diodes would do the same job ?

jbike (author)tytower2017-08-06

No, the problem with diodes is current can't be turned off in a diode. To control the current direction through the motor, one pair of diagonally placed transistors must be conducting, while the other diagonal pair must not conduct.

tytower (author)jbike2017-08-07

But surely one diode one way and another the opposite way current can only flow one way at a time depending on the feed polarity?

jbike (author)tytower2017-08-07

Current could flow through the diodes, but it would cause a short circuit, and no current would be flowing through the motor. See

https://drive.google.com/open?id=0B7gX600hAgxOVXRq...

H bridge should operate like there are 4 switches that can be opened or closed to steer current through the motor. See

https://drive.google.com/open?id=0B7gX600hAgxOa081VnEtY1YwbjA

About This Instructable

563views

14favorites

License:

More by jbike:South Pointing ChariotHandlebar End Blinky LEDPhotographic Copy Stand
Add instructable to: