Sunday, April 1, 2012

Optical Encoder Tested

I tested the completed speed sensor. The first picture below is the output waveform (sinusoidal-looking yellow line) of the photo-transistor. It looks like there are two traces because the infrared LED is pulsed. The straight top yellow line is when the infrared LED is off. The peaks of the output occur when the photo-transistor sees the least infrared light (reflected off the dark part of the encoder wheel) and the troughs occur when the photo-transistor sees the white sector of the encoder wheel. 
The two screen captures below show the output of the photo-transistor and comparator circuit. The comparator circuit compares the output to the photo-transistor with a reference voltage of 4V (mid-way between the peak and trough) and outputs 0V or 5V depending on whether the sensor output is bigger or smaller than 4V. The periodic glitches seen in the circuit is from the H-bridge, which is driving the motor with a 25% duty-cycle square wave. For the final mobot we will use separate power sources for the motor and the rest of the mobot.