No Subject
eagle4ces
Posts: 14
please i have a project to submit next week.can i get an object to to measure distance using the gp2d12 sharp infrared sensor. or a tutorial on how to use the counter for analog to digital converter.
Comments
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA
Take a look here: http://www.acroname.com/robotics/info/articles/sharp/sharp.html#e5
The unit outputs a voltage measurement which is roughly the result of a trig function of the distance to the object. Because the unit only measures within a specified distance range, you could make a look-up table of measured voltages and distances and simply use linear interpolation between known values. The accuracy would be limited by the number of bits in your a/d and the size of your look up table.
You could also use a little trig and figure out the exact values for the angle of the first lens, and the space between pixels on the ccd.
You first need to do a/d on the voltage output from the unit... to read the voltages... Go to the OBEX and pick an A/D solution. Then you need to do a little math or construct a lookup table, which converts your measured voltages measurements into distances, which you might find in the documentation or have to create yourself. You will be working between about 2.6 V max and 0.4 V min. Either an 8 or 12 bit A/D ought to get you where you are trying to go.
www.parallax.com/tabid/442/Default.aspx
How about adding a subject line. It's the right thing to do
Jim
When I try that page .../tabid/442/... all I get is an access denied message. And I am logged in to the site.
Here's my copy of the AN001 archive