This article was written based on my book Robotics, Mechatronics and Artificial Intelligence (sold out) published in the United States.The described circuit can be used to control speed and torque of a DC motor or to drive other loads such as SMAs, Solenoids or heaters.
A current up to 3 A can be kept constant across a load using the circuit shown in Figure 1. The LM350T is a three-lead TO220 packaged IC consisting of a variable voltage regulator with output currents up to 3 A.
Using the configuration shown in the figure, the circuit operates as a current regulator, keeping the current constant across a load.

The potentiometer is used to adjust the current across the load, and the resistor limits its highest value. The IC must be mounted on a heat sink, and the input voltage typically must be in the range between 12 and 24 V. Other ICs in the same series as the LM150T and LM250T can be used in this block.