Your home's air could be making you sick. Fight back!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
i built this diy air quality monitor to help me stay healthy and alert in my basement office i'm going to show you how you can do the same thing in this video so let's get started this office is where i record all my youtube videos and do pretty much all my work it's in a corner of my basement with no windows and one air vent this one you see behind me i normally put this magnetic cover on it because it can be pretty distracting to have it open during my recording i never designed this office for youtube but if i did i would have put the vent somewhere else definitely not right where you can see it but i noticed something when i had the vent closed off all day some afternoons i'd just start dragging you know like staring off in a space not being able to do much okay it never got quite that bad but it was bad enough i could see a pattern every afternoon i would get really sluggish and i'd only feel better after going upstairs for a while i came to realize how much indoor air quality impacts my ability to think specifically high carbon dioxide levels can lead to fatigue and lower cognitive performance or even sick building syndrome in a 2014 report the epa quantified co2 levels that lead to sick building syndrome and there's evidence that ventilation can help reduce co2 and other contaminants in the air and that same ventilation can also reduce the spread of covid19 indoors so it'd be good to better control my air quality but it's hard to know if i'm doing it right if i can't quantify the problem so initially i bought this temtop air quality monitor it monitors co2 levels and even has a battery so i can move it around my house easily i put it in my office for a few days and found that if i was in the office long enough the co2 levels would quickly go past the alarm level and sometimes reach beyond 3 000 parts per million unless i kept my vent open so i knew keeping the vent open is important but i'm lazy and i often forget to pop off the magnetic cover after recording and the temp top would work okay but i'd rather have an unobtrusive device in my office measuring the air quality and sending it to the raspberry pi i already used for monitoring other things using prometheus and grafana i initially looked into something like air things but was turned off by the price paying more than 200 bucks for an internet connected monitor that i could only minimally control was a no-go then a few months ago i spotted a hacker news post about the air gradient diy monitor air gradient's founder offered to send free pcbs to anyone who wanted to build the sensor so i took him up on the offer i got two pcbs so i could build two sensors one for my office down here in the basement and one to put centrally upstairs so i could monitor the air in the main living space this one's been running in my office for a couple months and it logs its data to a raspberry pi in my rack so i can view the data on a grafana dashboard i'll put together the second board now so you can see how to do it i'll also show you how i customize the firmware so it reports its data to my raspberry pi first i'll walk you through the parts that make up the sensor package the most important part for me was this sensor s8 which is a fairly accurate co2 sensor it's also the most expensive part coming in around 30 bucks right behind that is the comparatively massive pm 2.5 particulate matter sensor from plan tower it costs around 20 bucks and comes with a little breakout wire then there's an sht30 temperature and humidity sensor but it's only a few bucks and then to integrate everything together and provide a simple display and the ability to transmit the sensor data over wi-fi there's a wemos d1 mini which has an esp8266 on it and a wemos oled display shield that goes right on top of the d1 mini those guys are both a couple bucks each all these components fit together nicely on the air gradient pcb with its nice little silk screen now i bought everything from aliexpress and as a us resident i was prepared for the wait it took some of the parts over a month to make it to my house shipping is kind of weird especially how cheap it is but i won't get into that geopolitical discussion i had bought a sensor s8 from a us supplier last year and it cost over 60 bucks but it came within two days anyways we'll move on to the assembly next and before you ask for the assembly i used a circuit board holder helping hands a small breadboard a small adjustable wire stripper a flush cutter and a weller west 51 soldering station but you could get by with any old soldering iron and you technically don't need everything i used i just use them because i'm really clumsy soldering stripping and snipping without them if you want to see the exact tools i used there are links for them in the description air gradient's website has a pretty good guide but i can give a little more detail here since there are a couple tricky parts first i soldered headers onto the oled you stick the headers in a breadboard and set the oled on top and put a little solder on each leg next i plugged the oled into the tall headers it came with and then soldered the wemos d1 directly onto those headers long legs finally leaving a little bit of a gap between the d1 and the board just using friction to hold it in place i soldered the oled and d1 package onto the pcb where it's indicated now that the brains of the board are done i snipped the header to size and soldered the header to the sht30 temperature and humidity sensor i used the breadboard to keep it steady i put the sensor in the right place on the pcb and soldered it in using a piece of tape to hold it in place while the board was upside down next i soldered headers to both sides of the sensor s8 co2 sensor making sure the pins were going down so when i plugged the sensor into the pcb all the pins aligned correctly then i put the sensor on the pcb and again left a little room underneath this sensor is positioned with air flowing underneath it so make sure you leave a little gap here for the plan tower pm 2.5 sensor the installation is a bit finicky i had to first cut the wire it came with in half then strip the ends of four of the wires using this guide on air gradient sight i ended up using my adjustable wrench stripper for this because it can be a lot more precise than my normal wire strippers the wires in this cable are tiny and stranded and that makes them really fragile and prone to pulling out if you use the wrong wire stripper i stuck the wires into the pcb following air gradient's instructions and soldered them in place it helps to put a piece of tape across the tiny wires on the top side otherwise while you're soldering them might pull out finally i plugged the other end of the cable into the pm 2.5 sensor put some double sided tape on it and stuck it on the board for the longer term i might consider using some more permanent adhesive there are screw holes too but i didn't have any tiny screws small enough for them the final work on the pcb was snipping any of the long leads with my flush cutter then i cleaned off a little extra flux from the solder with alcohol all right so we have this nice looking little board assembled but it's not ideal for mounting anywhere ideally you'd want it vertical in an area with some amount of air circulation so setting it flat on a desk isn't that useful luckily air gradient also has a simple 3d printable case design along with a wall mount bracket i grabbed the stl files from their website and printed both of them on my ender three first the wall bracket and then the two halves of the case once that was done i slid the pcb in one half and popped the other half on it's a friction fit and it's not necessarily the best fit in the world but it works great after you put it in the wall mount holder which kind of ties the whole package together there's just one last thing to do nice at this point we have a glorified sensor package but when i plug it in nothing happens that's because the wemos d1 needs to be flashed with software to make it work the easiest way to flash the d1 is using arduino ide i installed it using homebrew on my mac using the command you see here but follow the official guide for whatever os you use next i had to tell the ide to work with the d1 inside the ide i opened up preferences added the esp8266 to additional boards manager url then opened the boards manager setting and installed the latest version of the board finally i had to go to the esp8266 menu and choose the right board version in this case the wemos d1 mini just like you see on the screen now if you want you can upload a blank sketch and watch the little led on the d1 blank to make sure things are working but in my case i wanted to upload the air gradient sketch right away so i could start seeing the air quality readings the sketch from air gradient requires two additional libraries the wi-fi manager by tabletronics and the esp8266 oled driver by thing pulse and at this point if you're feverishly taking notes please know that i have all these steps in detail in a blog post linked below so go check that out when you're building your own board now it's time to install air gradient sketch the easiest way is to go to the manage libraries menu and search for air gradient install the latest version and then choose this option from the examples menu it'll open up a sketch that makes all the sensors work but at this point there are a couple choices you can make you can choose whether or not you want wi-fi enabled if you just want to see what the levels are on the built-in oled you can do that just set the connect wi-fi boolean to false but in my case i wanted it to send data to my raspberry pi so i set it true then the api root string is what the board will send the data to the default sends sensor data up to air gradient servers but since i wanted to send the data to my pi i set it to the pi's address and port 9926 i'll show how the pi receives that data soon and i've actually been tweaking the config a little bit on my board and i'll be tracking those changes in the github repository i'll mention later once everything's set how you like it click the upload button the little right arrow icon to compile and upload the sketch to the d1 after a minute or so the oled display should read init and after a short delay it'll start printing the pm 2.5 co2 and temperature and humidity on the screen that is unless you configured it to connect to wi-fi if you do that it'll read connect to wi-fi until you connect to it from another computer you have to connect to its ad hoc network and set up your wi-fi credentials so it can connect to your home wi-fi network and start sending data once you do that it takes a little time but it should connect to the wi-fi and start posting data to the api route you set air gradient offers a cloud-based dashboard for your sensor if you use the default address and pay for their service but like i said i want my sensor data to stay on my local network so i put in my pi's url and used port 9926 to make it so the pi could actually receive the data on port 9926 i built a docker container image that i can run on the pi on that port using php and that same image also exposes a metrics endpoint so prometheus can grab the data and store it in its own database i released all this code like i do with all my projects there's an open source air gradient prometheus exporter project up on github and it also has my sketch customizations in it that i mentioned earlier i also integrated all these settings as an optional add-on in my internet pi project so enabling it is as easy as changing one setting in that project to true i won't get into the details of the exporter or the internet pi project in this video but everything's explained in detail in those projects readme files if you want to run it on your own now that i have the air gradient diy sensor pointed at the docker container and prometheus is logging the data from it i can build these nice dashboards to monitor air quality over time and also set up alerts in grafana so i can be notified when things like co2 levels are too high the data came in handy recently when i had a window company come and replace my basement windows i noticed an odd odor in the basement even a couple hours after they were done and sure enough the pm 2.5 graph went the highest it's ever gone on my basement sensor i opened a window and put in a fan and the level went down pretty quickly over the next couple hours if i didn't do that the particulate matter would have slowly dispersed in my house i didn't like the idea of me and my family just breathing in all the rusty dust and chemicals for the next week after using it a couple months now the data coming from the sensor seems pretty reliable though i haven't done any lab grade testing the co2 sensor needs a week or two before it can self-calibrate to give the most accurate data even then all these sensors have a little margin of error and you might even run into issues like the temperature sensor giving higher readings because of its location in the case and regarding any absolute recommendations or things like adding heap of filtration in your house i still don't do that myself and i haven't seen any hard evidence to point to any particular thresholds for indoor air levels just that you should make sure you exchange outside air with indoor air regularly the main thing i was looking for in this project was when co2 levels were high because i can strongly correlate that to my brain's performance for a future upgrade to my air monitoring i'd also like to add at least radon monitoring i already have this other monitor in my basement and we have a radon fan that helps make sure levels don't get too dangerous but it would be nice to have that data logged too and heck while i'm at it a geiger counter would also be pretty neat i'd be able to see when redshirt jeff's experiments get a little too wild but all in good time until then i'm jeff gearling collared shirt don't wear these too often unsafe just from talking during this video do you see the sacrifices i make for you in these videos i'm just mr optimistic here i snipped a header to size oh yeah i did i didn't shoot people often ask me how are you productive boom productive
Info
Channel: Jeff Geerling
Views: 149,410
Rating: 4.9666247 out of 5
Keywords: esp8266, co2, air quality, airgradient, home, indoor, air, epa, eu, pollution, pm2.5, particulate, outdoor, breathe, sick building syndrome, sick, wheeze, raspberry pi, prometheus, grafana, monitoring, home assistant, diy, solder, snips, weller, montage, electronics, homemade, 3d printing, wemos, d1, mini, arduino, ide, flash, firmware, cloud, iot, device, temperature, humidity, contaminant, health, wellness, ozone, hepa, filtration
Id: Cmr5VNALRAg
Channel Id: undefined
Length: 13min 24sec (804 seconds)
Published: Wed Sep 08 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.