Component guide · Beginner · 4 min read
L293D Motor Driver IC and Shield

Pinout, Wiring and Code
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
The L293D is a quad half-H driver that runs two small DC motors in both directions, or one small stepper, at up to 600 mA per channel. The IC suits breadboard robots; the L293D motor shield stacks two of them on an Uno to run four DC motors and two servos using the AFMotor library. Motor supply is 4.5 to 36 V.
Key specs at a glance
- Channels
- 4 half-H drivers = 2 full H-bridges per IC
- Current
- 600 mA continuous, 1.2 A peak per channel
- Motor supply (VCC2)
- 4.5 to 36 V
- Logic supply (VCC1)
- 4.5 to 7 V (use 5 V)
- Protection
- Built-in flyback diodes (the D in L293D)
- Shield
- 2 x L293D + 74HC595, 4 DC motors or 2 steppers, 2 servo headers
Models in this guide
These are alternatives. Pick the one that fits your project; you only need one.
Option 1L293D Motor Driver Shield for Arduino Uno / Mega₹189
Option 2L293D Quad Half-H Motor Driver IC (DIP-16)₹55
Option 3L293D Motor/Servo Driver Shield for Arduino₹116
What the L293D motor driver is
The L293D packs four half-H drivers into a 16-pin DIP chip. Pairs of drivers form two H-bridges, each controlled by two input pins (direction) and one enable pin (on/off or PWM speed). Unlike the L293 without D, it has flyback diodes built in, so you do not need external diodes for small motors.
The motor shield version adds a 74HC595 shift register so four motors use only a few Uno pins. It suits toy-sized BO and TT motors, not large geared motors that draw more than 600 mA.
L293D motor driver pinout
The pins on the L293D motor driver and what each one does.
| Pin | Function |
|---|---|
| 1 (EN1,2) | Enable for bridge 1 (PWM for speed) |
| 2, 7 (IN1, IN2) | Direction inputs, bridge 1 |
| 3, 6 (OUT1, OUT2) | Motor 1 terminals |
| 4, 5, 12, 13 | GND and heatsink (all four must be grounded) |
| 8 (VCC2) | Motor supply 4.5 to 36 V |
| 9 (EN3,4) | Enable for bridge 2 |
| 10, 15 (IN3, IN4) | Direction inputs, bridge 2 |
| 11, 14 (OUT3, OUT4) | Motor 2 terminals |
| 16 (VCC1) | 5 V logic supply |
- 1 (EN1,2)
- Enable for bridge 1 (PWM for speed)
- 2, 7 (IN1, IN2)
- Direction inputs, bridge 1
- 3, 6 (OUT1, OUT2)
- Motor 1 terminals
- 4, 5, 12, 13
- GND and heatsink (all four must be grounded)
- 8 (VCC2)
- Motor supply 4.5 to 36 V
- 9 (EN3,4)
- Enable for bridge 2
- 10, 15 (IN3, IN4)
- Direction inputs, bridge 2
- 11, 14 (OUT3, OUT4)
- Motor 2 terminals
- 16 (VCC1)
- 5 V logic supply
Wiring the L293D motor driver
This table is for the bare IC with one motor. The shield needs no wiring: plug it onto an Uno, connect motors to M1 to M4 and the motor supply to the EXT_PWR terminal, and remove the PWR jumper if that supply is above 12 V.
| L293D motor driver pin | Arduino Uno | ESP32 |
|---|---|---|
| EN1,2 (pin 1) | D9 (PWM) | GPIO 25 |
| IN1 (pin 2) | D8 | GPIO 26 |
| IN2 (pin 7) | D7 | GPIO 27 |
| VCC1 (pin 16) | 5V | 5V (VIN) |
| VCC2 (pin 8) | Motor battery + | Motor battery + |
| GND (4, 5, 12, 13) | GND | GND |
- EN1,2 (pin 1)
- Arduino Uno:
- D9 (PWM)
- ESP32:
- GPIO 25
- IN1 (pin 2)
- Arduino Uno:
- D8
- ESP32:
- GPIO 26
- IN2 (pin 7)
- Arduino Uno:
- D7
- ESP32:
- GPIO 27
- VCC1 (pin 16)
- Arduino Uno:
- 5V
- ESP32:
- 5V (VIN)
- VCC2 (pin 8)
- Arduino Uno:
- Motor battery +
- ESP32:
- Motor battery +
- GND (4, 5, 12, 13)
- Arduino Uno:
- GND
- ESP32:
- GND
Example code
Install the Adafruit Motor Shield library (V1, AFMotor) from the Library Manager. For the bare IC, the L298N sketch works unchanged with the same pin roles.
#include <AFMotor.h> // Adafruit Motor Shield V1 library
AF_DCMotor m1(1), m2(2), m3(3), m4(4);
void setup() {
for (AF_DCMotor* m : {&m1, &m2, &m3, &m4}) m->setSpeed(200); // 0-255
}
void loop() {
for (AF_DCMotor* m : {&m1, &m2, &m3, &m4}) m->run(FORWARD);
delay(2000);
for (AF_DCMotor* m : {&m1, &m2, &m3, &m4}) m->run(RELEASE);
delay(1000);
}Setup and tuning
run motors from their own battery and keep the logic on 5 V; motor noise can reset the Uno otherwise.
use pins 9 and 10 and take power from the Uno's 5 V, so only small SG90 servos are safe there.
D3, D4, D5, D6, D7, D8, D11 and D12 are taken; A0 to A5 stay free for sensors.
the IC uses its ground pins as a heatsink. Solder it to a board with copper around those pins if you push near 600 mA.
What you need
Shop this list5 of 6 found in our store · ₹4,47,402
L293D motor driver shield for Uno and Mega: four motors and two servos, no wiringL293D Motor Driver Shield for Arduino Uno / Mega₹189Closest match, check the specs
L293D quad half-H driver IC (DIP-16): for breadboard buildsL293D Quad Half-H Motor Driver IC (DIP-16)₹55
L293D motor/servo driver shield: the other shield versionL293D Motor/Servo Driver Shield for Arduino₹116- Uno R3 development board: the controller used in the wiring tableFind this part
TT gear motor (yellow) 3-6 V: the motor size the L293D suitsTT Gear Motor (Yellow) 3–6V₹86
18650 battery holder: for a battery-powered buildBattery Holder₹45
Alternatives and when to choose them
Try it: Pwm duty cycle calculator
Change the values and the diagram and results update as you type.
Common mistakes to avoid
- Driving motors above 600 mA, which makes the chip shut down or fail.
- Powering four motors and servos from the Uno's USB port.
- Forgetting to connect all four GND pins of the IC.
- Using pins the shield already occupies for sensors.
Frequently asked questions
What is the difference between L293 and L293D?
The L293D has internal flyback diodes and is rated 600 mA; the L293 has no diodes but is rated 1 A. For hobby motors the L293D is simpler.
Can the L293D shield work with an ESP32?
No, it is shaped for the Uno and Mega and uses their pin layout. With an ESP32 use the bare IC or a TB6612FNG module.
How many motors can the shield run?
Four DC motors, or two stepper motors, plus two hobby servos on the servo headers.
Which library does the shield use?
The Adafruit Motor Shield V1 library, called AFMotor. The V2 library is for a different shield.
Why does my Uno reset when motors start?
The motors pull the supply down. Use a separate motor battery on EXT_PWR, remove the PWR jumper, and keep wires short.
Can I control speed?
Yes: PWM on the enable pin of the IC, or setSpeed(0-255) on the shield.
Parts for this guide
Calculators
Terms in this guide
Projects that use it
Put this into practice: 4 step-by-step builds in our project library use parts from this guide.
Keep learning
Sources
- L293x quadruple half-H drivers datasheet (Texas Instruments)
- Adafruit Motor Shield V1 library documentation
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.


