Code
The group wanted to test code comparing the use of power braking with coasting to conclude how much more energy power braking used. However, the AEV had issues with the Arduino board prior to Performance Test #2 and the group was unable to do full testing to compare the two codes. Only one motor would work when testing, so the team needed to brainstorm of reasons why this was happening. It was determined that the issue was not with the motor since the problem persisted when the wires connecting the motors were switched. The problem also did not lie within the ports since the group tested each port and split the wires to ensure a good connection. A TA had suggested to relocate the metal fastenings that held the wings on the base to the bottom so they did not interfere with the Arduino board. It was also noticed that one of the motor chips was significantly hotter in temperature, so that part was replaced. Once all these tests and conclusions were made, the AEV was running again properly. The team did not have time to edit the code so that it would stop within the gate on its own, so it was stopped manually during the test. If this problem had not occurred, the team would have liked to test the power braking and coasting with costs as well. The team decided to proceed to the final performance test with coasting since it was proved earlier in the Advanced R&D that it consumed less energy than power braking. However, it was noticed that it took the AEV longer to complete the track, thus increasing the overall time of the run and therefore increasing the cost. For the next two weeks, the team wanted to consider energy and time costs so that the budget was not exceeded, however, the team’s overall goal was to use the least amount of energy as possible, so that will also be kept in mind. It was discovered earlier in Performance Test #1 that the GoFor(); command was preferred since it proved to be more consistent in the runs of the group’s AEV. The AbsolutePosition(); command caused the AEV to perform differently each day whether in Room 224 or 308. Therefore, the team decided to proceed forward to the final performance test with the GoFor(); command as before.
Energy
Since the group’s overall goal is to minimize energy consumed while staying under budget, the team will continue to compare data from each run to see what changes allow for the least amount of energy needed. The team hopes to test if power braking will consume less energy than coasting since the run would be shorter. From the graph shown below, the runs varied slightly in energy even when the same code was used. The first trial did not make it through the gate successfully, hence the reason why it stops before the second trial. However, from the first two GoFor(); commands it can be seen that the first trial was slightly lower in energy. The team wants to determine what factors could have led to this variation: bumps on the track, temperature of the room, slickness of the tracks, or random error such as inconsistent starting points. These runs were both tested in Room 224, meaning that there was inconsistency even within the same room.
Breakdown Distances
In preparation for the final performance test, a breakdown of possible code and distances has been listed below. Modifications in the code and times may be made as testing occurs.
Description of Area of Track | Distance | Time needed | Commands Needed |
Forward direction towards the hill | 6 ft (no incline) | 4.8 seconds | motorSpeed(4,30);
goFor(4.8); |
Forward direction up the hill | 4 ft (incline) | 4.7 seconds | motorSpeed(4,35);
goFor(4.7); |
Forward direction toward the gate | 4 ft (no incline) | 4 seconds | brake(4); |
Pause at gate | No distance | 7 seconds | brake(7); |
Proceed through gate in forward direction | 4 ft (no incline) | 2.53 seconds | motorSpeed(4,30);
goFor(2.53); |
Coast down hill in forward direction | 4 ft (decline) | 2 seconds | brake(2); |
Coast toward caboose in forward direction | 6 ft (no incline) | 4 seconds | brake(4); |
Pause at caboose | No distance | 5 seconds | brake(5); |
Reverse direction towards the hill with caboose | 6 ft (no incline) | 2 seconds | beverse(4);
goFor(5.2); |
Reverse direction up the hill with caboose | 4 ft (incline) | 5.1 seconds | motorSpeed(4,35);
goFor(5.1); |
Coast towards gate in reverse direction | 4 ft (no incline) | 4 seconds | brake(4); |
Stop at gate for 7 seconds | No distance | 7 seconds | brake(7); |
Proceed through gate in reverse direction with caboose | 4 ft (no incline) | 2.7 seconds | motorSpeed(4,30);
goFor(2.7); |
Coast down hill in reverse direction with caboose | 4 ft (decline) | 2 seconds | brake(2); |
Reverse direction towards loading dock | 6 ft (no incline) | 3.4 seconds | brake(3.4); |