# Potentiometer resistance value using ADC

#### vilfred

Joined Sep 5, 2018
2
Hi,
Is it possible to measure the resistance value of potentiometer from ADC?, if so is there any accurate formula for measurement?
I'm working in ATmega128 ADC, where potentiometer wiper voltage/adc value is the input, from this how can i display the resistance value of potentiometer.

#### ericgibbs

Joined Jan 29, 2010
11,642
hi vil,
Welcome to AAC.
Is it the wiper setting resistance of a known value variable resistor, that you want to measure.?
E

#### Picbuster

Joined Dec 2, 2013
1,025
a pot value is a voltage divider with two resistors.
This is in fact the answer.

When a voltage U is applied to two resistors in serial than the current is U/( r1+r2) = U/pot resistance.
The voltage over R2 ( resistance pot to Gnd) is caused by the same current.
You know the voltage ( measured by ADC) and the current. The R2 resistance is U adc/current
Ensure that voltage U is stable.
Mr. Ohm did provide the law allowing to calculate this

Picbuster

#### AlbertHall

Joined Jun 4, 2014
10,787
Ensure that voltage U is stable.
Or, better, make U the same as ADC reference voltage then it will not matter if that voltage changes.

#### vilfred

Joined Sep 5, 2018
2
hi vil,
Welcome to AAC.
Is it the wiper setting resistance of a known value variable resistor, that you want to measure.?
E
Not a known value potentiometer, i need to try it with different values of potentiometer. I have not found any standard formula to measure different resistance values.

#### MrChips

Joined Oct 2, 2009
22,552
Not a known value potentiometer, i need to try it with different values of potentiometer. I have not found any standard formula to measure different resistance values.
The standard formula of choice is Ohm's Law.

#### ericgibbs

Joined Jan 29, 2010
11,642
hi vil,
As most potentiometers have their values printed on their casing, why would you want to measure a known value.
Sorry if I am missing what you are asking.?
E

#### crutschow

Joined Mar 14, 2008
26,057
To measure the potentiometer resistance you will need to measure the wiper voltage for two different wiper currents when the wiper is near a 50% setting.
From those two readings you can calculate the pot resistance using Ohm's law.

The first wiper current can be just the micro ADC input which likely would be negligible.
You can generate a second smallwiper current by switching a known resistance to ground using a second micro input.

You calculate the wiper setting from the reading with no wiper current.
You then calculate the equivalent resistance of the pot from the reading with the wiper current.
Using those two readings you can calculate the pot resistance.

This assumes that the wiper contact resistance is negligible compared to the pot resistance.

#### ericgibbs

Joined Jan 29, 2010
11,642
We are also assuming your question is for linear potentiometers.??