Air quality in Poland is in general rather poor, according to some sources the second worst in Europe. I live in Poland in a small town of about 9000 people. Since it is close to Wrocław, people consider it rural. There is some truth in that – it is surrounded by forests that are a great place to walk or bike. As far as air pollution is concerned however, the situation is bad, in winter worse than in Wrocław in my opinion. One evening last December after I came back from a walk smelling like a life-long chain smoker I tried to find data to check what is the level of pollution in my town. It turned out that probably nobody knows as almost all air quality monitoring in Poland concentrates in big cities. There are three monitoring stations in Wrocław, but none in the surrounding areas. So then I searched for an inexpensive way to measure pollution by myself and I found Air Quality Egg.
The Air Quality Egg (AQE) product is a result of a successful Kickstarter campaign from 2012. The idea was to create a network of cheap air quality sensors that communicate their data to a central place from which data can be downloaded and analyzed. That central place was provided by Pachube – “a UK-based company that provides real-time data infrastructure for the Internet of things“. Pachube got later acquired by LogMein Inc. and is now known as Xively. Somewhere between 1000 and 2000 AQEs have been sold so far. Since the owners can register their units providing geographical location, a map can be drawn that shows all registered Eggs.
I think it is an interesting map as it shows a line of cultural divide in Europe, probably reflecting some mixture of the attitude towards Mother Earth and popularity of the maker culture. It also shows that Georgia is different. Or maybe I am reading too much from this.
An AQE is really two “eggs” – the base station and the sensor unit. The base station provides a WIFI hot spot for the sensor unit and plugs into Ethernet so that it can upload data to Xively. The AQE’s sensor unit contains a couple of sensors – the basic unit measures CO, NO2, temperature and humidity. I was interested mostly in the “Particulate Add On” that measures smoke and dust. This is really a Shinyei PPD 42NJ particle sensor, with some small part for interfacing with the board that communicates with the base station.
AQEs ship from the US. This turned out important for two reasons I kind of missed when I was ordering it: strong dollar and customs when importing to Europe. In short, it cost me about 50% more than I expected, plus a couple of hours preparing customs documents.
My first attempts to use AQE were not successful. Some people reported better results for the Shinyei sensor when they were blowing air onto it. So, I used a droplet of SuperGlue to put a small fan on the sensor. Don’t do that. The result was that the measurements became pure noise. I could not remove the fan, so I had to order a replacement sensor through Aliexpress which was surprisingly cheap – $20 total with shipping included, no customs. The replacement worked much better, but only at night. During the day it was showing zero all the time. It seems that sensor’s optics get disturbed when there is too much light. The Egg cases are partially translucent so I took some cardboard and duct tape and built a case that would shield the sensor Egg from light. I don’t want to put a picture of it here as it is very ugly. However, with the case the sensor worked great – I got very sensible measurements.
The next idea was to calibrate the sensor using data obtained from the official monitoring stations in Wrocław. The PM2.5 measurements between the stations correlate with coefficient 0.92, so they pretty much measure the same thing. The assumption is that my device, located (temporarily) somewhere between those stations is also exposed to a similar level of PM2.5, so if there is a significant correlation I can use regression line coefficients to convert Egg’s measurements to µg/m3 .
After collecting some data I got the following graph:
This shows the PM2.5 values from the closest monitoring station versus the average of last hour measurements from the AQE. There are not many data points for higher values as those happen rarely in Wrocław at this time of year. However, those that I got are enough to show a clear trend line. The correlation coefficient is 0.96.
So the next step is to create a small single page web app that would load raw values from Xively and display the result in some nice form for public consumption. I hope to do that before next winter.