HUMAN and OBJECT Following Arduino Robot

1,954

13

0

Posted in TechnologyArduino

Introduction: HUMAN and OBJECT Following Arduino Robot

About: GUYS FOLLOW US AT OUR FB PAGE ..DO LIKE ND SHARE ..OUR YOUTUBE CHANNEL IS S_R TRONICS...WATCH..TRY..INNOVATE..TASTE THE SUCCESS..THANK U..

hello guys...

we have made a new nice project...object following robot thats based on arduino...

this robot is made by using a ultrasonic sensor....

ultrasonic sensor:-

An Ultrasonic sensor is a device that can measure the distance to an object by using sound waves. It measures distance by sending out a sound wave at a specific frequency and listening for that sound wave to bounce back.

so..this sensor can find object with range and follow or avoid a object and human in specific distance..

so lets start...

Step 1: Components

Step 2: Circuit Diagram

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....

Step 3: 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..

Step 4: 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);

}

}

}

Step 5: Result

guys ...plz watch this video..

how this project or robot works???.....

plz see this this video till end for best result...and subscribe our channel and share also...

Share

    Recommendations

    • Casting Contest

      Casting Contest
    • Microcontroller Contest

      Microcontroller Contest
    • Woodworking Contest

      Woodworking Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    How do you make this formula distance=(duration/2)/29.1?

    Comments