There are two separate issues with using a high impedance source with the atmega328 ADC:
- Sampling capacitor charge time. The default implementation of analogRead starts the conversion in the very next instruction after setting the multiplexer to the required input. This allows only a very short time for the sample capacitor to charge. For source resistances above 10K, I usually patch the analogRead function to add a delayMicroseconds call between these instructions. The minimum delay required is about 1us per additional 10K of source resistance. As an alternative to patching the Arduino runtime, write your own code to set the multiplexer to the desired channel, then call delayMicroseconds, then call analogRead.
The common solution of calling analogRead twice and discarding the first reading is less effective, because the sampling capacitor is not connected to the input during most of the first analogRead call. Two analogRead calls with a delay between them would work, if you don't mind the 110us or so wasted by the first analogRead call.
If you are reading a DC or slowly-varying signal, then a hardware solution is to connect a 0.01uF or greater capacitor between the analog input and ground, if whatever is driving the analog input can tolerate that. The capacitor also provides immunity to noise pickup, which may otherwise be a problem when using high source resistances.
- Finite input resistance of the ADC. The datasheet specifies 100M typical. Therefore, with 100K source resistance, you can expect an error of about 1 part in 1000, i.e. 1 bit. With 1M source resistance, you can expect an error around 1%.
In one design that was powered from a 9V battery, to measure the battery voltage I used a voltage divider made from two 4.7M resistors, giving an effective source resistance of 2.35M. The reason for such high resistors was that the design didn't have an on/off switch, it just put everything to sleep when inactive; so I needed to minimize the current consumption of the voltage divider.