Sunday, April 11, 2010

Final Challenge-4

For this part of the challenge, we developed a procedure that that made our MotorCar go exactly 10 feet. We used a timer to control the amount of time the motor would be on for. . In order to figure out this time we timed how long it took for our car to move 10 feet on the concrete floor. The times that we obtain were not very consistent because the MotorCar did not travel in a perfect straight line. However, we were not worried about the vehicle moving straight at this point. So our average time was around 8.86 seconds and we incorporated it into our program. In PicoBlocks 1 seconds corresponds to 1000, so 8.86 seconds would be 8860. We first tried out our program with the motor stopping after the times exceeded 8.86 seconds and the MotorCar passed the 10 feet mark by an inch. So we decided to lower the time to 8.5 seconds. When tried it on our MotorCar, the car stopped exactly at the line!
Here is our program on PicoBlocks:

And here is a video of our MotorCar travelling 10 feet:


After making sure that our program worked on the concrete floor we tried it in different situations. When we tried it with the car going uphill, it stopped short of the 10 feet mark by a foot. When we tried it with the car going downhill, it passed the 10 feet mark by 3/4 of a foot. The fact that the car is travelling downhill or uphill definitely matters because the car moves slower as it travels up and moves faster as it travels down the ramp.
We then replaced our "stop" block with a "coast" block to see the difference between the distances that the car would travel. In fact, when the car coasted at the end of 8.5 seconds, it passed the 10 feet mark by a couple of inches.

We then, using the shaft encoders, measured how many "counts" it took for the car to travel that distance. We created a program that printed "count a " and "count b" for 8.5 seconds.
"count a" was 3237 and "count b" was 3225. All of these measurements were taken on the flat concrete floor.
This is a picture of the program that allowed us to obtain the counts:

We then figured out how far was one "count". We divided 10 feet with the counts that we obtained and the result was that for both "count a" and "count b", the car moves .037 inches per count.
If the car were to skid, which means that the car would move but the wheels would not spin, the distance per count would increase.
If the car were to slip, which means that the car would not move but the wheels would still spin, the distance per count would decrease.

No comments:

Post a Comment