OLED RGB CO2 Monitor
Monitor the CO2 level and display the measurements on an OLED screen.
Supplies
1 x WS2812B RGB LED
1 x Arduino Nano
1 x MH-Z19C
1 x USB Cable
1 x 0.96 inch OLED Screen
Dupont cables
Prepare the USB Cable
The sensor and OLED need their own power supply as the one from the Arduino is not enough, therefore we can use an old USB cable and solder dupont cables to split the plus and minus wires.
Before soldering the wires, don't forget to pass the cable thru the back lid.
Prepare the RGB LED
Solder dupont cables to the RGB LED for easily connection to the Arduino Nano.
Flash the Arduino Nano
The code is available here:
https://github.com/zangaby/OLED_RGB_CO2_meter
Connections
Oled
Display SDA -> Arduino A4
Display SCK -> Arduino A5
Display GND -> GND-USB-Cable
Display VCC -> VCC USB-Cable
Sensor
Sensor PWM -> Arduino D7
Sensor GND -> GND-USB-Cable
Sensor Vin -> VCC USB-Cable
Arduino
Arduino Vin -> VCC-USB-Cable
Arduino GND -> GND-USB-Cable
RGB LED
WS2812B RGB LED data PIN -> Arduino D8
Print the Case
The case design is available here: https://www.thingiverse.com/thing:4583703
It was initially designed for MH-Z19B but it can fit MH-Z19C just fine.
Final Assembly
The front screen frame is quite fix, so it might need a bit of adjusting with a knife before installing the OLED screen. Do not try to force the screen into the frame as it might damage the screen.
CO2 Sensor Calibration
This module has two methods for zero point calibration: hand-operated method and self-calibration. All the zero point is at 400ppm CO2.
Hand-operated method: Connect module’s HD pin to low level(0V), lasting for 7 seconds at least. Before calibrating the zero point, please ensure that the sensor is stable for more than 20 minutes at 400ppm ambient environment.
Self-calibration function: The self-calibration function means that after the sensor runs continuously for a period of time, it can intelligently determine the zero point according to the environmental concentration and calibrate itself. The calibration cycle is automatic calibration every 24 hours since power-on operation. The zero point of automatic calibration is 400ppm.
The self-calibration function is suitable for office environment and home environment. However, it is not suitable for agricultural greenhouses, breeding farms, cold storage and other places. In such places, self-calibration function should be turned off. After the shutdown, users are required to periodically perform zero-point detection on the sensors, and if necessary, perform zero calibration or manual zero calibration.
Further Ideas
Few things that might be added to the project.
- Add mqtt integration
- Add thingsboard.io integration
- Add OTA update capabilities
Hope you enjoyed this project and if you have any questions feel free to ask.
Thank you for reading!