Proximity sensor technology, Photosensor for security systems