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

Sharp IR

Posts: 1,094
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
Founder of the "Society for Aimless Tinkering and World Conquest"

• Posts: 19,357
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.

"When you make a thing, a thing that is new, it is so complicated making it that it is bound to be ugly. But those that make it after you, they don’t have to worry about making it. And they can make it pretty, and so everybody can like it when others make it after you."

- Pablo Picasso
• 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,094
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
Founder of the "Society for Aimless Tinkering and World Conquest"
• Posts: 8,134
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.
In science there is no authority. There is only experiment.
Life is unpredictable. Eat dessert first.
• Posts: 19,357
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.
"When you make a thing, a thing that is new, it is so complicated making it that it is bound to be ugly. But those that make it after you, they don’t have to worry about making it. And they can make it pretty, and so everybody can like it when others make it after you."

- Pablo Picasso