Instructables
Picture of Arduino and L293D Robot ( Part 1 )
DSCF4793.JPG
DSCF4792.JPG
DSCF4791.JPG
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.
 
Remove these adsRemove these ads by Signing Up

Step 1: Parts

Arduino Board

Breadboard

L293D Chip

Two Motors

9 Volt Battery

6 Volt Battery Pack

Step 2: Wiring the L293D Chip

Picture of Wiring the L293D Chip
L293D FINAL 3.jpg
Pin 4 ,Pin 5,Pin 12 and Pin 13 from L293D Chip Connect to Ground (Negative On Breadboard)

Pin 1,Pin 9 and Pin 16 from L293D Chip Connect to 5 Volts (Positive On Breadboard)

Pin 8 from L293D Chip Connects to 6 Volts (Positive On Breadboard)

Pin 3 from L293D Chip Connects to Right Motor
Pin 6 from L293D Chip Connects to Right Motor

Pin 11 from L293D Chip Connects to Left Motor
Pin 14 from L293D Chip Connects to Left Motor

Output pins on Arduino to control Right Motor :
Pin 2 from L293D Chip Connects to Output Pin on Arduino
Pin 7 from L293D Chip Connects to Output Pin on Arduino

Output pins on Arduino to control Left Motor :
Pin 10 from L293D Chip Connects to Output Pin on Arduino
Pin 15 from L293D Chip Connects to Output Pin on Arduino






Step 3: Connecting the Motors to L293D Chip

Picture of Connecting the Motors to L293D Chip
Pin 3 from L293D Chip Connects to Right Motor
Pin 6 from L293D Chip Connects to Right Motor

Pin 11 from L293D Chip Connects to Left Motor
Pin 14 from L293D Chip Connects to Left Motor

Step 4: Connecting the pins to 5 Volts and Ground

Picture of Connecting the pins to 5 Volts and Ground
Pin 4 ,Pin 5,Pin 12 and Pin 13 from L293D Chip Connect to Ground (Negative On Breadboard)

Pin 1,Pin 9 and Pin 16 from L293D Chip Connect to 5 Volts (Positive On Breadboard)

Pin 8 from L293D Chip Connects to 6 Volts (Positive On Breadboard)
tisaconundrum4 months ago

So I figured out how to get it wired correctly. All the batteries need to be grounded together.

Untitled picture.png

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

Untitled picture.png
tisaconundrum4 months ago

Now where does the ground for the 5 V battery go?

Untitled picture.png
asarkar95 months ago

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.

skant1 asarkar94 months ago

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 www.arduino.cc AND DOWNLOAD THE ARDUINO ZIP FOLDER

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

paras115 months ago
hey i tried to follow d steps but my l293d gets really heated
can u tell me why is this happening???
:O
beginner138 months ago
wat r the output pins for arduino,where do i connect the pin2,pin7,pin10 and pin15 to arduino
Haitham khedr10 months ago
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?

Thanks
Haitham khedr10 months ago
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?

Thanks
Vee2010 months ago
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!
AgentWolf (author)  Vee2010 months ago
Try the following to see if it works,if it doesn't i will have to test it to figure it out.

Option 1 :

delay(10000); // waits for 10 seconds
This line will keep the motor on for 10 seconds.

delay(1000); // waits for a second
This line will keep the motor on for 1 second.

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.

Option 2 :

To slow down the motor try the following command.
The following is an Example for the Right Motor Only.
Follow the same structure for other motors you want to control.

Replace the command

digitalWrite(RightMotorForward, HIGH);

with

analogWrite(RightMotorForward,N);

Let "N" be any number between 0 and 255, 0 is stop and 255 is the Highest speed.

Example: analogWrite(RightMotorForward,155);


This is a modification of the fade example from the Arduino Library.
Hope This Helps.
Vee20 AgentWolf10 months ago
thank you. will try it out and get back to you :)
mgarg510 months ago
Does the motor need to have a feedback? I have a DC motor. Can i use it using this method.
Regards.
And i do hope you rspond fast . i need to et this done by this weekend :)
AgentWolf (author)  mgarg510 months ago
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.

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.

Follow through the Steps and carefully read the instructions while using the images as aid and you should be fine.
A wonderful guide to start working with Arduino Uno. As you can see I add a link in my article  where is an impressive collection of guides and tutorials to start working with Uno.
AgentWolf (author)  cdragos george10 months ago
Thanks for including my project.
volt1071 year ago
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.
AgentWolf (author)  volt10710 months ago
Glad you Liked it.
Thanks.
AgentWolf (author)  volt1071 year ago
Thanks.
I think it could have been of better Quality but Thanks again.
ajimzack1 year ago
my project has been done...this is the link video..thanks,,http://www.youtube.com/watch?v=v2Y_s3R8EOY&feature=youtu.be
AgentWolf (author)  ajimzack10 months ago
Looks Good.
Good Job.
volt1071 year ago
Also, how are pins 1, 9, 16 connected to 5V? I just see them connected to negative on the breadboard.
AgentWolf (author)  volt1071 year ago
If you look closely the Pins 1,9,16 are connected correctly to positive on the breadboard.
The positive and negative on the breadboard are then inturn connected to battery pack.
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.
volt1071 year ago
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.
AgentWolf (author)  volt1071 year ago
You positive from 9V goes to VIn on the Arduino and the Negative goes GND(ground)
ajimzack1 year ago
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..
ajimzack1 year ago
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?
AgentWolf (author)  ajimzack1 year ago
Best i can think of is try fresh batteries for two different power sources.
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
""***CODE***""to operate from both PC and android mobile
AgentWolf (author)  speak2sainow1 year ago
I am also trying to learn that.
I think you would have to connect one of the Xbee wireless modules to the Arduino controlling the L2393D Robot and have the second one connected to an Ethernet shield on the Arduino connected to the PC.

Write a web based controller which you control from your phone or PC via the Ethernet and transmit the command to the second wireless xbee module on the L293D Chip.

I think thats how it works but at the moment i am not completely sure.I will let you know If and When i figure it out.

You can look for other tutorials dealing with arduino communications to help you.
Amper3861 year ago
Bla
AgentWolf (author)  Amper3861 year ago
?