Sharp IR

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"

Comments

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

    http://mech.vub.ac.be/teaching/info/mechatronica/finished_projects_2012/Twinbot1/media/downloads/SharpGP2D12Snrs.pdf
    "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
  • 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.

    http://mech.vub.ac.be/teaching/info/mechatronica/finished_projects_2012/Twinbot1/media/downloads/SharpGP2D12Snrs.pdf


    Hello :)

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

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

    If find it could you share your code please ? Thx :)
  • 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.

    http://mech.vub.ac.be/teaching/info/mechatronica/finished_projects_2012/Twinbot1/media/downloads/SharpGP2D12Snrs.pdf


    Hello :)

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

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

    If find it could you share your code please ? Thx :)

    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"
  • 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.
  • ercoerco Posts: 19,454
    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
Sign In or Register to comment.