Photosensor for medical devices, Proximity sensor for safety systems