CO2pod
| Project CO2pod | |
|---|---|
| Making a movable network-connected CO2 monitor | |
| Status | In progress |
| Contact | Oops |
| Last Update | 2026-01-07 |
Introduction
During COVID I spent time (as did many others) working on using MH-Z19B sensors and arduino-related devices to build CO2 monitors. I am now refreshing this effort, working with an MH-Z19C and with a different CPU. This project is now being done with PlatformIO, soldering, and lessons from the fiddling with the N-teller project.
Resources
I purchased the updated MH-Z19C. Looking at the Operame project I also bought a Lilygo T-display S3. I seem to have bricked my T-display so I'm working with the D1 mini v2.
Hardware
Instead of living with breadboards I soldered headers onto a project board and wired them together so that the d1 can be plugged into the board and the sensor can be plugged into the board. This should let me redo the board with less wear and tear on the d1 and the sensor, and I bought the extension cable for the sensor to enable this.
Eventually I want to build a case or a stand to hold the board and sensor, and may tack the sensor into place against the board.
Software
With initial work to get the board talking to the sensor, I've now pulled across a lot of the Wifi logic from the N-teller firmware and now have a device which can be configured to connect to a wifi network, which connects to NTP to get the correct time, which keeps a rotating buffer of CO2 and temperature figures (in fact, two -- one on a short-term high frequency basis and another with a three day buffer but longer, averaged readings), and which provides these figures as CSV output through the web server.
Next steps
- User configurability
- Set a label descriptor through the web interface (e.g., "Bedroom", "Living room"
- Refine use of the buffer and export of data in CSV
- Provide simple high-visibility view (by web interface) of current CO2 readings
- Make mDNS work properly for discovery by other devices on the local network
- Have on-board simple graph (probably SVG) of data accessible through web interface
- Figure out why CO2 readings seem consistently about 200ppm above expected values - try comparing with other CO2 monitors, and try using the other (notionally identical) sensor purchased
- Publish readings as mqtt so that my custom N-teller can report them
- Make it possible and practical to have two of these devices running simultaneously in different locations
- Build a frame, case or stand to hold this
- Rebuild the project board so that it's more compact
- Resolder wiring so it's more secure
- Put my firmware code on codeberg (this'll be my first repository on codeberg!)
Disclaimers
I'm doing this largely to exercise various skills - building this in PlatformIO (my previous work was with the Arduino IDE), using and exploring some of the libraries and capabilities which are available, soldering...
Other people could probably do all of these things better but then I wouldn't be learning from it. But I'll probably still welcome some advice!