bs2 and sharp gd2d120 IR sensor.. not detecting bs2
theloneduck
Posts: 20
Hi all.
Im having a problem getting a circuit built which I can use the GD2D120 sharp IR detector and have the Basic stamp editor detect the BS2 on the board.· As soon as I unplug the sensor, the stamp is detected.· When i plug it back in, it fails to detect it.
Attached is the circuit (Picture1.jpg·· sorry for the poor images).
I have tried it with a couple of resistors (10K, 1K and 10K variable resistor) but no luck.· If I hook the up the circuit as in·the second attachment it·works fine (Picture2.jpg)·.
Any ideas?· Do I need a second power source and just have the output pin talking to the BS2?
Im having a problem getting a circuit built which I can use the GD2D120 sharp IR detector and have the Basic stamp editor detect the BS2 on the board.· As soon as I unplug the sensor, the stamp is detected.· When i plug it back in, it fails to detect it.
Attached is the circuit (Picture1.jpg·· sorry for the poor images).
I have tried it with a couple of resistors (10K, 1K and 10K variable resistor) but no luck.· If I hook the up the circuit as in·the second attachment it·works fine (Picture2.jpg)·.
Any ideas?· Do I need a second power source and just have the output pin talking to the BS2?
Comments
The GD2D120 has an analog output and you need some kind of analog to digital converter. An ADC0831 works well and there is
plenty of sample code available from Parallax. It is possible to measure voltage directly using the RCTIME statement. Look at
www.emesystems.com. Select "app-notes", then look under RCTIME.
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Would the sharp be able to pull all power from the battery and not allow any to the stamp?
http://madlabs.info/gp2d12/sharp_gp2d12.shtml
Jonathan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot