Building the Robot:
The mobile robot had to be built out of legos. Our job was to come up with a suitable design for the robot that would be flexible in case we had additonal parts such as a claw to add. Initially, we were given 4 6 volt motors, 4 analog sensors, 2 digital sensors and a CPU which acts as the brain of the robot. For mobility, our group decided to use tracks instead of wheels. Using tracks(like on a tank) made turning much easier. The hardest part of the design was coming up with a gear configuration that produced enough torque for the robot to go up the ramp. The robot had 2 analog sensors in the front, used to follow a black piece of tape on the floor and 2 digital sensors to sense if the robot hit a fixed object such as another robot or a wall. If the robot hit a fixed object then it would turn 180 degress in the opposite direction, avoiding the object, and then continue to follow the black line. To make the robot move, we used 2 motors, one to control the left track and one to control the right track. To make the robot go straight we would turn on both motors at the same time and at the same speed. The analog sensors would return a value between 0 and 255. Consequently, when the analog sensor sensed a dark color than a high value would be returned and a low value would be returned when a light color was sensed. The digital sensor would return a value of either 0 or 1.Robot Tasks:
The first task was to make the robot go up the ramp and stop when it got to the top of the ramp. The second task was to allow the robot to avoid obstacles which could be solid objects. The third task was the final project which will be explained in more detail in the next section. To perform these tasks, the robot had to be given instructions which were implemented in the C programming language.Final Project:
Our final project uses all the tasks assigned throughout the semester. The final project was to let our robot read signsand perform different tasks depending upon each sign it read. Originally, each sign was a colored piece of paper that would be attached to the floor. However, since lighting conditions of the room changed daily which effected our analog sensors, we had to limit the color of the signs to black. Consequently, we made black signs by placing strips of black tape on the floor. When the robot read the first black sign it would do nothing but continue to follow the black tape on the floor. After reading the second black sign, it would turn 45 degrees to the left and hit the wall. After the robot hit the wall it reconginze that the wall was a fixed object and turn 180 degrees away from the wall and try and find the next sign. After finding the third black sign, the robot had 2 choices, either to follow the black tape on the floor, or detour from the black tape and go straight until the next sign was located. We made our robot detour from the black tape and go straight until the next sign was located. When the fourth black sign was located, the robot would turn right 45 degrees, reverse for a few seconds, and pause for a few seconds. After the short pause, the robot would find the black tape on the floor and follow it all the way to the ramp. Once the ramp was recognized by the robot, it would proceed to go to the top of the ramp and stop once it found the top of the ramp. If all the signs were removed then the robot would follow the black line all the way to the ramp using a much longer path . However, if the robot uses the signs, it will get the ramp using a much shorter path.Problems:
We had a few problems with the mobile lego robots. One main problem was the analog sensors. We had to replace our analog sensors twice. Furthermore, the analog sensors kept returning inconsistant values due to the changing lighting conditions of the room and shadows. More minute problems occurred with the motors. Since we used 2 motors for our robot, one motor was always weaker than the other and we could never get our robot to go perfectly straight. We tried to reduce the speed of the stronger motor to compensate, but we still could not get the robot to go perfectly straight.