The goal of this project is to make a robot navigate a maze while self-balancing, utilizing three IR sensors for corridor detection and a gyroscope and accelerometer to balance. The Texas Instruments F28379D LaunchPad development kit is used to power this robot.
The DevelopmentFirst, the team attached three IR sensors in the front and on each side of the robot. These sensors detect walls nearby, giving it the ability to sense where the junctions of the maze are. Sensors were implemented on both sides to allow the robot to center itself between two walls as it traverses a pathway.
These IR-sensors have three wires which are connected to power, ground, and to the ADC-A on the processor via a signal wire. The ADC uses a start-of-conversion (SOC) for each IR-sensor to read and store these values in the ADC-A register. The raw values from the sensor are from 0-4095, which is converted to 0-3 Volts. A moving average filter is then used to reduce the noise in the readings.
From here, cut-off voltages were experimentally determined to flag when the robot would see a path versus a wall. A cutoff-voltage of 0.7V was used on the sides, where below this value the robot would know that there is a new path to take. The front IR-sensor used a cut-off of 0.6V since it is mounted closer to the front of the robot
As a checkpoint, our goal was to have the robot be able to follow the left side of a wall. This can be seen in the video below.
AlgorithmThe final step is to implement the maze algorithm. The maze solving utilizes a recursive Depth-First Search (DFS) algorithm that allows it to explore every path starting from the left-most path (the path you take if you only take left turns).
The robot traverses forward while centering itself between pathway walls until it finds a junction, which is when a wall is sensed in front of the robot or a missing wall on the left or right of the robot is sensed. The robot performs a unit step movement to center itself on the junction. From here, it explores the left-most path, and remembers that it turns left. At each junction it sees, it will repeat this and take the left-most path until it reaches a dead end. It will then backtrack to the most recent junction and explore all other paths, prioritizing the middle path, and finally the right path. This will continue until it finds a junction where the all directions are open paths, which signifies the end.
Team Member Contributions:
Aman - Electromechanical integration of IR sensors and implementation of simple wall following.
Darren- Implemented IR-based wall following for pathway centering. Implemented a recursive maze-solving algorithm.
Matthew- Implemented linear movements and turning based on distance and angle using wheel encoders. Helped to implement and debug recursive maze-solving algorithm.
Tommy- Some work toward improving simple wall following, troubleshooting the maze algorithm, and integrating the IR sensors. Made the sensor mount and created the maze.
Special thanks to course intructor Dan Block and TAs Cary Butler and Joshua Cox!
Source code linked below:
Comments
Please log in or sign up to comment.