External Sensors
The current programming commands for the AEV record position efficiently, but control position exclusively by changing the power sent to the motors. This creates a potential problem because the power of the motors doesn’t correlate to the position of the AEV, this is an issue specifically when stopping because a command to stop all the motors is not going to stop the AEV.
The function of the reflectance sensors is to monitor the position of one of the wheels on the track, acting as encoders. The sensors detect when the reflective part of the wheel is in front of the sensor, and the Arduino records the output from the sensor. The reflective wheel is set up so that when the sensor record eight “marks”, the wheel has completed one revolution. If the wheel doesn’t slip on the track then the circumference of the wheel correlates to how far the AEV travels with one revolution of the wheel. This allows for the position to be monitored so the program interacts more accurately with the physical world.