Reflectance Sensor Testing

Lab 2 Deliverable:

1. Sensors on AEV:

2. Function of Reflectance Sensor:

The reflectance sensors are crucial for determining distances traveled by the AEV.  The wheel aligned with the sensors has reflective tape on it in two evenly spaced apart pieces.  When the wheel spins, the sensor will record light changes between the reflective and non-reflective parts.  It accomplishes this through a voltage divider, which produces an analog voltage output as a function of the light signal.  Low voltage indicates greater light reflection (from the taped parts of the wheel).  The Arduino board receives the voltage changes input and calculates when the wheel has made one full rotation.  Based on that information, and knowing the circumference of the wheel, it can calculate how far the AEV has traveled.

Lab 2 Arduino Code:

//1
motorSpeed(4,25);
goFor(2);

//2
motorSpeed(4,20);
goToAbsolutePosition(295.38);

//3
reverse(4);

//4
motorSpeed(4,30);
goFor(1.5);

//5
brake(4);