Control a DC motor