L293D Motor Driver Module Arduino Tutorial - DC motor control (2024)

L293D Motor Driver

L293D is a 16 pin motor driver IC consist of quadruple half H drivers. It can simultaneously control the direction and speed of two DC motors. L293d is a suitable device to use for stepper motors, gear motors etc.

The IC has an operating voltage range from 4.5 V to 36 V. The L293 and L293D models can drive current up to 1A and 600mA respectively.

L293d pin diagram

L293D pinout 16 Pin PDIP Package

L293D Motor Driver Module Arduino Tutorial - DC motor control (1)

IC L293D pin functions

Pin 1: Enable 1,2 – This is an active high input. When the pin is high it enables the driver channels 1 and 2.

Input High state – Enabled.

Input Low state – Disabled.

Pin 2: Input 1 – Digital input to control the output 1. The state of all outputs OUT1, OUT2, OUT3, OUT4 will be same as the input state applied at the corresponding inputs.

Output = Input.

High input – High output.

Low input – Low output.

Pin 3: Output 1 – Connected to one of the terminals of the motor 1; motor 1 – connected across the output 1 and 2.

Pin 4: GND – Heatsink and Ground Connection. The GND connection itself used as the heat sink to disperse the heat.

Pin 5: GND – Heatsink and Ground Connection.

Pin 6: Output 2 – Connected to the remaining terminal of the motor 1. Motor terminals should be connected with respect to the inputs assigned.

Pin 7: Input 2 – Digital input to control the output 2.

Pin 8: Vcc2 – Supply to the motors, 4.5V to 36V. The supply must be connected to a source capable enough to drive the current requirement of the load.

Pin 9: Enable3,4 – It is also an active high input. It is to enable and disable the driver channels 3 and 4.

Pin 10: Input 3 – Digital input to control the output 3.

Pin 11: Output 3 – Connected to one of the terminals of the motor 2; motor 2 – connected across the output 3 and 4.

Pin 12: GND – Heatsink and Ground Connection.

Pin 13: GND – Heatsink and Ground Connection.The Ground terminals should be soldered to a metallic area in the PCB which is enough to transfer the heat generated.

Pin 14: Output 4 – Connected to the remaining terminal of the motor 1.

Pin 15: Input 4 – Input to control the output 4. All the inputs are permitted only up to a maximum of 7V.

Pin 16: Vcc1 – 5V supply for the functioning of the IC.

L293D working

The IC L293D works with an H bridge arrangement, which can alternate the polarity across a load or change the direction of the current.

Refer: DC motor direction control

L293D Motor Driver Module Arduino Tutorial - DC motor control (2) L293D Motor Driver Module Arduino Tutorial - DC motor control (3)

L293D Motor Driver Module Arduino Tutorial - DC motor control (4) L293D Motor Driver Module Arduino Tutorial - DC motor control (5)

H bridge Truth table

S1S2S3S4Motor Direction
0000Freerunning
1001Clockwise
0110Anticlockwise
1100Brake
0011Brake

The s1 and s3, s2 and s4 are not permitted to close at a time as it will short circuit the supply.

Simply, what a motor driver does is it act as a current amplifier which gives high current outputs to drive the motor from a low current control signal. Driver IC or a driver circuit is a similar H bridge arrangement instead of switches replaced with transistors, MOSFETs, etc. Hence low current input signals can switch these devices and operate in the same way as an H bridge circuit works.

L293D Function Table

INPUTOUTPUTMotor Direction
IN1/IN3IN2/IN4OUT1/OUT3OUT2/OUT4
0000Brake
1010Clockwise
0101Anti-clockwise
1111Brake

L293D motor driver Arduino interfacing

L293D Motor Driver Module Arduino Tutorial - DC motor control (6)

Driver IC L293D is available as module and Arduino shield. L293D Motor Driver modules usually come with an inbuilt Lm317 voltage regulator circuit or similar voltage regulating circuit, along with connectors.

There is no difference in program or connection vice while using the L293D IC directly or through a module.

Connect the 4 inputs and 2 enable pins to the respective digital output pins of the arduinoas declared in the code.

Driver module

L293D Motor Driver Module Arduino Tutorial - DC motor control (7)

L293d motor driver module connection with Arduino Uno

L293D Motor Driver Module Arduino Tutorial - DC motor control (8)

The below arduino code just show you how the motor direction changes with the change in respective input states. As given in the code, for five seconds the motor runs in the clockwise direction, then in the counterclockwise direction and then stops; this repeats again.

L293d motor driver Arduino code

const int IN1 = 6, IN2 = 5, IN3 = 11, IN4 = 10;const int enable12 = 3 , enable34 = 9;void setup(){ pinMode(IN1, OUTPUT); pinMode(IN2, OUTPUT); pinMode(IN3, OUTPUT); pinMode(IN4, OUTPUT); pinMode(enable12, OUTPUT); pinMode(enable34, OUTPUT); digitalWrite(enable12, HIGH); digitalWrite(enable34, HIGH);}void loop(){ clockwise(); delay(5000); anticlockwise(); delay(5000); brake(); delay(5000);}// Input state to rotate 2 motors CWvoid clockwise(){ digitalWrite(IN1, HIGH); digitalWrite(IN2, LOW); digitalWrite(IN3, HIGH); digitalWrite(IN4, LOW);}// Input state to rotate 2 motors CCWvoid anticlockwise(){ digitalWrite(IN1, LOW); digitalWrite(IN2, HIGH); digitalWrite(IN3, LOW); digitalWrite(IN4, HIGH);}//Motor Brakevoid brake(){ digitalWrite(IN1, LOW); digitalWrite(IN2, LOW); digitalWrite(IN3, LOW); digitalWrite(IN4, LOW);}
L293D Motor Driver Module Arduino Tutorial - DC motor control (2024)
Top Articles
Farosh's Horn Botw
The interview: Kamala Harris' inaugural sit-down was most notable for seeming ... ordinary
The Tribes and Castes of the Central Provinces of India, Volume 3
Lowe's Garden Fence Roll
Using GPT for translation: How to get the best outcomes
Weeminuche Smoke Signal
Canary im Test: Ein All-in-One Überwachungssystem? - HouseControllers
15 Types of Pancake Recipes from Across the Globe | EUROSPAR NI
Autozone Locations Near Me
Notisabelrenu
Transfer Credits Uncc
Rhinotimes
Mills and Main Street Tour
National Weather Service Denver Co Forecast
Vanessa West Tripod Jeffrey Dahmer
Powerball winning numbers for Saturday, Sept. 14. Check tickets for $152 million drawing
Khiara Keating: Manchester City and England goalkeeper convinced WSL silverware is on the horizon
Spider-Man: Across The Spider-Verse Showtimes Near Marcus Bay Park Cinema
Drift Boss 911
north jersey garage & moving sales - craigslist
Sussyclassroom
Www.paystubportal.com/7-11 Login
Boise Craigslist Cars And Trucks - By Owner
Victory for Belron® company Carglass® Germany and ATU as European Court of Justice defends a fair and level playing field in the automotive aftermarket
Ticket To Paradise Showtimes Near Cinemark Mall Del Norte
Our 10 Best Selfcleaningcatlitterbox in the US - September 2024
Dairy Queen Lobby Hours
Bad Business Private Server Commands
La Qua Brothers Funeral Home
Tmj4 Weather Milwaukee
1400 Kg To Lb
Hisense Ht5021Kp Manual
Radical Red Doc
Streameast.xy2
888-333-4026
Frommer's Philadelphia & the Amish Country (2007) (Frommer's Complete) - PDF Free Download
Wrigley Rooftops Promo Code
Mississippi weather man flees studio during tornado - video
Courtney Roberson Rob Dyrdek
Academic Calendar / Academics / Home
Wordle Feb 27 Mashable
2Nd Corinthians 5 Nlt
Craigslist/Nashville
Brother Bear Tattoo Ideas
Okta Login Nordstrom
Great Clips Virginia Center Commons
Craigslist Cars And Trucks For Sale By Owner Indianapolis
Ics 400 Test Answers 2022
2121 Gateway Point
Ocean County Mugshots
Generator für Fantasie-Ortsnamen: Finden Sie den perfekten Namen
Kindlerso
Latest Posts
Article information

Author: The Hon. Margery Christiansen

Last Updated:

Views: 6442

Rating: 5 / 5 (70 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: The Hon. Margery Christiansen

Birthday: 2000-07-07

Address: 5050 Breitenberg Knoll, New Robert, MI 45409

Phone: +2556892639372

Job: Investor Mining Engineer

Hobby: Sketching, Cosplaying, Glassblowing, Genealogy, Crocheting, Archery, Skateboarding

Introduction: My name is The Hon. Margery Christiansen, I am a bright, adorable, precious, inexpensive, gorgeous, comfortable, happy person who loves writing and wants to share my knowledge and understanding with you.