Patent ID: 8896821

Claim:
An encoder comprising: a rotating disk, on which a plurality of Gray code optical patterns having a light-transmitting portion and a light-shielding portion alternately in a rotation direction is formed in a radial direction; a light-transmitting/shielding member, on which an optical pattern having a light-transmitting portion and a light-shielding portion, and facing each of the Gray code optical patterns on the rotating disk is formed; a light source adapted to irradiate the Gray code optical patterns on the rotating disk and the optical pattern of the light-transmitting/shielding member with light; a light detection unit adapted to receive the light transmitted through the light-transmitting portions of the rotating disk and the light-transmitting/shielding member, and to output digital data in accordance with a rotation position of the rotating disk; a magnet provided on a rotation center portion of the rotating disk, and forming a magnetic pattern by an arrangement of a magnetic pole; a magnetic detection unit adapted to detect the magnetic pattern, and to output digital data in accordance with the rotation position of the rotating disk; and a processing unit adapted to obtain a rotation angle of the rotating disk using the digital data of the magnetic detection unit and the light detection unit, wherein the processing unit corrects the digital data of the magnetic detection unit based on the digital data of the light detection unit.