The L293D Motor Driver Module is a versatile integrated circuit designed to control DC motors and stepper motors. Manufactured by UG LAND INDIA, Electronic Spices, and GEOES INDIA, this module is widely used in robotics and automation projects. It allows for bidirectional control of up to two motors simultaneously, making it ideal for applications requiring precise motor control. The module also features built-in diodes for back EMF protection, ensuring safe and reliable operation.
Below are the key technical details of the L293D Motor Driver Module:
Parameter | Value |
---|---|
Operating Voltage | 4.5V to 36V |
Logic Voltage | 5V |
Maximum Output Current | 600mA per channel |
Peak Output Current | 1.2A per channel (non-continuous) |
Number of Channels | 2 (can drive 2 motors) |
Motor Type Supported | DC motors, stepper motors |
Built-in Protection | Back EMF diodes |
Operating Temperature | -40°C to +150°C |
The L293D Motor Driver Module has 16 pins. Below is the pin configuration:
Pin Number | Pin Name | Description |
---|---|---|
1 | Enable 1 (EN1) | Enables/Disables Motor 1 (High = Enabled, Low = Disabled) |
2 | Input 1 (IN1) | Input signal for Motor 1 (controls direction when combined with IN2) |
3 | Output 1 (OUT1) | Output to Motor 1 terminal |
4 | GND | Ground connection |
5 | GND | Ground connection |
6 | Output 2 (OUT2) | Output to Motor 1 terminal |
7 | Input 2 (IN2) | Input signal for Motor 1 (controls direction when combined with IN1) |
8 | Vcc2 (Motor V) | Motor power supply (4.5V to 36V) |
9 | Enable 2 (EN2) | Enables/Disables Motor 2 (High = Enabled, Low = Disabled) |
10 | Input 3 (IN3) | Input signal for Motor 2 (controls direction when combined with IN4) |
11 | Output 3 (OUT3) | Output to Motor 2 terminal |
12 | GND | Ground connection |
13 | GND | Ground connection |
14 | Output 4 (OUT4) | Output to Motor 2 terminal |
15 | Input 4 (IN4) | Input signal for Motor 2 (controls direction when combined with IN3) |
16 | Vcc1 (Logic V) | Logic power supply (typically 5V) |
Power Connections:
Motor Connections:
Control Signals:
Direction Control:
PWM Speed Control:
Below is an example of how to control a DC motor using the L293D Motor Driver Module and an Arduino UNO:
// Define motor control pins
const int EN1 = 9; // Enable pin for Motor 1
const int IN1 = 2; // Input 1 for Motor 1
const int IN2 = 3; // Input 2 for Motor 1
void setup() {
// Set motor control pins as outputs
pinMode(EN1, OUTPUT);
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
}
void loop() {
// Rotate motor forward
digitalWrite(IN1, HIGH); // Set IN1 HIGH
digitalWrite(IN2, LOW); // Set IN2 LOW
analogWrite(EN1, 128); // Set speed to 50% (PWM value: 128 out of 255)
delay(2000); // Run for 2 seconds
// Stop motor
digitalWrite(IN1, LOW); // Set IN1 LOW
digitalWrite(IN2, LOW); // Set IN2 LOW
delay(1000); // Wait for 1 second
// Rotate motor backward
digitalWrite(IN1, LOW); // Set IN1 LOW
digitalWrite(IN2, HIGH); // Set IN2 HIGH
analogWrite(EN1, 200); // Set speed to ~78% (PWM value: 200 out of 255)
delay(2000); // Run for 2 seconds
// Stop motor
digitalWrite(IN1, LOW); // Set IN1 LOW
digitalWrite(IN2, LOW); // Set IN2 LOW
delay(1000); // Wait for 1 second
}
Motor Not Spinning:
Motor Spins in the Wrong Direction:
Overheating:
No Response from the Module:
Can I control stepper motors with the L293D? Yes, the L293D can control stepper motors by driving the coils in sequence. Refer to the stepper motor's datasheet for the correct sequence.
What happens if I exceed the current limit? Exceeding the current limit may damage the IC. Use motors within the specified current range or add external current-limiting resistors.
Can I use the L293D with a 3.3V microcontroller? The L293D requires a 5V logic supply (Vcc1). Use a level shifter to interface with