HomeExperiments
Potentiometer — Reading Analog Values
Robotics

Potentiometer — Reading Analog Values

Connect a potentiometer to Arduino's analog input and read variable voltage values from 0 to 1023.

25 min (set-up 10 min)
Robotics Fundamentals

What students learn

Students learn about analog input (0-1023), PWM output (0-255), the map() function, and voltage dividers.

The science behind this experiment

  • analogRead() converts voltage (0-5V) to a digital value (0-1023) using a 10-bit ADC
  • analogWrite() uses PWM (0-255) to simulate analog output
  • map(value, fromLow, fromHigh, toLow, toHigh) rescales one range to another
  • A potentiometer is a variable voltage divider

Key relation: V_out = V_in × (R2 / (R1 + R2)); Analog reading = V_pin × 1023 / 5V

Equipment used

  • Arduino Uno R3
  • Breadboard
  • 1x Potentiometer (10kΩ)
  • 1x LED
  • 1x 220Ω resistor
  • Jumper wires

Questions for students

  • What is the difference between digital and analog signals?
  • How could you use two potentiometers to control an RGB LED?

What to expect

Turning the potentiometer smoothly controls LED brightness from off to full brightness. Analog input (ADC) converts continuous voltages to digital values. PWM simulates analog output. The map() function bridges different value ranges.

Run this experiment in your classroom

This experiment is part of ATP Volta — a self-contained mobile science lab that turns an ordinary classroom into a working STEM laboratory, with over 200 experiments in physics, chemistry, biology, robotics and engineering. Gali, the AI tutor built into ATP Connect, guides students through each step and answers their questions at the bench.

See the ATP Volta mobile science labTalk to our team

The full experiment library

Eighty-six guided experiments across physics, chemistry and biology — each with learning goals, equipment, background theory and questions for students. Browse the library

Physics 42
Chemistry and biology 44