Shop OBEX P1 Docs P2 Docs Learn Events
Easy Linearization Equation — Parallax Forums

Easy Linearization Equation

gordianknotgordianknot Posts: 12
edited 2005-04-30 15:00 in BASIC Stamp
Hello All,

Has anyone come across an easy linearization function that I could use to linearize the output from my GP2D02 sensors.

Any help would be awesome

Stan

Comments

  • davecdavec Posts: 10
    edited 2005-04-30 05:38
    Pete Tomlinson has some code with linearization for the GP2D12 to ADS0831 to bs2 that might be useful for your 8bit GP2D02:
    http://www3.sympatico.ca/ptomlins/

    i think Jon Williams has a nuts and volts article that might help you too.

    i've gotten pretty acurate distance measurement with the Sharp GP2Y0A02YK and have code for that if you want to go that way.

    cheers
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2005-04-30 15:00
    The response is basically distance=constant1/volts + constant2. There is quite a bit of variation between sensors in the values of constant1 and constant2.

    Also Jonathan Peakall has a page here:

    madlabs.info/gp2d12/sharp_gp2d12.shtml

    with a routine for determining the values of the constants. That too is for the analog gp2d12, but I think the linearization part is the same.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
Sign In or Register to comment.