Air Quality Monitoring in Buildings

User Guide · Revision 2 — 2026-09-10

Author

Ki Young Koo

Published

September 10, 2026

Document history

Rev Date Changes
1 2026-06-01 Initial document, written in Org mode. Described the Arduino/PlatformIO firmware publishing to a public MQTT broker, and the Django/Bokeh web plots.
2 2026-09-10 Converted to Quarto and brought up to date with the ESP-IDF firmware, the TimescaleDB/Grafana stack and the September 2026 validation campaign. Split into two documents: this User Guide covers what the system measures, setting up a node and reading the data, and the development and operational detail moved to the Administrator Guide. Setup chapter with photos of each node’s buttons, the setup screens and pages, and each node’s current settings and data path. “Reading your data” now follows setup, and the trust section notes the month-long test under way.

1 Introduction

This guide explains how to use the building air quality monitoring system: what it measures, how to read the measurements, and how to set up a sensor node.

NoteWhich guide is this?

This is the User Guide. If you need to know how the firmware works, how data reaches the database, or how the system is monitored, see the Administrator Guide.

2 What the system measures

Two kinds of sensor node are deployed, shown in Figure 1.

Figure 1: The two sensor nodes: (left) the custom-made formaldehyde node, (right) M5Stack Air Quality v1.1

Between them they cover the quantities in Table 1.

Table 1: What each node measures
Node Measures Reported every
M5Stack Air Quality v1.1 CO2, particulates (PM1.0, PM2.5, PM4, PM10), VOC, NOX, temperature, humidity Interval you choose at setup
Formaldehyde Node (SFA30) Formaldehyde (HCHO), temperature, humidity 10 minutes

The M5Stack node is an off-the-shelf kit; it shows its latest readings on a small e-ink screen, which keeps the numbers visible even while the node is asleep between measurements. The formaldehyde node was purpose-built for this study on an M5Stack Core2, and shows its readings on an LCD for ten seconds after each measurement before going back to sleep.

Both nodes are battery-friendly: they wake, measure, upload and sleep again, rather than running continuously. But, the battery-only mode has not been tested yet. At the moment, the nodes requires a USB-C connector for power.

3 Setting up a node

Both nodes are set up the same way: the node raises its own WiFi network, you join it with a phone, and fill in a form on a web page the node serves. No cable or computer is needed. What differs is which buttons you press, so each section starts by showing where they are.

3.1 M5Stack Air Quality v1.1

3.1.1 Finding the buttons

Figure 2: The M5Stack Air Quality v1.1 and its buttons. Button A and Button B sit together at the top left, the Power button is on the face below the M5 logo, and Reset / Power off is on the side. (Image: M5Stack)
Table 2: What each button on the M5Stack Air Quality does
Button Where (Figure 2) What it does
Power On the face, below the M5 logo Press to switch the node on.
Button B Top left, the lower of the pair Click to open the settings page; click again to start WiFi setup. Hold 5 s to restore factory settings.
Button A Top left, the upper of the pair Click to show a QR code for viewing the data remotely; click again to go back. Hold 5 s to turn the buzzer on or off.
Reset / Power off On the side edge, next to the 5VIN / 5VOUT connector (marked RST/OFF) On battery it switches the node off; on USB power it restarts the node. The node cannot be switched off while on USB power.

3.1.2 Connecting it to WiFi

  1. Press the Power button. On a node that has never been set up, press Button B once to start WiFi setup. On a node that is already running, press Button B to open the settings page, then press it again to start WiFi setup.
  2. The screen shows a WiFi network named AirQ-xxxxxx and a QR code. Join that network from your phone.
  3. Scan the QR code on the screen, or open http://192.168.4.1 in a browser. The setup page in Figure 3 appears.
  4. Enter your WiFi name and password, choose the Wake-up Interval (how often the node measures) and your Time Zone, then press CONNECT.
Figure 3: The M5Stack setup page on a phone: (1) WiFi name, (2) WiFi password, the wake-up interval and time zone, then (3) CONNECT. (Image: M5Stack)

When setup completes, the screen shows a QR code for the node’s own public data page (Figure 4). Disconnect your phone from the AirQ-xxxxxx network before opening it, or the page will not load. The same QR code comes back whenever you click Button A.

Figure 4: The node’s public data page, with the latest readings from both sensors. (Device ID hidden.)

The page shows when the latest reading was taken and the interval the node is set to — 600 s for this node — followed by each sensor’s readings. The SCD40’s temperature and humidity are labelled Internal: they are measured inside the case and read warmer and drier than the room, so use the SEN55 values for room conditions. VOC and NOx are marked Need long time measure because the sensor has to run for a long time before those two readings settle.

3.1.3 Current configuration

Table 3: Current settings of the deployed M5Stack node
Setting Value
Name on the dashboard m5aq1
WiFi The building’s WiFi network
How often it measures Every 10 minutes (wake-up interval 600 s); readings arrive about every 10.4 minutes

Where its data goes. Each time the node wakes, it measures and sends the readings over WiFi to M5Stack’s own cloud service, EzData. Every 10 minutes, the project server fetches the latest reading from EzData and stores it in the project database, from where it appears on the dashboard under Node m5aq1 (Section 4).

node → building WiFi → M5Stack EzData cloud → project server (every 10 min) → database → dashboard

3.2 Formaldehyde Node

3.2.1 Finding the buttons

Figure 5: The M5Stack Core2 that the formaldehyde node is built on. The three red circles below the screen are touch buttons: left is Button A, middle Button B, right Button C, and the power button is on the left side. The photo shows the Core2 v1.0; on the v1.1 used for this node the reset button is a small button on the bottom edge, not on the right side as pictured. (Image: M5Stack)

The formaldehyde node is built on an M5Stack Core2 (Figure 5). Its three “buttons” under the screen are not physical buttons: the three red circles are touch areas, part of the touch screen. Touch them lightly with a finger, as you would the screen.

Table 4: The Core2’s buttons, and which ones the formaldehyde node uses
Button Where What it does on this node
Button A Left red circle, below the screen Hold at start-up to open WiFi setup.
Button B, Button C Middle and right red circles Not used.
Screen The display itself Touch to wake the node and see a fresh reading.
Power Physical button on the left side Press to switch on; hold about 4 s to switch off.
Reset Small physical button on the bottom edge Restarts the node.

3.2.2 Connecting it to WiFi

  1. Press the reset button on the bottom edge, and touch and hold Button A (the left red circle) for about 2 seconds.
  2. The screen changes to the setup screen in Figure 6, with two QR codes.
  3. Scan the left QR code to join the setup network, or join AirQ-Setup-xxxxxx by hand with the password configureme.
  4. The setup page (Figure 7) should open by itself. If it does not, scan the right QR code or open http://192.168.4.1/.
  5. Change the WiFi name and password, and anything else you need, then press Save & reboot. The node restarts and joins the new network.
Figure 6: The formaldehyde node’s setup screen: the setup network name and password, with QR code 1 to join that network and QR code 2 to open the setup page.
Figure 7: The formaldehyde node’s setup page, showing the node’s current settings. Leave the MQTT fields as they are: they tell the node where to send its data. (WiFi and broker values shown here are examples.)

The page opens showing the node’s current settings, so you only change what you need — usually just the WiFi name and password. The time zone affects the screen only; stored measurements are always in UTC, so changing it never alters the recorded data.

3.2.3 What you see when it is working

Figure 8: The formaldehyde node’s screen after a successful measurement: a green [ OK ] for each step, followed by the time and the latest readings.

After each measurement the screen shows a green [ OK ] for each step: the stored-readings queue, the sensor, the clock, WiFi, time sync and the upload. The latest readings follow (Figure 8). A red [FAIL] or yellow [WARN] names the step that went wrong.

After 10 seconds the screen switches off. This is normal: the node sleeps until its next measurement to save power. Touch the screen to wake it and see a fresh reading.

3.2.4 Current configuration

Table 5: Current settings of the deployed formaldehyde node
Setting Value
Name on the dashboard fa1
WiFi The building’s WiFi network
How often it measures Every 10 minutes (600 s), on the clock
Readings shown on screen 10 seconds, then the screen switches off and the node sleeps
Time zone on the screen London (UK time)

Where its data goes. Each time the node wakes, it measures and sends the reading over WiFi, encrypted, to the project’s own message server. The server stores every reading in the project database the moment it arrives, and it appears on the dashboard under Node fa1 (Section 4). If the network is down, the node keeps its readings and sends them all once it reconnects, so a WiFi outage delays data rather than losing it.

node → building WiFi → project message server → database → dashboard

4 Reading your data

All measurements are collected on the project server and plotted with Grafana. Open:

https://airquality.shmcloud.org/

That page opens on the public air quality dashboard and needs no login. Each panel is a time history; you can drag across a panel to zoom into a period, and use the time picker at the top right to choose a range.

The dashboard is arranged by node: the Node m5aq1 rows show the M5Stack Air Quality readings, the Node fa1 rows show formaldehyde, and a final row compares temperature and humidity from both.

4.1 Making sense of formaldehyde readings

Formaldehyde is reported in parts per billion (ppb). For reference, the World Health Organization guideline is 0.1 mg/m³, which is roughly 80 ppb as a 30-minute average. The dashboard draws this as a dashed line, so you can see at a glance whether readings are approaching it.

Indoor readings in this study have typically been in the range of a few ppb to about 30 ppb — well below the guideline. Short spikes are normal: formaldehyde is released by furniture, flooring and cleaning products, so a new item in the room or a warm, closed room can lift the reading for a while.

4.2 If a node stops reporting

A gap in the graphs usually means the node lost power or lost its WiFi connection. Check that it is powered and within range of the access point it was configured for. If it has been moved to a different network, it needs setting up again — see Section 3.

5 Can the measurements be trusted?

ImportantA one-month test is under way

The formaldehyde node is in the middle of a month-long reliability test, which started on 2026-09-04 and runs until early October 2026. The results below are from its first days. This guide will be updated with the full results once the test finishes.

The formaldehyde node has been under continuous monitoring since September 2026, checked in two independent ways: whether every expected measurement actually reached the database, and whether the node itself is behaving normally. Reports are produced automatically every day.

Over the first full days of that campaign the node delivered 144 of 144 expected measurements per day, with none missing. The one gap recorded, on 2026-09-04, was traced to the node’s USB power being interrupted at the shared computer it was plugged into — not to a fault in the sensor.

An earlier long-term test of one node of each type has been running since December 2025. The graphs on the dashboard are the best check: readings that track daily patterns of occupancy and ventilation, rather than drifting or sitting flat, are behaving as they should.

Details of how this monitoring works are in the Administrator Guide.

6 Sensor specifications

Manufacturer specifications for the sensor modules inside each node, for reference.

6.1 M5Stack Air Quality v1.1 (SEN55 and SCD40)

Figure 9: SEN55 Temperature and Humidity Sensor Specification
Figure 10: SEN55 Gas and Humidity Sensor Specification
Figure 11: SCD40 CO2 Sensor Specification
Figure 12: SCD40 Humidity Sensor Specification
Figure 13: SCD40 Temperature Sensor Specification

6.2 Formaldehyde Node (SFA30)

Figure 14: SFA30 Formaldehyde Sensor Specification
Figure 15: SFA30 Temperature Sensor Specification