Anyone know what the actual impedance of an analog pin is? Im wondering what the max practical voltage divider would be without being affected by the analog reading
Atmel spec says to have source with 10k or lower impedance.
Higher works, just need to allow longer settling time of the signal.
The datasheet says it's 100Mohms typical. However, that's not the whole story, because when you switch the multiplexer to select the analog input you want, the sample capacitor has to charge up. The code for analogRead() allows no time for this (stupidly, IMO) which is why you often see advice to read from the port twice and discard the first reading. My own measurements indicate that a 10us delay between switching the mux and starting the ADC conversion gives reliable results with up to 100K source resistance. The conversion itself takes around 100us, so an extra 10us isn't very significant.
I usually discard once and read,
but if I do a 10M and a 2.2M resistor divider I can get an accurate reading without altering it
id try it but I don't want to buy the resistors if its not worth it
To be strictly accurate the input impedance is 14pF (the sample and hold capacitor).... There are internal series resistances of 1k to 100k before that (yes, the datasheet has a value with 2 decades of uncertainty! fig 23-8 in datasheet). So source impedances of around 100k or more will definitely start to increase the settling time (which is 10us worst case by my calculations).
The sample and hold freezes 1.5 ADC clocks after the multiplexer updates, and the default Arduino setting is an ADC clock period of 8us. Thus there is 12us settling time available, fine for low impedance sources (25k or less - though if the internal series resistance is more like 1k than 100k a source of 120k would do OK). For a source of 1M 100us is needed (so two successive calls to analogRead () will be enough.
For more than 1M you have to scale the settling times by 100us per 1M.
An ADC conversion takes 13 ADC clocks (104us in default setup)
So if I had a 10M source it would take 20 throw away calls to analogRead()?
Or one call, a delay of 1.8ms, then a second read - the first read selects the correct pin to multiplex to the ADC sample/hold circuit and its capacitor, the second actually runs the ADC successive-approximation loop.
It you only read from one analog pin, life is easier.
Well thats the theory - be interesting to measure the real behaviour.