Indoor Air Quality Sensor: Build or Buy?

Indoor Air Quality Sensor: Build or Buy?

Australia's on fire, and smoke is inundating our cities and homes, causing terrible air quality, often over 10x hazardous levels. I'd like to measure how bad the air quality is in my home, when it looks like this outside:

Smoky Sydney Skyline


Graph air quality in my home over time, so I can know if we should:

  • Search out gaps letting in air?
  • Run the air conditioning, which presumably has a filter inside it?
  • Buy an expensive air purifier?
  • Wear masks?
  • Just wait for the wind to change then open the windows?

Then quantify whether these interventions make a difference.

I want to measure PM10 (~10 micron particulate matter) and PM2.5 (~2.5 micron). A USA plug is fine, as long as the sensor runs on 240V AC Australian power - I've already blown a few 120V USA powerblocks.

I also don't want to spend hundreds of dollars: I'd feel silly spending lots of money on a sensor when I already have one built into my body: I can feel it in my throat and eyes when quality is bad.

I particularly want to compare filtering with closing up the house, as the air quality improves in a closed area just because of particles falling out of the air: I don't want to pay hundreds of dollars for an air purifier if it's no better than just closing the door.

Ideally I'd like the measured data to go into Prometheus, an open-source time-series database which I'm already using for monitoring home weather.

Extra points if the monitoring can work without an internet connection, without relying on a cloud connection.

Commercial Options

Building isn't for everyone. It's an ongoing maintenance cost to keep the sensor alive and running. Here were the options I considered first, before eventually deciding to build my own.

Given I want graphing, I started by looking at sensors with Home Assistant integrations. Home Assistant is a popular open source home sensor hub, with a thriving community of plugin contributors. I figured the most popular sensors would have already been hooked up with Home Assistant, and if they're hooked up with Home Assistant, it's possible to get my data out of them.


Xiaomi Mi PM2.5 Detector Device

Xiaomi makes a family of Xiaomi Mi Air Quality Monitor sensors with Home Assistant integrations. I couldn't find these for sale in Australia easily though.

Laser Egg

Laser Egg Device

Laser Egg makes a good-looking 149USD PM2.5 (fine dust) sensor, with Home Assistant integration. This is Wirecutter's recommendation.

At 216AUD, that's too expensive for me.


Awair Device

Awair makes a gorgeous 199USD Hi-Fi inspired PM2.5 sensor with Home Assistant integration, and a 149USD model.

Too expensive.

AirVisual Pro

AirVisual Pro Device

IQAir's AirVisual runs a public online map, and has a lot of Sydney deployments, and makes a kind-of-ugly 295USD PM2.5 sensor with indoor and outdoor display and Home Assistant integration, though I'm not sure how it measures outdoor air quality, as there only seem to be pictures of the indoor unit on their website.

Someone from work was buying one of these, but it's too expensive for me.


FooBot made a sensor with Home Assistant integration, but they're pivoting to building new devices and have stopped selling the old device. Pretty strange for a business to stop selling the old device - you'd assume it'd be profit? Bummer.

Apple Store

The Apple Store has great return policies, so I like buying from them.

Eve Room Device

They stock the 180AUD HomeKit Eve Room Indoor Air Quality Monitor, a Volatile Organic Compounds (VOC) sensor, but doesn't measure PM2.5 or PM10.

Wynd Plus Smart Personal Air Purifier Device

And the 350AUD Wynd Plus Smart Personal Air Purifier, with a detachable PM2.5 Air Quality Tracker. That's pretty expensive - would be good if I could buy the Tracker separately, I suppose.


PurpleAir Device

PurpleAir has a fantastic real-time map of PM2.5 and PM10, with decent coverage in Sydney which lets you choose many indexes, and get the raw data out, and export it as CSV. They also offer a JSON API, and a comprehensive FAQ. I'm impressed, and reviews of the device are positive.

The council of Armidale, NSW used low-cost PurpleAir sensors to monitor air quality across their city, and I assume they did a bit of research first.

If I was to use this sensor outside, there'd be a force-multiplier effect: my outside data could contribute to the map that many other people can use. But I want an indoor sensor, and the sensor readings inside my home won't be of wide interest.

PurpleAir makes a 179USD indoor model and a 229USD outdoor model. I only really need an indoor model (there is good coverage in my part of Sydney with other outdoor PurpleAir owners on the public dashboard!).

But still, that's 260AUD, plus postage. Fairly steep for my budget.

Custom Build: Plantower PMS5003 + Breakout + Raspberry Pi

Plantower PMS5003 Device

The Plantower PMS5003 just kept popping up during this research:

A theme emerged: the PMS5003 is accurate-enough, while staying low-budget.

There was even a paper published in Nature(!) - Long-term field comparison of multiple low-cost particulate matter sensors in an outdoor urban environment measuring the PMS5003, which concludes

...these low-cost sensors are suitable for monitoring short-lived pollution events especially where coupled with wind data and they may provide useful information on personal exposure to PM. They may also be suitable for reporting hourly data to produce data to inform the public.

The PMS5003 is a box with a fan that blows air across a laser, and the scattering of the light implies how many particles are inside. It runs off 5V for the fan, and communicate over a 3.3V serial port. That's pretty easy to hook up: the Raspberry Pi has 5V pins and a 3.3V serial interface. The datasheet is pretty detailed.

Purchasing Components

The PMS5003 is available ubiquitously:


I built my own, using the PMS5003. If my budget was higher, I would have bought a PurpleAir sensor: they have comprehensive testing, seem very transparent, exposing the raw data, for a price that seems reasonable, if you don't want to get your hands dirty.

While I prefer to buy local & support the local maker communities, the price difference for the PMS5003's was stark. I bought 3x Pimoroni Breakout Board from Core Electronics for $5ea, and raced separate orders for 3x PMS5003 sensors, two from different eBay sellers and one from AliExpress. The eBay orders were delivered promptly, even though I judged from the cheap prices they might be drop-shippers that take weeks.

I already had some wires, Raspberry Pis {3, 4, Zero W}, Arduino Unos, and FTDI serial adapters from earlier projects. You can get a Raspberry Pi Zero W starter key for 69AUD from Core-Electronics, so the parts cost is much lower.

In Part 2: Building a Raspberry Pi Home Air Quality Sensor, I share how I connected everything, and graphed the data.

Mark Hansen

Mark Hansen

I'm a Software Engineering Manager working on Google Maps in Sydney, Australia. I write about software {engineering, management, profiling}, data visualisation, and transport.
Sydney, Australia