Motor drivers  are dedicated hardware chips to help controlling (DC) motors and also stepper motors. They can handle the power requirements for controlling  a motor which cannot be handled by micro-controllers.

By using motor drivers you can control turning direction and speed (and sometimes torque). Direction is changed by reversing the motor current through a structure called an H-bridge. Speed is controlled by changing the average value of the power through the motor through PWM (Pulse Width Modulation).

Motor drivers can be bought ready made on a PCB, but can also be soldered on a matrix board or used on a breadboard if you buy the required components. Most commonly used motor driver chips are the L293 and L298 chips. Both feature 4 outputs that can be combined to 2 H-bridges in a single chip.

A digital output of the micro controller can be used to set the direction line of the motor driver, and let the motor rotate clockwise or counter clockwise. The PWM outputs of a micro controller can be used to control the motor speed.

Some practicalities

To protect the outputs of the motor driver from the reverse current of a motor, so called freewheel or fly-back diodes must be added. Sometimes these diodes are already included in the motor driver IC (e.g. in the L293D). This can be an advantage, but it also means extra power dissipation: the chip will get warmer. Therefore, motor drivers without diodes in the chip can handle higher output currents (e.g. L293D can handle 600mA, the L293 without diodes 1A). The datasheet of the motor driver specifies which version you have.

Note: Apart from the GND terminal the L298 motor driver has two power supply terminals. One of these terminals indicated as Vss is used for powering the logic circuit (typically 5V). The other one, labeled Vs is the power supply that is used to drive the motors. This voltage may be different from the logic supply voltage depending on requirements of the attached motors. In contrast the L293 uses the motor power supply to power the logic circuit. The GND (‘-‘) connection of both power supplies should be connected to the GND terminal of the micro-controller.

Most important specifications

  • Maximum power supply voltage (for the motors) (V)
  • Maximum logic supply voltage (V)
  • Maximum output current per channel (mA or A)
  • Maximum total power dissipation (W)