Phipps Electronics

Order within the next 

FREE SHIPPING OVER $199

50,000+ ORDERS

WORLDWIDE SHIPPING

SSL SECURED

Skip to main content
← Back
You are here:
Print

L293D Motor Driver Mini Module User’s Guide


1. Overview

  • Driver IC: L293D (dual H‑bridge motor driver).
  • Motors Supported: 2 DC motors (independent) or 1 stepper motor.
  • Voltage Range: 4.5 V – 36 V motor supply.
  • Current Capacity: ~600 mA continuous per channel, up to 1.2 A peak.
  • Logic Voltage: 5 V (compatible with Arduino, ESP8266, ESP32).
  • Protection: Built‑in diodes for back‑EMF protection.

2. Pinout (Typical Mini Module)

Pin Function Description
VCC Logic supply (5 V)
VIN Motor supply (up to 36 V)
GND Ground
IN1, IN2 Control inputs for Motor A
OUT1, OUT2 Motor A terminals
IN3, IN4 Control inputs for Motor B
OUT3, OUT4 Motor B terminals
EN1 Enable Motor A (active HIGH)
EN2 Enable Motor B (active HIGH)

Some mini modules tie EN1/EN2 HIGH by default with jumpers, so motors are always enabled unless you cut/disable the jumper.


3. How It Works

  • Each motor channel is an H‑bridge: it can drive a motor forward, reverse, brake, or stop.
  • Inputs (IN1–IN4): Set HIGH/LOW to control direction.
  • Enable pins (EN1/EN2): Allow PWM speed control when connected to Arduino PWM pins.
  • Outputs (OUT1–OUT4): Connect directly to motor terminals.

4. Wiring Example (Arduino UNO, 2 DC Motors)

L293D Pin → Arduino Pin
IN1 → D2
IN2 → D3
IN3 → D4
IN4 → D5
EN1 → D9 (PWM)
EN2 → D10 (PWM)
VCC1 → 5V
VIN → External motor supply (e.g., 9V battery)
GND → GND

5. Arduino Code Example

int IN1 = 2;
int IN2 = 3;
int EN1 = 9;

void setup() {
  pinMode(IN1, OUTPUT);
  pinMode(IN2, OUTPUT);
  pinMode(EN1, OUTPUT);
}

void loop() {
  // Motor A forward
  digitalWrite(IN1, HIGH);
  digitalWrite(IN2, LOW);
  analogWrite(EN1, 200); // speed (0–255)
  delay(2000);

  // Motor A reverse
  digitalWrite(IN1, LOW);
  digitalWrite(IN2, HIGH);
  analogWrite(EN1, 200);
  delay(2000);

  // Stop
  digitalWrite(IN1, LOW);
  digitalWrite(IN2, LOW);
  delay(1000);
}

6. Applications

  • Robotics: drive two wheels independently.
  • DIY controllers: motorized sliders or toys.
  • Educational kits: demonstrate H‑bridge motor control.
  • Stepper motor projects: drive one bipolar stepper using both channels.

7. Best Practices

  • Always use a separate motor supply (VIN) — don’t power motors from Arduino 5 V.
  • Add a capacitor across motor supply to reduce noise.
  • Use PWM on EN pins for smooth speed control.
  • Keep wiring short to minimize voltage drop.

 

Was this article helpful?
Please Share Your Feedback
How Can We Improve This Article?
Table of Contents
Scroll to Top