Here is part 1 of the Arduino and L293D Robot.This is part of a series of instructables leading to a Line follower Robot.

This is a basic Robot made by controlling two motors via the L293D chip through an Arduino Board.

I have done this project in the past with similar set up just not with an Arduino Board.

Do let me know what you think of this project and if I made any mistakes.

Step 1: Parts

Arduino Board


L293D Chip

Two Motors

9 Volt Battery

6 Volt Battery Pack
<p>My apologies if i haven't been answering any Question.<br>I have been really busy with school and haven't had a chance to get back to instructables. During the next few weeks and summer months i will try to answer all questions and help with any issues you may have. I will also Update this instructables and make a better and more detailed version. </p><p>Thank you for your patience, Feedback and support.<br>I greatly appreciate it </p><p>Once again i am sorry if i wasnt able to help you.</p>
Amaizing ......<br><br>One of the easiest,low cost and simplest arduino robot project in the web<br><br>Thank you sir for this awesome project<br>Waiting for more projects like this<br><br>
Cool man your explanation is simple and great..do more instructables..waiting for thae next one..
<p>Thanks Alot! It Works I am so Happy (Y) </p>
<p>I am happy that i was able to make you happy.</p>
<p>Is that a Suggestion or a Request ?<br>I'll probably design a schematic one day and make my own at home.</p>
<p>Thank You Very Much! You explained the concept very clearly in comparison to other instructables, and it worked!!!!!</p>
<p>Thank you. I am glad it worked for you.</p>
great work, i hope it works. Can you pls post a schematics image using fritzing
<p>I never head of fritzing before and unfortunately i have been really busy with school and life.<br>I will try my best to make a detailed schematic using fritzing as soon as possible.<br>Thank you for your patience. </p>
yh, fritzing is open-source and free http://fritzing.org/download/ and it allows you to draw schematics and creates pcb layouts form those schematics. I'm also busy w/ school and life, I couldn't see clearly the images posted, I'm building a robot etoy prototype for anyone we're on kickstarter already you can spread the word, or back us to http://kck.st/1D7lOtk cheers
<p>can we incorporate IR sensor in this project, if yes then what changes are required?</p>
<p>Here is Part 2 where i did add IR to the Project<br>http://www.instructables.com/id/Arduino-and-L293D-Robot-Part-2-Infrared-Sensor/</p>
<p>You wouldn't have to make any physical changes, only to the code.<br>Just add the IR sensor to the Arduino and connect it to the Digital pins if i am not mistaken. <br>I have been really busy with school. If you are not in a rush i can make a complete version with IR and get back to you in the next few weeks.</p>
<p>thanks a lot..it works...Mars here we come</p>
<p>hi.. i want to get l293d ic but i think it's need (heat sink) !!</p><p>so plz.. explain y u didn't use heat sink and really it's need it ??!</p>
<p>wat happens wen 9V is given to enable pins</p>
<p>input 1 of l293d ic will connect on arduino13 pin.</p><p>input 2 of l293d ic will connect on arduino12 pin.</p><p>input 3 of l293d ic will connect on arduino10 pin.</p><p>input 4 of l293d ic will connect on arduino 9 pin.</p><p>and make the circuit by using this circuit diagram and code will available below.(rrawat2) </p>
<p>int IN1=13;</p><p>int IN2=12;</p><p>int IN3=11;</p><p>int IN4=10;</p><p>void setup()</p><p>{</p><p> pinMode(IN1,OUTPUT);</p><p> digitalWrite(IN1,LOW);</p><p> pinMode(IN2,OUTPUT);</p><p> digitalWrite(IN2,LOW);</p><p> pinMode(IN3,OUTPUT);</p><p> digitalWrite(IN3,LOW);</p><p> pinMode(IN4,OUTPUT);</p><p> digitalWrite(IN4,LOW);</p><p> Serial.begin(9600);</p><p>}</p><p>void loop()</p><p>{</p><p> if(Serial.available()&gt;0)</p><p> {</p><p> char letter=Serial.read();</p><p> if(letter=='8') //forward moving robot</p><p> {</p><p> digitalWrite(IN1,HIGH);</p><p> digitalWrite(IN2,LOW);</p><p> digitalWrite(IN3,HIGH);</p><p> digitalWrite(IN4,LOW);</p><p> Serial.println(&quot;THE ROBOT WILL MOVE FORWARD&quot;);</p><p> }</p><p> else if(letter=='5') //STOP ROBOT</p><p> {</p><p> digitalWrite(IN1,LOW);</p><p> digitalWrite(IN2,LOW);</p><p> digitalWrite(IN3,LOW);</p><p> digitalWrite(IN4,LOW);</p><p> Serial.println(&quot;THE ROBOT WILL BE STOP&quot;);</p><p> }</p><p> else if(letter=='2') //REVERSE ROBOT</p><p> {</p><p> digitalWrite(IN1,LOW);</p><p> digitalWrite(IN2,HIGH);</p><p> digitalWrite(IN3,LOW);</p><p> digitalWrite(IN4,HIGH);</p><p> Serial.println(&quot;THE ROBOT WILL MOVE REVERSE&quot;);</p><p> }</p><p> else if(letter=='4') //LEFT ROBOT </p><p> {</p><p> digitalWrite(IN1,HIGH);</p><p> digitalWrite(IN2,LOW);</p><p> digitalWrite(IN3,LOW);</p><p> digitalWrite(IN4,HIGH);</p><p> Serial.println(&quot;THE ROBOT WILL MOVE LEFT&quot;);</p><p> }</p><p> else if(letter=='6') //RIGHT MOVING ROBOT</p><p> {</p><p> digitalWrite(IN1,LOW);</p><p> digitalWrite(IN2,HIGH);</p><p> digitalWrite(IN3,HIGH);</p><p> digitalWrite(IN4,LOW);</p><p> Serial.println(&quot;THE ROBOT WILL MOVE RIGHT&quot;);</p><p> }</p><p> }</p><p>}</p><p>//this is move on by keyboard button so try and enjoy </p>
<p>So I figured out how to get it wired correctly. All the batteries need to be grounded together.</p>
<p>Edit: I had the batteries connected to the wrong pins. I was testing and the motor wasn't even running. So here is the correct schemtaic</p>
<p>Now where does the ground for the 5 V battery go?</p>
<p>Do we have to convert a program written in C++ to machine language, in order to make ARDUINO UNO work? If yes, then how to do it? And can you please give a link for downloading the software required for ARDUINO? Please reply ASAP.... it's very important. Thanks.</p>
<p>NO WE DON'T HAVE TO CONVERT THE CODE TO ASSEMBLY(IT IS ACTUALLY AN ADVANTAGE WITH ARDUINO).....PROGRAMMING ARDUINO IS VERY VERY SIMPLE...GO TO <a href="http://www.arduino.cc" rel="nofollow"> www.arduino.cc </a> AND DOWNLOAD THE ARDUINO ZIP FOLDER </p><p>then open zip folder and save it to desktop and connect your arduino board to usb port using usb cable and open device manager and find your arduino in ports section and right click on it and click update driver and choose from pc then open arduino folder saved in desktop and choose drivers that is it....your arduino is connected and then do hardware as per above given and program the arduino using arduino application and upload it....you are done</p>
hey i tried to follow d steps but my l293d gets really heated <br>can u tell me why is this happening??? <br>:O
wat r the output pins for arduino,where do i connect the pin2,pin7,pin10 and pin15 to arduino
Hello, i am trying to drive a dc motor with L293D ,i supply 5 volts to pin 8 and when i measure the output voltage it is reduced to 2.6 volt when i connect the motor only,if the motor is not connected all the input is transfered to the output . Would you please help solving this problem? <br> <br>Thanks
Hello, i am drive a dc motor with L293D ,i supply 5 volts to pin 8 and when i measure the output voltage it is reduced to 2.6 volt when i connect the motor only,if the motor is not connected all the input is transfered to the output . Would you please help solving this problem? <br> <br>Thanks
Hi there. Lovely instructable! Is there any way to slow down the speed of the motor? I find that it moves a bit too fast for my intended purpose. Thank you!
Try the following to see if it works,if it doesn't i will have to test it to figure it out. <br> <br>Option 1 : <br> <br>delay(10000); // waits for 10 seconds <br>This line will keep the motor on for 10 seconds. <br> <br>delay(1000); // waits for a second <br>This line will keep the motor on for 1 second. <br> <br>By adjusting the amounts of seconds you adjust the amount of time the motor stays on and this can be used to slow down turns. <br> <br>Option 2 : <br> <br>To slow down the motor try the following command. <br>The following is an Example for the Right Motor Only. <br>Follow the same structure for other motors you want to control. <br> <br>Replace the command <br> <br>digitalWrite(RightMotorForward, HIGH); <br> <br>with <br> <br>analogWrite(RightMotorForward,N); <br> <br>Let &quot;N&quot; be any number between 0 and 255, 0 is stop and 255 is the Highest speed. <br> <br>Example: analogWrite(RightMotorForward,155); <br> <br> <br>This is a modification of the fade example from the Arduino Library. <br>Hope This Helps.
thank you. will try it out and get back to you :)
Does the motor need to have a feedback? I have a DC motor. Can i use it using this method. <br>Regards. <br>And i do hope you rspond fast . i need to et this done by this weekend :)
No this project does not require Feed Back as it does not rely on sensory feedback to control movement. This project is based on predetermined preprogrammed commands. You can however edit the code to fit your needs. <br> <br>Yes this Project can be done with a DC motor. A DC Motor can be controlled through the application of Voltage change and can be made to turn slower or faster. <br> <br>Follow through the Steps and carefully read the instructions while using the images as aid and you should be fine. <br>
A wonderful guide to start working with Arduino Uno. As you can see I add a link in my article&nbsp; where is an impressive collection of <a href="http://www.intorobotics.com/arduino-uno-setup-and-programming-tutorials/" rel="nofollow">guides and tutorials to start working with Uno</a>.
Thanks for including my project.
Thanks a lot for this tutorial man. This is probably the clearest and simplest arduino robot tutorial on the web! Got mine to work. Thanks again.
Glad you Liked it. <br>Thanks.
Thanks. <br>I think it could have been of better Quality but Thanks again.
my project has been done...this is the link video..thanks,,http://www.youtube.com/watch?v=v2Y_s3R8EOY&amp;feature=youtu.be
Looks Good. <br>Good Job.
Also, how are pins 1, 9, 16 connected to 5V? I just see them connected to negative on the breadboard.
If you look closely the Pins 1,9,16 are connected correctly to positive on the breadboard. <br>The positive and negative on the breadboard are then inturn connected to battery pack. <br>Unfortunatly the pictures are not of best quality so they give the illusion that they are not connected properly.As long as you follow the schematic you should be fine.
Hi, sorry to bother you but can you let me know where exactly to put the 9 volt battery wires? It's a bit blurry in the pictures and I don't completely understand the schematic.. Thanks.
You positive from 9V goes to VIn on the Arduino and the Negative goes GND(ground)
thank you for your suggestion..before this i power up ardunio using usb and motor using 9V battery...next time i will try using 2 batteries..
hi, im currently do a project of line following robot using ardunio,l293d, ir sensor..i have problem with the power supplied to the motor..why motor that connected from l293d motor driver not enough power to make the motor works? means that, i need to rotate it first, only then the motor will working. I connect l293d with 9v battery to supplied the voltage. anyone can give your idea?
Best i can think of is try fresh batteries for two different power sources. <br>One for The Arduino and one for you circuit/Breadboard.Dont use one power supply to power up both of them.
can any one guide me in the code with L293D IC <br>&quot;&quot;***CODE***&quot;&quot;to operate from both PC and android mobile

About This Instructable


63 favorites


More by NIkheel94: Streaming the Xbox 360 to Twitch using an older VGA/DVI PC Monitor with Seperate Sound (Monitor Without Speakers) Easy Basic Arduino Ethernet Controller Most Basic Form of Hydroponics
Add instructable to: