Maze Project

By: Ran Trakhtengerts and Raheem Davis

Sensor Set-up and Design Modification

The Ultrasonic Sensor, its components, and its 'base' will be modified using the pieces which connected it in the previous 'default' design. It will be attached just above the swivel wheel. The Ultrasonic Sensor will be facing to the left. See the pictures below for more details. The first picture shows how the Touch Sensor will be connected. The bottom pinhole of the 'monstrosity' will be moved back as far as possible while maintaining the space for sensor wires as shown in the first picture. The second picture shows how the Ultrasonic Sensor will be connected. The third picture shows the "base" for the Ultrasonic Sensor. The Light Sensor will be removed from the robot, giving the Touch Sensor more room. This will allow us to move the Touch Sensor back to shorten the overall length of the robot. The little pegs of the Touch Sensor will be altered to deny the Touch Sensor the ability to swing backwards or forwards on the 'monstrosity'.
Big image
Big image
Big image


The program will be written in a way that the robot will move forward at 50% speed until either the Ultrasonic Sensor senses that there is nothing within 6 inches of it or the Touch Sensor is pressed. If the Ultrasonic Sensor is triggered, then the robot will make a 90 degree turn to the left. If the Touch Sensor is pressed, then the robot will make a 90 degree turn to the right. After turning left, the robot will wait 1 second before it reads the Ultrasonic Sensor again. There is always the slight angling problem. The robot may overturn or underturn, which will lead to it driving into walls and triggering sensors too early or late. We will incorporate hysteresis into our program to correct these mishaps. If the Ultrasonic Sensor detects that it is straying too close to or far away from the wall, it will increase the speed of a motor to correct itself. The optimal distance will be from 2 to 3 inches away from the wall. This will not interfere with the turning because the Ultrasonic Sensor senses an opening of at least six inches of space. Due to the constructions of the maze and our robot, a false turn/correction will not occur.

How It Should Act

The code should work perfectly because there will be no 'islands' where the robot will continue to make counter-clockwise circles around it. In the case of a dead end, the robot will turn right because of the Touch Sensor. Then it will do this one more time due to the second wall. As the robot moves in the other direction, whatever paths it missed due to the Ultrasonic Sensor being on the left will be detected because the robot will now see them on the left side.

Problems We Encountered

The main problem was that the Ultrasonic Sensor would only sense openings and walls on the left side of the robot. If the robot had to turn right or turn around in a dead end, it wouldn't be able to. To solve this, we added a Touch Sensor to the front which will make the robot turn right when pressed. This lets the robot turn right and turn around in a dead end. Another main problem that we had is the walls of the maze are 8-10 inches apart. That means that the robot must be shorter. Making the robot shorter is a task harder than it sounds. Shortening and moving back the "monstrosity" cut off about 1 inch. Our robot is now exactly 9 inches long.
The shorter the robot is, the easier it is to turn.