A motor driver is a breakout board that consists of a motor driver integrated circuit (IC). A motor driver is basically the same as a current amplifier, and its main purpose is to take a low-current signal and convert to a high-current signal in order to run the motors. TheĀ L298N motor driver is shown in the following photo:
The main reason why we need a motor driver is that components such as motors cannot be connected directly to the Raspberry Pi as they do not get sufficient current from the Raspberry Pi, as shown in the following diagram:
This is why we connect the motor to the motor driver first and supply power to the motors with a battery, as shown in the following diagram: