Introduction

A number of web sites talk about H-bridges, they are a topic of great discussion in robotics clubs and they are the bane of many robotics hobbyists. I periodically chime in on discussions about them, and while not an expert by a long shot I've built a few over the years. Further, they were one of my personal stumbling blocks when I was first getting into robotics. This section of the notebook is devoted to the theory and practice of building H-bridges for controlling brushed DC motors (the most common kind you will find in hobby robotics ...) I've got an image of one below with both as a unit and "expanded" in an exploded view.

Basic Theory

Let's start with the name, H-bridge. Sometimes called a "full bridge" the H-bridge is so named because it has four switching elements at the "corners" of the H and the motor forms the cross bar. The basic bridge is shown in the figure to the right.

Of course the letter H doesn't have the top and bottom joined together, but hopefully the picture is clear. This is also something of a theme of this tutorial where I will state something, and then tell you it isn't really true :-).

The key fact to note is that there are, in theory, four switching elements within the bridge. These four elements are often called, high side left, high side right, low side right, and low side left (when traversing in clockwise order).

The switches are turned on in pairs, either high left and lower right, or lower left and high right, but never both switches on the same "side" of the bridge. If both switches on one side of a bridge are turned on it creates a short circuit between the battery plus and battery minus terminals. This phenomena is called shoot through in the Switch-Mode Power Supply (SMPS) literature. If the bridge is sufficiently powerful it will absorb that load and your batteries will simply drain quickly. Usually however the switches in question melt.

To power the motor, you turn on two switches that are diagonally opposed. In the picture to the right, imagine that the high side left and low side right switches are turned on. The current flow is shown in green.

The current flows and the motor begins to turn in a "positive" direction. What happens if you turn on the high side right and low side left switches? You guessed it, current flows the other direction through the motor and the motor turns in the opposite direction.

Pretty simple stuff right? Actually it is just that simple, the tricky part comes in when you decide what to use for switches. Anything that can carry a current will work, from four SPST switches, one DPDT switch, relays, transistors, to enhancement mode power MOSFETs.

One more topic in the basic theory section, quadrants. If each switch can be controlled independently then you can do some interesting things with the bridge, some folks call such a bridge a "four quadrant device" (4QD get it?). If you built it out of a single DPDT relay, you can really only control forward or reverse. You can build a small truth table that tells you for each of the switch's states, what the bridge will do. As each switch has one of two states, and there are four switches, there are 16 possible states. However, since any state that turns both switches on one side on is "bad" (smoke issues forth),  there are in fact only four useful states (the four quadrants) where the transistors are turned on.

High Side
Left
High Side
Right
Lower
Left
Lower
Right
Quadrant Description

On Off Off On Motor goes Clockwise
Off On On Off Motor goes Counter-clockwise
On On Off Off Motor "brakes" and decelerates
Off Off On On Motor "brakes" and decelerates

The last two rows describe a maneuver where you "short circuit" the motor which causes the motors generator effect to work against itself. The turning motor generates a voltage which tries to force the motor to turn the opposite direction. This causes the motor to rapidly stop spinning and is called "braking" on a lot of H-bridge designs.

Of course there is also the state where all the transistors are turned off. In this case the motor coasts if it was spinning and does nothing if it was doing nothing.

Basic Practice

Building a BJT based  H-Bridge

Building a FET based H-Bridge


Return to the Tutorials Page

Return To Robotics Notebook