Proximity sensor for safety systems, Photosensor for medical devices