Environment Monitor
Interested in the quality of your indoor environment? Particulates, CO2, volatile organic compounds?
Interested in the quality of your indoor environment? Particulates, CO2, volatile organic compounds? Intention of this device is measure, show and trend what's going on!
Status | Operational |
Platform | ESP32 Custom PCB |
Budget | $100 |
Date Completed | Feb 2021 |
Summary of operation
Basically it measures using a variety of included sensors, shows the values on the small OLED screen, and also posts the data it reads to InfluxDB for display in Grafana.
Parts used
- ESP32 Microcontroller https://www.jaycar.com.au/esp32-main-board-with-wifi-and-bluetooth-communication/p/XC3800 Would have preferred an ESP8266 but they don't have enough I/O.
- Monochrome 1.2" OLED display https://www.jaycar.com.au/duinotech-1-3-inch-monochrome-oled-display/p/XC3728
- CCS881S Air Quality Sensor (eCO2, TVOC & Temp) https://www.sparkfun.com/products/14193
- Sharp GP2Y1014AU Dust Sensor https://www.jaycar.com.au/duinotech-dust-sensor-module/p/XC3780
- Small 30mm 5V fan https://www.jaycar.com.au/5vdc-30mm-thin-2-wire-fan/p/YX2500
Some engineering detail
The hardware is wired up as follows:
- Custom PCB which brings together the above sensors, with the addition of some minor components (resistors, NPN transistor, diode) to safely drive the 5V fan from 3.3V logic.
It's coded up in the Arduino IDE as follows:
- Uses WIFIManager to help you connect it to Wi-Fi using your smartphone when you first power it up. It then saves the wireless details in memory so it automatically connects next time.
- Once reading the sensors it shows a quick reference icon giving you an immediate indication of your local environment. For example, in depending priority - a canonical flask icon indicates high VOCs, a group of people icon indicates high CO2, a sun icon indicates high Temperature and a group of spots indicates high dust.
- Every 30 seconds it posts the averages of the values measured to an InfluxDB server using the "line" protocol.
- Uses ArduinoOTA for over-the-air updates including fetching updates regularly over HTTP. This helps me keep it up-to-date because i've given it to my parents-in-law for their house!
Future improvements
I actually made a better one of these for project last year using a far better laser-based dust sensor - Nova Fitness SDS011 - but they now seem harder to buy? It was digital rather than needing to read analogue voltages like the Sharp, and could distinguish between PM2.5 and PM10 particles.