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.
Explore Projects Built with L293D
Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
This circuit is designed to control a robot with four DC motors for movement, an ultrasonic sensor for distance measurement, and a servo motor to direct the sensor. The L293D driver shield interfaces with the motors, while the Arduino UNO microcontroller runs the embedded code to process sensor data and control motor speeds and directions. An LCD display is included for output, and power is supplied by a 4 x AAA battery mount.
This circuit is a motor control system that uses an L293D driver shield to control four hobby gearmotors, with each motor connected to an LED and a resistor for status indication. The system is powered by a 2x 18650 battery pack and includes an HC-05 Bluetooth module for wireless communication.
This circuit controls two DC motors using an L293D motor driver, with an Arduino UNO as the microcontroller. The Arduino reads inputs from three Hall sensors and controls the motors' direction based on the sensors' states, while also indicating the sensors' status through three LEDs. Each LED and Hall sensor is connected to the Arduino with a current-limiting resistor, and the motors' operation is dependent on the Hall sensors' signals.
This circuit uses an L293D motor driver to control two motors. The motor driver's enable and input pins are connected to pushbuttons, allowing manual control of the motor's direction and on/off state. A battery provides power to the system, with the L293D regulating the motor operation based on the pushbutton inputs.
Robotics: Controlling DC motors for wheels or arms
Automation: Driving stepper motors in CNC machines or 3D printers
DIY Projects: Motorized toys, conveyor belts, and small vehicles
Educational Projects: Learning motor control with microcontrollers like Arduino or Raspberry Pi
Technical Specifications
Key Technical Details
Operating Voltage: 4.5 V to 36 V
Output Current: 600 mA per channel (continuous), 1.2 A (peak)
Logic Input Voltage: 0 V to 7 V
Enable Input Voltage: High (2.3 V to 7 V), Low (0 V to 1.5 V)
Power Dissipation: 5 W (maximum)
Built-in Protection: Back EMF diodes for inductive loads
Temperature Range: 0°C to 70°C
Pin Configuration and Descriptions
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)
Usage Instructions
How to Use the L293D in a Circuit
Power Supply: Connect the motor power supply to 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.
Motor Connections: Connect the motor terminals to the output pins (Output 1 and Output 2 for Motor 1, Output 3 and Output 4 for Motor 2).
Control Inputs: Use the input pins (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 Pins: Set the enable pins (Enable 1,2 and Enable 3,4) HIGH to activate the corresponding motor channels.
Important Considerations and Best Practices
Heat Dissipation: The L293D can get hot during operation. Use a heat sink if driving motors at high currents for extended periods.
Back EMF Protection: The built-in diodes protect against back EMF, but ensure proper wiring to avoid damage.
Power Supply: Use separate power supplies for the logic and motor circuits if the motor's power requirements exceed the logic circuit's capacity.
Decoupling Capacitors: Add decoupling capacitors near the power supply pins to reduce noise and improve stability.
Example: Using L293D with Arduino UNO
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
}
Troubleshooting and FAQs
Common Issues and Solutions
Motor Not Running:
Ensure the enable pin is set HIGH.
Verify the power supply connections to Vcc1 and Vcc2.
Check the input pin logic levels.
Motor Running in the Wrong Direction:
Swap the HIGH and LOW signals on the input pins for the motor.
Overheating:
Reduce the motor load or add a heat sink to the L293D.
Ensure the motor's current does not exceed the IC's maximum ratings.
Noisy Operation:
Add decoupling capacitors near the power supply pins.
Check for loose connections in the circuit.
FAQs
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.