Lab 4 – Design Analysis Tool

 

The Data Analysis Tool is a program that combines MATlab and Arduino to record the energy used by an AEV after a single run in the track. This lab was conducted by recreating sample codes given in the MCR for the AEV to operate. The AEV was then tested using these codes and afterwards, the energy was analyzed using the Data Analysis Tool. The program was able to generate Power v. Distance plots as well as Power v. Time plots.


 

Code used for lab 4: 

// Accelerate all motors from start to 25% in 3 seconds
celerate(4,0,25,3);

//Run all motors at a constant speed (25%) 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%) for 2 seconds
motorSpeed(4,25);
goFor(2);

//Brake all motors
brake(4);

To see additional programs written for this lab, click here


 

Plots showing the code from above using the Data Analysis Tool:

Power v. Distance

Power v. Time

Imported as a jpeg using the export file tool in MATlab