The present invention relates to a compact and inexpensive optical displacement sensor that does not require accurate control of the distance to the object. A repetitive optical structure is utilized for formation of a repetitive optical signal emitted by an illuminated moving object. The repetitive optical structure is illuminated by the light source for formation of a fringe pattern similar to Laser Doppler Anemometry, and/or, an object is illuminated by the light source and the repetitive optical structure diverts light from the illuminated object onto light sensors. A speckle pattern is formed on the object by the illumination. The speckle pattern moves with movement of the object, and speckle pattern movement is determined without a need for imaging the object onto the repetitive optical structure. Since the speckle pattern is not imaged onto the optical member, the distance and possible distance changes between the object and the optical member substantially do not affect system performance.