Input Devices¶
Group Assignment:¶
- Probe an input device(s)'s analog levels and digital signals.
1. Overview & Objectives¶
In embedded systems, an input device (or sensor) converts a physical quantity—such as position, distance, light, or temperature—into an electrical signal that a microcontroller can process.
For this group assignment, we explored and probed two fundamental categories of input signals:
-
Continuous Analog Signal: Measured using a potentiometer.
-
Digital & Pulse-Width Signal: Measured using an Ultrasonic Distance Sensor (HC-SR04).
2. Analog Input Device: Potentiometer¶
To probe this signal, we connected the potentiometer's wiper (center pin) directly to an oscilloscope probe channel, with the ground clip attached to the circuit's GND. The oscilloscope was set to a DC-coupled input with a voltage scale of a few hundred mV/div, so the full rotation range could be seen on screen.
Observation: as the shaft was turned, the trace showed a smooth, continuous line moving up or down between roughly 0V and the supply voltage — with no steps, edges, or repeating pattern. This confirmed the potentiometer output is a purely analog, continuously variable voltage, directly proportional to the wiper's mechanical position.
The video below demonstrates the continuous probing and response of the potentiometer input:
3. Digital & Pulse Signal: Ultrasonic Sensor (HC-SR04)¶
For this device, we probed control line with the oscilloscope.the channel on the Echo pin, referenced to the sensor's GND. The time base was set fast enough (µs/div range) to resolve the short trigger pulse and the longer echo pulse on the same screen.
Observation: the Echo line went HIGH for a much longer, variable duration — its width changed directly with the distance of the object placed in front of the sensor: the closer the object, the shorter the Echo pulse. This confirmed that the HC-SR04 does not output an analog voltage at all; it encodes the measured distance purely in the timing of a digital pulse, which the microcontroller must convert back into centimeters (distance = pulse width × speed of sound / 2).
- Echo Pin (Output from sensor): Outputs a digital HIGH pulse whose duration; corresponds to the round-trip travel time of the ultrasonic wave.
The video below shows the active probing and real-time response of the ultrasonic sensor:
4. Conclusion & Comparison¶
Probing these two devices side by side with the oscilloscope made the practical difference between analog and digital signals very clear:
| Aspect | Potentiometer (Analog) | HC-SR04 (Digital / Pulse) |
|---|---|---|
| Signal type | Continuous voltage level | Discrete HIGH/LOW pulses |
| Information carried in | Voltage amplitude | Pulse duration (time) |
| How the microcontroller reads it | analogRead() (ADC) |
pulseIn() or interrupt timing |
| Oscilloscope trace shape | Smooth, slowly varying line | Sharp square pulses of varying width |