This project implements a CO2 monitoring system using the MH-Z19C sensor and Arduino UNO R4 WiFi board. MH-Z19C uses UART communication protocol via digital pins 2 and 3.
- Arduino UNO board
- MH-Z19C CO2 Sensor
MH-Z19C Pin | Arduino Pin |
---|---|
VCC | 5V |
GND | GND |
TX | D2 (RX) |
RX | D3 (TX) |
- The sensor requires 5V DC power supply
- Allow proper ventilation around the sensor for accurate readings
- SoftwareSerial (included in Arduino IDE)
- Clone this repository or download the source code
- Open the
MHZ19C_CO2_Monitor.ino
file in Arduino IDE - Connect your Arduino UNO R4 WiFi to your computer
- Select the correct board and port in Arduino IDE
- Upload the code to your board
-
Warm-up Time: The MH-Z19C sensor requires a warm-up time of about 3 minutes for accurate readings.
-
Calibration:
- The sensor has automatic baseline correction
- For manual calibration, expose the sensor to fresh air (400ppm CO2) for 20 minutes
- Avoid using in enclosed spaces for long periods without ventilation
-
Measurement Range:
- Standard measuring range: 400-5000ppm
- Accuracy: ±50ppm +5% reading value
- Response time: <120 seconds
-
Operating Conditions:
- Temperature range: 0-50°C
- Humidity range: 0-95% RH (non-condensing)
-
If no readings are displayed:
- Check all wire connections
- Verify power supply voltage
- Ensure TX/RX pins are correctly connected
-
If readings are inconsistent:
- Allow proper warm-up time
- Check for proper ventilation
- Verify power supply stability