Fundamentals of Mechanical Engineering - Mobot: Seek, find, and stop in front of a randomly placed can without leaving the borders, uses Arduino, servo motors, electric motors, a distance sensor, and a line tracker. The goal was to have our Mobot end its program (cease all function) once its proximity to the can is within about 2 centimeters without bumping into the can. The can is placed in a 5'x5' square of electrical tape, at random, but the Mobot starts in the same location each test. No starter code was given, we only had our knowledge on programming each individual component (distance sensor, motors, servo, line tracker) on its own, and were tasked with coming up with a strategy that would accomplish the goal by combining all 4. 
My Strategy: Have the Mobot move forward at all times, using the line tracker to detect the border and keep it within bounds. The distance sensor is mounted on a servo in the front, so it will turn 30 degrees every .25 second and sweep back and forth as the distance sensor scans the area. Once the distance sensor detects something less than 2 feet away, the sensor is pointed directly ahead, and the Mobot begins spinning until the distance sensor detects something once again, indicating that it is "looking at" the can. If the sensor continues detecting the can, the Mobot is moved forward until either the can is no longer in view, restarting the servo sweep, or detects something within 2-4 cm where it will then end the program.

Our Mobot on the final test day

Testing our Mobot

Back to Top