PDA

View Full Version : Sharp GP2D12 & the BS2px



SN96
09-08-2008, 07:42 PM
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


(http://www.geocities.com/botwire/X3_Board.html)
·

PJ Allen
09-08-2008, 08:31 PM
RCTIME can be used to measure small voltages

http://www.emesystems.com/BS2rct.htm

Chris Savage
09-09-2008, 03:25 AM
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

PJ Allen
09-09-2008, 03:40 AM
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 Savage
09-09-2008, 05:42 AM
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

PJ Allen
09-09-2008, 06:10 AM
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.