loading
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 use this circuit to control different motors (not at once), i have 9v, a 12v and a 24v. I know that the capacitors must be able to handle the voltage, but do i need capacitors with different farad ratings for each motor-setup?</p><p>Thank you for your replies!</p>
<p>how should i control speed (increase and decrease)? i am using 1000rpm geared motors( simple motors that work as if they are 300rpm), l293d motor drivers, 12V heavy battery, hc-05 bluetooth module. </p>
you should use PWM - pulse width modulation<br>https://www.arduino.cc/en/Tutorial/PWM
How i connect our arduino to l293d motor bridge please sir help me
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
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/>
Sir I am working with Arduino. I want to control god idle leg up and down with help of geared motor forward and reverse action please give me suggestions.
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
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/>
Thanks!
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!
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>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>
<p>Add heat sinks to the ground pins as shown in the data sheet of L293DNE</p>
Wrong way round maybe? High voltage on low voltage input?
<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>
<p>L298N is more efficient and powerful than L293DNE </p>
<p>sir i have one doubt ......</p><p>what is difference between l293d ic and l293den</p>
<p>both were the same.</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>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>

About This Instructable

476,364views

519favorites

License:

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: