TimHanewich / Air-Quality-IoT

Indoor air quality sensor box IoT project with 3D-printed housing!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

😷 Home Indoor Air Quality Sensor IoT Project 🫁

Welcome to my open-source Air Quality Sensor IoT Project! This project monitors your home's indoor air quality in real-time using IoT technology and feeds you data in JSON over a web server.

This project includes:

  • A web server, written in Python, running on a Raspberry Pi Pico W.
  • An ENS160 Digital Metal Oxide Multi-Gas Sensor, used for monitoring Carbon Dioxide (CO2), Total Volatile Organic Compounds (TOVC), and the Air Quality Index (AQI) of your home via the I2C protocol.
  • An AHT21 Integrated Temperature and Humidity Sensor, used for monitoring ambient temperature and humidity of your home via the I2C protocol.
  • A 3D-printed housing box for the Raspberry Pi Pico W and sensors (optional).

I am using a single breakout board that contains both an ENS160 and AHT21 on one board, found here.

The Raspberry Pi Pico, along with the ENS160 + AHT20 sensor breakout board live neatly in a small 3D-printed enclosure: plugged in

Web Service

The web server (written in Python) that runs on the Raspberry Pi Pico W provides two services. Firstly, the /data endpoint performs a reading of the Carbon Dioxide (CO2), Total Volatile Organic Compounds (TVOC), Air Quality Index (AQI), temperature, and humidity via the onboard ENS160 and AHT21 sensors and returns the data as JSON.

Data endpoint (API):
data endpoint

The second service the web server provides is a full HTML web page that can be rendered in any internet browser. The HTML page comes with client-side JavaScript that consumes the /data endpoint mentioned above and displays it in a simple UI.

Web page rendered in browser:
web page

3D Printed Housing

I modeled a simple housing tray for the microcontroller and sensors required for this project. You can download the 3D Model (STL file) here directly from this GitHub repo. 3d printed housing tray

pp
I further extended this project into the No-Code/Low-Code Realm using Microsoft's Power Platform.

Using an on-premises gateway for brokering communication between the Azure cloud (Power Platform) and my air quality sensor web server on my local network, I developed a custom connector, Dataverse table, model-driven app, and scheduled Power Automate workflow to collect data, accompanied with an interactive Power BI dashboard for data visualization.

You can read more about the Power Platform integration portion of this project here.

About

Indoor air quality sensor box IoT project with 3D-printed housing!


Languages

Language:Python 87.5%Language:HTML 12.5%