The Infrared IR Distance Sensor Long Range with cable (20 to 150cm) is an easy to use Distance or Proximity Sensor. It uses infrared light for accuracy of distance measuring.
The Sharp distance sensors are a popular choice for many projects that require accurate distance measurements. This IR sensor is more economical than sonar rangefinders, yet it provides much better performance than other IR alternatives. Interfacing to most microcontrollers is straightforward: the single analog output can be connected to an analog-to-digital converter for taking distance measurements, or the output can be connected to a comparator for threshold detection.