Hi Henrik!
Again thank you! You are correct. I connected a 10K resistor from the +5v to the ADC input pin and got 65472! Probably should have done that first! Just wondering, any way to eliminate the "bounce"?
Ed
Hi Henrik!
Again thank you! You are correct. I connected a 10K resistor from the +5v to the ADC input pin and got 65472! Probably should have done that first! Just wondering, any way to eliminate the "bounce"?
Ed
Hi Ed,
Make sure that VRef is stable.Just wondering, any way to eliminate the "bounce"?
In this case I think you're using Vdd as Vref so proper bypassing right at the supply pin(s) of the PIC. At Vdd/VRef=5V a difference of 4.88mV will make the ADC result "jump" a LSB. So any ripple larger than +/-5mV on the supply will be reflected on the readings.
Make sure that you feed the ADC input from a low(ish) impedence circuit.
If your sensor has a high output impedence you may need to buffer the signal with a OP-amp or whatever. Filter the sensor output then feed it to the buffer then to the ADC input.
Or you can simply try throwing a 10-100nF capacitor right on the ADC input pin....
Or just filter it in software.... which, again, will allow you to oversample and get more resolution (if needed).
Remember, you're seeing a "bounce" of 4 (or 64 actually) but in reallity it's only a single LSB - and that's pretty normal.
/Henrik.
Bookmarks