Lab #4: External Sensors

The external sensors lab was designed to introduce students to the components of the external sensors used in the AEV project. Students were also taught the program function calls and how to troubleshoot the code when implemented with the AEV. The main component of the external sensors were the reflectance sensors. The reflectance sensors used an infrared LED and a small phototransistor to work with the wheel wrapped in reflective tape. A voltage divider was created by connecting a phototransistor and a pull-up resistor. This voltage divide helped the Arduino record when the non-reflective surface passed over the sensor. Each time this occurred, the Arduino recorded this as a “mark”. Students used this measurement to calculate how far to tell the AEV to travel when writing the code for this lab. The code can be seen in the Appendix.

When testing the AEV with the external sensors, students noticed that the faster the AEV was traveling, the more distance the AEV took to stop. Conversely, students noticed that a slower speed meant the AEV could stop faster. These factors could impact the way students create the final code used for the AEV. Another observation students made was that the AEV traveled faster than expected which could have been due to the light weight design. At first, the group was worried the AEV might fall off of the track, but it did not. The AEV traveled the required distance to the gate and stopped slightly past the point where it needed to be. The extra distance traveled was attributed to excess speed.

The external sensors and reflective tape provided the team with a simple way to measure the distance their AEV had traveled. The lab taught the team how to read input on the Arduino, and have the AEV execute commands after calculating distances. The engineers are now able to make the AEV stop, reverse direction, and change speeds at specific points on the track. The simple and effective design of the sensors makes them cheap, reliable, and easy to understand.  The goals of this lab were to have engineers understand how a voltage divider can be used to produce an analog voltage output, how that output could be read as usable distance data, and how to execute preset commands after the vehicle has travelled a certain distance. These goals were accomplished after the lab procedure was completed. The students gained this knowledge.


 

port4

Above is an example of the reflectance sensors attached to the AEV.

External Sensors Final


Code:

reverse(4);                                    // Set vehicle to go forward
motorSpeed(4, 20);                    // Set all motors to 20%, go until the vehicle reaches 13.5 feet.
goToAbsolutePosition(332);
reverse(4);                                    // Reverse vehicle
motorSpeed(4, 30);                    // Set all motors to 30% for 1.5 seconds and stop
goFor(1);
brake(4);


Team Meeting Notes:
Date: 11–February–2016
Time: 10:30am-12:30pm
Members Present: Kailee Gulbin (KG), Ben Reed (BR), Paul Conway (PC), Grant Miller (GM)
Topics Discussed: Lab 4 Post-Lab


Objectives:
Today’s main focused were meeting as a team to discuss how to prepare an Executive Summary for Lab 4, update the u.osu.edu website, and troubleshoot the code and AEV components to better determine the cause of the inconsistency between trials.


To do:
-u.osu.edu (KG)
-Executive Summary (PC, KG, GM, BR)


Reflections:
-The u.osu page was not finished completely, need to finish adding the image of reflectance sensors.
-The executive summary was not proof read, and the conclusion section was not finished.
-The inconsistency was due to faulty parts.