Feedback on AGND
On a 3.6 I ran some basic ADC inputs.
* 0-3V
* LPF of arbitrary value
Very stable, rock solid running 10bit.
If you are reading this and trying to get better performance out of your ADC in a somewhat noisy environment, you MUST have a LPF (Low Pass Filter) on ANY of the microcontrollers. That is a universal truth and one not often enough spoken of.
Almost any value will work... and you dont have to go and calculate knee frequencies or any of that.
Resistor inline
Cap to Ground.
The LPF blocks changes that are in violation of Nyquist's Limit, so anything that is faster than half your sampling rate. Folks get mixed up with that (and calculating cutoff and roll off) so I like to explain things in a much simpler way
* Cap collects a charge and stabilizes
* Cap has only 2 places to spill out
* Into the ADC (very high impedance)
* Back out thru the series resistance (relatively high impedance)
Of course.. there is some self discharge and discharge thru paths like grease, but for what we are talking about... if you "fill the cap up" it will stay full. The key to understanding this is to understand that electronics work WAY faster than humans
* Seconds
* mSeconds
* uSeconds
* nSeconds
* pSeconds
Most signals... they change on the order of SECONDS. Like... Temperature. We DO NOT NEED (EVER EVER EVER!!!) Temperature readings at 1Khz. That is asinine and bordering on mental retardation. For something like temperature, once a second is PLENTY GOOD.
That being the case,
We are free to filter out all of this higher speed data... all of these swings and changes... all of these ups and downs (noise)
We
* Integrate
* Average
* Collect
The average value of the voltage coming in with the capacitor. We hold it there with the resistor. The resistor allows for SLOW CHANGE on the order of the RC time constant. Fill slow, changes slow... and
that is EXACTLY what we want if we are trying to filter out periodic noise.
Make sense?
Capacitor on the ADC input is like a little safe zone. A little buffer. A bucket...
Resistor slowly fills this bucket and resists fast changes back out
ADC input is practically an Open Circuit, so what happens is... it fills up... and you can read it. IF you go too large with the values you can actually SEE this slope in your data. You can see "lag". Lag is your friend, but only to a point.
Something like... hey... 1K and 4.7uF
Try that
Something like 200 ohms and 10uF
Try that
Something like 2k and 10uF
Try that
All of them work and it really does not matter. Just... Get a LPF (single pole) on your ADC input if you want to see clean and steady readings.
Final Point
This will have little to no impact on the circuit being measured. The resistance (be it 20ohms, 200 ohms, 2000ohms) is effectively hanging out on a wire with no current flowing thru it. Those who have completed their EE program of study know that this means there will be no DC impact to the circuit under test. OF COURSE there will be AC impact, but... then... that is what we are trying to do - right?
Pull off only the DC
Leave the AC
Because... the AC is the Noise part
(that is my Knuckle-head way of thinking about it and it has gotten me a very long way with taking good measurements in bad environments using only an Arduino, a resistor, and a capacitor)
-Schindler