Sharp IR Distance Sensor 20-
GP2Y0A02 F , 2Y0A710
The Sharp GP2Y0A02 IR Infrared Distance Sensor is an analog proximity sensor with a range from 20 to 150cm.
This optical sensor can detect objects up to 1.5 meters away.
It works by emitting a powerful beam of invisible IR infrared light and then measuring the return reflection.
Distance is read as an analog voltage suitable for use with most 5V microcontrollers.
Connect a regulated 5V power supply to the supply voltage (VCC) and ground (GND) connectors.
Read the output voltage (VO) using an analog input on your microcontroller.
The voltage output corresponds to the distance detected. See the datasheet for more details.