
In this lesson students learn how to use a potentiometer — a simple adjustable knob — to control sound from an Arduino in real time. This builds on their previous buzzer lessons and introduces the important concept of analog input. Students discover that the Arduino can sense different levels, not just ON or OFF, and that they can use those values to shape behavior in their programs.
By the end of this lesson, students create a circuit where turning a knob changes the pitch of a buzzer instantly. It feels magical and helps students understand interactive systems.
Student Learning Goals
By the end of this lesson students will be able to
• Identify a potentiometer and understand its purpose
• Wire a potentiometer to 5V, GND, and an analog pin
• Read analog values using analogRead()
• Understand the range 0–1023 and how it maps voltage
• Use a potentiometer to control tone frequency
• Combine analog input with sound output
• Upload and test interactive code
• Feel confident experimenting with physical inputs
Materials Needed
Arduino Uno boards
USB cables
Breadboards
Potentiometers
Piezo buzzers
Resistors (if needed for buzzer stability)
Jumper wires
Computers with Arduino IDE
Student notebooks
Teacher Preparation Notes
Before class
Build the sample circuit (potentiometer → A0, buzzer → pin 10) and verify the sound changes when turning the knob.
Make sure potentiometers turn smoothly — replace any that skip or feel rough.
Teachers do not need deep electronics background.
Let the hardware demonstrate the learning.
Keep the tone gentle and patient — students will love this once they hear it.
Safety Notes
Unplug the Arduino before changing any wiring.
Keep liquids away from electronics.
Do not force the potentiometer knob — gentle twisting only.
Buzzers should remain on the desk (not near ears).
Warm Up Activity
Hold up a potentiometer and ask
What everyday things use a knob like this
Let them say volume dials, stove knobs, dimmer switches, mixing boards, and game controllers.
Explain that today they will make their own adjustable electronic sound controller.
Lesson Flow
**Step One
Meet the Potentiometer**
Show the PPT slide introducing the potentiometer.
Explain in simple friendly terms
A potentiometer is a knob that changes voltage.
The Arduino reads that changing voltage as a number.
That number can control anything we program — today, sound.
Show students the three legs
5V
GND
Signal (A0)
**Step Two
Review the Resistor**
Show the resistor slide.
Explain
A resistor protects components by reducing current.
This is review — celebrate their growing knowledge.
**Step Three
Wire the Potentiometer**
Guide students step by step
• One outer leg → 5V
• Other outer leg → GND
• Middle leg → A0
Use the slide showing 5V, GND, and A0 placement.
Teacher note
Pause after each step and walk the room.
Students often reverse 5V and GND — reassure them mistakes are okay and easily fixed.
**Step Four
Connect the Buzzer**
Students connect the piezo buzzer following the earlier lessons
• Positive lead → pin 10
• Negative lead → GND
**Step Five
Clear the Board with BareMinimum**
In the Arduino IDE
File → Examples → Basics → BareMinimum
Upload it.
Explain
We always start fresh so old code doesn’t interfere with new behavior.
**Step Six
Review Last Lesson’s Tone Code**
Show the previous buzzer code from the slide
tone(10,100,100);
delay(100);
Explain
Today we will replace the fixed number 100 with a live reading from A0.
**Step Seven
Introduce analogRead()**
Show the PPT slide explaining analogRead().
Explain gently
analogRead(A0) gives a number from 0 to 1023
This represents voltages from 0 to 5V
The Arduino translates the knob position into a number
Teacher reassurance
Students don’t need to memorize the voltage math — the Arduino does it for them.
**Step Eight
Write the Interactive Tone Code**
Using the slide
tone(10, analogRead(A0) * 4, 100);
Explain
analogRead(A0) gives 0–1023
Multiplying by 4 turns that into roughly 0–4092
This is a perfect range for buzzer frequencies
Let students type
void loop() {
tone(10, analogRead(A0) * 4, 100);
}
Teacher note
Celebrate that a single line of math connects the physical knob to sound.
**Step Nine
Upload and Test**
Have students upload the code.
Ask them to gently twist the knob
What happens to the pitch
How fast does it change
Does it feel like a musical instrument
Let them experiment freely.
**Step Ten
Guided Exploration**
Encourage students to try
• Turning the knob slowly vs quickly
• Finding “sweet spots” in pitch
• Covering the buzzer to muffle sound
• Changing duration from 100 to 50 or 200
Students learn through playful investigation — no worksheets needed.
Teacher Notes for Each Slide
Potentiometer introduction
Use real-world analogies (volume knob, dimmer switch).
Resistor slide
Reassure them this is a familiar component now.
Wiring slide (5V / GND / A0)
Move slowly and double-check wiring as a class.
BareMinimum slide
Explain this as a “clean workspace.”
analogRead slide
Keep the explanation light and encouraging.
tone() with analogRead()
Highlight the magic of connecting hardware + software.
Independent or Group Activity
Option A: Create a Sound Slider
Students experiment with slow, smooth pitch transitions.
Option B: “Robot Whistle” Challenge
Students try to create an up-down whistle sound by turning the knob smoothly.
Option C: Partner Mode
One student twists the knob
One student listens and describes the change
Switch roles.
Vocabulary and Concepts
Potentiometer
A knob that changes resistance, affecting voltage.
Analog Input
A smooth range of values — not just ON or OFF.
analogRead()
Reads a voltage level and turns it into a number from 0–1023.
Frequency
The pitch of a sound.
tone()
A command to create sound on a chosen pin.
Wrap Up
Ask students
What surprised you about using a knob to control sound
How did the pitch change as you turned the potentiometer
What ideas do you have for using knobs in future projects
Celebrate their success with interactive electronics.
Exit Ticket
One
What number range does analogRead(A0) return
Two
What happens when you multiply that number by 4
Quiz
1. Multiple Choice
analogRead(A0) returns
A. 0–255
B. 0–1023
C. 5–10
2. Short Answer
What does a potentiometer control
3. Multiple Choice
tone(10, analogRead(A0) * 4, 100) changes the
A. volume
B. pitch
C. color
4. Short Answer
Why do we connect the outer legs of a potentiometer to 5V and GND
5. Short Answer
Describe what happened when you twisted the knob.
Teacher Reflection
Did students understand the idea of analog values
Was wiring the potentiometer clear or confusing
Did they enjoy the interactive sound control
Should we provide a wiring diagram handout next time
