Shop OBEX P1 Docs P2 Docs Learn Events
Sharp GP2D12 IR Sensor — Parallax Forums

Sharp GP2D12 IR Sensor

tkeenantkeenan Posts: 24
edited 2006-04-30 16:18 in BASIC Stamp
I am wodering if you can you connect the Sharp GP2D12 IR sensor directly to a stamp to be used for·object detection?

Thanks for any ideas.

Tim

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-04-30 03:38
    No really.· The GP2D12 outputs a non-linear analog voltage related to the distance of an object it detects.· You really should use an ADC0831 or similar to read it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-04-30 04:14
    Tim -

    Here is an interesting, and hopefully helpful article about linearizing the readings when converting from the Sharp GP2D12's analog voltage to distance:
    http://www.acroname.com/robotics/info/articles/irlinear/irlinear.html

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • tkeenantkeenan Posts: 24
    edited 2006-04-30 13:30
    OK thanks very much. I will look a different direction.

    TIm
  • JonathanJonathan Posts: 1,023
    edited 2006-04-30 14:35
    T,

    Here is a web page with some info on using the Sharp GP2D12:

    http://madlabs.info/gp2d12/sharp_gp2d12.shtml

    You *might* be able to use the RCTIME command, but resolution will be poor.

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-04-30 15:07
    Tim -

    The Sharp GP2D02 I/R distance sensor has a serial interface which easily interfaces with the PBASIC Stamp, and has all of the same characteristics as the GP2D12. Here are some applications notes:
    http://www.acroname.com/robotics/info/examples/GP2D02-4/GP2D02-4.html

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • LarryLarry Posts: 212
    edited 2006-04-30 16:18
    You haven't said what your application is- so advice on which sensor to use is based on some conjecture on the advisor's part. Here are some things to consider.

    GP2D15- simple (1 pin) digital interface. easiest to interface, rapid response, returns digital (on-off) reading when object is within factory predetermined range. Runs continuously, so it is a bit of a powerhog.

    GP2D05- 2 pin interface. rapid response. returns digital (on/off) reading. Distance adjustable with dial on unit. Only runs when queried, so it uses less power. slightly slower response than GP2D15, since you need to query the unit each time.

    GP2D02- 2 pin interface. Slow response(plan on 10 or fewer queries per second). serial interface, so it will give you range to object.

    GP2D12- 1 pin interface. Runs continuously. intended to be used with an ADC. (recommend a cap to ground on the signal line to level out readings).·Response··time related to size of signal leveling cap. can be used with a voltage comparator·(alternatively a voltage bridge and Scmitt trigger buffer)to deternine a digital threshold that can be read with a Stamp.

    There are also long range versions of most of these.

    Hope that gets you started.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sign In or Register to comment.