Nowadays automation and robotics are common words. In future, we can imagine a machine-controlled world. Everywhere we need a device with automation in it. Like automatic doors, automatic fire control, and automatic appliances which can be controlled with our voice or smartphones. Where there is a huge life risk for a human being in a work, it can be done by a robot easily. Living beings have limited energy and flexibility but a robot does not lose any energy. It is also very efficient and a time saver for us. The robot is a very common and interesting thing in our minds. At this time there is a need for assistance or helper. A human following robot can be a substitute for this problem.
Humanoid robotics is an innovative research field that has received considerable attention in recent years. Robotics research will resume to play an important role in many electronic applications in the 21st century and beyond. In this rapid moving world, there is a need for robots such as “A Human Following Robot” that can interact and co-exist with them. It can help us and follow our orders. Also, it helps us in all types of working fields like industries, medical and military applications, war, construction, space exploration, underground work, etc.
In this project, we are going to build a Human Following Robot using Arduino and some sensors.
This robotics project can do the following works;
- Follows accurately a person.
- Can move in various degrees.
- Can avoid any type of collisions.
Check out other Robotics Project
- Ultrasonic Sensor Module
- IR Sensor Module (x2)
- 5V Servo Motor
- L298N Motor Driver
- 3.7V Li-Ion Battery (x3)
- Battery Holder
About Parts for Human Following Robot
For the compact build, I choose Arduino Nano despite Arduino UNO. Arduino Nano is a small, flexible microcontroller board using an Atmega328p chip. It can also use as a substitute for UNO. All the functions are the same in these two boards. The size of its PCB is 18×45 mm. The clock speed is 16Mhz. Its input voltage is 5-12V. There are 30 pins including power pins, data pins, analog pins, serial pins on this board.
This is a sensor that can measure the distance of an object from the sensor position by ultrasonic sound waves. It sends ultrasonic waves of 40 KHz in the medium. If the waves are reflected on the object and bounce back to the sensor, it calculates the distance by calculating the travel time and speed of sound.
An infrared sensor module is an electronic device that emitted infrared rays for sensing. This sensor can sense any objects in the surroundings as well as measures the heat and motion of it. The working principle of this module is so easy. The IR transmitter sends the infrared rays and after a certain distance, it gets reflected by the object. These reflected rays get captured by the receiver present in this module. By this process, it captured data from the object.
L298N Motor Driver
This is a dual-channel H-bridge motor driver. It can control four DC motors at the same time. The range of the voltage that can be used with it is 5V to 35V.
Note: I am using an L298N motor driver in this project, but you can also use an L293D motor driver as we use only two BO motors here. But in the case of four BO motors, we should use the L298N motor driver.
For removing messy wiring and give a clean look, I designed a PCB prototype for this project. It is also helpful for troubleshooting that runs great without any errors. To design this PCB board, I used EasyEDA as it is too easy to use. For ordering PCB for this, I prefer PCBWay.
Gerber file for Human Following Robot Gerber.
You can view the Gerber file from here Gerber File Viewer.
Order PCB From PCBWay
There are so many forums or communities for electronics online in today’s technical world, and one of the famous ones for PCB manufacturing is the PCBWay. PCBWay is a place that brings manufacturers and customers together. They have more than a decade of experience in this field of fabrication, prototyping and assembling PCBs. PCBWay have proved their focus to their customers’ needs in terms of cost-effectiveness, delivery, and quality.
How PCB Manufacturing Process Done in PCBWay
Standard quality for any product needs to be maintained using some parameters. PCBWay gives that opportunity by quality control in designing and manufacturing. At first, they ensure accuracy, clarity, validity of the PCB files that we sent to them.
Then all the boards will go through the most stringent tests other than the basic visual check. They adopt most of the testing and inspecting equipment used in the industry, such as Flying Probe Tester, X-Ray Inspection Machine, Automated Optical Inspection (AOI) Machine. PCBWay are having 50+ new engineers on the daily basis around the world using PCBs for their work, who trust for their reliable quality. They produce high-quality pink, orange, grey, even transparent solder mask. Moreover, according to people needs, they can also provide Black core PCB. Check it out for a High-Quality PCB solder mask. There are some pictures below of the new colours of solder musks.
Features of PCBWay
PCB Prototyping & Manufacturing: PCBWay produces FR-4 and Aluminum boards and advanced PCBs like Rogers, HDI, Flexible and Rigid-Flex boards, at a very reasonable price. Just check this Instant Quote to order premium PCBs for your hobby projects.
PCB Assembly: It not only offers PCB Prototyping but also offers PCB Assembly service. You can order a full PCB board with attached components by uploading your file. SMT & THT assembly starts from only 30$ including free stencil and worldwide shipping. The components can be sourced and provided by PCBWay, or by clients themselves.
Open Source Community: It not only offers PCB Prototype & Assembly service but also gives opportunities to students for sponsorships. I think this is so great. They feature their projects on the website also.
3D Printing & CNC: It also produces Rapid Prototyping like 3D printing, CNC Machining, Sheet Metal Fabrication, and Injection Molding. The quality of the product is too premium and reliable. And also the best part is that you will receive your order within a minimum of 3 days.
PCBWay Store: More boutique gift modules are waiting for you to discover, giving your creativity wings. You can order all types of electronic equipment, components and many more with exciting offers. Go with the link and buy your needs, PCBWay Store.
Services: PCBWay offers great servicing of their products. It takes only 3 to 15 days according to courier service to deliver your products. Also, it has a live support facility. Whenever you have any problems, you can always reach a live customer service person to respond to your emails or messages. They have the “Return and Refund” principle, for every unusable board caused by PCBWay, they will rebuild and refund the order soon.
Guide for Ordering PCB From PCBWay
Working Principle of Human Following Robot
This project has a microprocessor (Arduino) and is controlled by some sensors and a motor driver. The sensors used in these project are ultrasonic sensor, infrared sensors which helps the robot to move with a person.
These sensors help the robot to avoid collisions and follow the person you want. The ultrasonic sensor does this thing for the robot. It helps to maintain a specific distance from the person. The distance is about 100 centimetres.
We placed the ultrasonic sensor at the top of our robot, as this sensor works like the eye of the robot. We attach the IR sensors on both sides of the robot.
Infrared sensors detect the distance of the object from the robot. When the beam of the infrared rays is released from the transmitter, it gets reflected by the person. This reflected ray is received by the receiver and sent to the Arduino and it counts the time. By this process, it calculates the distance.
Applications of Human Following Robot
- This robot can carry loads for a person in anywhere.
- It can help people in shopping malls and public areas.
- Any vehicle or person can be followed by this robot.
- It is a good companion for an elderly people.
Arduino Code for Human follwoing Robot
#define LEFT_IR A1
#define RIGHT_IR A0
#define TRIGGER_PIN A3
#define ECHO_PIN A2
#define MAX_DISTANCE 100
NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE);
AF_DCMotor Motor1(6, MOTOR12_1KHZ);
AF_DCMotor Motor2(5, MOTOR12_1KHZ);
AF_DCMotor Motor3(4, MOTOR34_1KHZ);
AF_DCMotor Motor4(3, MOTOR34_1KHZ);
int pos = 0;
for (pos = 90; pos <= 180; pos += 1)
for (pos = 180; pos >= 0; pos -= 1)
for (pos = 0; pos <= 90; pos += 1)
unsigned int distance = sonar.ping_cm();
int Right_Value = digitalRead(RIGHT_IR);
int Left_Value = digitalRead(LEFT_IR);
if ((Right_Value == 0) && (distance >= 10 && distance <= 30) && (Left_Value == 0))
} else if ((Right_Value == 0) && (Left_Value == 1))
} else if ((Right_Value == 1) && (Left_Value == 0))
} else if ((Right_Value == 1) && (Left_Value == 1))
} else if ((Right_Value == 0) && (Left_Value == 0))
else if (distance > 1 && distance < 10)