L293 Dual DC motor / Stepper motor controller
L293D is a typical motor driver or motor driver IC when allows DC motor to drive on either direction. L293D is a 16-pin IC which can control a set of two motor simultaneously in any direction. That means we can control two DC motor with single L293D IC. L293D is a Dual H-bridge Motor Driver Integrated circuit.
Inside the chip
It works on the concept of H-bridge. H-bridge is a circuit which allows the voltage to be flown in either direction. As we know voltage need to change its direction for being able to rotate the motor in clockwise or anticlockwise direction, hence H-bridge IC are ideal for driving a DC motor. In a single L293D chip there two H-bridge circuit inside the IC write two DC motor independently. Given below is the pin diagram of a L293D motor controller.
Pinout
Interfacing with DC motor
L293D is a 16 pin IC. Two ENABLE pins, four INPUT pins, four OUTPUT pins, four GND pins, one VSS and one VS.1 & 9 pins are ENABLE pins. This pins for being able to drive the motor. 2,7,10 & 15pins are INPUT pins. This pins are connected to microcontroller for select the direction of motor. 2 & 7 pins for MOTOR 1. 10 & 15 pins for MOTOR 2. 3, 6, 11&14 pins are OUTPUT pins. This pins are connected to the MOTOR. 3 & 6 pins for MOTOR 1. 11&14 pins for MOTOR 2.
Logic Table
INPUT |
ENABLE/DISABLE | IN 1 / IN 2 | IN 3 / IN 4 | RESULT/ROTATE |
MOTOR 1 |
1 |
0 |
1 |
LEFT/RIGHT |
1 | 1 |
0 |
RIGHT/LEFT |
|
MOTOR 2 |
1 |
0 | 1 | LEFT/RIGHT |
1 |
1 | 0 |
RIGHT/LEFT |
Interfacing with Stepper motor
1. Bi polar stepper motor
Logic Table
Stepper Table |
A |
B |
A’ |
B’ |
STEP 1 |
1 |
1 |
0 |
0 |
STEP 2 |
0 |
1 |
1 |
0 |
STEP 3 |
0 |
0 |
1 |
1 |
STEP 4 |
1 |
0 |
0 |
1 |
2. Uni polar stepper motor
Logic Table
Stepper Table |
A |
B |
A’ |
B’ |
STEP 1 |
1 |
0 |
0 |
0 |
STEP 2 |
0 |
0 |
1 |
0 |
STEP 3 |
0 |
1 |
0 |
0 |
STEP 4 |
0 |
0 |
0 |
1 |
Voltage Specification
L293D need 5V VSS (16th pin) for its own internal operation. This voltage didn’t use for driving the motor. So we provide external 9V for driving the motor. That is VS (8th pin). The maximum voltage for VS is 36V and maximum current is 600mA. Since we can drive motor up to 36V, hence we can drive big motors using L293D.
Circuit