Sei sulla pagina 1di 11

After long research and trial and error, I have came up to a new walkthrough

regarding this nice chip, the L293D.

Each project is one project and each one has its own unique power
configurations, so you must be aware of the best battery choice and how to
distribute voltage through your robot.
I strongly advice you to read the following articles:
Picking Batteries for your Robot (
Once you've decided on batteries, how do you regulate the voltage
L293D gives you the possibility to control two motors in both directions -
About This Instructable
313 favorites
let's make
share what you make >
Explore (/tag/type-id/) Create (/about/submit.jsp) Contests (/contest/) Community (/community/) Login (/account/login) | Sign Up (/account/gopro?sourcea=header)

Remove these ads by Signing Up (/account/gopro?
Step 1: Basic implementation
Designer & digital artist
More by guibot
l293d (/tag/type-id/category-technology/keyword-
breadboard (/tag/type-id/category-
circuit (/tag/type-id/category-technology/keyword-
ic (/tag/type-id/category-technology/keyword-ic/)
arduino (/tag/type-id/category-technology/keyword-
motor (/tag/type-id/category-technology/keyword-
dc motor (/tag/type-id/category-technology/keyword-
dc motor/)
microcontroller (/tag/type-id/category-
robot (/tag/type-id/category-technology/keyword-
GOduino II = Arduino +
L293D Variable Speed
Motor Controller
GOduino - The Arduino
Uno + Motor Driver clone
GOduino III - the
Arduino-based robot
controller (/id/GOduino-III-
Arduino and L293D Robot
( Part 1 ) (/id/Arduino-and-
by AgentWolf
This is the most basic implementation of the chip.
As you can see, a 5V Voltage Regulator is between the battery and pins 1, 9,
Pin 8 gets power before the VReg, if your motor needs for example 6V you
should put 6V directly in this pin, all the other pins should not get more than 5V.
This will work with no problem at all, but if you want to do the right
implementation take a look at the next example:
Step 2: Advanced implementation
See More (/tag/type-id/?q=)
Ship controled by
bluetooth. (/id/Ship-
Control your motors with L293D and Arduino by guibot (/member/guibot/)
Collection I Made it!
Download (/id/Control-your-motors-with-L293D-and-Arduino/?download=pdf)
(/id/Control-your-motors-with-L293D-and-Arduino/?ALLSTEPS) 3 Steps (/id/Control-your-motors-with-L293D-and-Arduino/step3/Arduino-code/)
Favorite Share
Next (/id/Control-your-motors-with-L293D-and-Arduino/step3/Arduino-code/)
View All Steps (/id/Control-your-motors-with-L293D-and-Arduino/?ALLSTEPS)
We have a be nice comment policy.
Please be positive and constructive.
I Made it! Add Images Make Comment
This is the correct Implementation (with the capacitors), and note that pin 8 is
feeded by unregulated voltage. This means that if your motors need more than
5V, you should power this pin with that amount of voltage, and the rest of the
circuit with 5V.
of 70
Next (
1 month ago
7 months ago
7 months ago
6 months ago
2 months ago
Reply (CR450IWHZMJ2C6X)
2 months ago
1 year ago
Reply (CSH2XM4HN4ZV7F6)
DanM5 (/member/DanM5/)
Thanks for the post. I made this circuit and it worked well. The photo was taken
before I found the error on only hooking the unregulated power to one pin.
skadd4life (/member/skadd4life/)
I want to use a 5v motor, and use a 5v DC powersource (not battery, wall plug).
Do I still need to regulate my voltage? Can my 5V source be used for Vs pin of the
L293D and microcontroller Vcc? Or, do I somehow need to isolate the 5v between
those inputs? Thanks!
skadd4life (/member/skadd4life/) skadd4life
BTW, I plan to use ATtiny to
provide PWM to L293D.
ccarpio2 (/member/ccarpio2/) skadd4life
How did I go with the Attiny? I want
to try as well
JamesT2 (/member/JamesT2/) ccarpio2
You can see how to use an ATtiny
on my blog. It shows how to
program it and everything.
JamesT2 (/member/JamesT2/)
I like it! You are very detailed and specific. There is also an Adafruit Shield that
uses 2 of those chips and is very good. They're cheap as well, like 5 or 6 bucks. I
have a tutorial on how to use them
supershwa (/member/supershwa/)
Good instructable - to clarify, the [battery] in this example powers the motors
separate from the Arduino power source: the Arduino controlling this circuit has a
separate power source (an additional 7-12v source plugged into the Arduino.) You
should be able to use a 9v battery for the motors, and a separate 9v for the
Arduino (the motors can run faster this way.)
supershwa (/member/supershwa/) supershwa
1 year ago
2 months ago
1 year ago
Reply (CY02I6JHNID3J7V)
3 months ago
6 months ago
10 months ago
10 months ago
10 months ago
By the way - L293D chips aren't at RadioShack...I waited 3 weeks to get
them from China.
ktrantham (/member/ktrantham/) supershwa
Wow that sucks a month. You know
you can get free samples from
Texas Instruments right??The
Company who makes them!
oddWires (/member/oddWires/) supershwa
oddWires has lots of L293Ds at the link
below in the San Francisco bay area
shipping world-wide. Also look for
special offer of 10% discount in
November for instructables members.
Use SAVE10 as coupon code.
Disclaimer: I work for oddWires.
Kante Tech (/member/Kante+Tech/)
Do you have a pcb layout to show how you would etch this or a schematic
because im confused with the wiring for the gnd pins
magiccircuit (/member/magiccircuit/)
Hi thanks for this article, it's very help full for me. Here is my video where i used
L293d driver ic, arduino and mpu6050
pradipta03 (/member/pradipta03/)
Thanks for the great cheap solution. I was trying this using PWM. and for lower
duty cycle it doesn't response very well. Say for example if i use analogWrite(40) it
doesn't response but if I go around 128 or above it responses. What do you think
about that?Any one had an issue with it?
guibot (/member/guibot/) (author) pradipta03
That is very normal to
happen, normally DC motors
have a minimum required
voltage to operate.
pradipta03 (/member/pradipta03/) guibot
Aha. Thank you.
mgarg5 (/member/mgarg5/)
1 year ago
1 year ago
1 year ago
Reply (CER843DHKF75GHC)
1 year ago
1 year ago
2 years ago
Reply (CA481QXH267L2XQ)
1 year ago
Reply (C14E7L7HBFFJ2Z1)
1 year ago
5 years ago
Sir just 2 questions, Can i use this setup for a robotic arm. I have 2 L293D chips i
need to inetrface. Is it posible? If yes then how? & also can i use Dc motors with
just power and ground for this setup instead of a motor with a feedback?
EduanSnyman (/member/EduanSnyman/)
Hi! This is a brilliant tutorial :D I do just want to ask something (I apologise if its a
noob question); but the DC motor (For Linear actuator) that I will be using has its
own battery unit and will draw a maximum of 3A and will be operated at 12V. Is
this current too much for this setup? If it is, what should I do? Has it got to do with
what the L293D can handle? Thank you! :D
EduanSnyman (/member/EduanSnyman/) EduanSnyman
Also, I am using an Arduino Uno to
control everything; the 3A isnt drawn
through the Arduino right?
guibot (/member/guibot/) (author) EduanSnyman
Hi! The L293D can handle only
600mA per channel, if you need
3A, try pololu drivers, you have
drivers to handle 16A or even
Good luck
Eman34 (/member/Eman34/)
Just wondering how you could integrate a joystick controller into this design?
Thank you
TorBoy9 (/member/TorBoy9/)
I breadboarded this circuit and use the sketch as is. Both the circuit and the sketch
work without issue. The electrical schematic and the breadboard differ slightly. I
used the breadboard circuit. The Arduino pins 2,3 go to one side of the L293D,
pins 7,8 go to the other side of the L293.
Your implementation into a circuit board also differs from the breadboard, such as
the added voltage regulator. If you have time, could you pls update your electrical
Anyway, thanks for the great 'ible.
guibot (/member/guibot/) (author) TorBoy9
thanks for your notes, this is a
very old instructable, it will be
difficult to update ..
guillempq (/member/guillempq/)
Can you control a Brushless motor?
ticapix (/member/ticapix/)
Thanks for the article :) Can you explain or give to link which explain why you put
5 years ago
Reply (CWU0A47FTY4D61M)
2 years ago
5 years ago
3 years ago
4 years ago
Reply (CVCJ58WG962KF0S)
capacitors ? (and why this way ?) Diodes aren't good ?
Wyle_E (/member/Wyle_E/) ticapix
The capacitors from the motor
leads to ground absorb noise
generated by the motors.
Motors are notorious for
generating spikes that interfere
with nearby logic and sensor
circuits. The big capacitor
across the battery smooths the
supply voltage, keeping the
internal resistance of the battery
from dragging the bus voltage
down when the current into the
circuit suddenly increases (like
when you start a motor). The
parallel pair of capacitors from
+5V to ground filter the logic-
circuit supply. The big
electrolytic capacitor soaks up
low-frequency trash, but isn't so
good at handling high-
frequency noise, like that
generated by fast-switching
logic. The .1 microfarad
capacitor is a ceramic or
polyester type that handles the
hign frequencies. (/member/ Wyle_E
This post has been a great help to
me. I had numerous problems
affecting my logic as I hadn't
implement the ceramic capacitors
detailed in your post. I was tearing
my hair out and temporarily
abandoned my project. Thank you
very much.
ticapix (/member/ticapix/) Wyle_E
thanks Wyle_E :)
shanakaplus (/member/shanakaplus/)
um looking for elevator avr program. Do you have example program ?
moose4987 (/member/moose4987/)
so, say i were to use a motor to turn a solar panel... if i used the voltage from the
solar panels which vary from 6-9 volts to power the arduino, could i also use that
unregulated voltage to power the L293?
chris27 (/member/chris27/)
4 years ago
4 years ago
Reply (CA78HWIG4D5WZ61)
5 years ago
5 years ago
5 years ago
5 years ago
Hey, sorry to bump an old thread, but I'm thinking of using four PICAXE 08-M
chips as slaves for DC motor control via PWM, routed through a L293D (four
mono-directional motors). The only example I've seen of this kind of setup
( seems to suggest that in
order to change the duty cycle of the PWM out, you have to pull pin 4 low, then
pulse a certain number of times in 100ms, then pull pin 4 high again. Is that true?
If so, it's only possible to change the motor speed a maximum of 10 times per
second - which isn't very useful when making minute adjustments to respond to
gyro stabilisation. Anyone know of a better way to achieve this?
felixk (/member/felixk/)
Great Job! :)
I noticed that in the final breadboard (Page 3 of the downloadable pdf), you have
included servo control and a couple of extra capacitors that are not in the system
diagram. Any chance of a complete schematic of this circuit?
mani.atico (/member/mani.atico/)
I'm new to electronics (follow instructions level) and this instructable helped me a
lot on bringing two motors to life with my arduino.
I have a basic question: is it better to use the 5V arduino output or a regulated
current from the ext source (as shown on this instructable) for the L293D logic
Thank you
icecreamterror (/member/icecreamterror/) mani.atico
ext source, always better with
the Arduino.
comodore (/member/comodore/)
Hi I like your Instructables very much! Great job! I have a question that I think
you may know the answer to. I need a small chip like this one that I can
program and put it in a circuit so when it activates by a sensor ( in my case I
want to put a light sensor (LDR))When light hits the light sensor It turns on a
motor for a period of time (lets say 5 seconds). Then when the sensor finds it
self in the dark it turns on the motor ( again for 5 sec) BUT IN THE opposite
DIRECTION. All in All When there is lite it turns on the motor for 5 sec on one
side (lets say left) when there is no light it turns the motor for 5 sec (on the
oposite side, right) Do you know such a chip that will enable me to program it
and make it do what I described??? Thank you! Stanislav
emmjul (/member/emmjul/) comodore
You can use the same setup,
simply save the states of the ldr
and you can check if there was
light before and have the
arduino reverse the motor->
5 years ago
Reply (CK6T999FUI0SF24)
5 years ago
5 years ago
5 years ago
5 years ago
if ( pin 1 = high)
turn right
5 sec
if (pin 1 = low)
turn left
5 sec
do nothing
Hope I could help
comodore (/member/comodore/) emmjul
I just upload this to the Arduino?
On what pins do I connect the
motor, LDR, power??? I needed
someone to write the code
because I am a complete n00b in
programing... THANK YOU!
Could you please now just help
me, to say, put it together, like on
what pins do I connect the motor,
LDR, power... Can I remove the
ATMega chip and use it with out
the Arduino board, connecting the
components directly to the chip?
Thank you!
emmjul (/member/emmjul/) comodore
no you can't, it's just pseudocode
so you can get an idea what you
have to programm, sadly I don't
own an arduino so I can't write it
for you. sry
comodore (/member/comodore/) emmjul
Well... Thanks any way...
Thanks, you helped me! :D
dagenius (/member/dagenius/) comodore
If that is all you are looking to
do, then a pickaxe 08-M
coupled with the circuit in this
instructable should do the trick.
the cheapest 08-M that I found
was about $3.00 USD.
comodore (/member/comodore/) dagenius
And how do you program them?
We have a be nice comment policy.
Please be positive and constructive.
I Made it! Add Images Make Comment
of 70
Next (
About Us
Who We Are (/about/)
Advertise (/advertise/)
Contact (/about/contact.jsp)
Jobs (/community/Positions-available-at-Instructables/)
Help (/id/how-to-write-a-great-instructable/)
Find Us
Facebook (
Youtube (
Twitter (
Pinterest (
Google+ (
Tumblr (
For Teachers (/teachers/)
Artists in Residence (
Gift Pro Account (/account/give?sourcea=footer)
Forums (/community/)
Answers (/tag/type-question/?sort=RECENT)
Sitemap (/sitemap/)
Go Pro Today (/account/gopro?sourcea=footer)
We're Hiring! (/community/Positions-available-at-Instructables/)
Download our new apps for iOS,
Android and Windows 8!
Join our newsletter:
Terms of Service ( |
Privacy Statement ( |
Legal Notices & Trademarks ( | Mobile Site (
2014 Autodesk, Inc.
enter email