Photo Electric Sensor   Cap Detection