Building a Semi-Autonomous Robot to Track and Follow People
Farah Omar, Hamidah Shittu
Calgary Islamic School, Akram Jomaa Campus
Grade 7
Presentation
Problem
Our goal is to build a robot that can automatically follow a person while maintaining a safe distance. This project explores how robotics is becoming more advanced by allowing robots to sense their environment, respond to their environment, and move on their own.
Method
Research
The human-following robot relies on the interaction of sensors, microcontroller, motor control, and power systems. In the middle of the robot is an Arduino Uno, a microcontroller that's like its brain. It reads data from ultrasonic and infrared (IR) sensors, processes it, and sends commands to the motors. The ultrasonic sensor works by sending sound waves at a frequency above human hearing. These waves bounce off objects and return as echoes. The Arduino calculates distance using the formula: Distance=Time for Echo×Speed of Sound /2 This allows the robot to know how far away a person is and maintain a safe following distance. The IR sensors detect reflected infrared light to determine lateral movement, letting the robot know if it needs to turn left or right. Multiple IR sensors allow the robot to detect the direction and relative position of the person in real time.
The motor driver shield is useful because the Arduino cannot give enough power to drive the DC motors directly. The shield receives low-power control signals from the Arduino and converts them into higher current output to drive the motors safely. The DC motors provide movement for the wheels, converting electrical energy into mechanical motion. Speed and direction are controlled by Pulse Width Modulation (PWM) signals from the Arduino, allowing fine adjustments to prevent jerky movements. Servo motors are used to adjust the orientation of sensors, like sweeping the ultrasonic sensor side to side for better scanning coverage.
Power management is critical for stable performance. The robot uses 18650 Li-ion batteries in a holder, which deliver enough current for all motors while maintaining a consistent voltage. Batteries are connected to the motor driver shield, and a DC power switch allows safe powering on and off. Voltage fluctuations or weak connections can cause motors to stall or sensors to return incorrect readings. Loose soldering, noisy wiring, or reflective surfaces can make ultrasonic sensors return “0 cm” or erratic measurements, which the code must handle.
The Arduino code uses information from all the hardware parts. It constantly reads data from the sensors and uses logic to decide what the robot should do next. The code sends PWM signals to the motors so they can move. The program uses conditional statements to handle different situations. The robot moves forward when it detects a person. It turns when the IR sensors show that the person is off to one side. It stops if the person is too far away. Some advanced parts of the code help deal with sensor noise, reduce sudden spikes in ultrasonic readings, and make sure the motors speed up smoothly instead of all at once. All of these parts working together—sensors, computing, motor control, and power management—allow the robot to work on its own. Human-following robots like this show how automation, robotics, and real-time processing work. They also show engineering challenges, such as making sensors reliable, keeping power stable, and making sure the hardware and software work well together.
- Get a cardboard box and cut it to 14cm by 9cm
- Hot glue all four tt motor gears on each corner of the cardboard piece
- Make four small holes in the cardboard and put the wires through
- Attach wheels to each of the motor gears
- Flip the cardboard piece over and strip around 3/4 inches of insulation from the motor wires off
- Glue the Arduino board in the middle of the cardboard piece
- Get a motor driver shield, count up to six male header pins, and snap it. Do this three times
- Heat the solder iron, wipe it with a sponge, and tin it with solder wire
- Put all three lines of six pins in the motor driver shield, turn it upside down, add flux, and solder them
- Connect the motor driver shield on top of the Arduino
- Unscrew all eight motor output screw terminals
- Glue the battery holder to the back side of the cardboard piece
- Use the robot circuit to secure the striped motor wires and the battery holder in the correct screw terminal on the motor driver shield
- Glue the servo motor on the front side of the robot
- Stick the piece of foam on top of the servo motor
- Get a piece of foam and cut it into this shape
- Push the ultrasonic sensor into the bracket
- Attach the bracket to the foam piece using hot glue and/or screws
- Hot glue two infrared sensors on each side of the bracket
- Use the robot circuit to put the servo on the motor driver shield
- Get ten female-to-female jumper wires and use the robot circuit to connect them from the sensors to the motor driver shield
- Plug the USB into the Arduino and your laptop, and open the Arduino app
- Choose the board Arduino Uno and upload this code https://docs.google.com/document/d/110-OLU21kZcD1-CC7RSZrf8pATroHb5aicaN12NUtHk/edit?tab=t.0
- Optional: Take the USB out of the Arduino and cut the battery holder’s red wire into two
- Optional: Get the dc power switch and solder the battery holder’s red wires to it
- Put the batteries in and turn it on
Analysis
The robot mostly worked as planned. The ultrasonic sensor measured how far away the person was, and the infrared sensors helped it know if the person was to the left or right. The motors moved the robot, but it turned a little slowly on sharp changes. We noticed that shiny or reflective surfaces sometimes confused the sensors. Watching how the robot moved helped us understand how well it kept its distance and where it needed improvement.
Conclusion
The robot successfully followed a person using the Arduino, ultrasonic sensor, and infrared sensors. It was able to keep a steady distance and adjust its path based on sensor input. Some challenges, like slow turning and sensor errors, were fixed by adjusting the code. This project shows that sensors, motors, and programming can work together to make a robot that reacts to people automatically.
Citations
https://projecthub.arduino.cc/hrsajjad844/human-following-robot-using-arduino-by-proteus-fda462
https://www.instructables.com/HUMAN-FOLLOWING-ROBOT/
https://www.arduino.cc/en/about/
https://www.instructables.com/
https://arduinogetstarted.com/tutorials/arduino-ultrasonic-sensor?utm_source=chatgpt.com
https://maker.pro/arduino/projects/diy-arduino-human-following-robotn
https://en.wikipedia.org/wiki/Servo_(radio_control)
https://store-usa.arduino.cc/products/arduino-motor-shield-rev3
https://docs.arduino.cc/built-in-examples/analog/Smoothing
https://howtomechatronics.com/arduino-projects/
https://chatgpt.com/ (only to help with soldering)
https://www.canva.com/templates
Verma Prateek. GitHub. https://github.com/vermaPrateek10/Human-Following-Robot/blob/main/Human_following_robot.ino
Mrs. Atabayeva. Guided us on soldering.
Farah's Mom
Hamidah's Mom
Farah's Dad
Acknowledgement
We would like to thank Mrs. Khalil, our science teacher, for her guidance and support throughout this project. We would also like to thank Mrs. Atabayeva, the high school science teacher, for her help and advice.
We are grateful to our parents for buying the materials and supporting us during this project. We would also like to thank our friends Lina, Rose, Masah, Sereen, Rania, Ayaat, Taleen, Maryiah, Sarah, and Leema for their help, ideas, and encouragement.
