An H Bridge is a device designed to control motors. A single H bridge can be used to run a DC motor forwards and backwards. Simple DC motors have two connectors. If you hook them up to a battery with one connector positive and the other negative they will go in one direction. If you reverse the leads they will go in the other.

An H Bridge is called an H Bridge because the wiring diagram is shaped like an H.

Many H Bridge Sheilds have 2 bridges on them. We are going to discuss only one right now.

The H Bridge can have many connections to control it, but only a few require any understanding.

Normal Scheme boards

The following works for most boards with what I consider a Normal Scheme. I sometimes call it a Positive Negative scheme in my head.

Control 1 (AIN1) and Control 2(AIN2) together control the direction and if the bridge is on or off. Usually when one of these is high and the other low the bridge is on, and when you reverse which one is high, the bridge runs in the other direction. When both are high or when both are low the H Bridge is off and sends no current.

The motor, or other device, is hooked up to the outputs. There are two outputs for each motor. On the dual h bridge boards I use these are both labeled Motor A for the first or 'A' H Bridge. The big motor shields that I use label the motors M1-M4

To run the motors, you need more current than an Arduino board can supply so there is a set of input pins, Vmotor. On some boards this is different than the supply for the board logic, and on some boards it can be the same. This is an easy place to screw up. Be careful, ask.

Some boards have a disable pin. Sometimes this has to be set High for the board to work. Sometimes low. Usually you can and should run this through a large resistor such as 10K Ohms.

PWM

On some boards you set one pin low and then send PWM to the other pin and this works fine to control speed. Other boards have a PWM pin. On these boards the board will only run when this is set high. On these boards you send PWM to this pin. This will control the speed in both directions.

Forward Reverse Scheme boards

These boards are similar but if you use both it is very easy to get confused. On these boards one pin controls on and off and the other pin controls direction.