Sharp IR sensor debugging problem
optsnav
Posts: 1
Using Sharp GP2D12 Analog Distance Sensor (#605-00003) Quick start circuit and code downloaded from Parallax site.
WHAT HAPPENED: ADC0831, POT and Sharp IR circuit verified. Code executes, but displays constant value of 10cm. Not clear how to calibrate from documentation.
DID THE FOLLOWING: 1. ADC ,POT and IR devices all independently checked out OK. 2. First Used the POT and ADC to set POT at 2.55 reference voltage. 3. Then rewired to connect Sharp IR sensor. 4. The Code is a cut an paste from Parallax documentation.
OTHER FACTS: If IR sensor is removed from connector spurious signals are detected by circuit and displayed.
Any debug suggestions will be appreciated...Tom
WHAT HAPPENED: ADC0831, POT and Sharp IR circuit verified. Code executes, but displays constant value of 10cm. Not clear how to calibrate from documentation.
DID THE FOLLOWING: 1. ADC ,POT and IR devices all independently checked out OK. 2. First Used the POT and ADC to set POT at 2.55 reference voltage. 3. Then rewired to connect Sharp IR sensor. 4. The Code is a cut an paste from Parallax documentation.
OTHER FACTS: If IR sensor is removed from connector spurious signals are detected by circuit and displayed.
Any debug suggestions will be appreciated...Tom
Comments
You said "Quick Start circuit" in your post. I bet a bunch of people assumed you meant the Propeller Quick Start board, when you actually may be using a BS2 per this helpful but HARD TO FIND (come on Parallax, make it easier to find, I had it bookmarked) document: http://www.parallax.com/dl/docs/prod/acc/SharpGP2D12Snrs.pdf This shows the sensor pinouts and does use (now) confusing words "Quick Start circuit".
Can you confirm which processor you are using?