Back to Sensors & Actuators Series

Linear & Rotary Potentiometers for Position Sensing

April 10, 2026 Wasil Zafar 7 min read

Potentiometer deep dive — resistive position sensing, slide and rotary types, calibration, Arduino code, and audio/industrial applications.

Contents

  1. Working Principle
  2. Electrical Characteristics
  3. Interfacing with MCU
  4. Calibration
  5. Code Example
  6. Real-World Applications
  7. Limitations

Working Principle

A linear potentiometer is a resistive position sensor that outputs a voltage proportional to the position of a sliding wiper along a resistive track. As the wiper moves from one end to the other, the resistance (and thus voltage) changes linearly. When connected as a voltage divider between VCC and GND, the wiper voltage directly indicates position: Vout = Vin × (position / total_length).

Types: Slide potentiometers (linear stroke, 10–100 mm), rotary potentiometers (angular, 270–300°), and multi-turn pots (10+ turns for precision adjustment). All use the same voltage-divider principle.

Electrical Characteristics

ParameterTypical (Slide Pot)
Total Resistance1 kΩ – 100 kΩ (10 kΩ common)
Stroke Length10–100 mm (linear), 270° (rotary)
Linearity±0.1–2% (depending on quality)
ResolutionInfinite (analog, limited by ADC)
Power Rating0.1–0.5 W
Lifecycle100,000–10M cycles (conductive plastic best)
OutputAnalog voltage (ratiometric)
Temperature Coefficient±100–500 ppm/°C

Interfacing with an MCU

Connect the three pins: one end to VCC, the other end to GND, and the wiper to an ADC input. The output is ratiometric — it depends only on the position ratio, not on VCC stability. A 10-bit ADC gives approximately 0.1 mm resolution on a 100 mm slide pot.

Noise filtering: Add a 100 nF capacitor between the wiper and GND to filter ADC noise. For noisy environments, a simple moving average of 8–16 samples eliminates jitter.

Calibration

  • End-point mapping: Read ADC at both extremes; map linearly using map(adc, minADC, maxADC, 0, strokeMM)
  • Dead zones: Cheap pots may have dead zones near the ends; trim min/max values to the active range
  • Linearity check: Measure at 5+ points across the stroke; apply piecewise-linear correction if needed

Code Example

/*
 * Linear Slide Potentiometer — Arduino
 * 60mm stroke, 10kΩ
 * Wiring: Pin 1 → GND, Pin 2 (wiper) → A0, Pin 3 → 5V
 */
#define POT_PIN A0
#define STROKE_MM 60.0

/* Calibrated endpoints (read with wiper at each end) */
const int ADC_MIN = 5;
const int ADC_MAX = 1018;

void setup() {
    Serial.begin(9600);
    Serial.println("Slide Potentiometer Ready");
}

void loop() {
    /* Average 8 samples */
    long sum = 0;
    for (int i = 0; i < 8; i++) {
        sum += analogRead(POT_PIN);
        delay(1);
    }
    int avg = sum / 8;

    float mm = (float)(avg - ADC_MIN) / (ADC_MAX - ADC_MIN) * STROKE_MM;
    if (mm < 0) mm = 0;
    if (mm > STROKE_MM) mm = STROKE_MM;

    Serial.print("Position: ");
    Serial.print(mm, 1);
    Serial.print(" mm  (");
    Serial.print((mm / STROKE_MM) * 100, 0);
    Serial.println("%)");

    delay(100);
}

Real-World Applications

Audio Faders, Joysticks & Industrial Position Feedback

Linear slide potentiometers are the standard faders on audio mixing consoles. Rotary pots control volume knobs, dimmer switches, and servo position trimmers. In industrial automation, high-precision conductive-plastic potentiometers (Bourns, Vishay) measure actuator stroke, valve position, and robotic joint angles. 3D printer bed leveling and CNC tool offset also use potentiometers.

AudioJoystickIndustrialPosition

Limitations

  • Mechanical wear: The wiper-track contact degrades over time; conductive-plastic tracks last longer than carbon.
  • Noise: Dirty or worn tracks produce noise (crackle) as the wiper moves.
  • Limited stroke: Typically 10–100 mm; for longer ranges, use linear encoders or LVDTs.
  • No absolute reference: Ratiometric, so VCC fluctuations don’t affect accuracy — but the pot must be powered.