15. System
Integration

This week I developed the full integration of my final project. The process gave me clarity on everything I needed to build and allowed me to think through the complete product lifecycle, from concept to packaging before any physical fabrication began.

Task:

Design and document the system integration for your final project


Concept

Indoor Air Quality — Translated into Motion

An indoor air quality management device that translates environmental sensor data into physical movement. The system helps users decide whether to open a window for natural ventilation or to activate an air purifier.


Objective

Design and build a modular air quality monitor that translates environmental data into physical movement through a kinetic origami panel. The system must integrate local sensor telemetry with external government data to intuitively guide the user on whether to ventilate the room naturally or use an air purifier, while allowing the sensor unit to be easily detached for portable testing across different rooms.


Problem

Lack of Intuitive, Actionable Air Quality Awareness

People often lack intuitive, real-time awareness of indoor air quality compared to outdoor conditions. In highly polluted or geographically unique areas — such as Mexico City (CDMX) with severe PM2.5 smog alerts, or Puebla with frequent volcanic ash fall — this lack of information becomes a critical health hazard. Users might open a window believing they are naturally ventilating their room, only to inadvertently draw in hazardous external pollutants, drastically worsening indoor air quality. Furthermore, traditional monitors rely on easily ignored numerical screens that lack actionable context, and being strictly tethered to a wall makes it difficult to evaluate an entire house without purchasing multiple units.


After I had a clear concept I started doing the requirements of the project, some of them were modifyed or added after the risk diagram:

Project Requirements

SYSTEM MUST:

  • 01 Measure local CO₂, TVOC, temperature, and humidity in real-time.
  • 02 Periodically fetch outdoor air quality data from a government API via Wi-Fi.
  • 03 Actuate a kinetic origami panel via a servo motor to physically represent environmental status.
  • 04 Include a fully detachable sensor module (Pod).
  • 05 Use pogo-pin connections to transfer power, ground, and data between the portable pod and the static base.
  • 06 Incorporate passive cross-flow ventilation (chimney effect) in the enclosure to prevent the microcontroller's heat from skewing sensor readings.
  • 07 Include an NeoPixel for immediate, color-coded visual feedback.
  • 08 Allow the internal gas sensor board to be swapped without soldering for long-term maintainability.
  • 09 Provide a local web interface on demand displaying real-time data, historical daily graphs, and actionable recommendations.

Proof of Concept Validations

Telemetry & Logic

Verify accurate execution of the decision matrix comparing local I2C sensor data with Wi-Fi API data without blocking the microcontroller.

Mechanical Actuation

Absence of material tearing, jamming, or servo stalling after repeated expansion and contraction cycles of the origami panel.

Modularity

Continuous system operation, stable I2C communication, and automatic battery switchover when detaching and reattaching the portable module.

Thermal Isolation

Temperature and humidity readings must remain consistent with ambient room conditions, entirely unaffected by the internal heat generated by the ESP32-C6.


Spiral Development Phases

The project is structured into four incremental phases, each building on the validated output of the previous one.

〜 PHASE 01 — CORE TELEMETRY & AMBIENT FEEDBACK

  • Make a PCB considering all the components that I will be using
  • Program the XIAO ESP32-C6 to read the ENS160 + AHT21 sensors via I2C.
  • Map CO₂/TVOC data to RGB color thresholds on the NeoPixel.
  • Figure out how I will translate environmental sensor data into physical movement

▣ PHASE 02 — KINETIC ACTUATION & ORIGAMI INTEGRATION

  • Create the kinetic origami panel.
  • Design and 3D print the mechanism for the MG995 servo.
  • Program safe servo rotation angles to prevent material tearing.
  • Test physical expansion and contraction of the Origami.

⎘ PHASE 03 — API CONNECTION & WEB DASHBOARD

  • Implement the Wi-Fi fetch protocol for the government AQI API (hourly checks).
  • Code the local web server triggered by an on-demand physical button.
  • Test dynamic data exchange between the browser and the ESP32-C6.

⚙ PHASE 04 — PACKAGING, MODULARITY & FULL SYSTEM INTEGRATION

  • 3D print the static Base and portable Pod with chimney-effect ventilation geometry.
  • Integrate internal and external pogo pins.
  • Assemble all components without adhesives using brass inserts and M4 screws.
  • Perform full system testing

System Integration

To begin, I identified all the components I would use and planned the connections between them. I also outlined the architecture of the interface. Below is the complete documentation of the system's electronic and software structure, risk analysis, design sketches, and packaging strategy.


Architecture & Components

Electronic Architecture

The core hardware stack and the connections planned between them.

COMPONENTS

  • Microcontroller: XIAO ESP32-C6
  • Sensor: ENS160 (VOC / CO₂) + AHT21 (Temperature / Humidity)
  • Power: 3.7 V LiPo Battery
  • Indicator: NeoPixel RGB LED
  • Controls: Push Button
  • Actuator: Servo Motor MG995
  • Optional: PM Sensor, Photoresistor (I didn't got the time to add these)
Electronic architecture diagram showing connections between the XIAO ESP32-C6, ENS160+AHT21 sensors, NeoPixel, servo motor, battery, switch, and button
Electronic architecture diagram: component connections and wiring overview.

Software Architecture

The firmware is divided into two logical layers: a backend running on the microcontroller, and a frontend served on demand to the user's browser.

BACKEND — FIRMWARE (ESP32-C6)

  • Telemetry & Status Reads the sensors (CO₂, TVOC) and monitors the sensor status: "Operating", "Warming Up", or "Read Error".
  • API Query (every hour) Connects briefly to the internet to download the government outdoor air quality index and stores it locally.
  • Historical Memory Calculates the average air quality every 5 minutes and stores it in a chart.

FRONTEND — LOCAL WEB INTERFACE

  • Main Panel — Live Data Displays room sensor data, external government data, and the current sensor status.
  • Data comparison It compares the data between the indoor and outdoor air quality and tells you whether to open the window or to turn on an air purifier.
  • Air quality Chart Takes every 5 minute readings and displays them in a chart.

Risk Diagram

I developed a risk diagram to anticipate everything that could go wrong — staying one step ahead to prevent issues before they occur.

Risk diagram mapping potential failure points across electronics, software, mechanical actuation, modularity, and packaging for the air quality device
Risk diagram — potential failure points and mitigation strategies across all subsystems.

System Integration Sketches

After the risk analysis, I began sketching how the entire system would be integrated, considering enclosure design and the points raised in the risk diagram. I explored several forms for the portable pod, ultimately selecting the shape that resembles the leaves of a flower.

Exploratory sketches of different pod form factors, including the flower-leaf shape, junction mechanisms, and ventilation apertures
Exploratory form studies for the portable pod.
Final system integration sketch showing the static wood base with the servo and origami panel, and the detachable sensor pod connected via pogo pins
Final system sketch — base unit, detachable pod, and pogo-pin connection.

Packaging Integration

Materials & Fabrication Methods

The enclosure combines 3D printed PLA for the portable pod and the actuator mechanism, with a Laser-cut triplay wood base. Joints rely on M4 screws and brass threaded inserts to ensure durability over repeated disassembly —> no adhesives are used.

TWO LEVELS OF MODULARITY

  • Level 1 — Pod ↔ Base (External Pogo Pins) The portable sensor pod snaps into the main base magnetically using an external set of pogo pins. This allows the pod to be detached and used independently in any room.
  • Level 2 — Sensor Board ↔ Microcontroller (Internal Pogo Pins) Inside the pod, the ENS160 + AHT21 sensor board connects to the XIAO ESP32-C6 via an internal set of pin headers. This solderless connection ensures that if the environmental sensor degrades due to constant air exposure, it can be swapped instantly without tools or soldering.

Thermal Isolation — Chimney Effect

The pod's geometry incorporates lower side intakes and upper exhaust vents to create passive cross-flow ventilation. This chimney effect successfully isolates the environmental sensors from the heat generated by the ESP32-C6 microcontroller.