# AirGradient DIY Created: 2023_04_06 05:30 Tags: [[Electronics]] [[Project]] Since I grew up in the US, Air Conditioning is just about everywhere (especially in Miami, where it is basically a human right). When I moved to San Francisco, it was the first time that I had lived somewhere that did not have AC, little did I know that it is actually a pretty common thing, especially in more mild weathered places. In San Francisco, it was pretty refreshing to have the windows open in the house (maybe a bit cold to do it all the time, but nice nonetheless). But when I moved to Arnhem in the Netherlands, the apartment I lived in also did not have AC. It is much colder in Arnhem, though, so the house is definitely better sealed, and you can tell that pretty easily. After reading a Hacker News article, I had a thought that I never really thought about before: How often should you open your windows? I [watched a video by Jeff Geerling](https://youtu.be/Cmr5VNALRAg) (see more details on [his blog post](https://www.jeffgeerling.com/blog/2021/airgradient-diy-air-quality-monitor-co2-pm25)), where he mentioned the idea of Carbon Dioxide (CO2) build up, and I was so interested; how have I never even thought/heard about it before? Apparently, it is easy to become fatigued at high levels of CO2, but how are you even supposed to know what the level of CO2 is? The [AirGradient DIY sensor kit](https://www.airgradient.com/open-airgradient/instructions/diy/) measures CO2, Air Quality (AQI), Temperature & Humidity using a variety of sensors that you put together on a PCB board. ## Hardware It is actually the first project that I have had to solder parts together for. I think that it also was a pretty good one to start with because all the steps were straightforward, and the soldering is pretty easy because everything is through-hole (as opposed to surface mount which is tricky to solder). I think it was a great introduction into the world of electronics not because it gives you a good understanding of electronics, but because it allows you to make something that you may just find useful. It is very similar to the [[IKEA effect]]. ## Software The ESPHome project is a really great entry point into the world of IoT devices because it has really great software support which is historically tricky on these low-power devices. I went through a couple of iterations, first following the air gradient diy’s guide by using the Arduino toolkit to install things onto the device. That worked, but definitely was not leveraging ESPHome and all of the cool features that it has like OTA updates. Then I used [Jeff Geerling's template](https://github.com/geerlingguy/airgradient-prometheus/tree/master), which installs ESPHome using yaml files and the ESPHome CLI. I had to make a couple of tweaks to get it to run on the newer version of ESPHome that I was running at the time, but other than that it was painless to create a python virtual env and follow his instructions. <details> 1. change `uart1` and `uart2` to `uarta` and `uartb` respectively </details> In my final iteration, and current setup, I am using the ESPHome Dashboard running on my [[Raspberry Pi]] via a Home Assistant add-on. This is advantageous in a lot of ways: constant updates, easily accessible with the dashboard UI, integration into Home Assistant for monitoring the sensors over time. This is a helpful guide by Airgradient for what reasonable values are for CO^2 and PM2.5 sensors. ![[AQ-Monitor-Cheatsheet.pdf]] ## References -