A distance measuring device includes light a projector for projecting a beam
of
light onto an object at a distance to be measured, a light detector for detecting
the part of the beam of light reflected from the object and outputting an output
signal, an integrator for discharging or charging an integration capacitor corresponding
to the output signal to integrate the output signal, an analog-to-digital converter
for converting the voltage of the integration capacitor after a predetermined number
of repetitions of a distance measuring routine, and a detector for detecting the
distance to the object based on the converted signal, wherein the number of repetitions
of the distance measuring routine is set to saturate the integration capacitor
through the repetition, when the object is located at a short range alarm position.