Skip to content

Potentiometer Control - Analog Input

Beginning of the lesson

What is a Potentiometer?

A potentiometer (often called a "pot") is a three-terminal variable resistor that allows you to manually adjust resistance by turning a knob or sliding a lever.

Construction
  • Terminal 1: Connected to one end of resistive track (typically to 5V)
  • Terminal 2 (Wiper): Center terminal - movable contact that slides along the track
  • Terminal 3: Connected to other end of resistive track (typically to GND)
  • Resistive Track: Carbon or cermet material with fixed total resistance (10kΩ in our case)
Key Specifications
  • Total Resistance: 10kΩ
  • Rotation Range: ~270°
  • Taper Type: Linear (B-type)
  • Power Rating: 0.1-0.5W typical

How a Potentiometer Works: Voltage Divider

A potentiometer acts as a voltage divider. When you connect the outer terminals to 5V and GND, the wiper outputs a voltage proportional to its position along the resistive track.

Voltage Divider Formula

Vout = Vin × (R2 / (R1 + R2))

Where:

  • Vin = 5V (supply voltage)
  • R1 = Resistance from 5V to wiper
  • R2 = Resistance from wiper to GND
  • R1 + R2 = 10kΩ (always constant)
Interactive visualization — available in the full lesson
Knob Position R1 (5V to Wiper) R2 (Wiper to GND) Output Voltage Arduino analogRead()
Full Counter-Clockwise 10kΩ 0Ω 0V 0
Center (50%) 5kΩ 5kΩ 2.5V ~512
Full Clockwise 0Ω 10kΩ 5V 1023

Continue this lesson on YourAIZone

The full lesson has the complete explanation, worked examples, common mistakes, tests with instant checking and an AI tutor. Start right away as a guest, or create an account to keep your progress.

In the full lesson

  • The complete explanation
  • Worked examples
  • Common mistakes and how to avoid them
  • Test questions: 15
  • AI tutor that answers questions about the topic
  • Progress tracking for students, parents and teachers