Infrared Distance Measuring Proximity Sensor 20 - 150cm - SHARP GP2Y0A02

  • Was  RM58.00 
  • RM48.00

  • Product Code: GP2Y0A02
  • Availability: In Stock

The Sharp distance sensor's are a popular choice for many projects that require accurate distance measurements. This IR sensor is more economical than sonar range-finders, 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. The detection range of this version is approximately 20 cm to 150 cm (8" to 60"). For over 1 m distance, we suggest using sonar sensors.

 

Features:

  • Infrared rangefinder: 20 cm to 150 cm (8" to 60")
  • Analog Interface
  • External control circuit is unnecessary
  • Japanese Solderless Terminal (JST) Connector

Specifications:

  • Distance measuring range: 20 - 150 cm (8" to 60")
  • Maximum measurement angle: >40°
  • Operating voltage: 4.5 V to 5.5 V DC
  • Average power consumption : 35mA
  • Peak power consumption : 50mA
  • Frequency of updates/cycle : 25 Hz / 40ms
  • Response time: 39 ± 10 ms
  • Output type: Analog voltage (3.1V at 10cm to 0.55V > 80cm)
  • Output voltage differential over distance range: 1.8 V (typical)
  • Analog output noise : < 200 mV
  • Weight: 3.5 g
 
 
Document:
http://www.sharpsma.com/webfm_send/1489
 

Connect Sharp Infrared Distance Measurement to Arduino

Arduino sketch:
// connect gp2d120x to A0

#define pin A0

void setup(){
   Serial.begin (9600);
   pinMode(pin, INPUT);
}

void loop(){
   uint16_t value = analogRead (pin);
   double distance = get_IR (value);  //Convert the analog voltage to the distance
   Serial.println (value);  //Print the data to the arduino serial monitor
   Serial.print (distance);
   Serial.println (" cm");
   Serial.println ();
   delay (500);   //Delay 0.5s
}

//return distance (cm)
double get_IR(uint16_t value){
   if (value < 16)  value = 16;
   return 9462.0 / (value - 16.92);
}

View the result in serial monitor.

Write a review

Note: HTML is not translated!
    Bad           Good

 

Related Products

Tags: IR Infrared, Distance Measuring