Lab 4 – External Sensors

External reflectance sensors are used to measure AEV running distance by detecting the reflective tapes on wheels. Reflectance sensors are constituted by an infrared LED and a voltage divider. There two parts which makes up the voltage divider: a phototransistor and a pull-up resistor. The phototransistor could absorb infrared generated by infrared LED and when infrared is intensive, the resistor value would be high and the voltage will in turn reaches a low state. And the recorded data would be shown in Arduino monitor.

The sensors contained a single infrared LED and a small phototransistor, which was connected to a pull-up resistor and a voltage divider. Larger charges were converted into engineering units and recorded as marks by the Arduino, where there were 0.4875 inches/1 mark. Two functions were also introduced in this lab:

goToRelativePosition(), which moved the AEV m marks from the current position;

goToAbsolutePosition(), which moved the AEV m marks relative to its starting position.

Reflectance Sensor

Figure 1: External Reflectance Sensor

The function commands, goToAbsolutePosition and goToRelativePosition, can be used in the preliminary AEV code. Other commands to be utilized can control the engine speed, run time, displacement, braking, waiting time, and direction of the AEV. By determining the length of the track and equating it to number of marks, the AEV can be programmed to travel a certain distance. According to the MCR, the AEV must travel to and stop at the first sensor before the gate; the distance would be around 16 feet, or 394 marks, as determined in this lab. Therefore, by first calculating an initial acceleration, the goToAbsolutePosition(m) command can be set such that m equals 394 marks and the AEV travels to the blue sensor to await the gate. Once the gate has opened, the AEV can be commanded to travel the remaining distance of around 26 feet, or 640 marks, and stop before returning to the starting position.

 


Previous

Lab 3 – AEV Design Concept Screening and Scoring

Next

Lab 5 – System Analysis 1


Appendix

Lab 4 Executive Summary