Skip to content

9. Input Devices

Global Class

This week focuses on how physical phenomena are captured and translated into digital signals that a microcontroller can process. It builds directly on the previous week, where a working PCB was fabricated, and introduces the sensing layer required for interaction and control.


Types of Inputs

Microcontrollers receive input through different mechanisms:

  • Digital inputs

  • binary signals (HIGH / LOW)

  • buttons, switches

  • Analog inputs

  • continuous voltage signals

  • read using ADC (Analog-to-Digital Converter)

  • Comparators: detect threshold conditions

  • Digital communication (I2C): smart sensors providing processed data


Analog-to-Digital Conversion (ADC)

The ADC converts voltage into numerical values.

Important parameters:

  • resolution (bit depth)
  • sampling rate
  • noise and filtering

Understanding ADC behavior is essential for reliable sensing.


Sensor Categories

Several types of sensors were introduced:

  • Resistive sensors

  • potentiometers (user input)

  • thermistors (temperature)

  • Magnetic sensors

  • measure field strength

  • detect position or presence

  • Encoders

  • measure rotation or position

  • enable closed-loop control

  • Capacitive sensors: touch and force detection


Signal Conditioning

Sensors often require additional circuitry:

  • voltage dividers
  • pull-up resistors
  • filtering capacitors

These ensure stable and interpretable signals.


Communication Protocols

  • I2C

  • two-wire communication (SDA, SCL)

  • requires pull-up resistors
  • supports multiple devices on the same bus

Datasheets and Abstraction

Libraries simplify sensor integration, but understanding the datasheet is essential to fully control and configure the hardware.

The hardware often provides more capabilities than exposed by default libraries.


Key Insight

Sensing is about understanding how a physical phenomenon becomes a signal and how that signal represents system behavior.


Local Class

Input Devices Introduction

The session began with a hands-on introduction to input devices, focusing on how physical interaction is translated into electrical signals.

Dani demonstrated basic components on a breadboard, with particular attention to the potentiometer as a variable input device.

Key concepts:

  • variable resistance as input signal
  • voltage division for analog reading
  • mapping physical interaction to voltage change

Breadboard setup with potentiometer


Smart Citizen Project (IAAC)

Adai presented the Smart Citizen project developed at IAAC.

This system integrates multiple environmental sensors into a compact device capable of measuring:

  • temperature
  • humidity
  • air quality
  • light
  • sound

The project demonstrates how multiple input devices are combined into a coherent sensing system with embedded processing and physical enclosure.

IAAC Smart Citizen board

Smart Citizen internal assembly

Smart Citizen enclosure detail


Hands-on — Potentiometer Integration

The assembled Barduino board was then placed on a breadboard and connected to a potentiometer to test analog input.

Connections:

  • 3.3V → one outer pin of the potentiometer
  • GND → opposite outer pin
  • wiper (middle pin) → analog input pin on the board

This creates a voltage divider, allowing the output voltage to vary continuously as the potentiometer is turned.

Top view of potentiometer wiring

Potentiometer wiring detail

Vertical setup view


Measurement with Multimeter

A multimeter was used to measure the voltage at the potentiometer output.

Observed behavior:

  • approximately 0V at one extreme
  • approximately 3.3V at the opposite extreme
  • continuous voltage variation between those two values

This confirmed that the potentiometer was functioning correctly as an analog input device.

Board connected to breadboard and powered

Board Preparation — Barduino Assembly

Before testing input devices, the Barduino development board was prepared by soldering header pins so it could be mounted securely on a breadboard and connected to external components.

Process:

  • align pin headers with board holes
  • solder each pin carefully
  • inspect joints for continuity and avoid solder bridges

This step was important to ensure both mechanical stability and reliable electrical contact during testing.

Soldering process

Soldering detail

Barduino board with soldered headers

Low-angle view of soldered headers

Potentiometer setup used for voltage measurement


Observations

  • stable voltage variation across the potentiometer range
  • direct relationship between rotation and measured voltage
  • correct wiring of VCC, GND, and signal is essential
  • good soldering quality improves reliability during testing

Key Insight

Input devices convert physical interaction into measurable electrical signals.

In this case, the potentiometer demonstrates clearly how a continuous manual action is translated into a continuous analog voltage that the microcontroller can read and process.


ASFALT Connection

This session directly informs the ASFALT input strategy:

  • potentiometer → user control and interface testing
  • thermistor → real temperature sensing and thermal feedback

Using the potentiometer as a controllable analog input makes it possible to validate sensing logic before integrating the final temperature sensor.


Weekly Assignment

Input Devices

This week focuses on measuring physical phenomena and converting them into electrical signals that a microcontroller can process.

The goal is to:

  • interface a sensor with a custom microcontroller board
  • read and interpret the signal
  • relate physical input to digital values

Group Assignment

The group assignment explored how input devices behave electrically.

Signal Observation

Using lab equipment:

  • multimeter → measure voltage levels
  • oscilloscope → observe signal variation over time

Key observations:

  • analog signals vary continuously
  • digital signals switch between discrete states (HIGH / LOW)

This distinction defines how sensors are read and processed.


Individual Assignment

Goal

Measure a physical input using a sensor connected to a custom microcontroller board.


Sensor Selection

A potentiometer was used as a variable input device.

It acts as a voltage divider:

  • one side → VCC
  • one side → GND
  • middle pin → variable voltage output

This allows mapping physical rotation to voltage.


Hardware Integration

The potentiometer was connected to the development board:

  • VCC → 3.3V
  • GND → GND
  • signal → analog input pin

The board used was developed in previous weeks.

Note: while initial testing used a breadboard, the final system is intended for direct PCB integration.


Reading the Signal

The microcontroller reads the analog voltage using its ADC (Analog-to-Digital Converter).

Process:

  • input voltage (0–3.3V)
  • converted into digital value (e.g. 0–1023 or 0–4095 depending on resolution)

This creates a direct mapping:

rotation → voltage → digital value


Code Logic

The program:

  • reads analog input
  • stores value in variable
  • outputs value (e.g. serial or LED behavior)

Basic flow:

  • initialize ADC
  • continuously read input
  • process and print value

Observations

  • smooth variation across full potentiometer range
  • stable readings when wiring is correct
  • noise appears with loose connections

Problems and Fixes

  • incorrect wiring → no signal
    → fixed by verifying VCC / GND / signal

  • unstable readings
    → improved by securing connections


Result

The system successfully:

  • reads analog input
  • converts it to digital data
  • reflects physical interaction in real time

This validates the sensing workflow.


Reflection

This week establishes the input layer of the system.

Key insight:

sensing is the foundation of control

Without reliable input, no meaningful system behavior can exist.


Relevance to ASFALT

This directly defines the sensing strategy for ASFALT:

  • potentiometer → user input (heat control)
  • thermistor → temperature measurement

Together, they enable:

  • user-driven control
  • system feedback

This prepares the system for:

input → processing → output → closed-loop control


Use of AI Tools

Prompts

Files

  • source code
  • schematic reference