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>sir i have one doubt ......</p><p>what is difference between l293d ic and l293den</p>
<p>How to calculate the value of capacitors If you use a different value of the battery differs from 16 volts?</p>
<p>I am not an engineer and I might be wrong with this:</p><p>one rule of thumb is to always duplicate the value of your VCC, for instance, if you use 12v, you should use a capacitor rated for 24v.</p><p>I just hope an engineer give you a better explanation :)</p>
I have made a lie follower robot using arduio and l293d and 2 geared toy motors. I have used two 9 volts battery (1 for arduino and one for l293d). It works properly but the problem is that the batteries drain up too quickly. i.e. both fresh batteries will last only 10-15 minutes. I am using your l293d basic implementation, will advance implementation i.e. using capacitors will help.<br><br>Please help.<br><br>Regards<br><br>Vishal Ahuja
You should not expect too much from 9v batteries.. use 4 x or 6 x 1.2 AA rechargeable batteries and you will be fine.<br>Good luck!
Thanx. Will definately try it.<br>One more thing, what is the use of advance implementation of l293d i.e. in which you are using capacitors.<br>Vishal Ahuja
<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>Thanks! That just answered a whole bunch of questions I had.</p>
<p>can i control 2 motors?</p>
<p>Hello about the L293D motor IC what are the other replacement for it.? I mean, there is no available stock of the said IC and im going to use it im project arduino and bluetooth car. So, is there other value of IC as replacement for it.? <br> Any help would be greatly appreciated, thank you.</p>
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
The Arduino board is fully programable, you can see more info at www.arduino.cc
<p>heya m making a line follower but my motors are not working according to arduino they just run when supply is given plz do guide me<br>viditsmartboy1808@gmail.com</p>
<p>Can you post the arduino code and a photo of connections so we can see ?</p>
Yea, but I need something smaller, much much smaller like a chip...
there are arduino clones of many sizes, or can build your customized arduino only with the essencial components, <a rel="nofollow" href="http://lab.guilhermemartins.net/index.php?s=ratazana">I have build one for this project</a><br/><br/>check the following links:<br/><br/><a rel="nofollow" href="http://store.fundamentallogic.com/ecom/index.php?main_page=index&amp;cPath=15">http://store.fundamentallogic.com/ecom/index.php?main_page=index&amp;cPath=15</a><br/><br/><a rel="nofollow" href="http://www.arduino.cc/en/Main/ArduinoBoardNano">http://www.arduino.cc/en/Main/ArduinoBoardNano</a><br/>
Thank you!
Once you've programmed the arduino you can remove the chip, add a crystal and it can act alone with a power source - you don't always need a smaller arduino ;)
Great, that is good to hear... I am new in programing and electronic... :P Why do I need a crystal, actually what does a crystal do??? How should it be connected? What chip should I use? Thank you!
this might interest you<br/><a rel="nofollow" href="http://lab.guilhermemartins.net/?p=539">http://lab.guilhermemartins.net/?p=539</a><br/>
and this :)<br/><a rel="nofollow" href="http://lab.guilhermemartins.net/?p=817">http://lab.guilhermemartins.net/?p=817</a><br/>
Thanks! x2 :D
I recommend the Arduino Duemillanove, it's relatively easy to use and program and the crystal (i have no idea besides this) is just to make it functional outside the board it's in. The arduino Duemillanove uses the AtMega328. ps: a "crystal" is just a component like a resister or capacitor, it's not a diamond or a ruby :P
I have the Arduino Duemillanove ... Are there types of crystals, if yes, which type should I use??? Are there separate chips that you can buy, without the whole board? On the chip it self hod do I know where should I hock up the sensor, power, motor, crystal... Yes, I am a n00b! ;) Thank you!
I will answer you honestly; i don't know. But googling goes a long way ;)
:P Thanks!
Any of the microcontrollers whether PIC or AVR can do this. But you will still need support components for regulating power and possibly programming interface, so yes the Arduino is a little big, but you may find you need the same components in any case.
Well, maybe, but the problem is I can't fit the Arduino into the case... I think that I I just program the chip and solder all the components... I would save much space... So should I use this chip? How do I actually program it, the chip that is? As I said, I need something small..like a bug circuit with the programed chip that turns on the motor when it gets a signal for a defined amount of time... Thanks!
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-&gt;<br/><br/>if ( pin 1 = high)<br/>{<br/>turn right<br/>5 sec<br/>}<br/>if (pin 1 = low)<br/>{<br/>turn left<br/>5 sec<br/>}<br/><br/>else<br/>{<br/>do nothing<br/>}<br/><br/>Hope I could help<br/>
THANK YOU SO MUCH!!! OK, so 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!
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
Well... Thanks any way... Thanks, you helped me! :D
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.
And how do you program them? Thanks!
the chips have a serial in, serial out(also a in0), and a ground to share with a serial cable. They do take a little more diy to use, because the breakout boards sold on the internet are terrible, and you can make one much smaller, cheaper, and funner with a perf board, solder, pic, and various components. The pic must be programmed with a certain resistor setup that can be found all over the internet.
Ah ok thanks! I think I am going to use an arduino, that is the arduino chip thanks!
<p>Can i controll the Speed of this motors?</p>
You can do pwm, pulsating the input for speed control
<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>Please help me !!! I just burns my 2 L293D ic's, yeah its heat up during I am controlling my Car, I am using NI -CD 8 AA 700mAH 9.6 V Battery, the positive of battery attach to the IC VSS(Pin 8) and negative of IC attach to the arduino gnd. Someone reply me please ......</p>
Wrong way round maybe? High voltage on low voltage input?
<p>Used this for my schoolproject and controlled it with a wiinunchuck, thank you so much for your help! Good instructables!</p>
Nice instructables. Can i use regulated 5 volt from arduino instead of 7805?
<p>Yes you can, its a good way to get started with it</p>
<p>I don't think so. Arduino board can not supply current to run a motor. You need an external supply.</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>

About This Instructable




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