

The L293D is a quadruple high-current half-H driver designed to control the direction and speed of DC motors and stepper motors. It is a versatile motor driver IC that can drive two motors simultaneously, making it ideal for robotics and automation projects. The L293D can handle up to 600 mA of continuous current per channel, with a peak current of 1.2 A. Additionally, it features built-in diodes for back EMF protection, ensuring safe operation when driving inductive loads like motors.








The L293D is a 16-pin IC. Below is the pin configuration:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | Enable 1,2 | Enables and disables the first motor (High = Enabled, Low = Disabled) |
| 2 | Input 1 | Logic input to control the direction of Motor 1 |
| 3 | Output 1 | Output connected to one terminal of Motor 1 |
| 4 | GND | Ground (common ground for logic and motor power supply) |
| 5 | GND | Ground (common ground for logic and motor power supply) |
| 6 | Output 2 | Output connected to the other terminal of Motor 1 |
| 7 | Input 2 | Logic input to control the direction of Motor 1 |
| 8 | Vcc2 (Motor) | Motor power supply (4.5 V to 36 V) |
| 9 | Enable 3,4 | Enables and disables the second motor (High = Enabled, Low = Disabled) |
| 10 | Input 3 | Logic input to control the direction of Motor 2 |
| 11 | Output 3 | Output connected to one terminal of Motor 2 |
| 12 | GND | Ground (common ground for logic and motor power supply) |
| 13 | GND | Ground (common ground for logic and motor power supply) |
| 14 | Output 4 | Output connected to the other terminal of Motor 2 |
| 15 | Input 4 | Logic input to control the direction of Motor 2 |
| 16 | Vcc1 (Logic) | Logic power supply (5 V) |
Vcc2 (Pin 8) and the logic power supply to Vcc1 (Pin 16). Ensure that the ground pins (Pins 4, 5, 12, and 13) are connected to the common ground.Output 1 and Output 2 for Motor 1, Output 3 and Output 4 for Motor 2).Input 1, Input 2, Input 3, and Input 4) to control the direction of the motors. A HIGH signal on one input and a LOW signal on the other will determine the motor's rotation direction.Enable 1,2 and Enable 3,4) HIGH to activate the corresponding motor channels.Below is an example of controlling a DC motor using the L293D and Arduino UNO:
// Define motor control pins
const int enablePin = 9; // Enable pin for Motor 1
const int input1 = 2; // Input 1 for Motor 1
const int input2 = 3; // Input 2 for Motor 1
void setup() {
// Set motor control pins as outputs
pinMode(enablePin, OUTPUT);
pinMode(input1, OUTPUT);
pinMode(input2, OUTPUT);
// Initialize motor in stopped state
digitalWrite(enablePin, LOW); // Disable motor
digitalWrite(input1, LOW); // Set Input 1 to LOW
digitalWrite(input2, LOW); // Set Input 2 to LOW
}
void loop() {
// Rotate motor clockwise
digitalWrite(enablePin, HIGH); // Enable motor
digitalWrite(input1, HIGH); // Set Input 1 to HIGH
digitalWrite(input2, LOW); // Set Input 2 to LOW
delay(2000); // Run motor for 2 seconds
// Stop motor
digitalWrite(enablePin, LOW); // Disable motor
delay(1000); // Wait for 1 second
// Rotate motor counterclockwise
digitalWrite(enablePin, HIGH); // Enable motor
digitalWrite(input1, LOW); // Set Input 1 to LOW
digitalWrite(input2, HIGH); // Set Input 2 to HIGH
delay(2000); // Run motor for 2 seconds
// Stop motor
digitalWrite(enablePin, LOW); // Disable motor
delay(1000); // Wait for 1 second
}
Motor Not Running:
Vcc1 and Vcc2.Motor Running in the Wrong Direction:
Overheating:
Noisy Operation:
Q: Can the L293D drive stepper motors?
A: Yes, the L293D can drive stepper motors by controlling the sequence of inputs to the motor coils.
Q: Can I use the L293D with a 3.3 V microcontroller?
A: The L293D requires a minimum logic voltage of 4.5 V. Use a level shifter or a 5 V microcontroller for compatibility.
Q: How many motors can the L293D control?
A: The L293D can control up to two DC motors or one stepper motor.
Q: Do I need external diodes for back EMF protection?
A: No, the L293D has built-in diodes for back EMF protection.