Back in early June 2023 when smoke from the Canadian wildfires was sitting over the east coast of the US, I, like many others, became much more aware of and interested in the quality of the air around me. I ended up buying one of these AirGradient DIY Basic sensor platforms that combines a CO2 sensor with particulate sensor that reports PM1.0, PM2.5, and PM10 particular concentrations, as well as temperature and humidity.
The AirGradient unit seems like a good choice because the sensors, while not too expensive, were well-enough regarded by commenters in the discussion threads I was reading and because the product is very DIY friendly. It's based around one of the ubiquitous ESP8266 chips that can be easily programmed in a bunch of ways and integrated neatly into a variet of systems, including HomeAssistant. I run a little HomeAssistant setup in my apartment so the ease of integrate was a big selling point for me. And at $67, the DIY kit didn't feel too pricy, especially on those really smoky days in early June.
The kit arrived today and I'm happy to report it's now working great! Here are some build notes:
Found the list of assembly instructions here
Here are all the parts unpacked:
Soldering went along easily enough:
I thought the instructions to solder the long headers onto the ESP board were odd, but this worked out
well as the OLED display could plug into the female header and the long pins could could be soldered straight
to the PCB to mount the ESP board to it:
The instructions don't mention what to do with this white connector for particular sensor cable, but I
found that this was the correct orientation:
I used some extra male header pins and two unused holes on the temperature and humidity sensor board to prop up the board for easier solding. Note that the two pins on the left here are not actually soldered in and aren't present in the final picture on the right:
Ready for programming! (feat. a Pinecil soldering iron!)
Blue particulate sensor isn't attached here!
docker run --rm --privileged -v "${PWD}":/config --device=/dev/ttyUSB0 -it ghcr.io/esphome/esphome run livingroom.yaml
docker run --rm --privileged -v "${PWD}":/config --device=/dev/ttyUSB0 -it ghcr.io/esphome/esphome run livingroom.yaml
~/Desktop/Projects/ESPHome$ ls air-gradient-diy.yaml font orig secrets.yaml ~/Desktop/Projects/ESPHome$ ls font/ arial.ttf monofonto.ttf monofonto.ttf.1 monofont.ttf
~/Desktop/Projects/ESPHome$ ls
air-gradient-diy.yaml font orig secrets.yaml
~/Desktop/Projects/ESPHome$ ls font/
arial.ttf monofonto.ttf monofonto.ttf.1 monofont.ttf
secrets.yaml
file contains some WiFI info and looks like this:
# Your Wi-Fi SSID and password wifi_ssid: "My Home Wifi" wifi_password: "thewifipassword" fallback_ssid_password: "" ota_password: ""
# Your Wi-Fi SSID and password
wifi_ssid: "My Home Wifi"
wifi_password: "thewifipassword"
fallback_ssid_password: ""
ota_password: ""
switch
and button
sections (not sure what those are for, and they generated compiler
errors)it.fill(Color::BLACK);
call before writing text
to the OLEDWith the ESPHome program generated by my copy of air-gradient-diy.yaml
loaded
onto my AirGradient board, HomeAssistant just picked it right up! A little playing around with HomeAssisant
sensor plot cards later and I have these sweet graphs of the particulate matter and CO2 around me:
Crazy! I've only had this going a day so far but it's fascinating to see how the CO2 changes when I enter or leave a room and how much cooking affects the PM readings. Very excited to continue to monitor this information!