Multpurpose Apocalypse Sensors

The end seems pretty nigh, so why not measure it? This sensor array is ready whether it’s fires or nuclear war.

This Sensor Array Measures:

    • Particulate Matter: PM2.5 is the international standard measure of air quality related to fires. It measures density of particulate matter with a size larger than 2.5 microns (Technically 2.5 microns is an average, and this metric generally refers to particles larger than 0.8 microns.).  This includes smoke but also includes pollen and some other pollutants.
    • Nuclear Radiation: I have always wanted to have a geiger counter, so I decided to buy two; one for inside and one for outside.
    • Temperature and Humidity: Temperature and humidity play a huge role in the impact of particulate matter in the air on the respiratory system. Even without smoke, the wrong humidity levels can cause respiratory problems for sensitive people. Tracking this number will help us see the potential impact on air quality indoors and out.

As the new worst-ever fire season gets started, I am planning to explore the effectiveness of several methods for indoor air filtration. I wanted to measure the results so I decided to expand on earlier work and build a series of high precision sensor arrays which can measure and compare smoke levels in the air.

Why not radiation too? These sensor arrays will become an ongoing source of interesting data as the world continues to fall apart. Watching the Chernobyl miniseries, I was struck by the fact that the scientists had a sort of “smoke alarm” for radiation in their offices. I asked myself why that isn’t something we all have. How would we know if there was some serious radiation danger? Well now I will know.  Also, wildfires release naturally occurring radioactive materials into the atmosphere which then rain down radionuclides onto the population. The USDA says we should not worry about this which makes me feel like we should worry about this.

Additionally, I will be comparing the efficacy of house plants alone and together with air filters on improving indoor air quality during fires. This builds on earlier work by NASA which showed that in general, house plants have a major positive impact on indoor air quality, but smoke was not one of the things NASA tested for.

Detector arrays

I bought some 12″ x 12″ cork boards and then tacked all the pieces on, with some EL wire around the edge to help tell them apart. In this photo, the Geiger counter on the left has a ziploc full of uranium marbles laying on it for testing purposes.

The Sensors

DHT22 Sensor: Gives temperature and humidity with high precision. This is not directly relevant but it makes it a more complicated and interesting project. Also, I suspect that humidity in particular will have an impact on filter performance.

PM2.5 Sensor: This sensor measures particulate matter larger than 2.5 microns. This is the standard unit of measure for air quality related to fires.

Geiger Counter: This is self explanatory. The Geiger-Muller tube detects ionizing particles which intersect it. This gives us the cool radioactive clicking sound and lots of information about radioactivity in the air. Scientists have declared that radiation is the hallmark of the Holocene or the archaeological epoch of humanity. It always seems like some nuclear disaster is spreading and threatening the globe. Let’s measure it over time!

The Micro-Controller

Probably any micro-controller will work, but initially I decided to use the very cheap and simple NodeMCU which is just a few dollars. This has wifi and I already had a box full of them. I’ve used these in the past on other projects. While they work great with digital inputs, I was not able to get the analog input to work; also there is only one analog input and no analog outputs which is frustrating.

I changed my mind and decided to go with the new Arduino Mkr Wifi 1010 because it has so many analog pins which makes this project a lot easier. It’s a little more expensive but it has much better support in addition to those critical analog pins. It also has eight digital pins with six being PWM; a very versatile micro-controller. Allegedly it even has OTA so you don’t have to plug it in to flash new software (I have not gotten this to work correctly). The simple I2C interface means this micro-controller  can also run an lcd screen in addition to the sensors which means it will be easier to have verbose output on the data.

The Code

The micro-controller simply hosts a web page as well as a JSON endpoint with all the data. It also has REST endpoints for each sensor so it’s very easy to query the sensors or to quickly view all the data on the homepage.

Here is the final draft of the final code. Each sensor has an API endpoint so they can be polled individually, or there is a json endpoint to poll them all simultaneously. This version also includes the LCD display which cycles through displaying all the sensor values.

If you’re going to use this on another micro-controller, you would probably just need to change the wifi parts or remove them since this is using the newest WifiNINA library. You could also simply log the data through USB.