HBridge from Transistors: Motor Control over Speed and Direction

 

Note 1: Pins A and B could both be PWM pins for variable speed.
Note 2: Power source could be separate from Arduino 5V if grounds are tied together.

Reference: Robert's Farm