I made this line following robot from scratch using DIY components and open-source Arduino platform. This robot transports stuff between two users (defined by point A and point B) back and forth. Robot carries the stuff in a basket and moves from point A to point B along a line defined by the black sticky tape on the floor, while avoiding collision with any passing object (e.g. a person) in its way. After it reaches the end (point A or B), robot stops and waits for the user to pick the basket up. Once user puts the basket back on robot, it turns back and moves towards the other end.
The whole project took around 5-6 months (few mins/hours here and there at nights/weekends), where I researched various aspects of robot design - mechanical engineering, electronics and computer programming. I chose Arduino microcontroller for the brain of the robot, since it's an open-source platform with tons of resources available online, mainly on YouTube. The most challenging part for me was the physical design of the robot itself, with the constrains on weight distribution of different parts, power management and robot stability.
Robot utilizes three kinds of sensors:
- An array of 3 reflectance sensors on the underside of bottom robotic platform to detect and follow the black sticy tape.
- An ultrasonic sensor mounted on a servo motor at the front to detect and avoid collision with any passing object, e.g. a moving person.
- Light-dependent resistor (LDR) embedded in the top platform to detect when the user lifts the basket off and puts it back, signaling that robot needs to turn back and move towards the other end.
Following are a series of videos describing the evolution of this robot, while I implemented and optimized different features:
First try, got the robot base moving and following the line.
Moved wheels close to the center, which led to better weight distribution and improved robot's agility.
Implemented a series of changes:
- Better power management by having separate battery packs for the Arduino board and the motors.
- Refined sensors and the code for the robot to follow a thinner line.
- Added code for the robot to stop at the "T" intersection.
- Added four legs and the top platform; embedded LDR sensor into the top platform, which senses basket movement on and off of the robot.
- Worked on the code so that all three sensors (LDR sensor at the top, ultrasonic object avoidance sensor at the front and reflectance sensors at the bottom) are working together.
Robot is working as expected. If a person comes in the way, robot stops and waits until the path is cleared. Robot stops at the end of the line (T intersection), waits for the user to pick up the basket. When user puts the basket back on the platform, robot turns back and starts moving towards the other end.
Here is the code which runs the final version of the robot.