An optical sensor projects light rays emanating from a light emitting element
that are collimated by a lens and reflected by a mirror and then directed to a
light projecting prism. The collimated light rays incident upon the prism are refracted
at an incident surface and come out from the prism through a light exit surface
so as thereby to be projected into the field of detection. Light rays passing through
the field of detection are directed to a light receiving prism. The light rays
incident upon the light receiving prism through a light incident surface are reflected
by a light exit surface and then come out from the light receiving prism. The outgoing
light rays are received and converted into an electric signal by a light receiving element.