OBJECT FOLLOWING/AVOIDING ROBOT

by Voice Of Technology in Circuits > Arduino

971 Views, 1 Favorites, 0 Comments

OBJECT FOLLOWING/AVOIDING ROBOT

OBJECT FOLLOWING ROBOT

Hi guys, we have made a project which is very compressive, easy to make and very good to watch, a very good project to start for college students and beginners. This robot brained with ARDUINO UNO, which is a microcontroller controlling the ultrasonic sensor and motors to move accordingly when the sensor senses any object between a distance of 10cm it follows and beyond that it will avoid. It is very nice to watch a robot following an object and going away in reality, so you people can follow the instructions make such simple good starting projects by yourself at home with our guidance and for further free video tutorial everyone is welcome to our youtube channel where you will get the whole video tutorial with basic guidelines to make such innovative creative projects. Guys one last thing don't be confused as our channel name has been changed from S_R Tronice to Voice Of Technology.

https://youtu.be/8WKsG0Buj-Y

COMPONENTS:

a1fe08c1-ace6-4c15-b13f-32847eced7bf.jpg
Figure-1-1.jpg
heavy-chassis-for-arduino-raspberry-pi-robotics-robot-chassis-rm0568-by-robomart-a14202-500x500-1.jpg
jumper-wires-3-types-set-dpelectronics-original-imaemh4hz6xpcwyt.jpg
9v-Battery-Hi-Watt-factoryforward-458x458.png
L293D-pinout.jpg

Everyone will get the components from the links given also from their localities

BUY EXACT COMPONENTS AT LOW COST:-
1)arduino- http://amzn.to/2klhIRT 2)l293d motor controller - http://amzn.to/2yoq5T7 3)distance sensor- http://amzn.to/2yoq5T7 4)dc motors with wheel- http://amzn.to/2yoq5T7 5)jumper wires- http://amzn.to/2yoq5T7 6)chassis- http://amzn.to/2yoq5T7

CIRCUIT :

28053898_800210626849551_1498726350_n.jpg

here is the simple circuit diagram........

trig pin is connected to arduino 2pin

echo pin is connected to arduino 3pin

motordriver l293d have 16pin...

1,8,9,16pin of l293d is connected to +5v

4,5,10 and 11 pin of l293d is connected to gnd

so..

2pin of l293d is connect to 4pin of arduino

7pin of arduino is connect to 5pin of arduino

9pin of arduino is connect to 6pin of arduino

15pin of arduino is connect to 7pin of arduino

motor1 is connected to 3 and 6pin of l293d

motor2 is connected to 10 and 14 pin of l293d

that it....then connect to power supply....

How This Robot Works??

this robot is works depend on ultrasonic sensor,which is help to find any object in range...

ultrasonic sensor works in 180degree angle...

so if distance of ultrasonic sensor 25cm or <25

this time robot moves forward using two dc gear motor...

else ..if distance <25..this time robots can moves backward..

if(distance>=25)

{

digitalWrite(m11,HIGH);

digitalWrite(m11,LOW);

digitalWrite(m11,HIGH);

digitalWrite(m11,LOW);

delay(400);

}

else

{

digitalWrite(m11,LOW);

digitalWrite(m11,HIGH);

digitalWrite(m11,LOW);

digitalWrite(m11,HIGH);

delay(400);

}

if(distance>=40)

{

digitalWrite(m11,LOW);

digitalWrite(m11,LOW);

digitalWrite(m11,LOW);

digitalWrite(m11,LOW);

delay(500);}

if distance is 40cm or >40..then robots will be stop

Uploading Code

plz copy the code below and paste it in your arduino..

#define trigpin 2

#define echopin 3

int m11=4;

int m12=5;

int m21=6;

int m22=7;

void setup()

{

pinMode(m11,OUTPUT);

pinMode(m12,OUTPUT);

pinMode(m21,OUTPUT);

pinMode(m22,OUTPUT);

pinMode(trigpin,OUTPUT);

pinMode(echopin,INPUT);

}

void loop()

{

int duration,distance;

digitalWrite(trigpin,HIGH);

delayMicroseconds(1000);

digitalWrite(trigpin,LOW);

duration=pulseIn(echopin,HIGH);

distance=(duration/2)/29.1;

if(distance>=40)

{

digitalWrite(m11,LOW);

digitalWrite(m11,LOW);

digitalWrite(m11,LOW);

digitalWrite(m11,LOW);

delay(500);

}

else

{

if(distance>=25)

{

digitalWrite(m11,HIGH);

digitalWrite(m11,LOW);

digitalWrite(m11,HIGH);

digitalWrite(m11,LOW);

delay(400);

}

else

{

digitalWrite(m11,LOW);

digitalWrite(m11,HIGH);

digitalWrite(m11,LOW);

digitalWrite(m11,HIGH);

delay(400);

}

}

}

TURN ON THE POWER AND ENJOY

FOR VIDEO ASSITANCE KINDLY VISIT OUR YOUTUBE TO WATCH FREELY AND MAKE IT WITHIN 4 MINUTES WITH CONCEPT.

YOUTUBE - https://youtu.be/8WKsG0Buj-Y