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

GP2D12 Distance Sensor

ArchiverArchiver Posts: 46,084
edited 2003-11-23 16:38 in General Discussion
It is possible to read the analog voltage on these sensors using
RCTIME, however, there are limits due to the way RCTIME works. When i
tried this a couple of summers ago, I found that the sensor only worked
for close distances. The reason is that RCTIME won't read voltages
below 1.3 volts and Sharp sensors output voltages lower than that as
distance increases. See the Sharp data sheets:
http://www.acroname.com/robotics/parts/SharpGP2D12-15.pdf and Tracy
Allen's page on RCTIME: http://www.emesystems.com/BS2rct.htm#RCtime for
an explanation.

This doesn't mean that you can't use the Sharp sensors. You could use
them for close distances (Voltage increases as distance decreases, up to
about 2.5 volts), or as a thresh hold distance sensor ( read the Vo
pin, it would read high at some point). Other than that, you have to
use an ADC converter.

chris in napa

rich2kchan wrote:

>I¡¦ve recently purchased a few of the Sharp Analog GP2D12 Distance
>Measuring Sensor,
>
>Since the output is analog, do I need an analog-digital converter
>just to read the output?
>
>Or is there some function on the Basic Stamp II that would allow me
>to read the voltage of the output?
>
>Thanks for reading, please reply soon.
>
>
>
>To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the Subject and Body
of the message will be ignored.
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
Sign In or Register to comment.