How Safe is Your Home’s Air? The Internet of Things and Air Quality Monitoring during Wildfires

IoT-driven monitoring of Air Quality during the 2018 California Wildfires

Over the past few weeks, the Camp Fire in Northern California and the Woolsey Fire in Southern California have devastated people and property. There has been tragic loss of life in the town of Paradise, and California’s firefighters remain tasked, once again, with the difficult job of containing and extinguishing the flames. What no one can contain, though, is the spread of hazardous wildfire smoke.

I was out of town when the smoke arrived, but on return to San Francisco several days later, the smoke in the air was as bad as I feared. Last year I wrote, “2017 was a bad year for fires in California,” which discussed the tools I used to collect and analyze the air quality data. I put those tools to use again in order to understand the air quality both inside and outside of my home.

At SFO the level of smoke in the air was obvious
At SFO the level of smoke in the air was obvious

Air Quality Basics

Air quality is measured with the Air Quality Index, or AQI. The AQI corresponds to the concentration of 2.5 and 10 micron particles in the air, usually referred to as PM2.5 and PM10. The “PM” stands for ‘Particulate Matter’.

Generally speaking, PM2.5 is the key metric to watch during wildfires, as these small particles are produced by combustion. These tiny particles stay in the air for a long time, can deeply penetrate the lungs, and significantly impair lung function. PM10 particles are harmful as well, but their story ends with the lungs – not so with PM2.5, which can pass right into your bloodstream.

Particulate matter sizes from EPA.gov
Particulate matter sizes. Image credit: EPA.gov

The EPA maintains the website AirNow which tracks AQI throughout the United States, and indicates air quality ranging from ‘Good’ to ‘Hazardous’. Air quality is measured by the EPA (and others) with sensors deployed at locations around the country. In recent years, these sensors have become commoditized, allowing the general public to set up their own. PurpleAir has become a popular provider of these sensors, offering a low-cost version featuring miniature lasers. These sensors upload the air quality data to a map which shows air quality for thousands of locations. If you’ve heard the term ‘Internet of Things’ (or IoT) before, this map shows one way of harnessing this type of information.

Initial Data Collection

I have two PurpleAir sensors which can monitor PM2.5: a PA-I-Indoor and an PA-II Outdoor. I’ve had them up and running since last year’s fires, which were in October of 2017. Based on this data I purchased several HEPA filters to keep the air in my home free of particulate matter.

These air sensors are extremely sensitive; they can detect air quality changes from not just wildfires, but common household appliances. Shortly after I started using the indoor sensor, I discovered that my ultrasonic humidifiers produced large amounts of PM2.5. They also pick up air quality changes when a hairdryer is in use, or something is burning in the oven. So if you decide to monitor your indoor air quality, don’t be surprised if you find it’s worse than you expect from seemingly innocuous daily activity.

My HEPA filters were turned off to save electricity when I was away. I thought that my house was weather-sealed well enough that any particulates would stay outside. I was wrong.

Based on the sensor readings, I could see the current AQI level that I would walk into at home, and it was not healthy. The Air Quality Index outside was 284, solidly in the ‘Very Unhealthy’ band, and the air inside my house — which had been sealed shut since the fire — was AQI 158, designated as ‘Unhealthy.’

Outdoor (284) and Indoor (158) Air Quality Index readings upon returning home. The indoor air was in the ‘Unhealthy’ region
Outdoor (284) and Indoor (158) Air Quality Index readings upon returning home. The indoor air was in the ‘Unhealthy’ region. Image source: PurpleAir Map

My HEPA filters were turned off to save electricity when I was away. I thought that my house was weather-sealed well enough that any particulates would stay outside. I was wrong.”

Clearing the Air

First things first; I turned on my HEPA filters and tracked the indoor AQI until the air inside was brought down to a safe-breathing level. It took an hour to bring the AQI level down to yellow, and then another 30 minutes or so to get it to green.

ne hour of HEPA filters dropped the AQI indoors from Unhealthy to Moderate
One hour of HEPA filters dropped the AQI indoors from Unhealthy to Moderate. Right image source: PurpleAir.com
Air Quality Sensors
When the air quality is poor, the indoor sensor shows a red light. When it’s good, it changes to green. This happens below an AQI of about 50.

Once the indoor air quality dropped to an AQI of less than 50, I turned my attention to analyzing the sensor data. I wanted answers to the following questions:

  1. How effective are HEPA filters at keeping the indoor air clean even when it gets really bad outside?
  2. I have a HEPA filter in my garage too; is that as effective as the ones inside the house?
  3. How bad is the air quality outside? Does it measure up to the anecdotal evidence in the news and on social media?
  4. How does the PurpleAir sensor data compare with the sensor data published by the Bay Area Air Quality Management District?

To answer these questions, I collected both PM2.5 and PM10 data as histograms using Circonus. Circonus is a monitoring system that allows users to collect data directly from IoT devices as well as websites and other technology infrastructure. Circonus can ingest data in most common formats, which makes it capable of integrating with just about any device out there. This allows me to use Circonus’ heatmap visualizations, as well as run statistical analyses on the data.

Let there be Data

My sensors collected 24 hours worth of data, and I displayed both the indoor and outdoor sensor readings on one heatmap, as shown below. The green line is the outdoor sensor, the blue line is the indoor sensor.

24 Hours of Heatmap Data
Twenty four hours of the worst SF Bay area air quality. Outdoor sensor readings in green, indoor in blue. Additional interesting events called out. Click image to enlarge.

The AQI levels are displayed on the Y axis, using a logarithmic scale; the relation between PM2.5 particle count and AQI is not a linear one, so this approach produces the best visualization.

Air Quality Index Levels
AQI levels, their descriptions, and the associated colors. Image source: AirNow.gov

With this heatmap visualization, the answers to my questions are clear:

Question 1 – HEPA Filter Effectiveness

My question regarding the effectiveness of my indoor HEPA filters is answered with this heatmap. The blue line (indoor AQI) stays below the yellow ‘AQI Moderate’ level for almost the entire graph. HEPA filters are rated by the amount of square footage that they can cover, and mine are more than sufficient for the square footage of my house. The indoor air quality remains great even when the outdoor AQI goes above the ‘AQI Hazardous’ level (more on that level later). Since my house is older, it is not sealed as well as a newer house or most high-rise apartment buildings, and the filters had to work against bad air leaking in.

Question 2 – Is the air in the garage safe?

I have a HEPA filter in the garage, so I wondered if it was safe to exercise there. The garage has several spots where air can enter, especially along the sides of the rollup garage door. To measure this area, I moved the indoor sensor to the garage for several hours. I added an annotation to the heatmap (marked by the thick blue horizontal line at the top of the graph) to indicate the time when the sensor was in this location. It is clear from the heatmap that the garage air quality varied between orange (AQI Unhealthy for Sensitive Groups) and red (AQI Unhealthy). If you look closely, you’ll see a bump in the middle of the range where I opened the garage door for several minutes. The garage air quality was cleaner than the outside, but nowhere near as good as inside the house.

Moving the air sensor to the garage
AQI jumped from Good to Unhealthy (blue line annotation at top) when the indoor sensor was moved to the garage. Click image to enlarge.
Air Quality Sensor readings from the garage
Note the slight bump in AQI (yellow line annotation at top) where the garage door was opened. Click image to enlarge.

Question 3 – Just how bad did the air get outside?

In a nutshell – the air outside was record-setting bad. The outdoor sensor recorded a maximum of ~288 micrograms per cubic meter at about 2pm on November 16th, 2018, which corresponds to about 336 on the AQI scale. At least 10% above the ‘AQI Hazardous’ level. I’ve only seen this reading a couple of times when I was barbecuing. Based on the data: the air outdoors was at the level of being surrounded by barbecues.

Question 4 – How did my sensor data compare to government AQI maps?

The Bay Area Air Quality Management District (BAAQMD) has high-end sensors spread around the SF Bay Area which report to various government agencies. They reported a maximum AQI value of 271 at about 2pm on November 16th. Why did they report AQI 271, but I measured AQI 336?

AQI recorded at 336 San Francisco 2018
The outdoor PurpleAir sensor measured 287.5 micrograms per cubic meter (AQI ~336) on November 16th, 2018 at ~2:30pm. Click image to enlarge.
Bay Area Air Quality Management Readings for November 16th, 2018
Bay Area Air Quality Management Readings for November 16th, 2018. Image credit: BAAQMD

BAAQMD has one air sensor in San Francisco, and a number of others around the Bay Area. Meanwhile, there are several dozen PurpleAir sensors in San Francisco, monitored by IoT enthusiasts like myself.

Readings from PurpleAir sensors can vary by +/- 50 AQI, but PurpleAir has stated that their sensors are roughly as accurate as other laser based sensors. Given the hilly topology and microclimates in San Francisco, a possible explanation may be that AQI varies enough locally to account for these discrepancies. A PurpleAir sensor in the same location as the BAAQMD sensor would help answer this question.

Data Science is Here for Everyone

Democratization of technology is leading to democratization of data. The Internet of Things has provided hobbyists with the instruments that have long been only available to scientists, but with the added power of crowd-sourcing the data gathered by those instruments. The tools to monitor environmental data are available to any end user with only a few hundred dollars worth of sensors and an internet connection. With smart monitoring, we can ask and answer the right questions of the world around us.

Posted in IoT