Close
0%
0%

OpenAirMonitor

A solar-powered, outdoor air quality monitor that transmits data over LoRaWAN and Bluetooth LE

Similar projects worth following
The OpenAirMonitor is a solar-powered, outdoor air quality monitor that transmits data over LoRaWAN and Bluetooth LE. It measures particulates (PM1, PM2.5 and PM10), humidity and temperature. The monitor has a STEMMA QT connector, so can be extended with other sensors.

The monitor is programmed in JavaScript over Bluetooth LE using Espruino.

Hardware: CERN Open Hardware License
Software: GPL-3.0 License
Documentation: CC BY-SA 4.0

Did 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 the existing limits set by the UK government:

SizeWHOUK
PM10 annual mean1540
PM10 24 hour mean4550
PM2.5 annual mean525
PM2.5 24 hour mean15?
NO2 annual mean1040
NO2 hourly mean25200

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 have been using 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
  • 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! Let's design and build an air quality monitor that is:

  • Battery-powered, charging with a solar panel
  • Long-range wireless communication
  • Sensors that can be used in high-humidity environments

box_complete.scad

Enclosure (in development)

scad - 11.88 kB - 10/15/2021 at 10:32

Download

main.js

OpenAirMonitor firmware

javascript - 4.36 kB - 10/15/2021 at 10:30

Download

  • 1 × PMS7003 particulate matter sensor
  • 1 × SMA antenna
  • 1 × 3.7V LiPo battery (e.g. 6600mAh)
  • 1 × 6V solar panel
  • 1 × SHT40 temperature & humidity sensor using STEMMA QT connector

View all 14 components

  • Choosing a LoRaWAN module

    Gerrit Niezen12/08/2021 at 10:20 0 comments

    If your electronics projects needs to talk to other devices, but you don't have access to WiFi, LoRaWAN is a great alternative. The Things Network (TTN) is a global collaborative Internet of Things ecosystem which allows devices to use the network for free. No payment or SIM cards are required like with NB-IoT or Helium, you just need to keep to the usage limits.

    The problem is that there are very limited options for LoRaWAN modules, given the current global chip shortage. As I'm based in the UK, I'm looking specifically for 868MHz modules to use with the OpenAirMonitor.

    The RN2483 LoRaWAN module from Microchip used to be the de facto option when you don't want to run a LoRaWAN stack on your microcontroller. Unfortunately they are out of stock until 2022 or later. Luckily there are other options, so let's have a look at what's out there.

    RAK3172
    RAK Wireless has a range of LoRaWAN modules where different microcontrollers are combined with LoRa chips. The RAK3172 is their first module that uses the STM32WL, combining a microcontroller and LoRa on the same chip. It comes preinstalled with a LoRaWAN stack, so you can use it with your own microcontroller over a UART interface.

    LoRa-E5
    Seeed Studio's LoRa-E5 module also uses the STM32WL chip, and is also controlled over a UART interface if you use the preinstalled stack. 

    Unfortunately both the RAK and Seeed modules suffer from a high transmit power consumption bug, which look like it may not be able to fix in firmware without reducing the range significantly.

    Ra-07H
    Ai-Thinker's Ra-07H uses the ASR6501 chipset which also combines a LoRa transceiver with a microcontroller, and can also be controlled over a UART interface.

    E78
    Ebyte's E78 module is also based on the ASR6501 chipset. It appears that both the Ra-07H and E78 modules are compatible with TTN v3.

    There are other LoRaWAN  modules out there, like Move Solutions' STM32WL-based MAWLE-C1, but the ones above are ones that were actually in stock at the time of writing.

    In the end I went with Seeed Studio's LoRa-E5 module, as they have a range of different promotions going on at the moment and I intended to make use of their Fusion PCB Assembly Service. I bought my first batch of LoRa-E5 modules directly from their web shop, and they arrived relatively quickly.

    For my first prototype PCB I used JLCPCB's assembly service, but had to solder the LoRa-E5 module and the MDBT42Q module myself, as they're not in JLCPCB's SMT parts library. For my second prototype revision I used Seeed's Fusion assembly service, as they currently have an offer for two free PCBA boards if it contains a LoRa-E5. I thought it was too good to be true, but I literally didn't have to pay anything to get the two prototype boards, including all the components.

    During the design check they even found a footprint issue that wasn't discovered during the first prototype run, and where parts were out of stock they worked with me to find suitable alternatives. The only part that we couldn't find an alternative for was the MDBT42Q, for which there was no stock in the entire mainland of China. Luckily I had modules on hand, so had the board manufactured without the module and soldered it on myself.

  • Working on the enclosure

    Gerrit Niezen10/26/2021 at 13:02 0 comments

    The enclosure design is slowly coming to an end. Who knew that it would be so much work making a plastic box to put something in? The idea is that this enclosure will be mounted on the bottom of the solar panel, so that only the solar panel itself (on a mounting plate) needs to be connected to a lamp post.

  • Choosing a battery charger chip

    Gerrit Niezen10/22/2021 at 09:00 0 comments

    With the current global chip shortage it can be challenging to find the right chip for your project that's actually in stock. I want to share some of my own challenges and what the options are. First up: What LiPo battery charger chips can be used with solar panels?

    BQ24074

    I first came across Texas Instrument's BQ24074 while looking at Adafruit's Universal USB / DC / Solar LiPo charger, which replaced their earlier MCP73781-based charger. It's relatively inexpensive ($0.81) and has an input voltage of up to 10V. Unfortunately this chip was out of stock when I ordered my board for SMT assembly, so I had to consider alternatives.

    LT3652

    Analog Device's LT3652 is used in Sparkfun's Sunny Buddy (MPPT Solar Charger), but it's a lot more expensive (around $5) than other chips and was also out of stock at the time of ordering.

     CN3065 / CN3063

    Consonance Electronic's CN3065 is used in Seeed Studio's LiPo Rider boards, as well as many low-cost solar battery charger boards on eBay. It's even cheaper than the BQ24074 at around $0.50, and it was available in its SOP8 package version CN3063 at JLCPCB when I placed my order. While it has been working great so far, it only has an input voltage of 6V, which could cause issues if you get high peak voltages on your solar panel over an extended period of time.

  • Completed PCB design, working on the enclosure

    Gerrit Niezen10/15/2021 at 10:53 0 comments

    So what's the current state of the OpenAirMonitor? I've completed the hardware design and schematics, manufactured a rev 1 of the PCB with JLCPCB, and then made the following fixes:

    • a floating pin on the LDO that's now grounded
    • replaced the LDO with a AZ1117CR2 as the HT7333-A is underpowered.
    • I've also changed the STEMMA pins as rev 1's pins are also used for NFC
    • moved the PMS7003 connector as it wasn't correctly aligned with the sensor location

    I haven't yet ordered a rev 2, as it was easy enough to fix the rev 1 PCBs by replacing the LDO and putting a bodge wire to ground. I also found a way to use pins D9 and D10 on the MDBT42Q module by disabling NFC in the Espruino CLI:

    NRF.disconnect();
    setTimeout(function() { 
        NRF.restart(function(){ 
            LED.set();poke32(0x4001e504,1);
            while(!peek32(0x4001e400)); // enable flash writing
            poke32(0x1000120c,0xfffffffe);
            while(!peek32(0x4001e400)); // NFC pins as GPIO
            poke32(0x4001e504, 0);while(!peek32(0x4001e400)); // disable flash writing
        });
    }, 1000);

     You can check if NFC is enabled on the Espruino module using:

    peek32(0x1000120c).toString(16) == "fffffffe"

    Right now I'm working on the enclosure design. You can download the OpenSCAD file from Files, but note that it's not quite yet ready for prime time. What still needs to be done:

    • adjusting the zip tie holes for holding the battery
    • making sure there's enough space for the o-ring in the lid
    • making sure there's enough space for the hex nut holes
    • checking the solar panel fit

View all 4 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates