Human-
Computer
Interaction 2
Potentiometer, Temperature Sensor, & Piezo
04
Arduino IDE
Potentiometer
A potentiometer is a simple knob that provides a variable
resistance, which we can read into the Arduino board as
an analog value.
A potentiometer is also commonly known as a potmeter
or pot. The most common form of potmeter is the single
turn rotary potmeter.
By far the most used value for potentiometers is 10 kΩ,
but other very common values are 1 kΩ, 5 kΩ and 100
kΩ.
Arduino Project 5:
Dimmer using Pot
Required Parts:
● Arduino Uno Board
● Breadboard
● USB Cable
● Jumper Wires (Male-Male, Male-
Female)
● LED
● Potentiometer
● 220 Ohms Resistor
Program
No Arduino Program is needed for this one.
Output
By turning the potentiometer, we can control the brightness of the LED.
Arduino Project 6:
3 LEDs with Pot
Required Parts:
● Arduino Uno Board
● Breadboard
● USB Cable
● Jumper Wires (Male-Male, Male-
Female)
● LED
● Potentiometer
● 220 Ohms Resistor
Circuit
● Potentiometer + Pin to 5V
● Potentiometer - Pin to GND
● Potentiometer Data Pin to A3
● A Red LED connected to pin 9 with a 220 Ohm Resistor
● A Yellow LED connected to pin 10 with a 220 Ohm Resistor
● A Green LED connected to pin 11 with a 220 Ohm Resistor
Output
By turning the potentiometer, the LED will light up and slowly gets dimmer, then afterwards the next
LED will light up.
Temperature Sensor
Temperature sensors are devices that detect and measure
coldness and heat and convert it into an electrical signal.
They use the fact as temperature increases, the voltage
across a diode increases at a known rate.
Power GND
Vout
Arduino Project 7:
Temperature
Sensor Reading
Required Parts:
● Arduino Uno Board
● Breadboard
● USB Cable
● Jumper Wires
● Temperature Sensor
Circuit
● Temperature Sensor Power to 5V
● Temperature Sensor Vout to A0
● Temperature Sensor GND to GND
Output
The Serial Monitor will display several info like the adc Value, voltage, and the temperature in
Celsius.
Piezo
The buzzers are used to generate sound, beep or even melody of a song.
There are two types of piezoelectric buzzers that are commonly used in electronics projects –active
buzzers and passive buzzers. Active buzzers are called active because they only need a DC voltage to
produce sound. Passive buzzers need an AC voltage to produce sound.
A buzzer usually has two pins:
Negative ( - ) pin: needs to be connected to GND.
Positive ( + ) pin: receive the control signal from Arduino.
Arduino Project 8:
Using Active Piezo
Required Parts:
● Arduino Uno Board
● Breadboard
● USB Cable
● Jumper Wires
● Active Piezo
● Push Button
Circuit
● Active Piezo + Pin to 8
● Active Piezo – Pin to GND
● Push Button to 7 and GND
Arduino Project 9:
Using Passive Piezo
Required Parts:
● Arduino Uno Board
● USB Cable
● Jumper Wires
● Passive Piezo
Arduino Project 10:
Blinking LED with Piezo
Required Parts:
● Arduino Uno Board
● USB Cable
● Jumper Wires
● Passive Piezo
Output
The LED will blink and buzzer will alarm if there’s not enough light source.
Thanks!
Do you have any questions?
CREDITS: This presentation template was created by
Slidesgo, and includes icons by Flaticon, and infographics
& images by Freepik