Shop OBEX P1 Docs P2 Docs Learn Events
Sharp GP2D120 IR Range Sensor - 4 to 30 cm — Parallax Forums

Sharp GP2D120 IR Range Sensor - 4 to 30 cm

air250air250 Posts: 6
edited 2011-12-01 09:23 in Accessories
Has any one tried to put the Sharp GP2D120 IR Range Sensor - 4 to 30 cm or any thing close to it on the boe-bot and if you have how did you do it, there are only three ports so im not sure how you would be able to set the freqout and receive a value as well

Comments

  • PublisonPublison Posts: 12,366
    edited 2011-11-30 08:53
    air250 wrote: »
    Has any one tried to put the Sharp GP2D120 IR Range Sensor - 4 to 30 cm or any thing close to it on the boe-bot and if you have how did you do it, there are only three ports so im not sure how you would be able to set the freqout and receive a value as well

    The sensor outputs an analog voltage corresponding to the distance of the object, and can easily be read using an inexpensive analog to digital converter (ADC) chip.

    It does not operate like the PING)) module which you transmit then listen. You only have to read the voltage off the module.
  • SRLMSRLM Posts: 5,045
    edited 2011-11-30 08:54
    The sharp IR sensor line is not like the Ping electrically. The red wire on the sharp is VCC, the black is VSS, and the white (or yellow?) wire is the analog output. The sharp IR sensor takes constant readings and outputs those as analog voltage. Look up the RCTIME basic stamp command. With that you can build a simple RC circuit to read analog voltages.
  • air250air250 Posts: 6
    edited 2011-12-01 08:48
    Thank you Soo much ill look that up right now would i still need a analog to digital converter (ADC) in order to read it or a RC circuit will b able to do the job by its self
  • SRLMSRLM Posts: 5,045
    edited 2011-12-01 09:09
    An RC circuit (as used by the BS2) is an ADC. It's simply an ADC made out of some simple electronic components instead of a discrete chip. So you can use either method at your choice.
  • air250air250 Posts: 6
    edited 2011-12-01 09:23
    Ok thanks i just checked it out it seems super easy and will defiantly make this much easier to control then using 2 IR LED's and 2 IR detectors and it will give me much bettor readings as well
Sign In or Register to comment.