Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino UNO with Trimmer Potentiometer Analog Input Reader

View and Edit Project In Cirkit DesignerImage of Arduino UNO with Trimmer Potentiometer Analog Input Reader

Circuit Documentation

Summary of the Circuit

This circuit consists of an Arduino UNO microcontroller board and a trimmer potentiometer. The potentiometer is used as a variable resistor to provide an analog input to the Arduino UNO. The Arduino UNO reads the analog voltage from the wiper of the potentiometer and outputs the reading through its serial communication interface. This setup can be used for applications requiring user input to adjust a parameter, such as volume control or brightness adjustment.

Component List

Arduino UNO

Trimmer Potentiometer

Wiring Details

Arduino UNO

Trimmer Potentiometer

Documented Code

The following code is written for the Arduino UNO microcontroller to read the analog value from the potentiometer and send it over the serial interface.

int odczytanaWartosc = 0;

void setup() {
  Serial.begin(9600); // Initialize serial communication
}

void loop() {
  odczytanaWartosc = analogRead(A5); // Read the voltage at the wiper of the potentiometer
  Serial.println(odczytanaWartosc); // Send the reading to the serial monitor
  delay(200); // Wait to make the readings more readable
}

The code initializes the serial communication at a baud rate of 9600. In the main loop, it reads the analog value from pin A5, where the potentiometer's wiper is connected, and prints this value to the serial monitor. The delay(200) function call adds a 200-millisecond pause between readings to make the output easier to read.