So how stable is the voltage reading of the dithered ADC, over time and with changes in room temperature? It is certainly useful to be able to detect a change of say 1 part in 50,000, but it is a lot more useful still if the voltage readings are highly stable and reproducible over minutes, hours or days. Could I dare to hope that the (dithered) ADC in a 10-bit $4 micro could be stable to within 1 part in 50K, over time and temperature? I would not think so, would you?
To find out, I have set up the following experiment. I am not interested in measuring drift arising from the ADC reference, nor from resistors in any added circuitry, as these drifts are separate from the ADC, and can be eliminated if necessary.
The test circuit consists of a 2K5 plus 2K5 voltage divider between the 3.3V rail, and ground. The mid-point of the divider (at 1.65V) is read by the input of the "dithered" ADC, and the 3.3V rail is also used as the ADC reference, so drift in the 3.3V rail will not affect the ADC reading. Actually, this is the circuit that I use to measure temperature with a thermistor, with the thermistor temporarily replaced by a 2K5 resistor at the ground end of the divider.
Clearly the dithered+averaged ADC should read exactly 1/2 of full scale (1023/2=511.50), as the input is sitting at 1/2 of the reference. In practice the ADC has a DC offset error of 0.76 counts, which I correct for in the software, so the ADC does indeed read 511.50 counts, flutuating by about plus-or-minus 0.01 counts between adjacent readings. Actually I have 2 channels wired in this way, and they both read identically within 0.01 counts, not half bad in a full scale of 1023.0
OK, so with this circuit drift in the reference voltage won't show up in the ADC output, but drift in the 2K5 resistors sure will! However, in this case I have used extraordinarily stable resistors with a specified drift of 0.05 part-per-million per DegC, so we may regard these resistors as 'perfect' with effectively zero drift. For anyone interested, they are Vishay type Z201, and cost around $60 each, and I was just lucky to have a few that I could "borrow" from a job at work.
What this all means, is that the only source of drift that I will measure is drift in the ADC itself, which is exactly what I wanted.
At this stage, please forgive a short story. I have been in the electronics game for a long time, and in my younger and more naive days, would enthusiastically measure the drift of some circuit or another that I hoped would have ultra-low drift. So, I monitor the output with a 6.5 or 7.5 digit DVM, and over 3 or so hours measure essentially no drift at all, and erroneously conclude that the circuit is fantastic. Then, I come back and measure the next morning, when room temperature has dropped perhaps as much as 10 degrees, and find the circuit has drifted significantly, and the super-duper circuit is not as good as I at first thought. The problem is, that room temperature is often stable to within better than 1 degree for several hours, but temperature variations over a full 24 hour period are a different matter.
All this is to say, that meaningful testing of ADC stability takes days of monitoring, and/or the circuit must be deliberately placed in a fridge or oven to know whether it is really stable or not.
That said, so far the results look amazingly good. I have had the circuit operating all day, and the 2 channels have both read 511.50 plus-or-minus 0.01 counts for the entire day, from 9AM in the morning until 10PM as I write. The Arduino LCD display also displays the temperature calculated from the 2K5 resistors which have temporararily replaced the thermistors, and that displayed temperature is 22.643 DegC on both channels, and that reading has been stable all day to within plus-or-minus 0.001 DegC. But there is more. The circuit is run from a small battery, so with room temp at 23 DegC, I then placed the operating circuit in the fridge at 12 DegC. Incredibly, for this 11 degree change, the drift was on the order of 0.01 counts, or one part in 102300. To express in an industry-standard way, that is a thermal drift of around 1 part-per-million per degree (ppm/K), which is very, very, very, very ridiculously small.
Naturally, I will run the circuit overnight, and see what it reads in the morning.
To put the results gained so far into perspective, good-quality general purpose metal-film resistors specify a temperature coefficient of 20 ppm/K.
I'm not willing to hang my hat on this just yet, but the indications so far are that drift with time and temperature of the dithered ADC is effectively zero, and in practice the drift will be dominated by external resistors. I find this extraordinary.
I will keep you informed.