GP2D12 Distance Sensor and Basic Stamp
sjenny
Posts: 25
I am trying to interface a Sharp GP2D12 IR distance sensor through an ADC0831 A/D converter to a BASIC Stamp 2. I have built the digital voltmeter from chapter 3 of Basic Analog to Digital Conversion and verified that the A/D converter works. I have also hooked the GP2D12 sensor to a multimeter and verified that I can reproduce the voltage vs. distance calibration curve on the data sheet for the sensor. When I connect the distance sensor to the ADC0831, the values I read into the BASIC Stamp are not the same as those I observed with the multimeter. Instead of seeing the voltage vary with distance over the 10-80 cm range, I'm seeing the voltage vary only from about 40-50 cm. I am using the Parallax publication for interfacing the Sharp GP2D12 sensor and I must be missing something important. Can anyone offer suggestions to what I might be doing wrong? Thanks in advance for your help, Susan
Comments
Adding a 10-47 uF electrolytic filter cap right at the sensor is helpful if you have noise in your power lines.
An incredibly valuable document by Parallax, saved elsewhere on the web. Sadly, Parallax took it off their website when they switched to a newer Sharp sensor, but all the info is identical. Parallax, PLEASE REHOST THIS either as-is or updated.