Skip to content

Potentiometer Analog Input

Explore the Uno ADC range by turning a potentiometer from end to end.

Potentiometer Analog Input: the matching Arduino Uno circuit rendered in Circuitera’s simulator
Matching Circuitera simulator circuit. Real firmware capture; modeled components are idealized.

Wire it up

Disconnect power before changing connections. Follow terminal names rather than wire colors.

FromToWhy it matters
Potentiometer (pot1) · VCCUno · 5VPower connection
Potentiometer (pot1) · GNDUno · GND.2Ground reference
Potentiometer (pot1) · SIGUno · A0Match this terminal to the sketch

The complete sketch

potentiometer-input.ino
void setup() { Serial.begin(9600); }
void loop() {
  Serial.print("adc:"); Serial.println(analogRead(A0));
  delay(100);
}

The launch buttons use this same code and a matching saved circuit.

Build it step by step

  1. Open a complete project

    Launch in Simulator creates a separate Uno sketch and its matching wired circuit. Existing sketches are preserved. Press Run to compile and execute.

  2. Explore the live circuit

    Move the knob to each endpoint and the center. Observe the values in simulated serial output.

  3. Try it on hardware

    Disconnect power while wiring. Match terminal names in the table, select the exact board, Verify, then connect and upload. Check component ratings and power requirements first.

Understand the sketch

Sampling a voltage

analogRead returns a 10-bit approximation of A0 relative to the reference. A centered ideal potentiometer gives roughly 512; the endpoints approach 0 and 1023.

If something is different

Reading floats randomly

A0 needs the wiper connection and both outer terminals need power and ground.

Expected output and tested scope

The ADC sample changes from near 0 to near 1023 as the potentiometer moves across its range.

Version 1 · Last source- and build-matched test: 2026-10-25. Actual shipped AVR-GCC WASM compilation and Uno AVR engine execution; no physical hardware test.

Supported tutorial target: Arduino Uno R3 / ATmega328P. Compile: PASS · Modeled execution: PASS. Other boards require a separate review of pins, voltage, libraries and the exact build profile.

Keep exploring.