Track:
Performance Test 1:
Performance Test 1 and 2 have been conducted to see how the AEV could be used to accomplish certain tasks. For progress report 1 the task was for the AEV to start, move along the track then come to a complete stop before the gate for 7 seconds then proceed through the gate. To complete this task, using the arduino, code was written and tested several times on the track until a suitable code emerged which was then used on Performance Test 1.
During the tests, it was observed that the AEV’s stopping location varied from test to test. It was then understood that since the code that was used depended on time as a marking mechanism which led the AEV’s stopping location to vary. This is because depending on the conditions surrounding the track the AEV may take more or less time to complete certain tasks. A decision was made to overhaul the code and switch it to be distance oriented to make our findings more consistent.
Code Used
celerate(4,0,35,1); //Accelerates all motors from 0 to 35% power in 1 second.
goFor(3.75); //Maintains speed for 3.75 seconds.
brake(4); //Stops all motors.
reverse(4); //Reverses the polarity of the motors.
celerate(4,0,50,2.5); //Accelerates all motors from 0 to 50% power in 2.5 seconds.
brake(4); //Stops all motors.
goFor(7); //Maintains speed for 7 seconds.
reverse(4); //Reverses the polarity of the motors.
celerate(4,0,40,8); //Accelerates all motors from 0 to 40% power in 8 seconds.
brake(4); //Stops all motors.
Performance Test 2:
After the completion of Performance Test 1, Performance Test 2 added more tasks on what was done in Performance Test 1. After waiting by the gate for 7 seconds, the AEV was then to come to a complete stop at the loading zone for 5 seconds then pull the caboose out of the loading zone. This was done so as to increase the tasks done by the AEV and observing how it handles the addition. This was accomplished by adding code onto the arduino and testing it on the track until a suitable code emerged which was then used on Performance Test 2.
In order to accomplish the tasks set out by Performance Test 2, the AEV design used had undergone a major overhaul to make it more compatible for the task. The metal bracket that was used to connect to the caboose could not be attached to the previous design. So while still abiding by previous research conducted a new AEV design was created where more issues where met. The first issue being a weight issue with the front part of the AEV bending downwards therefore blocking the AEV from connecting to the caboose. This was solved by attaching extra rectangles to the bottom of the AEV to act as back braces for the AEV making the AEV more stable. With the additional weight of the AEV, the code from the previous Performance Test had to be scrapped and coding had to begin from the start. Because of that the plan to switch to distance oriented code had to be postponed.
Code Used
Celerate(4,0,30,1); //Accelerates all motors from 0 to 30% power in 1 second.
goFor(4.3); //Maintains speed for 4.3 seconds.
Brake(4); //Stops all motors.
Reverse(4); //Reverses the polarity of the motors.
Celerate(4,0,50,2.5); //Accelerates all motors from 0 to 50% power in 2.5 seconds.
Brake(4); //Stops all motors.
goFor(9); //Maintains speed for 9 seconds.
Reverse(4); //Reverses the polarity of the motors.
motorSpeed(4,30); //Maintains speed at 30% power.
goFor(3); //Maintains speed for 3 seconds.
Brake(4); //Stops all motors.
Reverse(4); //Reverses the polarity of the motors.
motorSpeed(4,30); //Maintains speed at 30% power.
goFor(2.38); //Maintains speed for 2.38 seconds.
Brake(4); //Stops all motors.
Celerate(4,0,35,2); //Accelerates all motors from 0 to 35% power in 2 seconds.
Brake(4); //Stops all motors.
goFor(7); //Maintains speed for 7 seconds.
motorSpeed(4,40); //Maintains speed at 40% power.
goFor(3.3); //Maintains speed for 3.3 seconds.
brake(4); //Stops all motors.
Final Performance Test:
The Final Performance Test is a culmination of Performance Tests 1 & 2 with the addition of making the AEV return back to it’s starting point.
Code used
celerate(4,0,30.1); //Accelerates all motors from 0 to 30% power in 1 second.
goToAbsolutePosition(-215); //Continues the previous command for -215 marks relative to the overall starting position of the AEV
brake(4); //Stops all motors.
reverse(4); //Reverses the polarity of the motors.
celerate(4,0,40,1); //Accelerates all motors from 0 to 40% power in 1 second.
goFor(1); //Maintains speed for 1 second.
brake(4); //Stops all motors.
goFor(8.5); //Maintains speed for 8.5 seconds.
reverse(4); //Reverses the polarity of the motors.
celerate(4,0,30,1); //Accelerates all motors from 0 to 30% power in 1 second.
goToRelativePosition(-119); //Continues the previous command for -119 marks from the vehicle’s current position.
brake(4); //Stops all motors.
reverse(4); //Reverses the polarity of the motors.
celerate(4,0,24,1); //Accelerates all motors from 0 to 24% power in 1 second.
goFor(2.7); //Maintains speed for 2.7 seconds.
brake(4); //Stops all motors.
goFor(4.5); //Maintains speed for 4.5 seconds.
celerate(4,0,58,1) //Accelerates all motors from 0 to 58% power in 1 second.
goToRelativePosition(178); //Continues the previous command for 178 marks from the vehicle’s current position.
brake(4); //Stops all motors.
reverse(4); //Reverses the polarity of the motors.
celerate(4,0,33.5,2); //Accelerates all motors from 0 to 33.5% power in 2 seconds.
goFor(1); //Maintains speed for 1 second.
brake(4); //Stops all motors.
goFor(7); //Maintains speed for 7 seconds.
reverse(4); //Reverses the polarity of the motors.
celerate(4,0,50,1); //Accelerates all motors from 0 to 50% power in 1 second.
goToRelativePosition(160); //Continues the previous command for 160 marks from the vehicle’s current position.
brake(4); //Stops all motors.
reverse(4); //Reverses the polarity of the motors.
celerate(4,0,39,1); //Accelerates all motors from 0 to 39% power in 1 second.
goFor(2.3); //Maintains speed for 2.3 seconds.
brake(4); //Stops all motors.