In Lab 1, we used buffer IC’s (7417, 7414) to isolate the signals to and from the Arduino. This protected the board, and provided power for external devices without drawing it from the Arduino. An H-bridge can be thought of in much the same way. It is the interface between an electrical signal and an electrical power source. Though they share the same medium, their functions are vastly different.
The H-bridge is a common circuit used to control the speed and direction of a DC motor with low current PWM signals. The H-bridge you will be using is the TA7291P (datasheet). It is a pair of half bridges that can source 1 Amp.




Before you continue to the software tasks, make sure that your DC motor is working by supplying 5V from the benchtop power supply. The Arduino will not be able to supply enough current. Plugging the DC motor into the 5V and GND will trigger a board shutdown in order to prevent further damage.
Control the direction and speed of the provided DC motor with a potentiometer. The motor should behave like the throttle of a boat. A potentiometer twisted all the way to the right should have the motor spinning fast in one direction. As the potentiometer is twisted left, the motor should slow down and then begin spinning the other direction.
Tie the direction and speed of the motor spinning to the direction and speed of the potentiometer rotation. The faster you spin the potentiometer, the faster the motor should spin.
The map function provided by the Arduino libraries provides an easy way to scale a number within a range. It is called by map (value, fromLow, from High, toLow, toHigh). fromLow and fromHigh are the initial range of value. toLow and toHigh are the new range of values. The function returns the scaled value.
Velocity can be approximated as a change in position over a change in time. You can keep track of time in the Arduino with the millis()function. millis() returns the millisecond value of the onboard clock. It takes about 5 days for this counter to run-over and restart.
Some H-bridges, such as the LMD18200, simply have inputs for
direction and speed (PWM). The most intuitive way of using them is to
provide two input signals for direction and PWM. (The LMD18200 is rated
for 55V, 3 Amps, and can be checked out from the department.)

Simple PWM consists of a single, variable duty-cycle signal in which both direction and amplitude information is encoded. A 50% duty-cycle PWM signal represents zero drive, since the net value of voltage (integrated over one period) delivered to the load is zero. A 25% duty-cycle PWM signal represents current flow from OUT2 to OUT1 whereas a 75% duty-cycle represents current flowing from OUT1 to OUT2. To use simple PWM for driving the DC motor, wire the PWM signal from the Arduino to the DIRECTION input (pin 3) while the PWM input (pin 5) is tied to logic high. If you used a pull-up resistor on the PWM input, you can control the direction and magnitude of a DC motor with only one output from the Arduino.

NorthWestern’s wiki for their mechatronics classes. They pages contain amazing amounts of information about DC motors, RC servos, and stepper motors. They also have links to past student projects which may serve to inspire.
Arduino’s own reference section. Everything and anything you’d want to know about the Arduino, you can find here.