Introduction

Back in 2013, we launched one of the first hackable, internet-connected, environmental data-collection system, the Smart Citizen project. The goal was to build a software and hardware platform where everyday citizens could collect and share environmental data.

The initial reaction to the project was positive, and many early adopters helped it get off the ground. However, several intrinsic limitations prevented it from achieving the original vision. The most detrimental were:

After creative differences with the core development team, we decided to fork the project and devise a solution to address these problems. After a couple of years working on it, we're ready to share our efforts. 

Introducing rE-SPire, an Air Quality and Environmental Monitor

Based on numerous suggestions, comments, pleas, and complaints from past, current, and potential users of the Smart Citizen project, rE-SPire is an environmental monitor powered by Open Source hardware and software.

rE-SPire is based around the ESP8266, a WiFi-capable SoC that can be programmed with the Arduino IDE. It includes sensors that allow it to measure:

rE-SPire was also built to be used outdoors (as well as indoors), so it's enclosed in a waterproof enclosure and can be powered by a rechargeable battery and a solar panel.

Electronics

The electronics of rE-SPire include an array of components for sensing, measuring, storing, and communicating local environmental data, as well as powering and recharging the device.

– Sensing

rE-SPire carries several sensors that allow it to measure environmental conditions. These are:

Bosch BME680: temperature, humidity, barometric pressure, VOCs

Bosch's BME680 is a high-precision sensor that can measure humidity with ±3% accuracy, barometric pressure with ±1 hPa absolute accuracy, and temperature with ±1.0°C accuracy. Because of the accuracy in pressure, the sensor can be used to estimate altitude within ±1 meter!

Also, using a metal oxide-based sensor, it detects VOCs by adsorption (and subsequent oxidation/reduction) on its sensitive layer.  Though it can be used to detect gases & alcohols such as Ethanol, Alcohol and Carbon Monoxide, the sensor only gives one resistance value indicating overall VOC content, which means it cannot differentiate gasses or alcohols.

Please note this sensor, like all VOC/gas sensors, has variability and to get precise measurements you will want to calibrate it against known sources!

Sharp GP2Y1010AU0F: PM dust

Sharp’s GP2Y1010AU0F is an optical air quality sensor, designed to sense dust particles. An infrared emitting diode and a phototransistor are diagonally arranged into this device, to allow it to detect the reflected light of dust in air. It is especially effective in detecting very fine particles like cigarette smoke, and is commonly used in air purifier systems.

Electret condenser microphone: noise

The electret condenser microphone translates amplitude (not volume) by capturing sound waves between two conducting plates—one a vibrating diaphragm and the other fixed—and converting them into electrical waves.

GM5528 photoconductive resistance: light

A photoconductive resistance is a very small light sensor that changes resistance depending on the amount of light to which it is exposed.

– Measuring

Given the wide array of sensors included in rE-SPire, the device uses an 8-bit microcontroller—the ATmega328p—to sample all the digital and analog sensors. Three (3) of its Analog-to-Digital channels  are connected to the microphone, photoresistor, and dust sensor, respectively. And, four of its digital GPIOs are connected to the BME680, specifically the hardware SPI lines (PB3/MOSI, PB4/MISO, PB5/SCK, and PD6 (IDE pin 6) as chip select).

Custom firmware running on the ATmega328p collects the data, stores it (see below), and sends it over Serial UART to the ESP8266 SoC (see below) when needed.

– Storing

rE-SPire includes a microSD card adapter for long term storage of the data. The adapter is connected to the ATmega328p hardware SPI lines, using PB0 (IDE pin 8) as chip select.

– Communicating

rE-SPire employs a second processor, the ESP8266 SoC, to handle the data. The ESP8266 is a WiFi-capable chip whose Serial UART lines are connected to the ATmega328p. The firmware running on this chip requests the measured data from the ATmega328p, connects to or establishes a WiFi network, and creates a Graphical User Interface for accessing the data.

– Powering

– Recharging

......................................................

/*******

Chief amongst the lessons learned, we have:

● From career scientists to DIYers, most users are interested in collecting data outdoors

● 3d-printed enclosures are have great DIY appeal but are impractical for outdoor use (duh!)

● Measuring gas chemistry with reasonably-priced (<$5K) is meaningless without proper and frequent sensor calibration

● Adding a reliable power source using solar energy to most DIY-grade data collection projects involves hours of research in power consumption

In a quest to address all of these problems we have decided to build a kit that includes everything needed to get anyone from Zero to Measuring within one hour.

Processor and Sensors

Rather than re-inventing the wheel seeking a one-size-fits-all type of solution, the kit will be designed around the existing, modular set of electronic development boards known as WeMos. These boards provide an inexpensive platform for rapidly integrating hardware and software using the very capable ESP8266 SoC. The WeMos family of boards includes a series of breakout boards for a big assortment of sensors, flash memory storage, and rechargeable power.

Power

Although several off-the-shelf Solar Power solutions exist, it's often left to the user to figure out the intricacies of integrating it into their instrumentation. This is particularly difficult when operating in outdoor environments where data collection systems need to operate reliably under varying weather conditions.

Weatherproofing

Our design includes a polycarbonate enclosure for the electronics that's NEMA 4X (IP66) rated. The reason for this choice is to protect the hardware against falling dirt, rain, sleet, snow, windblown dust, splashing water, hose-directed water, and corrosion; it also will be undamaged by thee external formation of ice on the enclosure.

Given the (initial) cost of custom injection molding, and the abundance of enclosures meeting our mechanical specifications, we've based the electronic design around a commercially off-the-shelf enclosure:

The selected enclosure model includes knockouts for easily adding cable glands for weatherproofing connections going in and out of the enclosure itself.

******/

Licenses

All software will be released under The MIT License, and the hardware under the Creative Commons 4.0 Attribution-ShareAlike 4.0 International. For more information, please visit the project's Github repository.