OLED RGB CO2 Monitor

by ZaNgAbY in Circuits > Arduino

7356 Views, 126 Favorites, 0 Comments

OLED RGB CO2 Monitor

WhatsApp Image 2021-11-23 at 13.12.43.jpeg

Monitor the CO2 level and display the measurements on an OLED screen.

Supplies

2.png

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

3.png

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

4.png

Solder dupont cables to the RGB LED for easily connection to the Arduino Nano.

Flash the Arduino Nano

arduino_logo_icon_170518.png

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

5.png

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

cover.png

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. 

Source

Further Ideas

Few things that might be added to the project.

  • Add mqtt integration
  • Add thingsboard.io integration
  • Add OTA update capabilities 

thank-you.jpg

Hope you enjoyed this project and if you have any questions feel free to ask.

Thank you for reading!