Patent attributes
A miniaturized optical encoder capable of obtaining a sufficient amount of light in the light receiving element is provided. An optical encoder 1 includes a scale 2 having scale markings 21 and a readhead 3 having a light source 31 that emits light to the scale 2, a scale-side lens 32 that transmits the light emitted from the light source 31 to the scale 2, and a light receiving element 33 that receives the light that has been reflected by the scale 2 and that has passed through the scale-side lens 32. The light source 31 is arranged between the scale-side lens 32 and the light receiving element 33, and a distance between the light source 31 and the scale-side lens 32 is set to be a focal distance fs of the scale-side lens 32. An optical axis Lsrc of the light source 31 is matched with an optical axis Ls of the scale-side lens 32 in a reading direction of the scale markings 21 and is separated from an optical axis Ls of the scale-side lens 32 by a predetermined distance D in a direction perpendicular to the reading direction of the scale markings 21.