EXERCISE 3: DATA ANALYSIS TOOL

Exercise 3:

//accelerate all motors from 0-25% in 3 seconds

celerate(4,0,25,3);

//after accelerating, setting all motors to to 25% and waiting 1 second

motorSpeed(4,25);

goFor(1);

//running all motors 20% for 2 seconds

motorSpeed(4,20);

goFor(2);

//reverse all motors

reverse(4);

//set all motors to 25% for 2 seconds

motorSpeed(4,25);

goFor(2);

//brake all motors

brake(4);

The above code was written in order to test the AEV on the track as well as to test the data collection program. The AEV moved a small distance and data from the test is represented in the following plots. The first plot represents the power supplied to the motors over time. The second plot shows the power being used at at each point that the vehicle traveled away from its origin.

The variations can be seen in the code, starting with the increase in voltage for 3 seconds in the first line of code. The vehicle then kept a power of 25% for 1 second before suddenly dropping to 20% for 2 seconds as seen in the following 4 commands. The vehicle then experienced a large spike in power as the direction was reversed in the next line of code. This was followed by the motors running in that direction at 25% power once again before braking for 4 seconds and thus cutting off power completely from the motors.

The second plot starts with a small distance traveled as the power rapidly increases to just over 4 Watts. The vehicle does not obtain enough power to move until the first line of code almost finishes causing the vehicle to accelerate for 3 seconds. By that time the power is then bumped up to around 5.5 Watts at 25% power where it stays as the vehicle travels about 0.1 meters. Then the code brings the power back down to 20% and the vehicle travels about 0.5 meters at that speed before the spike in power just before the last increase in power for 2 seconds, which causes the vehicle to slow down over the distance of about 0.2 meters before braking and causing the vehicle to stop moving as the power is instantly cut off.

 

 

MCR Referenced in this exercise