Instructables
loading
loading

Arduino Controlled L293D Robot ( Part 1 - Update 1.0 )

Picture of Arduino Controlled L293D Robot ( Part 1 - Update 1.0 )
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
Untitled-7.jpg
Arduino L293D_bb.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 Lead of Battery Pack)

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:

Step 4: 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 5: 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)
1-40 of 50Next »
AgentWolf (author) 16 days ago

My apologies if i haven't been answering any Question.
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.

Thank you for your patience, Feedback and support.
I greatly appreciate it

Once again i am sorry if i wasnt able to help you.

Thanks Alot! It Works I am so Happy (Y)

AgentWolf (author)  faizi.barcaboyyesterday

I am happy that i was able to make you happy.

yhdesai3 months ago

MAKE A SHIELD OF L293D MOTOR CONTROLLER

AgentWolf (author)  yhdesaiyesterday

Is that a Suggestion or a Request ?
I'll probably design a schematic one day and make my own at home.

Thank You Very Much! You explained the concept very clearly in comparison to other instructables, and it worked!!!!!

AgentWolf (author)  Haythem Kenwayyesterday

Thank you. I am glad it worked for you.

ICareP17 days ago
great work, i hope it works. Can you pls post a schematics image using fritzing
AgentWolf (author)  ICareP16 days ago

I never head of fritzing before and unfortunately i have been really busy with school and life.
I will try my best to make a detailed schematic using fritzing as soon as possible.
Thank you for your patience.

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
navneet kaur2 months ago

can we incorporate IR sensor in this project, if yes then what changes are required?

AgentWolf (author)  navneet kaur16 days ago

Here is Part 2 where i did add IR to the Project
http://www.instructables.com/id/Arduino-and-L293D-Robot-Part-2-Infrared-Sensor/

AgentWolf (author)  navneet kaur16 days ago

You wouldn't have to make any physical changes, only to the code.
Just add the IR sensor to the Arduino and connect it to the Digital pins if i am not mistaken.
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.

thanks a lot..it works...Mars here we come

maljundi5 months ago

hi.. i want to get l293d ic but i think it's need (heat sink) !!

so plz.. explain y u didn't use heat sink and really it's need it ??!

sai instruct7 months ago

wat happens wen 9V is given to enable pins

rrawat28 months ago

input 1 of l293d ic will connect on arduino13 pin.

input 2 of l293d ic will connect on arduino12 pin.

input 3 of l293d ic will connect on arduino10 pin.

input 4 of l293d ic will connect on arduino 9 pin.

and make the circuit by using this circuit diagram and code will available below.(rrawat2)

l293d-based-motor-driver.png
rrawat28 months ago

int IN1=13;

int IN2=12;

int IN3=11;

int IN4=10;

void setup()

{

pinMode(IN1,OUTPUT);

digitalWrite(IN1,LOW);

pinMode(IN2,OUTPUT);

digitalWrite(IN2,LOW);

pinMode(IN3,OUTPUT);

digitalWrite(IN3,LOW);

pinMode(IN4,OUTPUT);

digitalWrite(IN4,LOW);

Serial.begin(9600);

}

void loop()

{

if(Serial.available()>0)

{

char letter=Serial.read();

if(letter=='8') //forward moving robot

{

digitalWrite(IN1,HIGH);

digitalWrite(IN2,LOW);

digitalWrite(IN3,HIGH);

digitalWrite(IN4,LOW);

Serial.println("THE ROBOT WILL MOVE FORWARD");

}

else if(letter=='5') //STOP ROBOT

{

digitalWrite(IN1,LOW);

digitalWrite(IN2,LOW);

digitalWrite(IN3,LOW);

digitalWrite(IN4,LOW);

Serial.println("THE ROBOT WILL BE STOP");

}

else if(letter=='2') //REVERSE ROBOT

{

digitalWrite(IN1,LOW);

digitalWrite(IN2,HIGH);

digitalWrite(IN3,LOW);

digitalWrite(IN4,HIGH);

Serial.println("THE ROBOT WILL MOVE REVERSE");

}

else if(letter=='4') //LEFT ROBOT

{

digitalWrite(IN1,HIGH);

digitalWrite(IN2,LOW);

digitalWrite(IN3,LOW);

digitalWrite(IN4,HIGH);

Serial.println("THE ROBOT WILL MOVE LEFT");

}

else if(letter=='6') //RIGHT MOVING ROBOT

{

digitalWrite(IN1,LOW);

digitalWrite(IN2,HIGH);

digitalWrite(IN3,HIGH);

digitalWrite(IN4,LOW);

Serial.println("THE ROBOT WILL MOVE RIGHT");

}

}

}

//this is move on by keyboard button so try and enjoy

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

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

Untitled picture.png
asarkar91 year 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.

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

paras111 year ago
hey i tried to follow d steps but my l293d gets really heated
can u tell me why is this happening???
:O
beginner131 year ago
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?

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?

Thanks
Vee201 year 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)  Vee201 year 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.
thank you. will try it out and get back to you :)
mgarg51 year 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)  mgarg51 year 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 george1 year 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)  volt1071 year 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)  ajimzack1 year 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.
1-40 of 50Next »