Shop OBEX P1 Docs P2 Docs Learn Events
Sharp GP2D12 & the BS2px — Parallax Forums

Sharp GP2D12 & the BS2px

SN96SN96 Posts: 318
edited 2008-09-08 23:10 in BASIC Stamp
I have done a search on this topic and found several documents using the Sharp GP2D12 with and ADC0831. My question is it necessary to use the ADC chip when using the BS2px? I have not found any examples of using the Sharp GP2D12 as a standalone sensor.
.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike



·

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-09-08 13:31
    RCTIME can be used to measure small voltages

    http://www.emesystems.com/BS2rct.htm
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-09-08 20:25
    By default, if you connect its output to an I/O pin, there will be at certain distance at which an object trips the state of the I/O pin. If I remember correctly it will stay low until that point and then go high when something is within that range. This is just based on logic threshold.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-09-08 20:40
    The "D12" has an analog output, the "D10" "D15" has a logic level output.

    Post Edited (PJ Allen) : 9/8/2008 8:46:18 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-09-08 22:42
    PJ,

    For all intents and purposes though, the functionality of both units should be about the same when connected to an I/O pin on a microcontroller. The D15 you refer to has a fixed range at which point the I/O changes states. This is the same effect as seen by the analog output crossing the logic threshold of an I/O pin.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-09-08 23:10
    With the analog/D12 one can get a reading which is proportional to distance, which it seems the OP is after,·whereas·the·digital/D15·changes states·when the subject is within the threshold distance.

    Using RCTIME as outllined in the referenced link ("Monitoring battery voltage with RCtime") will result in an RCTIME response value in relation to the voltage applied to the RCTIME pin, not a simple 1/0.
Sign In or Register to comment.