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

A divider you can turn

The track is one 10 kΩ resistor from VCC to GND, and the wiper taps it wherever the knob puts it. That makes it a voltage divider whose ratio you set by hand: a quarter of the way along, a quarter of VCC.

One resistor, tapped anywhere

A potentiometer is a strip of resistive material, the track, with a contact pressed against it, the wiper. The two ends of the track are fixed: on this board one is GND and the other is VCC. Turning the knob slides the wiper along the strip.

Wherever the wiper is, it splits the track in two. The part below it runs to GND, the part above it runs to VCC, and together they are always 10 kΩ.

A divider you can turn
VCC
Knob50 %
Above the wiper
5.0 kΩ
Below the wiper
5.0 kΩ
SIGNAL
1.65 V
The wiper has 5.0 kΩ of track below it and 5.0 kΩ above. SIGNAL is the share of VCC that matches: 50 % of the way along, 50 % of 3.3 V, which is 1.65 V. Nothing is attached to the wiper in this picture; the red LED is, and the third chapter shows what that changes.

A share of VCC

Current flows down the whole track, from VCC to GND, and every part of the track drops its share of the voltage. The wiper picks off the voltage at its own point. With the wiper a quarter of the way up from GND, a quarter of the track is below it, so it sits at a quarter of VCC: 0.83 V from 3.3 V, 1.25 V from 5 V.

That is the voltage divider, and the potentiometer is the one form of it where you set the ratio with your fingers. Written as a formula, SIGNAL = VCC × (track below the wiper ÷ whole track). Because the potentiometer is linear, the track below the wiper grows in step with the turn, so the voltage does too.

What the numbers do not depend on

The 10 kΩ cancels out. The ratio is what matters, and any value of potentiometer gives the same voltages. What the value does decide is the current the track wastes, about 0.5 mA from 5 V, and how easily the microcontroller can read the wiper. The Uno's ADC wants whatever feeds it to look like about 10 kΩ or less; the wiper never looks like more than 2.5 kΩ, which it has in the middle of the turn, where the two halves are in parallel.

The ends

Fully turned one way, the wiper sits on GND and reads 0 V. Fully the other way, it sits on VCC and reads VCC. The block cannot give out more than you put in, which is why VCC has to be your board's own logic voltage: 3V3 beside an ESP32, ESP32-S3 or Pico, 5V beside an Uno.

The figure leaves the red LED out on purpose. For everything below about 2.0 V on the wiper it makes no difference. Above that it does, and why the top of the turn bends is the whole story.

When it does not work

Does it matter whether VCC is 3.3 V or 5 V?

It sets the top of the range and nothing else about the divider: the wiper gives the same fraction of whatever VCC is. What VCC must match is your board. The full turn puts all of VCC on your analog pin, so beside a 3.3 V board it has to be 3V3.

Why does the resistance not matter to the reading?

The divider gives a ratio, and a ratio of two parts of the same track does not care how long the track is. A 1 kΩ or a 100 kΩ potentiometer would give the same voltages. The value matters for how much current it wastes and how well the ADC can read it, and 10 kΩ is good for both.

How much current does the block draw?

The track is 10 kΩ from VCC to GND whatever the knob does, so about 0.5 mA from 5 V and about 0.33 mA from 3.3 V. The red LED adds up to about 3.0 mA on 5 V at the end of the turn, and about 1.3 mA on 3.3 V.

Which way do I turn to go up?

Towards the end of the track that is soldered to VCC. On most potentiometers of this style that is clockwise seen from the knob end, but the documents for this part do not say. Turn it and watch the number: if it falls and you want it to rise, subtract the reading from full scale in the sketch.

Where this goes next

Three wires, one analog pin, and a sketch that prints the number.

The first read

Edit this page — content/books/rotary-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 ↗

Rotary 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