Excellent long range sensing makes the cheap Sharp GP2Y0A02YK0F infrared sensor a suitable alternative to ultrasonic sensors for many applications with its range from 20cm to 150cm (8-59").
Like the GP2Y0A21YK0F and GP2D120XJ00F sensors this is a very easy to use sensor. Supply power and the sensor outputs an analog voltage related to the distance. You do not need any extra control algorithms or circuitry.
We recommend the 3-Pin JST connector to go with this sensor to make hooking it up to your project a snap. The connector on these Sharp sensors is smaller than the normal 2.54mm header spacing expected.
The Sharp GP2Y0A02YK0F has a long range of 150cm enabling it to perform object detection for obstacle avoidance or near distance mapping.
Like the GP2Y0A21YK0F and GP2D120XJ00F the GP2Y0A02YK0F uses control circuitry to compensate for ambient conditions and optical triangulation to determine distance which is far more robust than simply measuring the intensity of returned infrared light.
Here is a chart of the output voltage as a function of distance
As with the other Sharp IR Sensors the performance is excellent against the test grey and white backgrounds. Like the other sensors there is also a limit to the minimum distance the sensor can range beyond which the readings indicate a greater distance than actual. Using complimentary sensors together such as the Sharp GP2D120XJ00F (4-30cm) and this one with its range of 20-150cm enables a greater distance to be measured.