Indoor Air Quality Sensor: Build or Buy?

Mark Hansen

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:

Goals

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.

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

FooBot

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.

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!).

...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.

Conclusion

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.