Skip to main content

Extending the ESDK for Outdoor Air Quality Monitoring

ESDK sensor modules, housed in an enclosure

Building an enclosure to house a number of ESDK sensor modules for outdoor air quality monitoring.

Introduction

Outdoor air quality monitoring is a task often performed by large organisations such as the Department for Food and Rural Affairs and more locally in the UK by councils, due to the cost and complexity of installing automatic monitoring stations.

In this project, we’ll be constructing an outdoor air quality monitoring unit that makes use of a number of ESDK modules, including the latest NO2, NRD and CRE boards. We wanted to be able to monitor outside conditions as measurements such as NO2 and particulate matter are heavily influenced by man-made sources, such as wood stoves and vehicle internal combustion engines.

All the pollutants we set out to measure can have serious impacts on health and the environment and are quite possibly the most common ones to cause issues. Various regulations have been laid out by governments worldwide, including the Air Quality Standards Regulations 2010 in the UK that set rules on the maximum permissible exposure levels to various pollutants.

The Sensors

For keeping an eye on outdoor air quality we opted to use a number of ESDK sensor modules:

  • ESDK-THV for temperature, humidity and VOC
  • ESDK-NRD for detecting beta and gamma radiation
  • ESDK-PM2 for keeping track of PM1.0, 2.5, 4 and 10 counts
  • ESDK-NO2 to provide data on atmospheric NO2 levels

ESDK-THV

ESDK-THV Board

We picked the THV module to provide us with an outdoor air temperature and humidity measurement, useful to have if an existing weather station isn’t present. VOCs can be a problem outdoors but tend to have more of an effect on indoor air quality — high levels can cause effects such as drowsiness and dizziness, often experienced when painting with particularly high VOC paint in smaller spaces.

ESDK-NRD

ESDK-NRD Board

The ESDK-NRD utilises a solid-state radiation detector capable of detecting beta and gamma radiation, both of which are emitted in the decay chain of radon; a common air pollutant formed by the decay of natural uranium found in rocks and soils.

Keeping an eye on radon levels is quite important as it carries an increased risk of lung cancer. The UK Health Security Agency has published a breakdown of the average UK radiation dose by source example (using 2010 data) and the largest contributor is radon gas at 48%.

Other sources of radiation are present in the atmosphere including both natural sources such as terrestrial gamma radiation and cosmic radiation, as well as man-made sources such as medical radiation (commonly radioactive tracers used in medical imaging processes), fallout from nuclear weapons and radioactive discharges from processes such as nuclear power generation.

A deeper dive into the ESDK-NRD module development process can be found here.

ESDK-PM2

ESDK-PM2 Board

We opted to add our PM2 module to keep track of four sizes of particulate matter in the air. These particulates can be particularly problematic to health and can cause lung cancer, as well as cancers elsewhere in the body.

Common causes of particulates include human-made sources such as combustion engine exhausts — in particular petrol and diesel engines; wood fires and stoves, components of things such as rubber tyres and brake pads, as well as other natural sources.

Strict regulations around the concentration of PM in air are enforced by various agencies globally: Defra in the UK, the EPA in the US and others. The UK limits set out by the Air Quality Standards Regulations 2010 are strict with an annual upper limit of 40 µg/m3 for PM10 and 20 µg/m3 for PM2.5, with a 24-hour average of 50 µg/m3 for PM10 that cannot be exceeded more than 35 times in a single year.

ESDK-NO2

ESDK-NO2 Board

The effects of NO2 on the body and environment can be quite severe, including causing inflammation of airways and increased susceptibility to respiratory infections and allergens, as well as changing the composition of soils and harming biodiversity.

Nitrogen Dioxide and Nitric Oxide (collectively referred to as nitrogen oxides - NOx) are also precursors to the production of ozone which is another compound that is harmful to health as well as the environment. Once again the Air Quality Standards Regulations 2010 set out upper limits for NO2 concentrations — the annual mean should not exceed 40 µg/m3 with an hourly mean limit of 200 µg/m3 not to be exceeded more than 18 times in a single year.

Based upon this, we opted to include the NO2 module. Further details about the NO2 module can be found here, including details about the sensor choice and module design process.

With the sensors selected, we moved onto assembling an enclosure.

Hardware Build

Bill of Materials

Before starting with the box build, we selected a number of components that would be necessary.

A suitable IP66 rated Fibox enclosure (194-3099) was selected to contain the sensor modules. Unfortunately, a white IP-rated enclosure proved hard to source in the size we needed so we settled for light grey — white and light colours would reflect heat better, helping to reduce the effects of air temperature measurement.

The ESDK Cabled Range Extenders utilise a typical RJ45 connector for connectivity, so a suitable IP-sealed panel-mount connector (111-6744) and appropriate mating part (111-6742) were selected.

As air needed to be passed through the enclosure, a small 25mm 5V brushless fan (144-2027) was also selected. We opted to utilise a fan to move air so as to ensure that particulates and gases could be drawn into the enclosure.

Given the enclosure will be located outside, a suitable reel of external grade network cable (201-0689) was selected. This cable is resistant to breakdown by UV light from the sun, helping to prolong the lifespan, as well as being highly flexible.

To admit air into the enclosure, 32mm waste pipe was selected. This is easy to source, has a wide range of fittings, is stable in an outdoor environment and can be glued with epoxy resins as well as solvent cements. We sourced a three-metre length along with two right-angle knuckles and two compression-fitting end caps to be modified. To glue pipe stubs into the box a tube of rapid-set Araldite epoxy (756-0102) was used.

With all the parts acquired, we moved onto construction.

The Build

Pipe with bend

We first marked out a suitable length for the pipe studs that will exit the box. This was based upon the length of the fitting plus some distance to account for getting through the wall — approximately 6mm. A small cut mark was made and the pipe cut with a ratcheting plastic pipe cutter (813-2742) . Great care should be taken when using these cutters as the blade is very sharp.

hole drilled in enclosure

Centres were marked on both short edges of the enclosure, ready to be drilled out with a 32mm hole saw. We used a matching-size hole saw for this task, which left a ragged edge that was slightly undersized and would not accept the pipe.

enclosure hole tidy up

To tidy up the hole, a combination of a large hand reamer and a deburring tool enlarged the hole to final dimension. The use of a deburring tool also allowed for the creation of a chamfer that aided installation of the pipe.

Pipe is affixed to enclosure

As we were concerned about the adhesion of the epoxy resin, both the pipe and box were roughed up with sandpaper to provide something to key on. The pipe was pressed into the box, resin was dispensed and mixed according to the instructions, and a bead applied to the outside of the box as neatly as possible. 

We wanted to ensure full coverage to maintain an environmental seal to reduce the chance of unwanted water entering the box, so a bead was applied on both the outside and inside.

stainless steel mesh

To provide some protection from bugs and large particulates being able to enter the box an assortment of stainless steel mesh was purchased. This has a hole size of approximately 1mm which will permit the passage of air but hopefully not insects.

A circle was marked using a 30mm disc and cut out with a pair of tin snips. Gloves were worn during this step as we learnt the hard way that the gauze is quite prone to breaking the small spot welds and leaving sharp points.

End cap with stainless steel mesh fitted

The end cap was modified by drilling a 28mm hole in the end and then again deburred to remove any stray PVC chips. The gauze was glued in with more epoxy and then left to set overnight to achieve full strength.

Fan mounted in enclosure across pipe entry

Two acrylic discs were cut to allow for fan mounting — one glued to the end of the inlet pipe on the interior, and the other holds the fan. Three M3 screws hold the two parts together and provide a secure connection. We opted to make this assembly detachable in case the fan ever needs to be replaced or cleaned.

laser-cut acrylic plate

A laser-cut acrylic plate was produced to hold the sensor modules, which are arranged in order from smallest to largest, starting with the CRE and THV modules. Each board is secured using M3 standoffs.

mounting the sensors within the enclosure

To power the fan, a pin header was soldered onto the cable and plugged into the final port on the sensor module string, completing the outdoor enclosure configuration.

completed assembly

An acrylic backplate was cut which fastens to the wall mounting holes present in the four corners of the enclosure, that enabled us to cable tie the box in position on a railing outside one of our office windows.

AQ Application Configuration

The latest update to the Air Quality application requires a value to be entered in the configuration if an NO2 sensor is present. On the back of each NO2 module is a label that contains a sensitivity code — this is how the sensor output changes in response to a change in NO2 concentration.

An additional block consisting of the following needs to be added to the configuration file located in /boot/aq/aq.toml:

[NO2]
sensitivity = (code from sensor)

The file can be saved and then the ESDK rebooted (or the aq service restarted) to apply the configuration changes. However, if there is a CO2 sensor on the indoor sensor chain, it will be necessary to shut down, remove and then reapply power, so that it operates correctly.

Modifying the Dashboard

AQ Dashboard Screen

The default AQ dashboard features a lot of readings, but none of the new sensor types. As we did not want to lose our default dash, a copy was made by heading to “Settings” then clicking “Save as” in the upper-right corner.

Nuclear Dashbaord Screen

With a fresh copy of the dashboard, we could begin modifying the panels. The first thing to do was add new gauge tiles for the nuclear radiation and NO2 sensors — this was easily done by duplicating an existing gauge and then changing the metric query.

Selecting the query dashbaord

Selecting the query can either be done by entering a PromQL query (in this case cpm{}) or by selecting the “Metrics Browser” drop-down and selecting one in there. After selecting a suitable query the rest of the gauge options were modified with an appropriate unit and upper limit.

particulate matter metrics dashboard

We opted to combine all the particulate matter metrics onto one graph to simplify the dashboard

Adding multiple queries

This is easily done by adding multiple queries to the same graph and then setting a suitable name. The name is changed within the “Options” section and is a PromQL query, in this case selecting the “friendlyname” tag and appending a fixed string of either “PM1.0”, “PM2.5”, “PM4.0” or “PM10” to the end.

To set individual colours for each series the “Color scheme” option was changed to “Classic palette” — this setting is located in the right-hand options pane, under “Standard options”. 

Final dashboard

With all the changes made, we saved the dashboard.

Conclusion

In this article, we’ve taken a look at the reasoning behind why we wanted to build an outdoor air quality monitoring unit. We then selected appropriate sensor modules to monitor the pollutants in question and designed an enclosure to keep them protected from the elements.

Finally, we updated the AQ application configuration to enable the new NO2 sensor, modified the template dashboard to add the new sensors and an improved layout.

Engineer of mechanical and electronic things by day, and a designer of rather amusing, rather terrible electric "vehicles" by night.
DesignSpark Electrical Logolinkedin