If you are looking for a obstacle avoidance Sensor that can work without getting affected by the ambient light then E18-D80NK Infrared Obstacle Avoidance Sensor is the solution that you actually want.
This contains an infrared transmitter and receiver which together make up a photoelectric sensor. The sensor has a long detection distance, and has less interference by visible light because it uses modulated Infrared light.
This sensor has a screwdriver adjustment to set the detected distance, then gives a digital output when it senses something within that range.
It is widely used in robot obstacle avoidance, and many other automation products. The technology behind this effective distance sensor is modulation of infrared light. The receiver is sensitive only to infrared light. Therefore it is not very sensitive to ambient light compared to plain infrared detectors.
Power Supply: 5VDC
supply current DC <25mA
maximum load current 100mA (Open-collector NPN pulldown output)
response time <2ms
pointing angle: ≤ 15 °, effective from 3-80CM Adjustable
detection of objects: transparent or opaque
working environment temperature: -25℃+55℃
Case Material: Plastic
Lead Length: 47CM
1 X E18-D80NK Infrared Obstacle Avoidance Sensor