This project is under development!!!
Current release should work for real-time CO2 monitoring 'out-of-the-box'.
This repository contains the firmware source code for a low-cost CO2 monitor built using platform.io framework, and standard ESP modules such Wemos Lolin32 and clones.
Current hardware setup, includes support for (total cost about 22€):
- Wemos Lolin32 OLED Board and clones (ESP-WROOM-32).
- MH-Z19B CO2 Sensor (0-5000ppm +/-50ppm range).
- Realtime CO2 level (ppm) monitoring.
- 60 points historical data graph (with configurable average time).
- More coming soon...
As the ESP module is able to run supplied from standard USB Smartphone charger, it is only need to wire 4 cables between ESP module and MH-Z19B Sensor:
ESP module | MH-Z19B Sensor |
---|---|
5V | Vin |
GND | GND |
PIN 25 | Tx |
PIN 26 | Rx |
-
Install Visual Studio Code.
-
Install platform.io plugin.
-
Clone (or download) this repository.
-
Open folder with Visual Studio Code.
-
Wait to platform.io plugin to load.
-
Click on Build button (platform.io lower toolbar V) and wait until === [SUCCESS] === banner appears.
-
Connect board to computer using a USB cable (in Windows 10, drivers will install automatically).
-
Press and keep pressing tiny Boot button located on the rear side of the PCB.
- Click on Upload button (platform.io lower toolbar ->).
- Keep pressing tiny Boot button until Writing at 0x00001000... (100 %) line appears, and then release it.
- Wait until the firmware upload is finished, program will boot automatically.
- Aliexpress searching for ESP32 ESP-WROOM-32 OLED.
- Aliexpress searching for MH-Z19B