Skip to content
Electronics Basics

Potentiometer Explained: Pinout, Voltage Divider and Arduino Wiring

12 min readBeginner

A potentiometer is a three-terminal variable resistor. Turn its shaft or slide its control and the wiper moves along a resistive track, changing the ratio between the two sections. That makes it useful for user controls, calibration, adjustable references and analog inputs. A common 10 kΩ part can be connected as a voltage divider so a microcontroller reads a changing voltage instead of trying to measure resistance directly.

Voltage-divider wiring: outer terminals connect to supply and ground, with the centre wiper feeding an analog input.

The three terminals and how to identify them

A typical rotary potentiometer has three pins. The two outer terminals connect to opposite ends of the resistive track; the middle terminal is the wiper. If you measure resistance between the two outer pins with a multimeter, the reading should stay close to the component's rated total resistance as you turn the shaft. Resistance from the wiper to either outer pin changes in opposite directions.

TerminalWhat it doesTypical use in a voltage divider
Outer terminal 1One end of the resistive trackGround
Centre terminalWiper, the moving contactAnalog output
Outer terminal 2Other end of the resistive trackSupply voltage

The physical left-to-right pin order is not universal. Manufacturers rotate the body, and panel-mount parts can be installed at different angles. Use the datasheet or meter rather than relying on a drawing of a similar-looking part.

Potentiometer as a voltage divider

Connect one outer terminal to ground, the other to a safe reference voltage, and the wiper to the input you want to measure. With no load on the wiper, the output is approximately proportional to shaft position:

[ V_{OUT} \approx \alpha V_{IN} ]

Here, α is the fraction of the resistive track between ground and the wiper. Near one end the output approaches 0 V; near the other it approaches the applied reference voltage. The direction is reversed if you swap the two outer wires.

The wiper is not a power supply. The divider has a finite output resistance, so a heavy load can pull the voltage away from the expected value. For a microcontroller analog input, the load is usually light enough when wiring is short and sensible, but an external circuit that needs significant current should use a buffer stage.

Why the 10 kΩ value is common

A 10 kΩ potentiometer is a practical general-purpose choice for knobs connected to analog inputs: it wastes much less current than a 1 kΩ divider while usually being less sensitive to noise and ADC sampling effects than a very high-value part. It is not a universal rule. Long cables, very noisy environments or fast ADC sampling may need a lower source impedance or a buffer; battery-powered circuits may prefer a higher value to reduce divider current.

The current drawn by the divider is approximately I = V/R, where R is the end-to-end resistance. A 10 kΩ pot across 5 V draws about 0.5 mA, ignoring microcontroller input current. A 100 kΩ part across the same voltage draws about 0.05 mA.

Linear taper vs audio/log taper

A potentiometer's resistance does not always change in a straight line with shaft position.

  • Linear taper: output changes approximately in proportion to travel. It is a good starting point for analog readings, setpoints and educational experiments.
  • Logarithmic/audio taper: resistance changes nonlinearly to match how people perceive sound loudness. Letter codes vary between markets and manufacturers, so check the datasheet.
  • Trimmer potentiometer: a small adjustment part intended to be set occasionally with a screwdriver rather than turned repeatedly by a user.
  • Multi-turn potentiometer: the wiper travels gradually over several shaft turns, allowing finer adjustment for calibration and measurement circuits.

The total resistance, taper, tolerance, rated power, mechanical travel and expected number of adjustments all matter. For a dashboard knob, ergonomics and shaft style may matter more than precision. For calibration, stability, low contact noise and mechanical resolution may matter more.

Wiring it to an Arduino Uno

Use a 10 kΩ linear potentiometer for this experiment.

PotentiometerArduino Uno R3
Outer pin 1GND
Centre wiperA0
Outer pin 25V

Reverse the two outer terminals if you prefer the reading to increase in the opposite direction. Do not connect the wiper to a supply rail and then assume it is an analog output.

Install no extra library for a basic analog read. The Uno's 10-bit ADC returns a number from 0 to 1023 for its configured reference range.

const int POT_PIN = A0;

void setup() {
  Serial.begin(115200);
}

void loop() {
  int raw = analogRead(POT_PIN);
  float voltage = raw * (5.0 / 1023.0);

  Serial.print("ADC: ");
  Serial.print(raw);
  Serial.print("  Voltage: ");
  Serial.print(voltage, 3);
  Serial.println(" V");
  delay(100);
}

The calculation assumes the default 5 V analog reference is actually 5.0 V. If the USB supply or reference differs, the calculated voltage has corresponding error. Use a measured reference or an external precision reference when accuracy matters.

Wiring it to an ESP32

For a classic ESP32 DevKit, connect one outer terminal to GND, the other to 3V3, and the wiper to an ADC-capable GPIO such as GPIO34 on a classic ESP32-WROOM board. GPIO34 is input-only, which is fine for an analog input, but it does not have a usable internal pull-up or pull-down. ADC pin availability varies on ESP32-C3, S3 and other variants, so consult the exact board pinout.

Never power a potentiometer divider from 5 V if its wiper goes directly to an ESP32 GPIO. Classic ESP32 GPIO is not 5 V tolerant. Keep the full analog output range within the board's allowed ADC input range; ADC attenuation settings and measurement accuracy depend on the chip and Arduino core version.

// Classic ESP32 DevKit example: pot ends at GND and 3V3, wiper at GPIO34.
const int POT_PIN = 34;

void setup() {
  Serial.begin(115200);
  analogReadResolution(12);
}

void loop() {
  int raw = analogRead(POT_PIN);
  Serial.printf("ADC raw: %d\n", raw);
  delay(100);
}

The ESP32 ADC is not a precision voltmeter out of the box. Its readings can be nonlinear and vary between chips and attenuation settings. For a human-operated knob, raw values are usually enough; for accurate voltage measurement, use calibration or a suitable external ADC.

Using a potentiometer as a two-terminal variable resistor

You can use the wiper plus one outer terminal as a rheostat. The resistance changes as the control moves. For more reliable operation, many designs tie the unused outer terminal to the wiper so a momentary wiper-contact issue does not make the circuit open in an unexpected way. That connection is not a substitute for a circuit-specific safety analysis.

Remember that a standard potentiometer has a maximum power rating, often far below what is needed to control a motor or lamp directly. Do not put motor current through a small signal potentiometer. Use it as a control signal for a transistor, MOSFET, motor driver or suitable controller.

Troubleshooting

SymptomLikely reasonWhat to check
Reading stays near zeroWiper on wrong pin or no supplyConfirm outer pins receive GND and reference; measure wiper voltage
Reading stays near maximumWiper shorted to reference or wrong terminal orderInspect breadboard rows and measure the centre pin
Reading jumps or jittersLoose contact, long cable, noisy supply or worn trackShorten wires, add a stable ground, check with a multimeter
ESP32 input is damagedWiper exceeds the GPIO voltage rangeUse 3.3 V as the divider supply and verify the actual pin
Not quite 0 or full scaleReference voltage, tolerance and ADC limitsCompare ADC readings with measured wiper voltage
One region of travel changes fasterLog taper or mechanical/contact characteristicCheck the part number and datasheet

For a noisy reading, average a small number of samples or apply a simple low-pass filter. Avoid excessive filtering if the knob must respond quickly. If the pot is used as a safety-critical control or in a feedback loop, consider a sensor with a defined failure mode, redundant measurement, or an appropriately rated encoder.

Choosing the right potentiometer

Before ordering, decide how the control will be used: panel-mounted or PCB-mounted; shaft, slide or trimmer; linear or logarithmic taper; total resistance; power rating; tolerance; mechanical life; and whether it must tolerate dust, water or vibration. Verify pin pitch and footprint against the exact manufacturer drawing. “10 kΩ potentiometer” describes only one characteristic, not an interchangeable mechanical part.

Where to go next

For the underlying circuit rules, review Ohm's law, electrical resistance, and reading resistor values. For embedded applications, pair a potentiometer with an Arduino analog input, an ESP32 ADC input, or a motor/servo controller—the potentiometer itself does not supply motor power.

Sources: Arduino analog input reference, Espressif ADC documentation.

Worked example: mapping a 10 kΩ potentiometer to a useful setpoint

Suppose an Arduino Uno reads a 10 kΩ linear potentiometer from A0 and uses the value to set an LED brightness or a menu value. If the ADC returns 512 on a 0–1023 range, the reading is approximately half-scale. With a nominal 5.0 V reference, the idealized input voltage is V ≈ (512 / 1023) × 5.0 ≈ 2.50 V. This calculation is only as accurate as the actual reference voltage and the ADC itself. If the board runs from a USB supply that is 4.75 V, the same midpoint reading represents about 2.38 V. For a user interface, mapping the raw reading to a percentage is often more robust than pretending it is a calibrated voltmeter.

int raw = analogRead(A0);
int percent = map(raw, 0, 1023, 0, 100);
percent = constrain(percent, 0, 100);

For an ESP32, do not copy the Uno's 0–1023 range into the code. Resolution and usable voltage range depend on the chip, Arduino core settings, attenuation and selected ADC pin. Calibrate the range that your board actually produces.

Reduce jitter without hiding real motion

A long wire to the wiper can pick up mains hum or switching noise. Start by keeping the three potentiometer wires short, routing the wiper away from motor and relay wiring, and ensuring the board and potentiometer share a reliable ground. If the knob reading still flickers, average a few samples or use an exponential filter. Filtering adds response lag, so tune it according to the way the control should feel.

A small capacitor from the wiper to ground can form a low-pass filter with the potentiometer's output resistance. Choose the value based on the desired response time and the ADC input requirements; an arbitrarily large capacitor can make the knob feel slow and may affect settling after a large change. For long cables or demanding measurement accuracy, a buffer amplifier and defined analog front end may be more appropriate.

Selecting a replacement or panel control

When replacing a potentiometer, match more than the resistance: confirm taper, shaft type and length, bushing diameter, pin spacing, rotation angle, mounting style, power rating and tolerance. If the potentiometer is part of an audio circuit, changing a log-taper part to a linear one can make the control feel dramatically different even if both have the same nominal resistance.

Do not use a small panel potentiometer as a mains dimmer or motor power control unless it is part of a purpose-designed, appropriately rated circuit. The pot should normally provide a low-power control signal; a separate transistor, MOSFET, driver or certified controller handles the load.

Analog setpoints, end stops and filtering

If the potentiometer is used to set a temperature threshold or motor command, do not automatically map the complete electrical travel to the full operating range. A worn or noisy region near the mechanical end can make a critical setpoint jump. Apply a deliberate minimum and maximum, check for open-wiper behavior if the circuit could fail dangerously, and make the firmware handle out-of-range values explicitly.

For a stable UI control, a simple first-order digital filter can reduce small ADC fluctuations. One example is to move the displayed value a fraction of the way toward each new sample rather than replacing it abruptly. A lower fraction smooths more but adds lag; the right choice depends on how quickly the control should respond. For accuracy, filter the raw measurement only after confirming wiring, reference voltage and grounding are sound. A filter cannot fix a loose wiper, a rail-voltage error or an ESP32 ADC input exceeding its safe range.

If the pot is being used for repeated positioning, consider whether a rotary encoder is a better fit. An encoder reports motion increments and can provide an unlimited rotary control, while a potentiometer reports a bounded analog position and can drift or wear. The correct choice depends on whether the circuit needs an absolute analog position, a relative adjustment or a calibrated measurement.