The OpenAirMonitor is a solar-powered outdoor air quality monitor that transmits data over LoRaWAN networks like The Things Network and Helium. It measures particulates (PM1, PM2.5 and PM10), humidity and temperature. The monitor can be extended with other sensors using its STEMMA QT connector. It's also super easy to install, only requiring a single hose clamp to be attached to a pole.The monitor is programmed in JavaScript using Espruino, over the air using Bluetooth LE, so can be easily reprogrammed after it is installed.
DetailsDid you know that fossil fuel air pollution is responsible for 1 in 5 deaths worldwide? According to the World Health Organisation (WHO), air pollution is one of the biggest environmental threats to human health, alongside climate change. Both affect each other, as improving air quality can enhance climate change mitigation efforts, while reducing emissions will in turn improve air quality.
Air pollution comes in all different types and sizes:
- Particulate matter (PM2.5 and PM10)
- Carbon monoxide
- Sulfur dioxide
- Nitrogen dioxide
- Ground-level ozone
On 22 September 2021, the WHO updated their Global Air Quality Guidelines (AQGs), adjusting almost all the AQGs levels downwards. The WHO warned that exceeding the new air quality guideline levels is associated with significant risks to health, but that at the same time, adhering to them could save millions of lives. Let's compare the 2021 WHO air pollution limits to the existing limits set by the UK government:
Clearly there is an opportunity here to both educate ourselves on the levels of air pollution in our immediate environment, and also to inform and update local and national governments on what exactly is happening and where they should focus their efforts. Luckily measuring air pollution yourself has become a lot easier with the availability of low-cost sensors that use a laser beam and a photo-diode to measure particulate matter pollution.
There are some great open-source air quality sensors out there, like the airRohr sensor created by sensor.community (previously known as Luftdaten). I built one using the instructions from their website, and used it for over a year. There are also relatively low-cost commercial air quality monitors like the PurpleAir. However, both the DIY and commercial varieties usually have the following shortcomings:
- They need to be connected to a power source
- They transmit data over WiFi, which is not available everywhere, takes time to set up and not always reliable
- The SDS011 PM sensor used by sensor.community is less accurate at high humidity
It's time to redefine what a low-cost air quality monitor looks like! That's why I designed and built the OpenAirMonitor:
- Battery-powered, charging with a solar panel
- Long-range wireless communication
- Sensors that can be used in high-humidity environments
The OpenAirMonitor schematics and PCB design are completely open source (even the Bill Of Materials!) and can be accessed from https://oshwlab.com/gendor/air-quality-monitor .
If you want an assembled PCB, please reach out as I'm still looking for a couple of beta testers!
Attach the whip antenna to the SMA connector at the top right of the OpenAirMonitor PCB and then insert the PCB into the enclosure. The source files to 3D print the enclosure can be downloaded from the GitHub link at the bottom of the page.
Next, attach the SHT40 temperature sensor to the STEMMA QT connector on the left-hand side of the OpenAirMonitor PCB and push fit the sensor into the enclosure. Install the PMS7003 particulate matter sensor onto the PCB by pushing it into the connector. At this stage you can also plug in the battery to power the monitor (and flash Espruino if you built the PCB yourself, see the next section for instructions).
Screw the black nylon cable gland into the enclosure and thread the solar panel JST extension cable through the cable gland.
Plug the solar panel JST extension cable into the port labeled SOLAR and also attach an optional M12 nut on the inside. Tighten the cable gland to make it waterproof.
Insert the rubber o-ring cord into the edge of the lid. Use two zip ties to secure the battery to the lid of the enclosure using the zip tie cable holders.
Insert two M3 nuts into the captive holes at the bottom of the lid and attach the lid to the enclosure using two 40mm M3 hex bolts. You can also attach some optional double-sided tape to the lid to secure it to the solar panel, although this shouldn't be necessary.
Use the ETFE panel screw & washer set to attach the solar panel bracket to the solar panel.
Use the two 45mm M3 hex bolts to attach the enclosure to the solar panel with M3 nuts and nylon washers. Plug the solar panel extension cable into the solar panel. You can tidy up the cable with more zip ties if you so wish.
Installing the OpenAirMonitor is now as easy as pulling the hex screw worm drive (hose clip through the solar panel bracket to attach it to a downspout or other pole.
If you built your own OpenAirMonitor PCB, you'll have to flash the Espruino firmware onto the board. This can be done using the Nordic NRF52840DK:
nrfjprog -f nrf52 --program espruino_2v11.32_e73trm01.hex --sectorerase
nrfjprog -f nrf52 --reset
The SWD connector on the OpenAirMonitor PCB's pin layout is as follows:
GND - CLK - SWIO - 3V3
Setting up on The Things Network or HeliumTo get the ID of the LoRaWAN module, run the following Espruino code:
const lora = {
pins: {tx:D8, rx: D6},
resetPin: D3,
};
let buf = '';
Serial1.setup(9600, lora.pins);
digitalWrite(lora.resetPin,1); // keep LoRa reset pin high
Serial1.on('data', (data) => {
buf += data;
var idx = buf.indexOf("\r");
while ( idx >= 0) {
const line = buf.substr(0, idx);
buf = buf.substr(idx + 1);
print(line);
idx = buf.indexOf("\r");
}
});
Serial1.println('AT+ID');
The settings are as follows:
- LoRaWAN version : MAC V1.0.3
- Frequency plan: Europe 863-870Mhz (SF9 for RX2 - recommended)
- Payload Format is Cayenne LP
To set the AppKey on the module:
Serial1.println('AT+KEY=APPKEY, "16 bytes length key"')
ConclusionOpenAirMonitor measures particulate matter pollution, temperature and humidity and transmits the data over LoRaWAN networks. It can be programmed over the air using Bluetooth LE and Espruino.
I've installed a network of four OpenAirMonitors in my local community, but would love for more people to give it a try. Please get in touch if you'd like to get involved, either by building your own or potentially buying a pre-assembled version in future.
Open-source licensesHardware: CERN Open Hardware LicenseSoftware: GPL-3.0 LicenseDocumentation: CC BY-SA 4.0
Comments