Welcome to the Parallax Discussion Forums, sign-up to participate.

# Sharp IR

Posts: 1,101
Can anyone tell me the formula to convert the voltage output of the Sharp IR sensor to distance (in SimpleIDE). I have the 10 to 80 CM version.

Thanks for any wisdom!!!!

Amanda

• Posts: 19,587
edited 2016-02-16 - 01:41:27
A fun sensor. You have Sharp's chart, I'm sure. Its output is nonlinear. Here's an old appnote, not sure if it's still on Parallax's site. About using an older 10-80 Sharp sensor (check the curve values to see if it matches yours). It gives BASIC code to interpolate between a few datapoints.

Now just swap that into SimpleIDE and you're golden!

That's actually a useful PDF to save, it shows how to use the sensor AND an ADC0831.

• Posts: 15
ajward wrote: »
Can anyone tell me the formula to convert the voltage output of the Sharp IR sensor to distance (in SimpleIDE). I have the 10 to 80 CM version.

Thanks for any wisdom!!!!

Amanda

erco wrote: »
A fun sensor. You have Sharp's chart, I'm sure. Its output is nonlinear. Here's an old appnote, not sure if it's still on Parallax's site. About using an older 10-80 Sharp sensor (check the curve values to see if it matches yours). It gives BASIC code to interpolate between a few datapoints.

Now just swap that into SimpleIDE and you're golden!

That's actually a useful PDF to save, it shows how to use the sensor AND an ADC0831.

Hello

Do you find the good equation to convert Volt in centimeter ?

I don't understand the basic code program...

• Posts: 1,101
NicoHEI wrote: »
ajward wrote: »
Can anyone tell me the formula to convert the voltage output of the Sharp IR sensor to distance (in SimpleIDE). I have the 10 to 80 CM version.

Thanks for any wisdom!!!!

Amanda

erco wrote: »
A fun sensor. You have Sharp's chart, I'm sure. Its output is nonlinear. Here's an old appnote, not sure if it's still on Parallax's site. About using an older 10-80 Sharp sensor (check the curve values to see if it matches yours). It gives BASIC code to interpolate between a few datapoints.

Now just swap that into SimpleIDE and you're golden!

That's actually a useful PDF to save, it shows how to use the sensor AND an ADC0831.

Hello

Do you find the good equation to convert Volt in centimeter ?

I don't understand the basic code program...

Hi!

Due to my inability to apply myself to see most projects through to completion, this one, as well, has fallen by the wayside. Still, while it was in focus, I realized I didn't need the sensor to provide exact distances. As long as I could find the output value when the sensor was approximately 12 to 18 inches from an object, I was good to go.

My application was just to let Bob, my BOE/Activity Bot, know when something was close enough to require some evasive action. Precision just wasn't needed.

Still, I might apply myself to find something approximating exact ranging, though I think the Ping))) sensor would be a better choice.

Amanda
• Posts: 8,440
For converting some types of sensor readings to distance you could create a data table of sensor readings at various distances from an object. The problem with IR is that the signal also varies with the reflectivity of the object. A wall may provide a very different reading than a piece of furniture would even if they are the same distance from the sensor.
• Posts: 19,587
This particular Sharp sensor uses a position sensitive device to determine distance by Parallax (yes, seriously apropos!) instead of reflected signal intensity. As such, it is fairly insensitive to the color and reflectivity of the object detected. The data sheet shows nearly identical curves for black and white objects. Very useful sensor IMO.