Microchip has a really outstanding video on cleaning up noise on A/D inputs. There are a lot of steps, tho. http://www.microchip.com/webinars.microchip.com/WebinarDetails.aspx?dDocNam= e=3Den528480 --McD On Thu, 2015-01-29 at 01:50 -0500, Josh Koffman wrote: > Hi all, >=20 > A few years ago I made a few copies of a project of mine. One of the > things that it did was to read a slide pot via ADC and send the value > via serial. When I built them, they were solid, meaning that if I > didn't move the slider, the value stayed consistent. >=20 > A few months ago I saw a few of them still in action, and the values > were...fluttering a bit. So even if the slider was not being moved, > the value transmitted fluctuated a bit around where it should be (say > by about 1-2% in each direction). I didn't have much time to > troubleshoot them, so I didn't take very good notes. Consequently I > don't remember precisely what happened. I know I replaced the slide > pot with an used one, but that didn't fix the problem. I replaced the > slide pot with a fixed resistor, but I don't recall what happened > there. A vague recollection is that it fluctuated a bit too, but I > can't be certain. I tried adding capacitance to the power bus, but > that didn't do anything. I tried a cleaner power supply, but no dice > there. >=20 > In the end I solved this with firmware, I basically filtered the > results. However that lost me a bit of precision on the slider, and it > meant it had to move more before it was registered. >=20 > I originally had this set up as a simple voltage divider with a series > resistor to protect the input pin if the slider was at one extreme or > the other and the pin was accidentally set to output. >=20 > I'm about to use the ADC again, this time to read a rotary pot. I > could connect it the same as last time, but before I do, I'm wondering > if there's a better way to do this that will result in longer term > stability. I can't help shake the feeling that the way I connected > things was partially to blame. >=20 > Any thoughts? >=20 > Thanks! >=20 > Josh > --=20 > A common mistake that people make when trying to design something > completely foolproof is to underestimate the ingenuity of complete > fools. > -Douglas Adams --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .