Ok, I tried 2 4.7K ohm resistors, and I am only getting values between 110 and 126 with my IR ranger. I checked the voltage with a multimeter and it ranges between .4 and 2.6V. It seems like the upper range (126) is about correct, and the lower range isn't as sensitive. Would the capacitor type cause this? Or do I just need to try different resistor values? Thanks.
My guess is that your IR circuitry has a high impedance output (approx. 25 kOhm)
or a nonlineair (eg.diode) output.
If you were to have a 1x opamp amplifier (eg. voltage follower) at your IR output,
then the ADC circuitry will not affect the IR output voltage.
Ok, I have an LM324 Quad OP Amp, will that work? I am assuming that the output pin on the LM324 would go to the javelin, but the OP Amp has 2 inputs (a + and a -). I have never worked with these before, how do I use it?
Yes, 1 of the opamps will suffice.
Just connect the - input of the opamp to the opamp output, and the
opamp output to the javelin adc circuitry. Connect your
sensor voltage output to the + input of the opamp.
You can power the LM324 with just +5V and GND.
Now the opamp output follows the sensor voltage value.
Well, the range is much better now, between 30 and roughly 120ish, but the numbers don't stablize. The readings change +-4 for the same distance and sometimes make a huge jump for one reading and then go back. Is this how IR rangers are normally? Is this just the ambient light affecting the readings, or would changing a capacitor or resistors help?
The adc values are updated every 2.1 msec
The suggested values were R=10k and C=0.1uF
You use R=4.7k so C=0.22uF gives about the same RC constant.
You can try using C=0.47uF or C=1.0uF. That should minimize
fluctuations.
Comments
that will give the best result. A low leakage capacitor
is also recommended.
regards peter
or a nonlineair (eg.diode) output.
If you were to have a 1x opamp amplifier (eg. voltage follower) at your IR output,
then the ADC circuitry will not affect the IR output voltage.
regards peter
Just connect the - input of the opamp to the opamp output, and the
opamp output to the javelin adc circuitry. Connect your
sensor voltage output to the + input of the opamp.
You can power the LM324 with just +5V and GND.
Now the opamp output follows the sensor voltage value.
regards peter
The suggested values were R=10k and C=0.1uF
You use R=4.7k so C=0.22uF gives about the same RC constant.
You can try using C=0.47uF or C=1.0uF. That should minimize
fluctuations.
regards peter
·
http://www.sxlist.com/techref/ubicom/lib/io/adc_vp.htm
for an explanation of the javelin adc circuitry.
regards peter