Sharp Distance Sensor (20-150cm)
Using reflected IR light, measure the distance of an opaque object 20-150cm away.
This popular sensor made by Sharp produces an analog output that varies from 2.5V at 20cm to 0.4V at 150cm.
Based on “typical values” from Sharp, the formula to translate output voltage ratio into Distance is:
Distance (cm) = 9.462/(VoltageRatio – 0.01692)
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, and object alignment). Our formula is based on the data provided by Sharp. If you find that you are not getting good results with the standard formulas, you may want to derive your own formula to better characterize your situation.