Following on from my previous Air Quality Monitor, in Spring 2022, I had a pile of useful components on my desk:
- PMS 7003 – Low cost particulate sensor
- BME280 – Temperature and pressure monitoring sensor
- Raspberry Pi Zero W
It looked like a great opportunity to join sensor community, a distributed network of air quality monitors across the whole of Europe. Sensor community generally use ESP32, and a SDS011 particulate sensor. I was keen to learn more about Raspberry Pi, I thought it would be fun to take on the challenge of getting their system to work with a Pi.
One of these sensors in Bristol is mine. At any time I can see the current PM10 and PM2.5 particulate levels in my neighbourhood.
Not the Enviro+ Hat
The Pimoroni Enviro+ is an amazing hat for the Pi, that adds loads of sensors for particulates, temperature, pressure, noise, humidity, light, gas and a little screen. For this project, I only needed a fraction of that functionality.
Viewing the pinout for the Enviro+ and realised that I didn’t even need the hat for this project, soldered together a little adapter to make a few connections between my 2 sensors and the GPIO pins of the Pi. This was the worst soldering I’ve done for years… Hey, don’t judge me for this mess, it’s worked fine for two years, I might go back and re-make it one day. (Narrators voice… he never did go back and re-make it.)
I modified one file from the Pimoroni Enviro+ code base (luftdaten.py) by removing the functionality that I didn’t need. It reads the 2 sensors and uploads to sensor community. My version is on GitHub.
I also had to learn how to get the Python file to run on startup and hacked the Pi config to turn off the LED’s so that it was more inconspicuous at night. Strangely, this all went very smoothly, at times I felt like I knew what I was doing with both Pi and Python…weird.
The cheapest option was two square downpipe ends. I sawed the wide part off one of them, and pushed them together. then fixed everything inside with double sided foam tape. (The sensor community guides use larger round pipe.)
I added 2 little 3D printed insect shields using a slicer hack in Prusa. The part was CAD modelled solid in about 2 minutes, the hexagon pattern is created by the slicer as the infill, which is visible because the print is set to zero top and bottom layers and about 2mm for the side walls to give it some strength.
In a great hacker tradition, I used a glue gun to fix the insect screen in place and cable tie to fix to a downpipe outside my house.
The whole project cost under £15 for 2 pieces of guttering and an extra long USB cable. It would be £65 if I had to buy all the parts.
One year on, I’ve been data logging for a year, some observations:
- It is clear when a neighbour lights a wood fire in winter, particulate levels are unhealthy on cold winter evenings.
- The same with BBQ’s on hot summer evenings.
- I can’t yet comment the effect of the new air quality zone in Bristol. That just means that I don’t have enough data, and I want to wait for the proper report by air quality professionals based on calibrated and accurate sensors in Bristol.
- There are sensors and data all over Europe. Watching the effect of the Russian bombing and subsequent fires in Ukraine in 2022 on Sensor Community, really brought the invasion home.