Research / SmartAir

Published2026First Author

SmartAir: AIoT-Based Indoor Air Quality and Occupancy-Aware Ventilation System for Good Health and Well-Being

A low-cost sensor box that checks room air quality and whether people are in the room, and switches a ventilation fan on only when needed, so it improves air without wasting electricity.

What the System Does

One ESP32 node reads a BME280 (temperature, humidity, pressure), a BH1750 (light) and a CCS811 (estimated CO2 and TVOC), shows readings on an OLED display and drives a fan or exhaust through a relay. It samples every 5 seconds.

Two compact decision-tree models run on the device with TinyML, so no cloud is needed: one detects occupancy (yes or no) and one sets the air-quality control class (Good, Moderate or Poor).

For monitoring, the ESP32 publishes JSON over MQTT to a Mosquitto broker. Telegraf stores it in InfluxDB, and Grafana shows a live dashboard.

Results

  • Occupancy model on two public test sets: accuracy 97.82% (F1 0.9709) and 99.26% (F1 0.9826).
  • Air-quality control model: macro-F1 0.9999 against threshold-derived labels. Those labels come from CO2 and TVOC threshold rules, so this shows the tree reproduces the control rules faithfully, not that it learned health outcomes.
  • Validated end to end in a 60-minute run in a residential kitchen in Dhaka (January 2025).
  • Bill of materials for one node: about Tk. 3,015 (ESP32 380, CCS811 1,500, BME280 380, BH1750 170, OLED 320, relay 25, miscellaneous 240), excluding enclosure and fans.

Limitations Stated in the Paper

The occupancy tree splits mainly on light level. That caused some false "unoccupied" results when the node was mounted high and the door was open. Occupancy only gates the "Moderate" air-quality case, and "Poor" air triggers ventilation regardless, so severe cases are unaffected. The CCS811 is a low-cost proxy sensor, not a lab-grade one.

My Contribution

Core system design, prototype assembly, deployment and testing, and development and deployment of the on-device algorithm.