Patent ID: 7977623

Claim:
A method of providing automatic gain control in an optical encoder, comprising: providing a light emitter configured to emit a collimated beam of light; providing a code wheel having a plurality of apertures disposed therethrough and configured to rotate substantially in a plane and in a first direction; providing a light detector comprising at least first and second photodetectors positioned along the first direction on a first vertical portion thereof and at least a first automatic gain control photodetector positioned on a second vertical portion thereof, the second vertical portion being vertically offset from the first vertical portion; providing an automatic gain control circuit comprising a comparator and a decoder; rotating the code wheel between the light-emitting element and the light detector such that the collimated light beam is directed substantially in the plane through the apertures onto the first and second vertical portions; generating with the first and second photodetectors, in response to first portions of the collimated beam being incident thereon, first and second output signals; generating with the first automatic gain control photodetector, in response to the second portion of the collimated beam being incident thereon, a third output signal and providing same to the circuit; comparing the third output signal and a reference voltage in the comparator and generating an output from the comparator on the basis of such comparison, and providing the comparator output to a decoder and setting the gain of the automatic gain circuit according to the comparator output.