Hamamatsu Shaft Encoder

To measure the speed of the wheel arm I used the Hamamatsu Photo reflector P5587. This shaft encoder contains a high power infrared LED emitter and a photo IC (receptor). The LED emits infrared light which bounces off a near by surface, and is received by the photo IC.

hamamatsu shaft encoder

Reflective Surface

The reflective surface was contructed from normal white paper. The paper is printed half white and half black. When the infrared light bounces off a white section it is received by the photo IC. When the infrared light hits the black section it does not reflect enough of the infrared pulse to register with the photo IC. These transitions from black to white create a pulse train.

hamamatsu shaft encoder

Pulse Train

This pulse train can then be used to calculate the speed at which the motor is spinning and act as a start marker for each rotation.

More details on how the shaft encoder calibrates the timing of the wheel can be found in the Timing section of this report.

pulse train

Wiring and Voltage

The shaft encoder requires an input and output voltage of 5V. The AT90USB1287 cannot provide 5V, but will accept 5V on an input capture pin. ( assuming the AT90 has a common ground with the shaft encoder ).

This is the circuit used to hook the AT90 to the shaft encoder outlined in Mobile Robots p154.

shaft encoder mounting board

The pin numbers on this diagram correspond to the pins on the mounting board used to secure the shaft encoder to the wheel.

shaft encoder mounting board

Mounted Shaft Encoder

The following images shows the shaft encoder mounted 4mm above the black and white wheel.

side view
side view