Subsection 6.1.3 The Potentiometer: A Voltage You Can Turn
To explore an ADC you need an input voltage you can vary at will. The simplest source is a potentiometer, a resistor with a sliding contact.
A potentiometer has three terminals. The two outer ones connect to the ends of a fixed resistive track; the middle one, the wiper, connects to a contact that slides along that track as you turn the knob. Connecting the outer terminals across a supply makes the device an adjustable voltage divider. The wiper splits the track into two resistances: call \(R_2\) the resistance between the wiper and the terminal you have grounded, and \(R_1\) the resistance between the wiper and the terminal at the supply. The wiper voltage is then
\begin{gather*}
V_\text{wiper} = V_\text{supply} \times \frac{R_2}{R_1 + R_2}
\end{gather*}
Turning the knob shifts resistance from one side of the wiper to the other while their sum stays fixed, so the wiper voltage sweeps continuously from one supply rail to the other. With the outer terminals on 3.3 V and GND, the wiper delivers anything from 0 V to 3.3 V. At the midpoint \(R_1 = R_2\) and the wiper sits at half the supply, 1.65 V.
Here is an example with real numbers. On a 10 kΩ potentiometer with the wiper a quarter of the way up from the grounded end, \(R_2 = 2.5\text{ k}\Omega\) and \(R_1 = 7.5\text{ k}\Omega\text{,}\) so \(V_\text{wiper} = 3.3 \times 2500/(2500+7500) = 0.825\text{ V}\text{,}\) a quarter of the supply, as the geometry suggests. We use 10 kΩ mainly because it draws only a third of a milliamp across the rails. A sensor’s own resistance can also limit how quickly the ADC is able to measure it, and Subsection 6.3.2 works out how large that resistance is allowed to be.
The wiper is a source of voltage, not a control signal: you wire it to the pin you want to measure, and the ADC reads whatever voltage the knob is currently producing.
