Proximity sensor technology, Photosensor for quality control, Proximity sensor for object detection