Lab 10 – PT3

This week, the team worked on Performance Test 2 for the duration of the lab. Previously, the team had run into issues with the reflectance sensors and the Arduino software that caused the AEV to measure distance incorrectly or not accept code at all, significantly slowing progress. Thankfully, this week the team was able to identify the source of the problem – the reflectance sensors had not actually been connected to the Arduino properly in the first place. After one of the TA’s pointed out the error, the team was able to correct this and confirm with the reflectance sensor test that the AEV was measuring distance correctly again. No further technical problems impeded progress during this period. By comparison to last week’s lab, this week was much more productive. First, the team looked at the code currently being used on their Arduino model, and designated this as Code A. The team then rewrote Code A, identifying areas of improvement or areas where a different approach could be used and tested. This was designated as Code B. Several notable areas of change included the distance measurement, the speed, and the braking. Originally, Code A used absolute position for distance throughout the program, moved at a rapid motor speed of 55%, and came to a harsh, abrupt stop at the gate. Code B, by comparison, used relative distance for all measurements, moved at a slightly more relaxed motor speed of 35%, and stopped earlier to glide into the gate, rather than braking at all. The team tested both codes, updating and improving each one so that by the end of the period both Code A and Code B were able to guide the AEV to run to the end of the track perfectly. Throughout, the team wrote down observations and areas where each code seemed to improve over the other. Unfortunately, the team was unable to have either code complete the full track, and only managed to succeed in each one making it to the payload at the end of the track without pulling it back to the start. The team found that the AEV inconsistently triggered the first sensor, and spent more time than necessary attempting to fix the issue rather than completing the rest of the code. In the future, the team will attempt to change their approach to coding by developing a first draft that makes it through as much of the scenario as possible before fixing minor bugs. The team also will be more consistent with AEV positioning at the start, as it was found that two different team members had been positioning the AEV at two different places along the track at the beginning.

The biggest takeaway this week had to do with the code. As mentioned earlier, the team was unable to program for the portion of the scenario where the AEV transports the payload to the start. Too much time was spent working on fixing minor bugs in the code, and as a result the team could not complete the entire scenario. In the future, the obvious lesson is to spend less time on small details and bugs and more time creating the overall outline of the code. This way, the team can at least have some progress for every part of the scenario, even if some of it has minor problems, instead of having incomplete code. Another important takeaway had to do with the starting position of the AEV. At a certain point in the lab, the team observed that the AEV no longer reached the gate, even though they had not changed any part of the code. Confused, the team ran several tests until it was noticed that different team members were starting the AEV at different positions on the track, leading it to reach the gate sometimes and other times stop before it with no apparent connection between the two. Although there is a marker on the track for a starting point, some teammates started the vehicle on the marker while others started it directly before, leading to a small but meaningful difference. After noticing the problem, the team collectively agreed on a point to always start the vehicle from to avoid further confusion. The obvious takeaway is to be aware of what the entire team is doing in order to prevent silly mistakes from impeding progress.

Team Meeting Notes

March 29, 2017 – Lab 10

Teammates present: Iskandar Roslen, Jacob Jeffers, Abhishekh Kumar, Vince Le

Objective: Optimize and refine code for maximum efficiency and to complete the mission

Decisions: The team has decided on combining Code’s A and B for different parts of the track for best efficiency.

To-do/Action items: Test Model 3 against Model 2. Continue making changes to code that decrease energy usage. Complete CDR draft by Thursday

Reflections:

This week the team was able to complete code that was able to do 1/2 of the mission requirements. With more testing, the team is confident in being able to complete the mission as well as doing it efficiently. The team noticed that the AEV propellers touch a part of the track that is lower that the other and may need to come up with a solution to that issue.

Schedule 

Arduino Code

Version 1:

 

//Moves AEV to gate then stops

 

//Moves AEV forward until position 290

reverse(4);

motorSpeed(4,35);

goToAbsolutePosition(290);

 

//Applies forward thrust to brake

//back(motor)

reverse(4);

celerate(4,40,40,2);

brake(4);

 

Version 2:

 

//Moves AEV to position 190 with higher thrust then cuts power to coast to gate

reverse(4);

motorSpeed(4,55);

goToAbsolutePosition(190);

brake(4);

 

Final AEV Design: