Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: yoshco on February 05, 2012, 04:25:23 AM
-
following the "Effectively Using the Sharp GP2D12 Rangefinder" (link (http://www.robotshop.com/gorobotics/Articles/Sensors/Effectively-Using-the-Sharp-GP2D12-Rangefinder)) article
When powered with a 5V power source, the Sharp sensor has a maximum output
voltage of about 2.45V, for close distances. The highest useable distance
gives approximately 0.45V (see Fig. 2). It is therefore wise to use an AD
converter with two external adjustable voltage references: Vref and COM
im looking for a cheaper alternative to the MAX148 (data (http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1133)), which currently sells (http://octopart.com/max1248bcpe%2B-maxim-663539)for about ~12$
-
You don't say what microprocessor you're using, but if you can set the reference voltage on the uc, I would think you could use a voltage divider to provide the required reference. That would only cost a couple resistors.
-
im using an avr (arduino). but it has only one AREF,
if you can explain as to ways of specifying a second external reference for COM that would be great.
-
Well if you're using an Arduino you're a little more limited because it has things connected the way it wants already. You might try using the 1.1 V internal reference described here (http://"http://www.arduino.cc/en/Reference/AnalogReference?from=Reference.AREF").
If you do that you'll want to us a divider on the output of the sensor to bring it to 1.1V as well. See http://en.wikipedia.org/wiki/Voltage_divider (http://en.wikipedia.org/wiki/Voltage_divider) for a description of a voltage divider, and http://www.raltron.com/cust/tools/voltage_divider.asp (http://www.raltron.com/cust/tools/voltage_divider.asp) for help in figuring the resistor values.
Joe
-
thanks!
i fail to understand how specifying the 1.1v as vref will help
my understanding as follows:
the sensor outputs between 0.45-2.5v.
if i divide the sensor output i will get between 0.22-1.25v.
so still loosing resolution.
without replacing the arduino. still looking for cheap alt to that ADC ic.
-
What values did you use in the calculator I pointed you to? Looks to me like you can get 1.099 volts with resistor values of 1K and 785.
If you really need pinpoint precision, then you'll probably have to put out some money for another chip.
Edit: FWIW, take a look at the Microchip 3004/3008 ADC converters. I have a couple of them but haven't gotten around to doing anything with them yet. I've heard good things about them, though. They're about $2.50 at DigiKey.
http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010529 (http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010529)
Joe
-
Hi,
if i divide the sensor output i will get between 0.22-1.25v.
so still loosing resolution.
without replacing the arduino. still looking for cheap alt to that ADC ic.
Dividers don't have to be 2:1, but you don't need neither dividers nor changes to the Arduinos Aref.
I haven't tested this myself, but according to Dave Cook over at RobotRoom, the Sharp PSD's apparently have a "[...] limited resolution of approximately 0.019V. [per step]"
If we accept this as true and hold it up against the 10 bit A/D-C of the Arduino, which have a step size (with an Aref of 5V) of 4.88mV, leaving 4 steps in between each possible reading from the PSD - without any changes.
Tailoring the output of the PSD to the A/D-C range of the controller, whether with Aref adjustment or an op-amp,will only leave you with even more values possible with each step from the PSD.
The photo array in a Sharp PSD has got a digital output followed by a D/A-C to give you a pseudo analog output.
-
thanks sorem, i went over those discussions but missed that crucial info.