0% found this document useful (0 votes)
2 views

Human Following Robot Project

Uploaded by

naniandela0212
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Human Following Robot Project

Uploaded by

naniandela0212
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

HUMAN FOLLOWING ROBOT PROJECT

BY ARDUINO

Name of students:-
BORELLI . ABHINAY KOUSHIK RAJ-24001A0412
BOLLU . CHANDRA NEEL-24001A0409
KUMMARA . KARTHIK-24001A0413
ANDELA SHIVA SHANKARA VARAPRASAD-24001A0453
KALLAMADI TRILOK REDDY-24001A0442
YANNAM PREETHAM-24001A0444
Abstract: Humanoid robotics is an emerging research field that has received significant attention during
the past years and will continue to play an important role in robotics research and many applications of
the 21st century and beyond. In this rapid moving world, there is a need of robot such a “A Human
Following Robot” that can interact and co-exist with them. Because of its human following capability,
these robots can work as assistants for humans in various situations and it can also acquire or monitor
certain information associated with the human subject. In this paper we present a prototype that uses
Arduino Uno along with basic sensors such as ultrasonic and IR sensor. All the processing is carried out
by the microprocessor while the control of the motors is carried out by the controller. This robot can
further be modified by using many technologies such as Bluetooth, PixyCamera etc.

Keywords: Artificial Intelligence, Human following, Human tracking, Ultrasonic Sensor, IR Sensor,
Arduino Micro Controller.

I. INTRODUCTION
Robotic technology has increased appreciably in past couple of years. Such innovations were only a
dream for some people a couple of years back. But in this rapid moving world, now there is a need of
robot such as “A Human Following Robot” that can interact and co-exist with them. The development of
robot technology had increased significantly due to industrial, medical and military applications. In
various fields with harsh environment such as underground mining, war-zones, medical, construction,
space exploration etc. the work done by one is extremely dangerous. Life of individuals assisting are also
put at risks. Tasks performed by humans have its own limitations in many ways. In order to perceive
beyond the human limitation in vision, speed, consistency, flexibility, quality e.tc we should make use of
robots. A key requirement for these robots is the ability to detect humans and to interact with the min
non-technical way. The main objective of this dissertation is to make a robot that can help humans with
various tasks.. In this paper, we present a prototype of a human following robot that uses Arduino Uno
and different sensors for detection and following an object. The Robot must follow the following
objectives. The robot must be capable of accurately

 follow a person.

It should be capable of taking various degrees of turns.

The robot must be insensitive to environmental factors such as noise.

The robot must be capable to avoid collision.

II. SYSTEM CIRCUIT DIAGRAM AND COMPONENTS


2.1 Circuit Diagram Figure 1: Human Following Robot Circuit 2.2 System Components 2.2.1 ArduinoUno

It is the brain of our project. It can give all the command to their sub ordinate components which should
by operated by the human behavior . And it also give feedback to the other components and human. So
that it can be the used as a medium of communication between human and robots & vice versa. . It has
specification of 8 bit CPU, 16 MHZ clock speed, 2 KB SRAM 32 KB flash Memory, 1 KB EEPROM. 2.2.2 DC
Motors DC Motor is a device that converts any form of energy into mechanical energy or imparts
motion. In constructing a robot, motor usually plays an important role by giving movement to the robot.
Here 4 DC motor are used to drive the robot. 2.2.3 Motor Shield The Motor Shield is a driver module for
motors that allows you to use Arduino to control the working speed and direction of the motor. . The
Motor Shield can either be powered by Arduino directly or by an external 6V~15V power supply via the
terminal input. Here Motor Driver Board is designed to Work with L293D IC. 2.2.4 Ultrasonic sensor An
ultrasonic sensor is an instrument that measures the distance to an object using ultrasonic sound waves.
The working principle of this module is simple, it sends an ultrasonic pulse out at 40kHz which travels
through the air and if there is an obstacle or object, it will bounce back to the sensor. By calculating the
travel time and the speed of sound, the distance can be calculated. 2.2.5 IR Sensor IR sensor is an
electronic device, that emits the light in order to sense some object of the surroundings. An IR sensor
can measure the heat of an object as well as detects the motion. Usually, in the infrared spectrum, all
the objects radiate some form of thermal radiation. These types of radiations are invisible to our eyes,
but infrared sensor can detect these radiations. The emitter is simply an IR LED (Light Emitting Diode)
and the detector is simply an IR photodiode.

1 Ultrasonic and IR Sensor Principle This ultrasonic sensor is placed at the top of robot and pair of IR
sensors are attached on either side of the ultrasonic sensor. We used ultrasonic sensor for obstacle
avoidance and to maintain a specific distance for the object. The ultrasonic sensor works accurately
works accurately within a range of 4 meters. Ultrasonic sensors operate by calculating the times
differences. Infrared sensors detect the object’s distance with infrared radiations when the beam from
transmitter detects an object it returns to the receiver with an angle after reflection also known as
method of triangulation this also helps in calculation of distance travelled by robot and eliminate any
further error in the robotic movement due to displacement.IR sensor controls the movement of motors
and ultrasonic sensor detects the obstacle and stops the motors.

IV. RESULTS
Different experiments were conducted and the performance of the human following robot was tested.
Test was performed on the ultrasonic and infrared sensor. It was noted that the sensor was working
accurately within a range of 4 meters. Then we performed the test to check whether the robot
maintains a specific distance with the target object. Then we checked the serial communication
between Arduino, motor shield and various motors. On the basis of results obtained from these tests
and experiments, we made the necessary changes in the processing and control algorithm. After the
completion, we observed that the results produced were very satisfying the robot was perfectly
following the person wherever it goes. Hence the objective of implementing a good Human-Robot
interaction was achieved. Figure 3: Human Following Robot

V. APPLICATIONS
Looking deeply into environment or our surroundings, we were be able interpret that there is a need of
such robot that can assist humans and can serve them. Such a robot can be used for many purposes.
With a few modifications, the robot can act as a human companion as well. The tasks these kind of
robots can perform are limitless including assisting in carrying loads for people working in hospitals,
libraries, airports etc.

CODE FOR THE PROJECT:-


/Arduino Human Following Robot

// Created By DIY Builder

// You have to install the AFMotor and NewPing library Before Uploading the sketch

// You can find all the required libraris from arduino library manager.

// Contact me on instagram for any query(Insta Id : diy.builder)

// Modified 7 Mar 2022

// Version 1.1

//include the library code:

#include<NewPing.h>

#include<Servo.h>

#include<AFMotor.h>

#define RIGHT A2 // Right IR sensor connected to analog pin A2 of Arduino Uno:

#define LEFT A3 // Left IR sensor connected to analog pin A3 of Arduino Uno:

#define TRIGGER_PIN A1 // Trigger pin connected to analog pin A1 of Arduino Uno:

#define ECHO_PIN A0 // Echo pin connected to analog pin A0 of Arduino Uno:

#define MAX_DISTANCE 200 // Maximum ping distance:

unsigned int distance = 0; //Variable to store ultrasonic sensor distance:


unsigned int Right_Value = 0; //Variable to store Right IR sensor value:

unsigned int Left_Value = 0; //Variable to store Left IR sensor value:

NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); //NewPing setup of pins and maximum


distance:

//create motor objects

AF_DCMotor Motor1(1,MOTOR12_1KHZ);

AF_DCMotor Motor2(2,MOTOR12_1KHZ);

AF_DCMotor Motor3(3,MOTOR34_1KHZ);

AF_DCMotor Motor4(4,MOTOR34_1KHZ);

Servo myservo; //create servo object to control the servo:

int pos=0; //variable to store the servo position:

void setup() { // the setup function runs only once when power on the board or reset the board:

Serial.begin(9600); //initailize serial communication at 9600 bits per second:

myservo.attach(10); // servo attached to pin 10 of Arduino UNO

for(pos = 90; pos <= 180; pos += 1){ // goes from 90 degrees to 180 degrees:

myservo.write(pos); //tell servo to move according to the value of 'pos' variable:

delay(15); //wait 15ms for the servo to reach the position:

for(pos = 180; pos >= 0; pos-= 1) { // goes from 180 degrees to 0 degrees:
myservo.write(pos); //tell servo to move according to the value of 'pos' variable:

delay(15); //wait 15ms for the servo to reach the position:

for(pos = 0; pos<=90; pos += 1) { //goes from 180 degrees to 0 degrees:

myservo.write(pos); //tell servo to move according to the value of 'pos' variable:

delay(15); //wait 15ms for the servo to reach the position:

pinMode(RIGHT, INPUT); //set analog pin RIGHT as an input:

pinMode(LEFT, INPUT); //set analog pin RIGHT as an input:

// the lope function runs forever

void loop() {

delay(50); //wait 50ms between pings:

distance = sonar.ping_cm(); //send ping, get distance in cm and store it in 'distance'


variable:

Serial.print("distance");

Serial.println(distance); // print the distance in serial monitor:

Right_Value = digitalRead(RIGHT); // read the value from Right IR sensor:

Left_Value = digitalRead(LEFT); // read the value from Left IR sensor:

Serial.print("RIGHT");
Serial.println(Right_Value); // print the right IR sensor value in serial monitor:

Serial.print("LEFT");

Serial.println(Left_Value); //print the left IR sensor value in serial monitor:

if((distance > 1) && (distance < 15)){ //check wheather the ultrasonic sensor's value stays between
1 to 15.

//If the condition is 'true' then the statement below will execute:

//Move Forward:

Motor1.setSpeed(130); //define motor1 speed:

Motor1.run(FORWARD); //rotate motor1 clockwise:

Motor2.setSpeed(130); //define motor2 speed:

Motor2.run(FORWARD); //rotate motor2 clockwise:

Motor3.setSpeed(130); //define motor3 speed:

Motor3.run(FORWARD); //rotate motor3 clockwise:

Motor4.setSpeed(130); //define motor4 speed:

Motor4.run(FORWARD); //rotate motor4 clockwise:

}else if((Right_Value==0) && (Left_Value==1)) { //If the condition is 'true' then the statement below will
execute:

//Turn Left

Motor1.setSpeed(150); //define motor1 speed:

Motor1.run(FORWARD); //rotate motor1 cloclwise:

Motor2.setSpeed(150); //define motor2 speed:

Motor2.run(FORWARD); //rotate motor2 clockwise:

Motor3.setSpeed(150); //define motor3 speed:


Motor3.run(BACKWARD); //rotate motor3 anticlockwise:

Motor4.setSpeed(150); //define motor4 speed:

Motor4.run(BACKWARD); //rotate motor4 anticlockwise:

delay(150);

}else if((Right_Value==1)&&(Left_Value==0)) { //If the condition is 'true' then the statement below will
execute:

//Turn Right

Motor1.setSpeed(150); //define motor1 speed:

Motor1.run(BACKWARD); //rotate motor1 anticlockwise:

Motor2.setSpeed(150); //define motor2 speed:

Motor2.run(BACKWARD); //rotate motor2 anticlockwise:

Motor3.setSpeed(150); //define motor3 speed:

Motor3.run(FORWARD); //rotate motor3 clockwise:

Motor4.setSpeed(150); //define motor4 speed:

Motor4.run(FORWARD); //rotate motor4 clockwise:

delay(150);

}else if(distance > 15) { //If the condition is 'true' then the statement below will execute:

//Stop

Motor1.setSpeed(0); //define motor1 speed:

Motor1.run(RELEASE); //stop motor1:

Motor2.setSpeed(0); //define motor2 speed:

Motor2.run(RELEASE); //stop motor2:


Motor3.setSpeed(0); //define motor3 speed:

Motor3.run(RELEASE); //stop motor3:

Motor4.setSpeed(0); //define motor4 speed:

Motor4.run(RELEASE); //stop motor4:

VI. FUTURE WORK


There are many interesting applications of this research in different fields whether military or medical. A
wireless communication functionality can be added in the robot to make it more versatile and control it
from a large distance. This capability of a robot could also be used for military purposes. By mounting a
real time video recorder on top of the camera, we can monitor the surroundings by just sitting in our
rooms. We can also add some modifications in the algorithm and the structure as well to fit it for any
other purpose. Similarly it can assist the public in shopping malls. So there it can act as a luggage carrier,
hence no need to carry up the weights or to pull that. Similarly, ample amount of modifications could be
done to this prototype for far and wide applications.

VII. CONCLUSION
A successful implementation of a prototype of human following robot is illustrated in this paper. This
robot does not only have the detection capability but also the following ability as well. While making this
prototype it was also kept in mind that the functioning of the robot should be as efficient as possible.
Tests were performed on the different conditions to pin point the mistakes in the algorithm and to
correct them. The different sensors that were integrated with the robot provided an additional
advantage. The human following robot is an automobile system that has ability to recognize obstacle,
move and change the robot's position toward the subject in the best way to remain on its track. This
project uses arduino, motors different types of sensors to achieve its goal. This project challenged the
group to cooperate, communicate, and expand understanding of electronics, mechanical systems, and
their integration with programming.

You might also like