An optical range finder is provided with a projection unit for projecting
luminous flux to an object located in an optical axis direction, a
detection unit for receiving the luminous flux returned from the object, a
holding frame housing the projection unit and the detection unit, and a
support substrate on which the holding frame is supported. The holding
frame has a partition wall for separating the detection unit and the
projection unit from each other. An end of the partition wall is provided
with a tip protruding from a bottom of the holding frame. In the support
substrate, a groove is formed in a surface side which comes in contact
with the bottom of the holding frame to be engaged with the tip of the
partition wall. Light leaked from the projection unit through a thickness
of the support substrate to the detection unit is shut off by a
combination of the tip and the groove.