← All parts

L293D Motor Driver

L293D

Texas Instrumentsic motor driver

The L293D is a quadruple half-H driver that drives inductive loads such as relays, solenoids, and DC or bipolar stepper motors. It provides bidirectional currents up to 600 mA per channel at 4.5 to 36 V, with integrated flyback diodes.

In stock

Specifications

6
Operating Voltage
4.5 to 36 V
Output Current Continuous
600 mA
Output Current Peak
1.2 A
Logic Supply Voltage
4.5 to 7 V
Operating Temperature Range
0 to 70 °C
Package Types
PDIP-16

Pinout

16
PinNameFunctionsNotes
11,2EN
GPIO
Enable for driver channels 1 and 2 (active high)
21A
GPIO
Driver 1 input, noninverting
31Y
GPIO
Driver 1 output
4GROUND
GND
Device ground and heat sink pin
5GROUND
GND
Device ground and heat sink pin
62Y
GPIO
Driver 2 output
72A
GPIO
Driver 2 input, noninverting
8VCC2
POWER
Power supply for drivers, 4.5 V to 36 V
93,4EN
GPIO
Enable for driver channels 3 and 4 (active high)
103A
GPIO
Driver 3 input, noninverting
113Y
GPIO
Driver 3 output
12GROUND
GND
Device ground and heat sink pin
13GROUND
GND
Device ground and heat sink pin
144Y
GPIO
Driver 4 output
154A
GPIO
Driver 4 input, noninverting
16VCC1
POWER
5-V supply for internal logic

Interactive pinout

Highlight:
L293D

Click a pin to copy its name · tap a tag above to spotlight a bus.

Starter code

Community starter examples — minimal, unofficial, and provided to get you wiring fast. Verify against the manufacturer datasheet before relying on them.

Arduino (C++)

arduino
// L293D quad half-H bridge - drive one DC motor — community starter example
#if defined(ESP32)
  #define EN12 25
  #define A1   26
  #define A2   27
#else
  #define EN12 9   // Uno PWM pin -> 1,2EN
  #define A1   8   // -> 1A
  #define A2   7   // -> 2A
#endif

void setup() {
  pinMode(EN12, OUTPUT); pinMode(A1, OUTPUT); pinMode(A2, OUTPUT);
}

void loop() {
  digitalWrite(A1, HIGH); digitalWrite(A2, LOW);   // forward
  analogWrite(EN12, 200);                          // speed
  delay(2000);
  digitalWrite(A1, LOW);  digitalWrite(A2, HIGH);  // reverse
  delay(2000);
}

MicroPython

python
# L293D motor driver - one DC motor (ESP32) — community starter example
from machine import Pin, PWM
import time

en = PWM(Pin(25), freq=1000)   # 1,2EN
a1 = Pin(26, Pin.OUT)          # 1A
a2 = Pin(27, Pin.OUT)          # 2A

def drive(forward, duty):
    a1.value(1 if forward else 0)
    a2.value(0 if forward else 1)
    en.duty(duty)

while True:
    drive(True, 600);  time.sleep(2)
    drive(False, 600); time.sleep(2)

Wiring

PinArduino Uno R3ESP32 DevKitC (WROOM-32)Notes
VCC1+5V3V3Logic supply 4.5-7 V (pin 16)
VCC2--Motor supply up to 36 V (pin 8), separate from logic
GNDGNDGNDPins 4,5,12,13; common ground + heatsinking
1,2END9GPIO25PWM enable for channel 1/2
1AD8GPIO26
2AD7GPIO27
1Y/2Y--Outputs to the motor (pins 3 and 6)

Typical uses

  • Driving small DC motors or one stepper
  • Bidirectional control of 2 motors

Related parts

6