Preview build — page text is a draft awaiting human review. Code badges come from real compiles. The flasher is real but not yet hardware-tested; the Playground is still a preview.

Rotary potentiometer (10 kΩ, B10K)

Wire a 10 kΩ rotary potentiometer to an ADC: which leg is the wiper, 3.3 V vs 5 V, linear (B) vs log (A) taper, and fixes for jumpy or non-linear readings.

Analog

Community draft — report a mistake

CategoryInput
InterfaceAnalog
VoltagePassive — across the board’s 3.3 V or 5 V
Typical price₹15

3.3 V or 5 V? Connect the outer legs to the same voltage your ADC uses: 3.3 V and GND on ESP32 and Pico, 5 V and GND on Uno. The wiper can then never exceed the pin limit.

A potentiometer is a resistor track with a sliding contact. With the outer legs across your supply, the middle leg (wiper) gives a voltage anywhere from 0 V to the supply as you turn the knob — analogRead() turns that into a number (0–1023 on Uno, 0–4095 on ESP32 and Pico). It’s the simplest way to set a speed, a brightness, a threshold or a servo angle.

Use a linear “B” taper — the code printed on the back, e.g. B10K. “A” pots are logarithmic and feel uneven for anything except audio. Values from 5 kΩ to 50 kΩ all work; 10 kΩ is the standard.

The legs aren’t labelled on most pots. Looking at the shaft with the legs pointing down, the outer legs are the ends of the track and the middle one is the wiper; swapping the outer two just reverses which way is “up”. Modules with three header pins usually print VCC, OUT (or SIG) and GND.

Prices are indicative (Nov 2026) and vary by seller.

Pinout

PinWhat it does
Pin 1Outer leg — to GND (swap with Pin 3 to reverse the direction)
WiperMiddle leg — the output voltage, to an ADC pin
Pin 3Outer leg — to 3.3 V (ESP32, Pico) or 5 V (Uno)

Use it with

Common errors

Value jitters by a few counts at rest

Normal ADC noise. Average 8–16 readings, add a 100 nF capacitor from the wiper to GND, and ignore changes smaller than 2–3 counts.

ESP32 reads 0 for the first part of the turn and 4095 for the last

The ESP32 ADC is non-linear near its ends. Use analogReadMilliVolts() or map only the usable middle range.

Most of the change happens in the last quarter turn

You have a log-taper (A) pot, made for volume controls. Use a linear B10K for controls and sensors.

Pot gets hot or the reading is stuck

The wiper is probably wired to 5 V or GND directly. Only the outer legs go to the supply — the middle leg goes to the ADC.

↑↓ to move · Enter to open