disc potentiometer/What is on the board/02. A divider you can turn
What is on the board · 02 of 9

A divider you can turn

The track runs from GND to VCC and the wiper picks off a point along it, so SIGNAL is VCC times the wheel's position: 0 V at one stop, VCC at the other. The current down the track is the same wherever the wheel is, 0.33 mA from 3.3 V and 0.5 mA from 5 V.

A track and a wiper

Inside the wheel is a curved strip of resistive material, the track, with a contact at each end. On this board one end is GND and the other is VCC, so the whole supply voltage is spread along the track, falling from VCC at one end to 0 V at the other.

The wiper is a third contact that rides on the track and turns with the wheel. Wherever it touches, it picks off the voltage at that point. That is a voltage divider: two resistors in series, the part of the track above the wiper and the part below it, with the output taken from the join.

A divider you can turn
VCC
Wiper position50 %
SIGNAL
1.65 V
Track current
0.33 mA
Seen by the ADC
2.5 kΩ
The wiper splits the 10 kΩ track into 5.0 kΩ below and 5.0 kΩ above, so SIGNAL is 50 % of 3.3 V, 1.65 V. The current down the track is 0.33 mA wherever the wheel is; only the voltage picked off it moves.

Slide the wiper. At one stop it is on the GND end and SIGNAL is 0 V. At the other it is on the VCC end and SIGNAL is VCC. In between, SIGNAL is VCC times the fraction of the track below the wiper: a third of the way along a 3.3 V track, 1.1 V.

The current does not move

The track is always 10 kΩ from end to end, so the current through it is always VCC divided by 10 kΩ: 0.33 mA from 3.3 V, 0.5 mA from 5 V. Turning the wheel does not change it at all. Only the point where SIGNAL taps the track moves.

That is small enough to ignore on any board's supply, and it flows as long as VCC is connected, whether or not anything reads SIGNAL.

What reads it

A digital pin only answers HIGH or LOW. SIGNAL is anywhere between 0 V and VCC, so it goes to an analog input, which measures the voltage and hands your sketch a number. The first read wires it; what the number means explains the number.

Two things the part does not say

Which way is up. Turning the wheel one way raises SIGNAL and the other way lowers it. Which is which depends on which way the track runs inside the part, and the part's drawing does not show it. Turn it and see.

The taper. A pot's track can be linear, where half-way round gives half the voltage, or logarithmic, where it bunches up at one end for audio volume. The part's drawing does not state which. The figure draws it linear. Your first sketch will show you which it is.

When it does not work

Which way do I turn it to make the voltage go up?

It depends on which way the track runs inside the part relative to the wheel, and the part's drawing does not say. Turn it and watch the first sketch's numbers. If it goes the wrong way for your project, flip it in code rather than in the wiring: use the full-scale value minus the reading.

Is the track linear or logarithmic?

Nothing we have for this part states the taper. The figure draws it linear, which is what the first sketch's numbers will look like if it is: half-way round, half of full scale. If your readings bunch up at one end, it is not, and a lookup table or a curve in code evens it out.

Does the 10 kΩ suit my board's ADC?

Yes. The ADC sees the two halves of the track in parallel, which is never more than 2.5 kΩ, at mid-travel. The ATmega328P datasheet asks for a source of about 10 kΩ or less, and this is a quarter of that at worst.

Can the wiper short VCC to GND at a stop?

No. At either stop the wiper sits on one end of the track, and the whole 10 kΩ is still between VCC and GND. SIGNAL becomes VCC or GND, which is what an analog pin is built to measure.

Where this goes next

Which supply pin VCC goes to, and why the answer depends on your board.

VCC sets the top

Edit this page — content/books/disc-potentiometer/a-divider-you-can-turn.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

Ask a question ↗

Disc Potentiometer

Loading discussions…

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Modules and blocks on the forum