Sign Up for Our Newsletter!
Description:
This popular sensor made by Sharp produces an analog output that varies from 3.1V at 10cm to 0.3V at 80cm.
Based on "typical values" from Sharp, the formula to translate SensorValue into Distance (the formula is only valid for a SensorValue between 80 to 500) is:
This sensor can find the distance to objects that present a very narrow edge such as a wall at a very sharp angle.
Note: The output of this sensor will vary from unit to unit, and based on the characteristics of the target (reflectance, size, direction of motion, object alignment, ...). If you find that you are not getting good results with the standard formulas, you may want to derive your own formula to better characterise your situation.
Specifications:
Sharp GP2Y0A21YK0F is an IR sensor using infrared wave to measure distance. The output of the sensor is analog voltage, which can be read easily by microcontroller’s ADC converter. This sensor can be used in industry and especially in robotics. The efficient range of this module is 10 to 80 cm.