IR Distance Sensor with Cables - Sharp Infrared Sensor Module GP2Y0A02YK0F

AED 103.95

Low stock


  • The Sharp Infrared Sensor Module GP2Y0A02YK0F is a device used for measuring distance and proximity detection. It is composed of a PSD (position sensitive detector), IRED (infrared emitting diode), and signal processing circuit. These components work together to accurately measure distances in a range of 20 to 150 cm.
  • The sensor utilizes a triangulation method to calculate distance, which is not easily influenced by the reflectivity of objects, environmental temperature, or operating duration. It outputs a voltage signal that corresponds to the detected distance, which can be easily read by a microcontroller or other electronics.
  • This device is commonly used in robotics and automation applications, where accurate distance measurement is required. It can also be used as a proximity sensor for detecting objects within a certain range.
  • The sensor comes with cables for easy integration into electronic projects. It is a reliable and cost-effective solution for distance and proximity sensing needs.

Screen Shot 2023-02-28 at 9 25 52 AM


  • Analog output type
  • Agency approvals/Compliance
  • Compliant with RoHS directive (2002/95/EC)


  • Supply voltage: 4.5 to 5.5 V
  • Consumption current: 33 mA
  • Distance measuring range: 20 to 150 cm
  • Package size: 29.5 × 13 × 21.6 mm


  • Touch-less switch: The sensor can be used as a touch-less switch in sanitary equipment, controlling illumination in public spaces, or any other application where touch-less control is preferred for hygiene reasons.
  • Sensor for energy saving: The sensor can be used in energy-saving applications such as automatic teller machines (ATMs), copiers, vending machines, laptop computers, LCD monitors, and other electronics that need to conserve power.
  • Amusement equipment: The sensor can be used in arcade game machines and robots to detect objects and obstacles in their path and navigate around them.
  • Robotics: The sensor is commonly used in robotics applications for obstacle avoidance, distance measurement, and proximity sensing.
  • Automation: The sensor can be used in automated production lines for detecting objects, positioning, and quality control.
  • Security: The sensor can be used in security applications to detect the presence of objects or people in restricted areas.
  • Smart home technology: The sensor can be used in smart home technology to control lighting, heating, and other home appliances based on the presence or absence of people in a room.

Pin Connections:

Pin Description
VCC Module power supply – 5V
GND Ground
OUT The output of the module which is analog voltage

Screen Shot 2023-02-28 at 9 29 29 AM

Package Includes:

  • 1 x IR Distance Sensor
  • 1 x Cables

Sample Project:


  • Required Material:
    • Arduino UNO R3 × 1
    • GP2Y0A02YK0F Infrared Distance Sensor × 1
    • Male to Female Jumper Wire × 1

Screen Shot 2023-02-28 at 9 26 33 AM


  • Use this link to download the Average.h library



// Reserve space for 10 entries in the average bucket.
// Change the type between < and > to change the entire way the library works.
Average<float> ave(10);

void setup() {

void loop() {
    int minat = 0;
    int maxat = 0;

    // Add a new random value to the bucket
    ave.push(60.374*1.3 * pow(map(analogRead(A0), 0, 1023, 0, 5000) / 1000.0,  -1.16));