Movement Tracking


 When designing, and ultimately constructing, nearly any vehicle or machine that moves, some means of moving a specific distance is required to ensure that a project is done with the necessary precision. Our case in designing an AEV is not different. Precision is key, as it is required to adequately stop at a certain position twice to open a gate, to softly secure a payload, and come to rest back at the start after performing all of the tasks. This is why becoming familiar and effectively utilizing these Reflectance Sensors is vital to establishing a successful design.
Reflectance Sensors
A Reflectance Sensor uses a LED, reflective tape, and a photo transistor to keep a number of “ticks”, or how many times the LED is reflected off of the tape as the tape passes on and off the sensor. Using the dimensions of a given wheel, the number of “ticks” can be converted into a measure of inches. In our case, there are 8 “ticks” per 1 wheel revolution, and knowing that our wheel has a circumference of ~3.9 inches, we know with a high level of precision that 1 “tick” is equivalent to 0.4875 inches. We can use this data to travel any measured distance. While some error, such as the vehicle drifting, is expected, the Reflectance Sensor presents the best opportunity to precisely move the AEV, and thus create an effective and successful design.
We had been tasked with installing Reflectance Sensors onto our sample AEV, and using them to create a program that would move the AEV a specific distance along the rail, and then stop. We also had to do a Sensor test before running the program.
Brandon was again tasked with creating the program, along with running the Sensor test. Cameron and Payne were tasked with installing the Reflectance Sensors and wiring the sensors to the Arduino Nano. Jacob took the minutes and ensured that the lab was following procedure. While the wiring was initially done incorrectly, it had no impact on the Arduino system, and the rest of the lab went according to the procedure.
While the Reflectance Sensors do measure the distance correctly, the inertia of the AEV carried it past the point where the motors had stopped. It drifted approximately 1 foot past the point when the motors stopped and the Reflectance Sensors had read the correct distance. Being more aware of the wiring details that were missed in this lab, along with determining a means to reduce the drift of the AEV after the Reflectance Sensor reads the designated value.

Code Used:
Refer here for information on command functions.
Code Explanation
motorSpeed(4,35);

goFor(4);

brake(4);

The power of all motors are set to thirty five percent and is ran for four seconds. Then all motor power is stopped.
reverse(4); All motors’ rotation is reversed.
motorSpeed(4,0);

goFor(4);

The power of all motors are set to zero percent and is ran for four seconds.
motorSpeed(4,35);

goFor(4);

brake(4);

The power of all motors are set to thirty five percent and is ran for four seconds. Then all motor power is stopped.