Performance Test 2

The same designs from performance test 1 were used in performance test 2. The second test was supposed to focus on editing the code in order to make it more efficient however, Performance Test 2 did not go as planned. In the days leading up to the test, the AEV had become less and less consistent. Whenever the AEV had a perfect run, it would be tested again directly after without making changes and the AEV would not make it to the first gate. Possible issues were brainstormed. There was a chance that the battery could be running low, so enough power was not reaching the motors making it not go as far, so the battery was replaced. The battery was not the issue because the AEV was just as inconsistent as before. Some advice that was given was that it could be the reflectance tape on the wheel. The tape was fairly scratched and not reflecting light well, so the wheel was exchanged for a new one. When tested again, the motors would not turn off, so it was deduced that the sensors were not working at all. With closer inspection, the connection from the sensor to the arduino was bent, which was causing the loss of connection. The Arduino was replaced. Unfortunately, this was after the performance test took place, so extensive data was not collected.

Orange shows the coasting code used, and blue shows the power braking code. From the two tests, it was found that power braking was the best option. Although it may use more power than coasting does, by looking at the budget it can be seen that the cost of the extra power could be balanced with the loss of time it will take to do a run. In addition to less time, the stopping point of the AEV will be more consistent and accurate with power braking, which will decrease the accuracy penalty, decreasing the total cost required. Therefore, power braking will be used during the final performance test

Codes Used:

Code 1-

 

reverse(4); //reverse the polarity of the motors to thrust AEV in the right direction
celerate(4,0,45,2); //accelerates the AEV from 0% power to 45% power in 2 seconds
motorSpeed(4,40); //coasts at 40% power
goToAbsolutePosition(152); //follows previous command till AEV reaches 152 ticks
brake(4); //cuts power to the motors
goFor(10.5); //follows previous command for 10 seconds
motorSpeed(4,35); //coasts at 35% power
goToRelativePosition(99.7); //previous command runs for 99.7 ticks from the position the AEV is at the end of last command
reverse(4); //reverses polarity of motors
goFor(10); //AEV coasts at 0% power for 10 seconds
celerate(4,0,45,2); //accelerates the AEV

 

Code 2-

 

reverse(4); //reverse the polarity of the motors to thrust AEV in the right direction
motorSpeed(4,42); //coasts at 42% power
goToAbsolutePosition(210); //follows previous command till AEV reaches 152 ticks
reverse(4); //reverse polarity for the power brake maneuver
goToAbsolutePosition(265); //the next command is engaged when the AEV reaches 265 ticks
motorSpeed(4,35); //power brakes at 35% power
goFor(1); //power is supplied to motors for 1 second to kill speed
brake(4) //cuts power to the motors
goFor(7); //AEV waits for 7 seconds to engage next command
reverse(4); //reverses polarity of the motors
motorSpeed(4,42); //both motors run at 42% power
goToAbsolutePosition(450); //motors run till the AEV reaches 450 ticks
brake(4); //cuts power to motors