We’re prototyping affordable open source systems for monitoring air quality. Right now these measure particulate matter, temperature, and humidity.
We designed and assembled a basic air quality monitoring station to start collecting air quality data in Aruba, which was not being done in any public way until now. The idea is to have the design process open, to have the sensor stations cheap and easy to put together, and to share the data openly.
You can see the live data from our prototype version of this on the Adafruit IO website here: https://io.adafruit.com/brenchies/dashboards/airuba-sero-blanco (you’ll need to create an account to see it).
Our previous version is displayed on this website, with download options: https://science.brenchies.com/aq/air-quality/mainstreet.php
And our visualization prototype is here: https://editor.p5js.org/sevold/sketches/6Cthym-Ym
The system we’re using for our initial pilot is based on an ESP8266 D1 mini, a wifi-enabled Arduino board, which is connected to two sensors, a PMS5003 particulate matter sensor, and an SHT31 temperature and humidity sensor. Many air quality parameters are difficult to measure using cheap sensors, but particulate matter can be reliably measured by a few different sensors that are available for under $50 USD. Temperature and humidity data can also be reliably measured using an affordable sensor, so our pilot was limited to these two sensors. Links to descriptions and datasheets for the components we used are below.
- ESP8266 D1 mini microcontroller board
- Plantower PMS5003 laser particle concentration sensor
- Sensirion SHT31 digital humidity and temperature sensor
Wiring and programming
The wiring is pretty straightforward, the PMS5003 sensor operates on a serial connection, with its TX pin connected to the D5 pin on the board (which is set up as a serial receiving pin using a software serial connection). The SHT31 sensor is connected using an I2C protocol so the SCL pin connects to SCL (D1) on the board, and SDA to SDA (D2).
The code is hosted on github, with different versions being posted as we improve things. The link for that is here: https://github.com/brenchies/airuba
For programming the ESP8266 D1 mini, you’ll need to install the ESP8266 boards, and select the LOLIN(WEMOS) D1 R2 & mini from the Tools > Boards menu for programming
You’ll also need to install the Adafruit_SHT31 library using the library manager.
So far we’ve tested stations at a few locations around the island, and had a variety of issues with wifi connections, salty Aruban air, and power cables. We’ve worked on some of these issues and are in the process of setting up reprogrammed stations in a few new locations.
We also had an open workshop to develop a more intuitive interface for this data, which resulted in the following animation (currently not live):
The code for the animation was developed using p5 and can be found at:
Steps to install and connect to the ESP8266 Wemos D1 board
- File>Preferences>Additional Board Manager URL:http://arduino.esp8266.com/stable/package_esp8266com_index.json
- Tools>Board>Boards Manager search and install esp8266
- Tools>Board>LOLIN(WeMos) D1 R2 & mini
Other relevant links
Internal voltage meter
Arduino course material for environmental science
Adafruit example setup