Shop OBEX P1 Docs P2 Docs Learn Events
Using ADC: specific R and C values? — Parallax Forums

Using ADC: specific R and C values?

bulkheadbulkhead Posts: 405
edited 2006-08-01 05:21 in General Discussion
The manual on p.159 just represents them as "R" and "C", does this mean that any resistors (of same value) and capacitor can be used?

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-07-28 21:45
    Yes, you can handpick two resistors that are best match,
    that will give the best result. A low leakage capacitor
    is also recommended.

    regards peter
  • bulkheadbulkhead Posts: 405
    edited 2006-07-28 22:51
    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.
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-07-29 06:38
    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.

    regards peter
  • bulkheadbulkhead Posts: 405
    edited 2006-07-31 20:35
    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?
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-07-31 21:07
    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.

    regards peter
  • bulkheadbulkhead Posts: 405
    edited 2006-07-31 22:15
    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?
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-07-31 23:37
    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.

    regards peter
    ·
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-08-01 05:21
    See here:
    http://www.sxlist.com/techref/ubicom/lib/io/adc_vp.htm
    for an explanation of the javelin adc circuitry.

    regards peter
Sign In or Register to comment.