It takes about 40mS to charge the cap thru 5k so there will be a lag as you turn the control or after power on. Even a variation of 5 seems kind high to me, so I'm not all that impressed with the first set of results before the cap.
The analysis runs in a continuous loop (as opposed to the other kind and cap-in / cap-out give the same (different) results, so I don't think it's that kind of time/charging thing.
I'm curious why the bi-modalism, too. That must be a clue, right?
I'm not sure what effect you are trying to achieve with the 1 uF cap. That's rather large.
I put some caps on the input of my ADC to help with the current when the analog source had a high impedance
( and also a very low rate of change ), and I was using 2 nF and 10 nF.
Do you have anything else connected to Arduino ground? If so, you may get better results if you use one of the Arduino ground pins to connect the ground side of the capacitor and the ground end of the pot, and the other ground pins for connecting everything else that needs to be connected to ground.
Hi! Sorry for the lag. I'm getting over a lousy cold and the things put off thereby.
The Nano is powered by the USB and the pot by the +5V (really about 4.5V) supply on the Nano. The cap goes directly from PC7 to Gnd. Well, the columns(?) on the breadboard, of course. (The cappot was originally powered by the +5V buss powered by the nano +5V but even when I de-powered the breadboard and ran a wire directly to the pot, the noise remained.)
ADC ref is Vcc. I can see the full 0-1027 range from 0V-Vcc.
The 1 uF cap size was to see what would happen. I'm still rather NEWB! to the whole bypass cap thing. Also it seemed about the right choice for the 100kHz - 10MHz regime I expected for the noise.
My scope (C. Zeitnitz's cool soundcard oszilliscope Soundcard Scope) doesn't show anything that I can interpret. I mostly use it as a logic analyzer/timing checker.
Thanks for the interest. I'll get back to something more systematic in a day or two.
Doug
Oh well. It looks like I've got more problems than a perplexing cap.
My multi-meter shows 35 mV DC & ~0 AC between USB ground and soundcard line-in ground with both cables un-attached (plugged into the PC of course). When I plug in the USB cable to the Nano and leave the audio cable unplugged it shows 75 mV DC and 15 mV AC. In both cases the audio ground is lower than USB ground.
15 mV AC (approx rms) works out to about +/- 4 LSBs p-p which is what I often see. So hmmmm.
I'll have to chase down these problems first then see what the cap does.
So, it's easy. ADC is measuring the ratio between its reference and the signal. When you have just the pot, the noise from the power line is in both signal and reference, so it is effectively cancelled out. But when you connect a cap across a pot, you filter away the noise from your signal while still having the noise in reference, so you get noisy results.
Try changing the reference to internal bandgap one. Or power your arduino from a low-noise external power supply (usb port of a computer isn't low noise).