H-Bridge Wiring

How Brushed Motors Work

One of the most common types of motors is the brushed continuous rotation DC motor. These motors use the magnetic field created when electricity moves through a wire to push against a permanent magnet. Motors come in a range of sizes, from microscopically tiny to enormous, but we will be using a common type of low-voltage motor that is small, simple, and inexpensive:

Small DC Motor

These motors require a lot more power than our microcontroller can provide. Additionally, for use in a robot, we would probably want the motor to be able to turn both forward and backward, and turn at different speeds. A driver board can help us with all of these problems.

The H-Bridge Circuit

Our motor driver board has a circuit called an H-Bridge, because the circuit is composed of switches in the shape of an “H”:

H-Bridge Diagram

This driver has two H-Bridges on it. The inputs INT1 and INT2 control Motor A, and INT3 and INT4 control Motor B.

When we turn pin INT1 on and INT2 off, the circuit turns on switches S1 and S4, which causes current to flow forward through the motor and the motor turns forward. When INT1 is off and INT2 is on, the circuit turns on switches S2 and S3, the current flows backward through the motor, and the motor turns backward.

H-Bridge Current Flow

Image from Driving a motor with the L9110 tutorial

Wiring Connections

Our driver board has two H-Bridges on it, which is very useful for a robot with two wheels. However, we will only use one of them. Using Dupont wires, make these connections:

  • INT1 (or INT3) to P0 signal (yellow)
  • INT2 (or INT4) to P1 signal (yellow)
  • Gnd to P0 ground (-)
  • Vcc to P0 power (+)
Warning

Very Important! Connect the power pin Vcc last, and disconnect it first. Do not connect or disconnect the signal pins while power is applied. Violating these rules can destroy the driver.

It would be best to unplug both USB cables while connecting or disconnecting the H-Bridge.

Then, connect the red and black motor leads to the “Motor A” terminals. It does not matter which side the red and black go on; swapping them will make the motor turn in the other direction when you program it to go forward. You may have to use a breadboard to make the connections between male Dupont wires.

H-Bridge Connections

Tip
Before powering on, double-check every wire against the diagram above. Have your instructor verify your connections before plugging in USB cables.

How It Works

If you would like to know more about how the brushed motor works, this video explains all of the details.