Professional Documents
Culture Documents
Under supervision
INTRODUCTION
In this high technology, a robot must be able to detect and follow humans. A robot that can detect
.” and follow human or obstacle within a specific range is called “ Human Following Robot
Robots are used to change people's lives and make people's life luxurious. A robot that can use
in shopping time which carries items, and follow human without any remote more useful.A
robot that can use in the hospital to bringing medicine with more accuracy and fast. The human
following robot has many works like work as trolley,strecture in hospital, and a small basket
.with a car and so on
METHOD OF INSTALLATION
we need only one rectangular plate, on which lower side should be glued the
engines, and on the upper surface are mounted other elements. You can use
discontinued L293D motor driver shield like in my case, but also and Adafruit
motor shield as is presented on the schematic diagram without any changes.
The principle of object detection and monitoring is based on data accepted by both
sensors. The ultrasonic sensor detects the presence of an object in front of it within
certain limits, in our case between 10 and 30 centimeters. If there is no object (for
example our hand) in this space, all four engines are idle.
METHOD OF INSTALLATION
At the moment when an object appears in this space, the data from the infrared
sensors are read, and based on the obtained data, commands are given to the
motors, whereby the robot moves in the desired direction. The distance to which the
infrared sensors respond is adjusted by a small triming potentiometer. This distance
should be adjusted so that it is slightly larger than the minimum distance to which
the ultrasonic sensor is set to respond, in our case it is more than 10 centimeters.
you can see what this looks like in reality, just to mention that the smooth
movement of the robot takes some time to adjust the distances in the code as well
as the way the hand moves.
COMPONENTS REQUIRED
When you come near to the robot starts to follow you there are 4 wheels in the robot and 4 motors
attached to the chassis. now there are three sensors on the robot one is an ultrasonic sensor and
two IR sensor which arranges like two sensors left and right to the ultrasonic sensor. and when
you put your hand near to the ultrasonic sensor the robot will start forward.
If you turn your hand to the left side the Arduino robot moves on the left side, and if you put
your hand in the right the robot will move in the right direction. so, how the whole system works
we will talk about this.
when you put your hand in from of the ultrasonic sensor then the sensor detects you and sends
this information to the Arduino. there is some distance prefix in the Arduino so if your hand is
away from the sensor it will not read that. and if your hand is near to the sensor it will read it.
HOW DOES IT WORK
Now Arduino knows that there is something in front of the sensor and Arduino send some
instruction to the motor driver and motor driver trigger the motors. and the Arduino robot
starts to move forward we need to run all motor forward.
Now, what about the sensors. Ir sensor works on infrared light which can also detect the
object near to it. so there is two IR sensor one is at the left side of ultrasonic sensor and
other is at the right side of the ultrasonic sensor. when anything comes near to the left
sensor Arduino got the information that there is something is near to the left sensors and
according to the code, the robot will turn to the left. and the same process for the right
sensor. so this is how the human following robot works.
Here are giving all the steps to make this awesome project.
STEPS
Step 6: screw the acrylic piece to the servo motor top using screws and it
should look something like the above picture
Step 7: now take an small rectangular acrylic sheet with big holes and add
the ultrasonic sensor into the hole and add the two infrared sensor to the
two sides of the rectangular sheet and it should look like the above picture
Step 8: now add the battery case to to below portion of the base and
connect it to the arduino to power it up . use this circuit diagram to wire
them all properly and this code in arduino to activate it
Step 9: now play with it as much as you want or wish to it will follow you
every where no matter where you go (except for the bathroom)
CODE
{
#include<NewPing.h> for(pos = 90; pos <= 180; pos += 1){
#include<Servo.h> myservo.write(pos);
#include<AFMotor.h> delay(15);
#define RIGHT A2 } for(pos = 180; pos >= 0; pos-= 1) {
#define LEFT A3 myservo.write(pos);
#define TRIGGER_PIN A1 delay(15);
#define ECHO_PIN A0 }for(pos = 0; pos<=90; pos += 1) {
#define MAX_DISTANCE 250 myservo.write(pos);
delay(15);
NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); }
AF_DCMotor Motor1(1,MOTOR12_1KHZ); }
AF_DCMotor Motor2(2,MOTOR12_1KHZ); pinMode(RIGHT, INPUT);
AF_DCMotor Motor3(3,MOTOR34_1KHZ); pinMode(LEFT, INPUT);
AF_DCMotor Motor4(4,MOTOR34_1KHZ); }
Servo myservo; void loop() {
int pos =0; // put your main code here, to run repeatedly:
void setup() {
// put your setup code here, to run once: delay(50);
Serial.begin(9600); unsigned int distance = sonar.ping_cm();
myservo.attach(10); Serial.print("distance");
Serial.println(distance);
CODE