Saturday, April 24, 2010

Final Challenge-9

For the last part of this challenge, we combined everything that we learned into one program. Our goal was to make the MotorCar move straight for 10 feet up the ramp. In doing so, we used our straight-proportional program and our nudge program. So we combined these programs together and basically looks the same as our previous program from challenge 8. However, this time when we tested our MotorCar on the ramp, it didn't move straight. It was very strange because in our previous programs, it had successfully moved up the ramp without falling off numerous times. So we decided to take a closer look at our straight-proportional program. We saw that there were a few problems in our program. We first created a "protect" block that would ensure that the power settings would remain withing the range of 0 and 10000. Before, we did not have a way to limit the setpowers and if our they were set to numbers that were negative or higher than the full power, it might have caused our proportional program not to work properly. The second thing that we did was to change the equation that determined our proportional control. We did not know that LogoChip did not consider order operations. It reads an equation from left to right. Therefore, LogoChip misinterpreted our equation to be (10000-count-)*800. While this is what we intended our equation to be: 10000-(count-*800). So we altered the order of our equation. This is a picture showing the changes that we made:

This is our program for the protect block:

These are the blocks that determine proportional control:
These are our nudge and straight-proportional blocks:
and we combined them to create a program to make the car go exactly ten feet:



After making those changes, we tested our program and this time the MotorCar wobbled and still beared to the right. To decrease the wobbling we decreased our gain from 800 to 200. But even after changing the gain, the car still beared to the right. So then we decided that the problem was in the wheels. To test that out, we switched the two wheels and tested our program again. The problem did lie in the wheels because the car, this time, beared left. There must have been a slight difference in the diameter of the wheels which would have completely thrown off the counts and made our proportional program ineffective. So we tested out different wheels until we found a pair that would make the MotorCar move the straightest.

This is a video of our MotorCar moving up the ramp. The car moved fairly straight but we had to nudge it a little bit so that it wouldn't fall off. We were disappointed that we had to do this because in previous challenges, our car was able to move along the ramp without falling. However, the car stopped really close to the 10 feet target.


This is a video of our MotorCar moving down the ramp. Like when going up the ramp, we had to slightly nudge our MotorCar. The car did, however, stop fairly close to the 10 feet target.



The last two videos are of the MotorCar on the concrete floor and on the carpet, respectively. On both of these surfaces, the car beared to the right. On the carpet, it beared greatly to the right. These tests were one of the worst out of all our LogoChip challenges. We didn't really understand why this happened because our programs were working fine before. So one of the reasons that our final programs didn't work as well was that the wheels were changed, which would have messed up our counts because the wheels are not exactly the same. Unfortunately, we didn't have much time to invest in fixing this problem because Esther and I had to concentrate on the final project. However, we will certainly use our straight proportional program in our final project because our robot would have to move straight for 10ft to reach the candle.


No comments:

Post a Comment