AIR/MONITOR
A box on the desk that tells me what I am actually breathing: particulates, CO₂, temperature, humidity. Hand-wired, firmware written from scratch, every step logged.
why
I wanted to know whether the room I am sitting in is actually ventilated or whether I should open a window. Same at night: what the numbers look like with the window open versus shut.
I like deciding things from data.
v1 → v2
- Local display only
- No network
- 2 KB of RAM to work in
- Powered over USB
- Wifi, so the data leaves the room
- Real CO₂ instead of a gas proxy
- Battery, so it moves around the house
- Printed case
One electrical detail worth knowing before buying: the ESP32 runs at 3.3 V, not 5 V. The display and the temperature sensor are fine, but the MQ-135 swings up to 5 V and needs a divider before it touches an ADC pin. The particulate sensor actually gets easier: its serial was already 3.3 V and on the Uno it was the awkward wire.
bill of materials
| Component | What for | Source | Price | Status |
|---|---|---|---|---|
| PMS5003 G5 | Laser particulate, PM1 / PM2.5 / PM10 | AliExpress | 7,73 € | bought |
| AM2302 / DHT22 | Temperature and humidity | AliExpress | 0,69 € | bought |
| MQ-135 | Gas trend, standing in for CO₂ | AliExpress | 0,74 € | bought |
| OLED SSD1306 | 0.96" 128×64 display | AliExpress | 0,84 € | bought |
| Capacitor kits | Electrolytic and ceramic | AliExpress | 2,53 € | bought |
| SPDT slide switches | Buzzer enable | AliExpress | 0,74 € | bought |
| Uno R3, DS1302, buzzer, buttons | Board, clock, alarm, navigation | starter kit | 0,00 € | on hand |
| v2 · still to buy | ||||
| ESP32 dev board | Replaces the Uno. Wifi, three hardware UARTs, room to breathe | to decide | ? | to buy |
| MH-Z19C or MH-Z19D | True CO₂ by NDIR, the number this is all about | AliExpress, link saved | ? | to buy |
| Battery and charging | So it can sit in the bedroom overnight without a cable | to decide | ? | to buy |
| Bigger display | Optional. 0.96" gets tight with four readings and a chart | to decide | ? | maybe |
| Enclosure | Needs airflow over the particulate sensor, not a sealed box | 3D print | ? | to print |
| Spent so far | 7 parts, all of v1 | 13,27 € | ||
build log
The clock lied to me
Spent an evening trying to talk I²C to a module that turned out to be a DS1302, a three-wire part that has never spoken I²C in its life. The chip was marked. I just had not looked.
Making the display stop flickering
Clearing the whole screen every frame made it strobe. Switched to text mode and overwrote only the characters that changed. On a board with 2 KB of RAM you do not get to be wasteful.
A traffic light, then an arrow
Green, amber, red for the air, plus a trend arrow on PM2.5. The first arrow was ambiguous enough that I replaced it with UP / DN / OK and slowed it down so it could actually be read.
Multi-screen UI with per-sensor charts
Three buttons, one screen per sensor, each with min, max, mean and a rolling chart. This is where it stopped.
links
where it is now
It got as far as a working breadboard. Then it sat still from February to September. Picking it back up means finishing the parts list, moving to the ESP32, and printing a case that lets the air through.