Learn · Lesson 7 of 7 · 4 min

How the sensor works

A peek inside the box: the Pi, the laser, the GPS and the setup wifi.

A SimpleAQ device is a small computer, a set of sensors and a lot of patience. Here is what happens inside the box.

The hardware

  • A Raspberry Pi Zero W runs the show. It is a credit-card-sized computer with built-in wifi.
  • A laser particle counter (such as the Sensirion SEN5x) draws air through a tiny fan and counts particles by the light they scatter.
  • A GPS receiver timestamps and geolocates every reading, so a device can ride along in a backpack or on a bike.
  • Optional extras such as a BME688 add temperature, humidity, pressure and gas readings. Anything on the I2C bus is auto-detected at boot.

Collecting data

On power-up the device finds its sensors and starts recording, by default every few seconds, into a small database on its memory card. Nothing is lost if the internet is down: readings pile up locally and are sent as a batch the next time the device connects. A device can also be set up to report to your own InfluxDB server instead of simpleaq.org.

Setting it up with a phone

If the device cannot reach your network, it broadcasts its own wifi called SimpleAQ- followed by four characters. Join it with a phone or laptop, and the device shows a settings page where you enter your home wifi and where to send data. Our guided setup can send those settings for you. Once the device is online, the setup network disappears until it is needed again.

Open by design

The firmware, the website and the hardware designs are all published under the MIT license, so you can read exactly how a number made it from the sensor to your screen, fix what bothers you, and add sensors we never thought of. The code lives on GitHub.