calculating the input current

I have been a bit confused about calculating the input current, so I'd be much obliged if someone could help.

Let's say that we have a potentiometer connected with an analog input as shown below. In a middle position the resistance of the potentiometer is spitted to R1 and R2.

How can I calculate the current in A0? How much will be the current value if (R1=0, R2=Rmax), (R1=Rmax, R2=0), (R1 and R2 !=0,Rmax)?

5V --------
|
R1
|
A0 --------
|
R2
|
GND
• Just in case you didn't realise, it's maybe worth noting that the analog pins measure voltage rather than current. Apr 27 '15 at 13:11
• You are right, I just want to know the current value which passes through the analog pin Apr 29 '15 at 19:35

When reading an analog voltage an analog pin has a very high resistance - usually very very much higher than the resistance of any potentiometer used, and input current to A0 can be regarded as zero for practical purposes.

For practical purposes the current drain from the supply will be that which flows from 5V to ground via R1 & R2.
I = V/R = 5V/(R1 + R2)

As for a potentiometer the sum of R1 + R2 is constant, the position of the pot-wiper makes no difference to current draw.

eg 10k pot. I_supply = V/r = 5V/10K = 0.5 mA.
An I_A0 ~= 0

The upper value of a potentiometer which should be used for an analog input is covered by the uC (microcontroller) data sheet. The key parameter is uC input bias currents flowing in the potentiometer and causing small voltages which affect the analog reading. A rule of thumb is to keep such voltages under about one LSB (least significant bit) of the ADC.

The input current of the ADC is low enough not to change the potentiometer's characteristic (which won't be perfectly straight, anyway).

The only requirement is that the impedance of the potentiometer (according to Thévénin equal to R1 parallel to R2) shouldn't be greater than 10 kΩ. That's because otherwise it takes too long for the ADC's capacitor to get charged.