The L293D H-Bridge 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, automation, and other motor control applications. The IC can drive two motors simultaneously, with each motor's direction and speed independently controlled. Additionally, the L293D includes built-in diodes for back EMF protection, ensuring the safety of the circuit and the IC itself.
Explore Projects Built with L293D H-Bridge
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 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 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 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.
This circuit features an Arduino UNO microcontroller interfaced with an L298N DC motor driver to control two hobbyist yellow geared motors, powered by a 12V battery. Additionally, an HC-05 Bluetooth module is connected to the Arduino for potential wireless communication. The Arduino's digital pins are configured to send control signals to the L298N driver, which in turn drives the motors, while the HC-05 module is powered by the Arduino and connected to its serial pins for communication.
Stepper motor control for CNC machines or 3D printers
Technical Specifications
The L293D is a robust and versatile motor driver IC. Below are its key technical details:
Parameter
Value
Supply Voltage (Vcc1)
4.5V to 7V
Motor Supply Voltage (Vcc2)
4.5V to 36V
Output Current (per channel)
600mA (peak: 1.2A)
Logic Input Voltage
0V to 7V
Operating Temperature
-40°C to +150°C
Built-in Protection
Back EMF diodes
Number of Channels
2 (dual H-bridge)
Pin Configuration and Descriptions
The L293D has 16 pins, each serving a specific purpose. Below is the pinout and description:
Pin Number
Pin Name
Description
1
Enable 1,2
Enables H-bridge 1 (controls motor 1). High = Enabled, Low = Disabled.
2
Input 1
Logic input for H-bridge 1. Controls motor 1 direction.
3
Output 1
Output for H-bridge 1. Connect to one terminal of motor 1.
4
GND
Ground connection.
5
GND
Ground connection.
6
Output 2
Output for H-bridge 1. Connect to the other terminal of motor 1.
7
Input 2
Logic input for H-bridge 1. Controls motor 1 direction.
8
Vcc2
Motor supply voltage (4.5V to 36V).
9
Enable 3,4
Enables H-bridge 2 (controls motor 2). High = Enabled, Low = Disabled.
10
Input 3
Logic input for H-bridge 2. Controls motor 2 direction.
11
Output 3
Output for H-bridge 2. Connect to one terminal of motor 2.
12
GND
Ground connection.
13
GND
Ground connection.
14
Output 4
Output for H-bridge 2. Connect to the other terminal of motor 2.
15
Input 4
Logic input for H-bridge 2. Controls motor 2 direction.
16
Vcc1
Logic supply voltage (4.5V to 7V).
Usage Instructions
How to Use the L293D in a Circuit
Power Connections:
Connect Vcc1 (pin 16) to a 5V supply for the IC's logic circuitry.
Connect Vcc2 (pin 8) to the motor's supply voltage (4.5V to 36V).
Connect all GND pins (4, 5, 12, 13) to the ground of the power supply.
Motor Connections:
Connect the motor terminals to the output pins (3 and 6 for motor 1, 11 and 14 for motor 2).
Control Logic:
Use the input pins (2, 7 for motor 1; 10, 15 for motor 2) to control the direction of the motors.
Enable the H-bridges by setting the enable pins (1 for motor 1, 9 for motor 2) to HIGH.
Direction Control:
Set the input pins HIGH or LOW to control the motor's direction:
Input1 = HIGH, Input2 = LOW → Motor rotates in one direction.
Input1 = LOW, Input2 = HIGH → Motor rotates in the opposite direction.
Speed Control:
Use a PWM signal on the enable pins (1 and 9) to control the motor speed.
Example: Connecting to an Arduino UNO
Below is an example of how to control a single DC motor using the L293D and an Arduino UNO:
// Define pins for motor control
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);
digitalWrite(input1, LOW);
digitalWrite(input2, LOW);
}
void loop() {
// Rotate motor in one direction
digitalWrite(enablePin, HIGH); // Enable motor
digitalWrite(input1, HIGH); // Set direction
digitalWrite(input2, LOW);
delay(2000); // Run for 2 seconds
// Stop motor
digitalWrite(enablePin, LOW); // Disable motor
delay(1000); // Wait for 1 second
// Rotate motor in the opposite direction
digitalWrite(enablePin, HIGH); // Enable motor
digitalWrite(input1, LOW); // Set direction
digitalWrite(input2, HIGH);
delay(2000); // Run for 2 seconds
// Stop motor
digitalWrite(enablePin, LOW); // Disable motor
delay(1000); // Wait for 1 second
}
Important Considerations
Ensure the motor's current and voltage ratings are within the L293D's limits.
Use proper heat dissipation methods if the IC gets too hot during operation.
Always connect all ground pins to ensure proper operation.
Troubleshooting and FAQs
Common Issues
Motor Not Spinning:
Check if the enable pin is set HIGH.
Verify the input pin logic levels.
Ensure the motor is properly connected to the output pins.
Motor Spins in the Wrong Direction:
Reverse the logic levels on the input pins (e.g., swap HIGH and LOW).
IC Overheating:
Ensure the motor's current does not exceed 600mA per channel.
Use a heat sink if necessary.
No Output Voltage:
Verify the power supply connections to Vcc1 and Vcc2.
Check for loose or incorrect wiring.
FAQs
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 HIGH voltage from the microcontroller is sufficient to meet the L293D's input voltage requirements.
Q: What is the maximum motor voltage the L293D can handle?
A: The L293D can handle motor supply voltages up to 36V on Vcc2.