Zwally, Scott

Brief Description: While searching for ideas, I spotted a project where someone created a robot that can track a ball filled with IR lights and play soccer. I thought to create a robot to do that, but instead I decided to create a robot that responds to commands given by an IR remote. Later, I added a way where it can tell if it's on or off a table and not fall off the table. Then I decided to make it autonomous and be able to move around the edge of a table without falling off.

Detailed Description: With the first part, responding to an IR remote, I downloaded the IRremote library found on Ken Shirriff's blog and got the code values for the IR remote using IRrecvDemo. Using the code below, I assigned the various codes to make the robot move forward, backward, turn clockwise and counterclockwise, and stop. Then I added the distance sensors, which take a digital read to see whether they are on or off. With the addition of distance sensors, I made it so that if the robot views itself as being on the table, it follows the IR remote commands, and if views itself as being off of it, it backs up and starts turning clockwise. When I made it autonomous with edge-tracking capabilities, I used the distance sensor so that if it's on the table, it slowly turns towards the edge, but if it sees itself as of the table, it turns away from the edge. This gives the robot a waddling motion rather than a smooth one. When using the IR remote program, I had the distance sensors hanging forward and looking downwards, but when I had it be autonomous, I had the one distance sensor forward of the robot and looking at the ground at about a 45 degree angle with the ground so it could make corners safely.

int distanceSensorL = 5;//int distanceSensorR = 8; //only use if the right sensor will be hanging off the table instead of the left sensorint distanceStateL;//int distanceStateR;Servo ServoL;Servo ServoR;

Problems Encountered: 1. I was having troubles with the distance sensors working with the servos; the distance sensors would always view themeselves as on the table. So then I added the disk capacitors to the sensors and everything worked out there.

2. Also, with the IR sensor, the distance sensors, and the servos working, be sure to use a 9 volt battery, because the robot won't respond to commands all that well and won't sense itself as being off the table.

3. When you are getting your IR signals from your remote using the IRrecvDemo program from the IRremote file, be sure to remove "HEX" or the robot won't respond to your commands.

4. If the robot doesn't respond well to commands when the IR receiver is facing away from the remote, extend the IR receiver and place it on the top with the dome facing the ceiling.

5. If the light in the distance sensors is flickering while edge-tracking and the robot keeps falling off, replace the 9-volt battery and everything should work out.

6. I noticed that when the robot is receiving IR signals, zeros appear. Sometimes, they messed up the command signals sent, other times, they don't visibly affect the performance. They started appearing when before they didn't, and I don't know what caused them to appear or how to fix them if they interrupt the IR signal.

7. When doing testing and loading the programs, it helps to make a stand and put your robot on it so it doesn't go anywhere or fall off. I made mine out of Lego.

Additions if I had more time and/or money:1. I would make the robot perform the tasks it originally was meant for: go around a table putting foam cups over PVC pipes, pushing stuff off the table, and taking in measurements.

2. I would replace the tape with something more permanent, like glue.

3. I would add a piezo so that when it backs-up, it makes a beeping sound.

4. I would make another one and make the original send IR signals to the other one so that it follows the first car.