An optical displacement sensor comprises a surface emitting laser light
source, a scale and a photosensor. The surface emitting laser light
source emits a light beam having a predetermined shape. The scale is
displaceable in such a manner as to cross the light beam emitted from the
surface emitting laser light source and has a diffraction grating of a
predetermined period formed thereon for forming a diffraction
interference pattern from the light beam. The photosensor receives a
predetermined portion of the diffraction interference pattern. The
photosensor includes light intensity detecting means comprised of a
plurality of light receiving areas arranged apart from one another in a
pitch direction of the diffraction interference pattern on a light
receiving surface at intervals of np1(z1+z2)/z1 where z1 is a distance
between a light-beam emitting surface of the surface emitting laser light
source and a surface on which the diffraction grating is formed, z2 is a
distance between the surface on which the diffraction grating is formed
and the light receiving surface of the photosensor, p1 is the pitch of
the diffraction grating on the scale, and n is a natural number.