A good choice for non-contact object detection!
The Sharp GP2Y0D805Z0F digital infrared sensor allows measuring
distances of 0.5cm to 5 cm via
quick response time: 2.56ms to 3.77ms (max)
low current draw: 5mA typical
Operating Voltage: 2.7 to 6.2V
output type: digital voltage
package size: 13.6mm x 7mm x 7.96mm
This sensor is already mounted onto the carrier board.
The output (Vo) is driven low when the sensor detects an object 0.5 cm to 5 cm away from it, and the output is otherwise high.
There is approximately ±0.25 cm of hysteresis around the 5.25 cm threshold, meaning that the detected object will have to get to approximately 5.0 cm before the output goes low, and once low, the object will have to get to 5.5 cm before it goes high.
There is no hysteresis at the 0.5 cm threshold.