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 - datasheet

Step 1: Basic implementation

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, 16.

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:
<p>Can i controll the Speed of this motors?</p>
<p>Sure you can, speed can be assign using PWM (pulse width modulation).</p><p>Use the following commands: <br>analogWrite(pinMotorA, value);<br>digitalWrite(pinMotorB, LOW);</p><p>PS - don't forget to check the Arduino Reference</p>
<p>So are the 100uF/16V capacitors, the same as the 0.1uf capacitors, and are they both used to control the current spike from the motors, or are they used to regulate the voltage to 6V. I have a 14.8 volt lithium ion battery, and have a 5 volt regulator in for the sensors and the microcontroller. I also have a 6V regulator going into pin 8 for my motors. I'm confused about what pin 16 does; is it's ouput voltage 6V? Does pin 16 rely on the input voltage from pin 8?</p>
<p>Hello,</p><p>Thanks a lot for this tutorial! I wanted to control motors with my arduino for a long time but just didn't get started. Though I have a few questions before I start.</p><p>In step 2:<br>1) To plug the motor in, I just stick the wires in the tie points above the white wires? row 42 and 46?</p><p>2) I need to control a 12V motor, so if I understood this correctly I just take a 12V source and plug the + to pin 8 and the - to the ground? But then you have like, 1 side of pin 8 has 12V and the other side has 5V. I don't really get how that works.</p><p>3) Do I need to change the capacitor if I use a higher voltage? I assume yes, how do I calculate it?</p><p>Thanks in advance!</p>
<p>1) Yes you are right, connect the motor wires on row 42 and 46.<br>2) The L-293D driver has two power inputs, one for logic (5V - VSS - pin 20) and other for Motor Power (VS - pin 10), this enable you to work with until 36V motors!!<br>3) You will use a same capacitance capacitor, but the work voltage of this capacitor will be according the supply voltage of the motor used.</p>
<p>Thanks for the answer :)</p><p>One more question, should I connect the 5V output of the arduino on both sides of the breadboard? As far as I've got it now, I do. But it is not in the picture (I'm using the picture of the breadboard in step 2)</p><p>I just connected the 2 -parts on the breadboard and the 2 +parts.<br>The +-wire of the external battery is connected to pin 8 of the L293D.</p><p>This question may sound dumb, but I just don't want to blow up my arduino :p</p>
<p>Greetings, sorry but I not understand your question, can you take a picture? to be sure and help you to not blow up your arduino.<br>If you has an blow up arduino, this can be repaired, do you know?</p>
Hi. Great tutorial. There is one thing i do not understand though, probably because im not an electrical engineer: why Are the 100 uf capacitors needed?<br><br>Best<br>Kristian
<p>Because inductive loads like motors, will generate spike voltage transients (electrical noise) that can disturb or block a &micro;Controller.</p>
<p>I am too a beginner in these things. I want to know how the capacitor helps in this case.</p>
<p>The capacitor will work like a buffer (&quot;electrical shock absorber&quot;), that absorb a spike and fill a low voltage, the voltage variations when will be smoother or inexistent. the microcontroller needs a constant power supply to work fine any spikes or electrical noise will disturb, restart or block ...</p>
Add good heatsink on your ground l293d .
<p>what is the enable for?</p>
<p>If you want simpler code, I wrote an Arduino library for the L293D motor controller. You can find it at <a href="https://github.com/tysweat/arduino-L293D" rel="nofollow">https://github.com/tysweat/arduino-L293D</a></p>
<p>can i control 2 motors?</p>
Nice instructables. Can i use regulated 5 volt from arduino instead of 7805?
<p>I don't think so. Arduino board can not supply current to run a motor. You need an external supply.</p>
MCU output? What does MCU stand for? Thanks.
<p>MCU is the Microcontroller</p>
<p>Thank you!</p>
<p>Hey ,</p><p>I have one qst , can i use this H Bridge with a Linear acutator (Motor) , who needs 24 V, if yeah , did i just need to feed pin 8 with 24 V source ?</p><p>Thanks</p>
Yes. The datasheet says that the l293d has a maximum input current of 36 volts i Think. You should only supply this to pin 8 however.
Nice instructables. Can i use regulated 5 volt from arduino instead of 7805?
Nice instructables. Can i use regulated 5 volt from arduino instead of 7805?
<p>why you have connected 0.1uf capacitors in L293D connection?</p>
I think it was in the L293D datasheet
<p>&iquest;Cu&aacute;les son los materiales?</p>
<p>My L293D chip is getting heating up and after a few seconds the motors are stopping. please help.</p>
<p>I think your motor is drawing too much current. The max continuous current output of L293D is 600mA(Refer the data sheet). L293 has thermal shutdown protection that automatically shut off motor outputs when over heat. Use 298N that can allow 2A continuously. What motor you are driving with this IC?</p>
I am using small ordinary 6v motors which come in the cheap rc cars.
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? &amp; also can i use Dc motors with just power and ground for this setup instead of a motor with a feedback?
<p>i think you can. but it my be a bit difvult</p>
<p>i luv drones</p>
<p>can I connect 3 of these setups with 3 l293d on the arduino uno rev3 but will I have enough pins beacause I am connecting a nrf24l0 on the same arduino I need 3 l293d to work on so will there be enough pins for this </p>
how can I control 4 motors
<p>Use 2 L293D chips</p>
thanks tys5
Hello <br>Can this driver used in line follower
<p>Thanks for making this. I'm totally new to this, but it will give me a good place to start. It worked well .</p>
<p>Hi! I'm glad to know it worked for you!! ;)</p>
Great project! I have made it and it is working properly but I want to control motor speed also with arduino. How can I do it
<p>Hi! if you want to control speed you should use analogWrite(pin, value), where value is a number between 0 and 255.</p><p>for mor info check the PWM tutorial on the Arduino page:<br><a href="http://www.arduino.cc/en/Tutorial/PWM" rel="nofollow">http://www.arduino.cc/en/Tutorial/PWM</a></p>
<p>my motors don't move when on the ground, i found out its giving 3.3v for 2 motors connected and 5v for 1 motor, im using 4 AA batteries, it works when connected directly, my motors draw 600MAX when moving hardly! 300mah normally!</p><p>what should i do? i already ordered a 2200mah 3s (11.1v) battery hopping it woul work!</p>
<p>great tuts here is another tuts </p><p><iframe allowfullscreen="" frameborder="0" height="281" src="//www.youtube.com/embed/IDC1iCVqgrU" width="500"></iframe></p>
<p>Arduino + ESP8266 + L293D<br>https://www.youtube.com/watch?v=3LV_KIwo7-I<br>^_^</p>
<p>hello there...i am building a robot using arduino and L293D.....and i want to use bluetooth module on the same to control the robot using android app...i wonder if you could help me with the codes to be written on the arduino....thankyou :))</p>
<p>It didn't work at all!!!!</p><p>Any tips?????</p>
<p>more details please..</p>

About This Instructable


454 favorites


Bio: Designer & digital artist
More by guibot: Create an FPV 4WD Robot making wheels out of plastic bottles Clever ways of attaching components to your robot
Add instructable to: