The Design Analysis Tool provides feedback on the performance of the AEV to the computer. During week 4 two plots were obtained from the data collected: Time vs. Power and Distance vs. Power.
Energy vs. Time Plot
During the first 3 seconds, in Figure 6, the AEV accelerates from 0 Watts to approximately 6 Watts. This change is shown to be relatively linear on the plot, meaning that the AEV was accelerating at a constant rate. The AEV then remained at 6 Watts for one second. Next the AEV power was reduced to approximately 3.8 Watts. The AEV remained at 3.8 Watts for 2 seconds as shown by the constant line on the plot for this interval. Afterwards, the motors on the AEV were reversed. The plot displays a spike in the power where the power jumps to about 11 Watts. The reason for this spike is the increased amount of power required to bring the motor to a very quick stop and then get the motor spinning in the opposite direction. After reversing the motors, the AEV ran at about 6.3 Watts for 2 seconds. At the end of the run, the power is reduced to 0 Watts.
Energy vs. Distance plot
Because the AEV was stationary during Exercise 4, and the Reflectance sensors were not used to measure distance; the value for Distance remained at zero throughout the plot. The maximum Power (Watts) value reached was roughly 11 Watts. This is equivalent to the Time vs. Power plot.
Arduino Code: Exercise 4
//Accelerate all motors from start to 25% in 3 seconds.
celerate(4,0,25,3);
//Run all motors at a constant speed (25% power) for 1 second.
motorSpeed(4,25);
goFor(1);
//Run all motors at 20% power for 2 seconds.
motorSpeed(4,20);
goFor(2);
//Reverse all motors.
reverse(4);
//Run all motors at a constant speed (25% power) for 2 second.
motorSpeed(4,25);
goFor(2);
//Brake all motors.
brake(4);