the mobile particle matter logger


The idea

A stationary particle matter sensor is good, if you want measure the air quality on one sport. But people are not all the time in the same place. They leave the house in the morning, travel by car, bike or bus to their work, then maybe have some exposure at their workplace and later leave to do sports, met with friends or do other stuff. So we wanted to build a sensor you can carry around with you and measure your personal exposure, almost like a dosimeter but not for radioactivity but for particle matter.

With this device scientist and private citizen can measure their personal exposure or measure what exposure certain groups of people will have.


What you need

You can get all the stuff from Amazon. We have provided some Amazon-Affiliate-Links as a way for us to earn some money from our project. Of course you can buy stuff from your local electronics store or a diffrent vendor.

You will need from Amazon:

However there is one component we didn’t find on Amazon: the particle matter sensor itself. For that we have provided a link to AliExpress. Meaning you will have to wait about six weeks until you get that.

SDS011 Feinstaubsensor (früher PPD42NS)
(22 Euros)

From your local hardware store:

  • You will also need a case. A plastic box might work fine for this. It should have two openings: One for the 6 mm Cable and one to ventilate it all.
  • a plastic 6 mm hose, to connect the sensor to the outside, as shorter as better!
  • duct tape

Around 5 Euros.

What to do

Download the image file (from Dropbox). (2 GB from Dropbox)

Use an application like etcher to burn the image file onto an SD Card.

Assemble the entire setup. Put the SD Card into the Pie. Put the Hub into the USB Port of the Pie that says USB. Attach the GPS reciever and the sensor via the USB-to-Serial cable with the hub. Power up!


How to opearate it?

You can use the logger with and without the GPS reciever. If you use it without the GPS reciever you have to check the time of the rasperry manually when you turn it on.
The rasperry pi has no internal clock and so it has to be set manually.

Connect the device to the power. Now the logger will start to log time, place, PM10 and PM2.5 values. It will save this data to a file. The first file on the list oat the interface is the last file. Time and Date depend on the time of the Pi. As the Pi has no internal clock and ususally draws its time from the network these will be wrong.


To acess your files and to configure everything the Pi will open a hotspot. The hotspot should be named „Airlogger“. The Password is „airloggerpsk“.

Then enter the following adress in your browser:

You can acess this from your phone or your laptop and download the data. You may have to try several times. The file can be downloaded as csv or kml file.

How will the data look like?

The data cand be downloaded from the pi, by acesssing the hotspot and then download a *.csv file and a *.kml file.

CSV Files can be analyzed and imported into Excel, LibreOffice or Numbers.

KML Files can loaded into Here Maps, Google Earth and Maps or other software.

Unix Time Human Readable Time pm 2.5 pm 10 Has Fix Longitude Latitude Altitude GPS Unix Time
1497856643 19.06.17 07:17:23 1.3 1.6 False 0.0 0.0 nan 0
1497856644 19.06.17 07:17:24 1.3 1.6 False 0.0 0.0 nan 0
1497856645 19.06.17 07:17:25 1.3 1.6 False 0.0 0.0 nan 0
1497856646 19.06.17 07:17:26 1.3 1.6 False 0.0 0.0 nan 0
1497856647 19.06.17 07:17:27 1.3 1.6 False 7.828464308 48.006151165 nan 0
1497856648 19.06.17 07:17:28 1.3 1.6 False 7.828464308 48.006151165 nan 0

The first row „Unix time“ and „Human readable time“ are taken from the Pi. These are not accurate.
PM 2.5 and PM 10 are the reading from the particle matter sensor.
„Has Fix“ says if the system has a GPS fix. It will change after two or three reading from False to True.
Longtiude and Latitude give the reading from the GPS sensor. Altitude as well.
GPS Unix Time gives the GPS time from the satelite as unix timestamp in seconds since 1970, the time it uses is UTC (Greenwich Time) without summer or wintertime.


The code

The current code for this project can be found on Github:

More information

This project was inpired by Ingmar Stapel. You can find his blog entry here and the Code on GitHub here.

You can also find this article on my blog about it.

Please tell us how and for what you used our application.


Please consider donating a small amount, maybe 3 Euros to us to help support the code.


Many thanks to Florian Kramer for his work on this