Analog Reading with a Potentiometer
Feed a variable voltage from the potentiometer's middle terminal into an analog input.
Circuit diagram

Interactive circuit guide
Run the simulation, follow the build steps one by one and try it in our real app.
Stopped
Step-by-step build
You can open the same circuit in the browser-based circuit simulator without any installation and inspect the wires and components there.
Parts list
| Component | Qty | Description |
|---|---|---|
| Arduino Uno | 1 | Converts the analog voltage into a numeric value. |
| 10 kΩ potentiometer | 1 | Produces an adjustable voltage. |
| 5V reference connection | 1 | Supplies voltage to the upper end of the divider. |
| Ground connection | 1 | Connects the lower end of the divider to the reference. |
Breadboard layout
The Arduino is on the left, the potentiometer at the upper right and the 5V rail at the top. The potentiometer's two outer legs go to supply and ground, and the middle leg to Arduino pin 1.
Step-by-step build
- Place the Arduino Uno on the work area.Tip: The GND pin is index 0.
- Connect the first outer leg of the potentiometer to 5V.Tip: On a potentiometer, pin 0 and pin 1 are the outer ends and pin 2 is the middle terminal.
- Connect the second outer leg to common ground.Tip: The orientation of the outer ends determines the direction in which the reading increases.
- Connect the middle terminal to Arduino pin 1.Tip: The signal line goes to a single analog pin.
- Connect the Arduino GND to common ground, upload the code and turn the knob.Tip: The value on the serial port should vary between 0 and 1023.
How it works
A potentiometer divides the total resistance between its ends into two according to the wiper position. When the outer ends are connected to supply and ground, the resulting circuit is a voltage divider. The voltage at the middle terminal varies between 0 and the supply voltage depending on the wiper's position. The Arduino's analog-to-digital converter divides this voltage into 1024 equal steps and returns the corresponding integer. Turning the knob in one direction increases the reading, turning it in the other direction decreases it. Since this relationship is linear, the read value gives direct information about the knob's angle.
What you will learn
- Takes an adjustable voltage from a voltage divider.
- Relates the analog reading value to voltage.
- Connects the three legs of a potentiometer correctly.
Expected result: As the potentiometer knob is turned, a value varying between 0 and 1023 appears on the serial port.
Challenge
Explore the analog input: Observe the relationship between knob position and the read value.
Goal: A value varying between 0 and 1023 appears on the serial port.
Tips
- If an outer end is connected instead of the middle terminal, the reading does not change with the knob.
- When the knob is turned fully to either end, the value reaches the limit values.
Frequently asked questions
Why is the potentiometer's middle terminal important?
The voltage divider output is the middle terminal; the outer ends connect to supply and ground.
Why does the value change when the knob is turned?
As the wiper position changes, the divided resistance ratio and therefore the middle-terminal voltage change.
What should be checked if the value never changes?
An outer end may have been connected instead of the middle terminal; make sure the signal line goes to the analog pin.
If you want to build this project in real life, you can get the parts from hobidevre.com. For more circuit ideas, visit the hobidevre.com blog.