Pandabyte Potentiometer Module: Analog Input Guide

by pandabyte in Circuits > Arduino

39 Views, 0 Favorites, 0 Comments

Pandabyte Potentiometer Module: Analog Input Guide

poti.png

Pandabyte Potentiometer Module is a simple input module used for learning analog input control with microcontrollers such as Arduino compatible boards, ESP32, or Raspberry Pi Pico.

The module uses a 10KΩ rotary potentiometer that outputs a variable analog voltage based on knob rotation.

A key feature of this module is that it supports two connection methods:

  1. Traditional 3-pin header for standard jumper-wire connections
  2. OR
  3. 4-pin Grove connector for quick plug-and-play prototyping without complex wiring

In this guide, you will learn:

  1. Module pin configuration
  2. Analog input reading
  3. Voltage level monitoring
  4. Circuit connections and Arduino programming examples


Supplies

item list.png

Hardware:

  1. PandaByte Potentiometer Module
  2. Development Board (We will use PandaByte xC3m ESP32C3 Dev board)
  3. Grove Shield/Expansion Board
  4. Cables: Dupont, USB, and Grove

Software:

  1. Arduino IDE

Circuit Connections

pot.png

Perform the connection based on the table.

Programming

Program 1: Read the potentiometer analog value and display it on Serial Monitor.

int potPin = 0;

void setup() {
Serial.begin(115200);
}

void loop() {

int potValue = analogRead(potPin);

Serial.print("Potentiometer Value: ");
Serial.println(potValue);

delay(200);
}

Program 2: Display Voltage Level Convert the analog reading into voltage.

int potPin = 0;

void setup() {
Serial.begin(115200);
}

void loop() {
int potValue = analogRead(potPin);

float voltage = (potValue / 4095.0) * 3.3;

Serial.print("Voltage: ");
Serial.print(voltage);
Serial.println(" V");

delay(200);
}

Output

Program 1: Read Analog Value

  1. The Serial Monitor will display changing ADC values as the knob is rotated.
  2. Typical range:
  3. 0 → Minimum rotation
  4. 4095 → Maximum rotation (ESP32 12-bit ADC)

Program 2: Display Voltage Level

  1. The Serial Monitor will display the output voltage of the potentiometer.
  2. Voltage changes continuously as the knob rotates.

Important Info

  1. The module uses a 10KΩ potentiometer.
  2. The output is an analog voltage between GND and VCC.
  3. The IN pin must be connected to an ADC-capable GPIO pin.
  4. ADC resolution depends on the microcontroller:
  5. ESP32 commonly uses 12-bit ADC (0–4095)
  6. Arduino UNO uses 10-bit ADC (0–1023)
  7. Not all GPIO pins support analog input. Verify the board pinout before use.