DC motor control with H-bridge