Using L293D IC for motors

What is L293D?

The L293D is a 16-pin Motor Driver IC which can control a set of two DC motors simultaneously in any direction. The L293D is designed to provide bidirectional drive currents of up to 600 mA (per channel) at voltages from 4.5 V to 36 V. It can be extremely hot. When they get overheated, they may not follow commands anymore.

It is cheap but may not have the easiest pinout to read for beginners.

DC motor

DC motor is very common to be found in toys. It usually comes with 2 wires, one red(+) and one black(-). dcmotor.png

Although it can be small and cheap, it can be very fast. Therefore sometimes it comes with a gearbox which will slow down the speed of the motor.

gearbox.png

Taking a 12V DC motor for example, we connect the red wire of the motor to the positive wire of the power supply and the black wire of the motor to the negative wire of the power supply as normal practice. We will get a motor running clockwise at full speed.

motorClockwise.png

BUT if we reverse the red and black wires of the motor we connect the black wire of the motor to the positive wire of the power supply and the red wire of the motor to the negative wire of the power supply. We will get a motor running anti-clockwise at full speed.

motorAntiClockwise.png

Wiring

Be careful with which pin on the IC to which pin on the Arduino as there are 16 pins you need to connect!