Shop OBEX P1 Docs P2 Docs Learn Events
Sharp IR Distance Sensor Algorithms — Parallax Forums

Sharp IR Distance Sensor Algorithms

ercoerco Posts: 20,250
I love me some Sharp IR distance sensors, even if their analog output is non-linear. I suspect most of us use these either with lookup tables or in non-precision applications where rough ranges are used. But this morning I found some hardcore equations at https://www.upgradeindustries.com/product/58/Sharp-10-80cm-Infrared-Distance-Sensor-(GP2Y0A21YK0F) and https://www.upgradeindustries.com/product/57/Sharp-20-150cm-Infrared-Distance-Sensor-(GP2Y0A02YK0F)

Depending on your ADC resolution and other factors, you might not need floating-point accuracy to 6-7 sig figs. :)

Comments

Sign In or Register to comment.