Home Air Quality Monitoring System
System overview of a personal IT project to monitor air quality at my house
See it running: https://aqi.markandrews.com.au/
The Problem
We moved close to a busy road and I wanted to know what the air quality was like. Why buy a commercial unit like Purpleair when you can do it yourself for double the cost in time!
The Solution: A Serverless IoT System
I wanted to use dotnet and C# for the backend so Azure was the natural choice, for Functions and CosmosDB document database. It could have just as easily been AWS Lambda + DynamoDB.
Architecture diagram

Data Flow
- The Arduino polls the SPS-30 sensor every 10 seconds
- A JSON payload is sent via encrypted http POST to an Azure Function endpoint
- The function validates the API key, processes data, and stores it in Cosmos DB
- Scheduled aggregation jobs create optimised datasets for the frontend
- A Next.js application visualises the data through interactive D3 charts
Components & Costs
- Sensiron SPS-30 Air Quality Sensor (AUD$60)
- Arduino (microcontroller for data processing - AUD$60)
- ESP8266 WiFi Module (AUD$30)
- Azure backend - free tier (one CosmosDB free)
- Vercel frontend - free tier
Drivers
I have used this driver but there is also an official Sensiron driver that would be worth exploring.
Reliability
When I first got the sensor, it was logging particulate levels of 0.5 µg/m3 (AQI of 2) which made me think it wasn't working properly!
Obviously I can't be certain of the inter-device reliability (consistency between different devices) until I compare to one or more alternate SPS-30 units.
However, I did make many observations on AQICN.org and PurpleAir and my results tracked with those in the city, and relatively close suburbs.
I am fairly confident in the intra-device reliability (consistency of measurement in this unit) because the two days that showed red on the heat map (01-02 Feb 2025) were the days where bushfires in western Victoria + easterly winds meant Adelaide was covered in smoke. On those days, the sensor peaked at 193 µg/m3 (AQI of 243).
So, I have seen it log low readings on a cold, winter night where I would expect a low reading, and a high readings on the days where the city was enveloped in smoke. Therefore, at that level of precision, the goals of this project were met, the air here is cleaner than I could have expected and about as good as it gets anywhere.
Next steps
There are newer versions of the SPS-30 driver. I should repeat the build, with newer software, and per the above with another SPS-30 unit.
This time, I would like to document the build so that others can easily repeat it. I will make all parts of the stack (Arduini, backend, frontend) available.