Shop OBEX P1 Docs P2 Docs Learn Events
SHARP GP2Y0A02YK0F Sensor Question — Parallax Forums

SHARP GP2Y0A02YK0F Sensor Question

jan dekkersjan dekkers Posts: 11
edited 2009-07-17 22:26 in BASIC Stamp
Hi

I want to use the SHARP GP2Y0A02YK0F sensor with the Basic Stamp.· http://document.sharpsma.com/files/gp2y0a02yk_e.pdf·how would I connect this sensor to the Basic2, directly or do I need to use a A/D ·?··

Jan
·

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-07-17 21:18
    This sensor, like many of the Sharp sensors, produces a voltage proportional to the distance as described in the documentation. You will need an A/D converter. It's possible to measure voltages using the RCTIME statement in the Stamp, but it's slow and not as accurate as using an A/D converter. Typically this capability might be used for measuring the Stamp's own battery voltage.

    If you're interested, look at www.emesystems.com. Select the "app-notes" link and look at the discussion on the RCTIME statement.
  • jan dekkersjan dekkers Posts: 11
    edited 2009-07-17 21:47
    Thanks Mike, very intersting reading on RCTime. What A/D do you recommend in general ?
  • JDJD Posts: 570
    edited 2009-07-17 22:26
    Jan,

    To chime in really quick, there are various types of ADC modules that you could use; depending on the speed and resolution that you need, would determine which ADC to use. For example, there is a 8-bit and 12-bit ADC available from Parallax which are easy to implement (I believe there is sample code for both). Here is a link for you to review to see if either of these will work for your application.

    ADC Modules:
    http://www.parallax.com/tabid/613/List/0/CategoryID/78/Level/a/SortField/0/Default.aspx


    I hope this helps,


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Respectfully,


    Joshua Donelson
    www.parallax.com
Sign In or Register to comment.