Microcontrollers like the Arduino and embedded computers like the Raspberry Pi are not designed to provide enough current to power a motor directly. Motors can often draw high currents that would damage these boards. Motor Drivers and Motor Controllers are typically used to interface the microcontroller to the motors.
A Motor Driver is a relatively simple chip or board that controls the speed and direction of one or more motors based on inputs from a microcontroller.
A Motor Controller is a more advanced board that includes its own microcontroller for controlling the speed and direction of one or more motors based on inputs from a microcontroller, allowing the microcontroller to focus on other tasks.
A widely used approach for powering small motors is to use a “Dual H-Bridge Motor Driver” in the form of an L293D integrated circuit. This chip can be used to control the speed and direction of two small motors that draw up to 600 mA each. Peak currents of 1.2A can be tolerated but only for very short periods of time.
Here’s an example of an Arduino robot using an L293D motor driver. The L293D chip can be seen on the breadboard. This robot uses these motors, which draw a maximum of 360 mA when stalled, and 40 mA when rotating freely.