

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 widely used in robotics and automation projects due to its ability to drive two motors simultaneously. Each channel of the L293D can handle up to 600 mA of current, making it suitable for small to medium-sized motors. The IC also features built-in diodes for back-EMF protection, ensuring safe operation with inductive loads like motors.








Below are the key technical details of the L293D motor driver IC:
| Parameter | Value |
|---|---|
| Operating Voltage | 4.5V to 36V |
| Output Current (per channel) | 600 mA (peak: 1.2A) |
| Logic Input Voltage | 0V to 7V |
| Control Logic Levels | Low: 0V, High: 5V |
| Number of Channels | 2 (dual H-bridge) |
| Maximum Power Dissipation | 5W |
| Built-in Protection | Back-EMF diodes |
| Operating Temperature | -40°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 power supply (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 power supply (5V) |
Power Connections:
Vcc1 (Pin 16) to a 5V logic power supply.Vcc2 (Pin 8) to the motor power supply (4.5V to 36V, 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 and Enable 3,4) to HIGH.Direction Control:
Speed Control:
Enable pins to control motor speed.Below is an example Arduino code to control a DC motor using the L293D:
// Define motor control pins
const int enablePin = 9; // PWM pin for speed control
const int input1Pin = 7; // Direction control pin 1
const int input2Pin = 8; // Direction control pin 2
void setup() {
// Set motor control pins as outputs
pinMode(enablePin, OUTPUT);
pinMode(input1Pin, OUTPUT);
pinMode(input2Pin, OUTPUT);
}
void loop() {
// Rotate motor forward at 50% speed
analogWrite(enablePin, 128); // Set speed (0-255)
digitalWrite(input1Pin, HIGH); // Set direction
digitalWrite(input2Pin, LOW);
delay(2000); // Run for 2 seconds
// Rotate motor backward at full speed
analogWrite(enablePin, 255); // Set speed (0-255)
digitalWrite(input1Pin, LOW); // Set direction
digitalWrite(input2Pin, HIGH);
delay(2000); // Run for 2 seconds
// Stop the motor
analogWrite(enablePin, 0); // Set speed to 0
delay(2000); // Wait for 2 seconds
}
Motor Not Spinning:
Enable pin is set to HIGH.Motor Spins in the Wrong Direction:
IC Overheating:
No Response from the Motor:
Vcc1) is 5V.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: The L293D requires a minimum logic voltage of 4.5V. Use a level shifter or a 5V microcontroller for compatibility.
Q: How do I control motor speed with the L293D?
A: Use a PWM signal on the Enable pins to adjust the motor speed.
Q: What happens if I exceed the current rating?
A: Exceeding the current rating can damage the IC. Use motors within the specified current limits or add external current-limiting circuitry.