Daniel James' Air Quality Monitor Pairs a Salvaged PM2.5 Sensor with an Adafruit KB2040

Using a PM2.5 sensor pulled from a broken "smart" air purifier, James creates a simple two-component CircuitPython-powered AQ monitor.

Software engineer and maker Daniel James has built a handy little air quality monitor for tracking concentrations of particular matter indoors — using a sensor salvaged from a dead air purifier.

"As a part of my prior experience dissembling 'smart' air purifiers, I have had a couple of Cubic PM1003 indoor particulate sensor modules sitting in my electronics stash," James explains. "Since I had already tracked down the datasheet with the UART protocol and familiarized myself with it, I knew I could use something simple like a [Raspberry Pi] RP2040 to communicate with the sensor and blink some lights."

The Cubic PM1003 is a low-cost LED-based infrared particle sensor designed to track particles measuring from 1.0μm to around 10μm and output a reading equivalent to the concentration of 2.5μm particulate matter in the air — an air quality metric known as "PM2.5." In the case of the air purifier in which it had originally been installed, that metric was used to turn the fan on and off and adjust its speed according to the reading; James, though, was looking for something simpler: visual feedback, provided by a Raspberry Pi RP2040-based Adafruit KB2040 microcontroller board.

"I looked up the current AirNow.gov Technical Assistance Document for the Reporting of Daily Air Quality – the Air Quality Index (AQI) to refer to its guidelines for rating the levels of 2.5 micron particulate matter, as well as the familiar colors used to communicate air quality," James explains. "The Neopixel onboard [the Adafruit KB2040] renders the colors quite well and I added a subtle 'breathing' effect to alleviate the harshness of an inanimate object."

Installed in 3D-printed case, the resulting gadget lights up with a color-coded indication of particulate matter pollution — and James has released wiring instructions, CircuitPython source code, and 3D print files for the case on GitHub under the permissive MIT license, with more information on his website.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Get our weekly newsletter when you join Hackster.
Latest articles
Read more
Related articles