I'm a developer advocate at Akamai and a huge proponent for the open source initiative. So, today I am going to tell you a story of how a regular person like you or me can make an impact with just a little bit of goodwill, and a pinch of open source.
Early morning on August 16, around 2,500 lightning strikes hit the San Francisco Bay Area where I live, with 200 strikes happening in 30 minutes at one point. Within the next 72-96 hours, over 12,000 lightning strikes were recorded over Northern California, sparking over 500 wildfires, many of which grew to be very large at a rapid pace. Now, for several weeks, the huge quantities of smoke have degraded the air quality all over the West Coast.
When all this happened, and my neighborhood was covered in smoke and ash, my first thought was on what I could do to protect my family and the people in my community from all of this unhealthy air.
I looked at commercial air purifiers but most of them were sold out, and to be honest, I am the type of guy who loves tinkering and building stuff, so I decided to go the "do it yourself" route. I wanted to build something that was low-cost and could be reused for other purposes and then share my findings (like I usually do with technology)!
I knew I needed 2 things:
- A way to filter the smoke (Air Purifier)
- A way to monitor indoor air quality (Air Monitor)
I did some research on DIY air purifiers and found out that some types of air filters used for home heating and cooling systems (also known as HVAC) are able to filter smoke particles. Those air filters are rated with an index of at least FRP 10 / MERV 13, where higher FRP and MERV numbers indicate better quality and ability to catch finer air particles.
So, first, I decided to get a MERV 13 filter. You could use the filter in your HVAC, but it's a slow process. With a lot of smoke, it's best to use an air purifier, which is essentially a fan with a special filter. But then I looked around online and found a great video explaining how to build one using an inexpensive box fan and an FPR 10 HVAC filter. He also explains how this DIY air purifier compares with commercial air purifiers that cost hundreds of dollars.
So I ordered the fans and filters from Home Depot, and they were delivered in just one day! Then I simply used transparent packaging tape to stick the air filter into the back of the fan.
Note: Watch out for an arrow located on the side of the filter explaining the direction of the airflow. People who don't read the instructions still have 50% chances of doing it right, though!
Now the air monitor is an additional step, and it's not totally necessary, but it's great if you want an accurate reading of your immediate air quality. You can also use Websites like airnow.gov to monitor the outdoor air quality and just run your air purifier when the outdoor air quality is bad. If you prefer a low-tech approach, you can always look at the sky and use your sense of smell for signs of smoke. However, it's important to know that many harmful air pollutants do not have an odor and can't be seen with the naked eye.
Personally, I just like to measure and improve things and I wanted to be able to monitor my air quality in order to know if the air filter really works and also to find out how long I needed to run my air purifier to improve the air quality. As I mentioned earlier, I'm a fan of open source, so I gathered some of my favorite tools to set up an automatic air monitoring system.
For this project I wanted to build something "simple" using the things I already had at home:
- Nova Particulate Matter Sensor SDS011: This cost $30 on Amazon. The sensor comes with a USB dongle you can use to connect to a computer, a Pi (or similar).
- Raspberry Pi: I used a Pi 3b+ that I got for $40. You can probably save some money by using a Raspberry Zero or an Arduino as well.
- Raspberry Pi Sense HAT with Orientation, Pressure, Humidity and Temperature Sensors: I paid $38 on Amazon.
- A USB power bank: I used this so I could move the air monitor around and measure different rooms. Any power bank will suffice.
The next thing I needed to do was grab the code to read data from the SDS011 sensor on GitHub, and I found a Python code example that I could apply within 5 minutes (don't you just love GitHub?).
I modified the Python code by adding some code that helps print the particle matter measurements on the SenseHAT LED array using color-coding. The measurement prints green when air quality is good, yellow when moderate, and red when the air quality is unhealthy.
I also added code to capture the temperature, air pressure, and humidity provided by the SenseHAT sensors, and print those measurements both on the Pi's console and on a JSON-formatted file that is available on the Pi's Web server (/var/www/html/aqi.json), which helps to graph measurements with Grafana or the visualization tool of your choice.
With this code, I am monitoring the effects of my two air purifiers (one for each floor of my house), and after using the system for a few weeks I can confirm it works pretty well!
I usually check the air quality when I wake up using the Pi's air quality monitoring system and if I see red, I just turn on the filter until the display shows green. Another trick is to have the Pi running out of a power bank so you can move it around to different rooms.
With the fan at the maximum speed it takes around 30 minutes to bring the air quality to a good level in a large bedroom with the door closed, but times will vary depending on the fan speed and the room size.
Below, you can see the Grafana dashboard I set up that shows a graph of the air quality over the past 7 days.
Open source has changed the world as it opens the door to billions of people to share knowledge and collaborate to develop things together. I am constantly learning and sharing new things with friends, family, and my team at work using emerging open source tools.
The Akamai team and I hope this post can help people in all parts of the world that are affected by bad air quality. Let us know if you're working on any open source projects yourself to improve the quality of your daily life!
Please send me a message on Twitter @jjaviergarza, and let me know what you think. And remember, share what you know, and learn what you don't!