Skip to content

Input devices

Group assignment:

  • Probe an input device(s)'s analog and digital signals

Objective

The objective of this group assignment was to probe an input device's analog levels and digital signals. To achieve this, we characterized a potentiometer using an oscilloscope and a microcontroller's serial interface to visualize how physical rotation converts into both continuous voltage and discrete digital data.

The Setup

A potentiometer is a three-terminal resistor with a sliding or rotating contact that forms an adjustable voltage divider. We connected it as follows:Pin 1: Connected to VCC (\(3.3\text{V}\))Pin 2 (Wiper): Connected to the Analog Input pin of our microcontroller (e.g., ESP32 GPIO) and simultaneously hooked up to the Oscilloscope probe.Pin 3: Connected to GND (\(0\text{V}\)).

Probing Analog Levels (The Electrical Signal)

To observe the pure analog behavior, we connected the probe of our digital oscilloscope to the wiper pin (Pin 2) of the potentiometer, with the ground clip attached to the common GND.

  • Equipment: Digital Oscilloscope.

  • Process: We slowly turned the potentiometer knob from one end to the other while monitoring the waveform on the screen.

  • Observations: The oscilloscope showed a perfectly continuous DC voltage level. As we rotated the knob clockwise, the voltage line smoothly climbed from \(0\text{V}\) up to the maximum supply voltage (\(3.3\text{V}\)). Turning it back counter-clockwise dropped the voltage smoothly back to \(0\text{V}\).

Probing Digital Signals (The Conversational Data)

Microcontrollers cannot naturally process an infinite scale of analog voltages; they must convert them into digital steps using an ADC (Analog-to-Digital Converter).

To visualize this digital translation, we compiled a basic sketch that reads the analog voltage and prints the converted digital signal over the serial bus (UART TX line) to our computer.

  • Microcontroller Resolution: The ESP32 utilizes a 12-bit ADC, which translates the \(0\text{V} - 3.3\text{V}\) analog range into discrete values between 0 (\(0\text{V}\)) and 4095 (\(3.3\text{V}\)).

  • Process: We opened the Serial Plotter inside our IDE while changing the potentiometer position.sssss