

The L293D is a dual H-bridge motor driver IC designed to control the direction and speed of DC motors and stepper motors. It is capable of driving two motors simultaneously, making it an essential component in robotics, automation, and motor control projects. The IC can handle bidirectional control of motors, allowing for forward and reverse motion, and supports PWM (Pulse Width Modulation) for speed control.








The L293D is a robust and versatile IC with the following key specifications:
| Parameter | Value |
|---|---|
| Operating Voltage | 4.5V to 36V |
| Output Current (per channel) | 600mA (continuous), 1.2A (peak) |
| Logic Input Voltage | 0V to 7V |
| Enable Input Voltage | High (2.3V to 7V), Low (0V to 1.5V) |
| Power Dissipation | 5W (maximum) |
| Number of Channels | 2 (dual H-bridge) |
| Motor Voltage Range | 4.5V to 36V |
| Operating Temperature | -25°C to +150°C |
The L293D comes in a 16-pin DIP (Dual Inline Package). Below is the pinout and description:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | Enable 1,2 | Enables H-bridge 1 (High = Enabled, Low = Disabled) |
| 2 | Input 1 | Logic input for H-bridge 1 (controls motor direction) |
| 3 | Output 1 | Output for H-bridge 1 (connect to motor terminal) |
| 4 | GND | Ground (common ground for logic and motor power) |
| 5 | GND | Ground (common ground for logic and motor power) |
| 6 | Output 2 | Output for H-bridge 1 (connect to motor terminal) |
| 7 | Input 2 | Logic input for H-bridge 1 (controls motor direction) |
| 8 | Vcc2 (Motor V+) | Motor supply voltage (4.5V to 36V) |
| 9 | Enable 3,4 | Enables H-bridge 2 (High = Enabled, Low = Disabled) |
| 10 | Input 3 | Logic input for H-bridge 2 (controls motor direction) |
| 11 | Output 3 | Output for H-bridge 2 (connect to motor terminal) |
| 12 | GND | Ground (common ground for logic and motor power) |
| 13 | GND | Ground (common ground for logic and motor power) |
| 14 | Output 4 | Output for H-bridge 2 (connect to motor terminal) |
| 15 | Input 4 | Logic input for H-bridge 2 (controls motor direction) |
| 16 | Vcc1 (Logic V+) | Logic supply voltage (4.5V to 7V) |
Power Connections:
Vcc1 (Pin 16) to the logic voltage (e.g., 5V for Arduino).Vcc2 (Pin 8) to the motor supply voltage (e.g., 9V or 12V, depending on the motor).GND pins (Pins 4, 5, 12, 13) to the ground of the power supply.Motor Connections:
Output 1 and Output 2 for Motor 1, Output 3 and Output 4 for Motor 2).Control Logic:
Input 1, Input 2, Input 3, Input 4) to control the direction of the motors.Enable pins (Enable 1,2 for Motor 1, Enable 3,4 for Motor 2).PWM for Speed Control:
Enable pins to control motor speed.Below is an example of how to control a single DC motor using the L293D and Arduino UNO:
Vcc1 to the Arduino's 5V pin.Vcc2 to an external 9V power supply.GND to the Arduino's GND pin.Input 1 to Arduino pin 9.Input 2 to Arduino pin 10.Enable 1,2 to Arduino pin 11.Output 1 and Output 2.// Define motor control pins
const int enablePin = 11; // Enable pin for Motor 1
const int input1Pin = 9; // Input 1 for Motor 1
const int input2Pin = 10; // Input 2 for Motor 1
void setup() {
// Set motor control pins as outputs
pinMode(enablePin, OUTPUT);
pinMode(input1Pin, OUTPUT);
pinMode(input2Pin, OUTPUT);
// Initialize motor to stop
digitalWrite(input1Pin, LOW);
digitalWrite(input2Pin, LOW);
analogWrite(enablePin, 0); // Set speed to 0
}
void loop() {
// Rotate motor forward at 50% speed
digitalWrite(input1Pin, HIGH);
digitalWrite(input2Pin, LOW);
analogWrite(enablePin, 128); // PWM value for 50% speed
delay(2000); // Run for 2 seconds
// Rotate motor backward at full speed
digitalWrite(input1Pin, LOW);
digitalWrite(input2Pin, HIGH);
analogWrite(enablePin, 255); // PWM value for 100% speed
delay(2000); // Run for 2 seconds
// Stop the motor
digitalWrite(input1Pin, LOW);
digitalWrite(input2Pin, LOW);
analogWrite(enablePin, 0); // Set speed to 0
delay(2000); // Wait for 2 seconds
}
Vcc2) matches the motor's rated voltage.Motor Not Running:
Enable pin is set to HIGH.Vcc1, Vcc2, and GND).Motor Running in the Wrong Direction:
Input 1 and LOW on Input 2).IC Overheating:
PWM Not Controlling Speed:
Enable pin.Q: Can the L293D drive stepper motors?
A: Yes, the L293D can drive stepper motors by controlling the sequence of inputs to the H-bridges.
Q: Can I use the L293D with a 3.3V microcontroller?
A: Yes, but ensure that the logic voltage (Vcc1) is compatible with the microcontroller's output levels.
Q: What is the difference between L293 and L293D?
A: The L293D includes internal flyback diodes for protection, while the L293 does not.
Q: Can I control more than two motors with one L293D?
A: No, the L293D can control only two motors. For more motors, use additional L293D ICs.