Dear All,
I've had my Air Quality Monitor up and running for a few weeks now with just the air quality sensor installed. All has been fine until I added a MH-Z19B CO2 sensor today. After configuring the code and uploading, I get no AQ or CO2 readings on the Rx unit. The serial monitor output I get is below. Changing the #define USE_CO2 back = 0 restores the AQ reading.
Any ideas on what might be wrong would be much appreciated....
Rgds,
Zak
WeatherDuino 4Pro
Air Quality Monitor v8.0 b001
Please wait 30s
Configuring CO2 Sensor
Setting measurement range to: 5000
FF,99,1,0,0,0,0,0,66,
66,66
Measurement range changed!
Disabling ABC Funtion
Reseting Sensor
21,10,A0,FD,0,0,0,1,35,
Calculated crc: 52
Wrong reply from CO2 sensor!
FF,86,1,9A,3C,0,0,0,A3,
Calculated crc: A3
CO2 read: 431 - Temp: 20
FF,86,1,9A,3C,0,0,0,A3,
Calculated crc: A3
CO2 read: 431 - Temp: 20
FF,86,1,9A,3C,0,0,0,A3,
Calculated crc: A3
CO2 read: 431 - Temp: 20
FF,86,1,9A,3C,0,0,0,A3,
Calculated crc: A3
CO2 read: 431 - Temp: 20
FF,86,1,9A,3C,0,0,0,A3,
Calculated crc: A3
CO2 read: 431 - Temp: 20
FF,86,1,9A,3C,0,0,0,A3,
Calculated crc: A3
CO2 read: 431 - Temp: 20
FF,86,1,9A,3C,0,0,0,A3,
Calculated crc: A3
CO2 read: 431 - Temp: 20
FF,86,5,E4,3C,0,0,0,55,
Calculated crc: 55
CO2 read: 1585 - Temp: 20
FF,86,5,D9,3C,0,0,0,60,
Calculated crc: 60
CO2 read: 1573 - Temp: 20
Init MH-Z19 Ended
FF,86,5,F8,3C,0,0,0,41,
Calculated crc: 41
CO2 read: 0 - Temp: 20
My config_options are:
I've had my Air Quality Monitor up and running for a few weeks now with just the air quality sensor installed. All has been fine until I added a MH-Z19B CO2 sensor today. After configuring the code and uploading, I get no AQ or CO2 readings on the Rx unit. The serial monitor output I get is below. Changing the #define USE_CO2 back = 0 restores the AQ reading.
Any ideas on what might be wrong would be much appreciated....
Rgds,
Zak
WeatherDuino 4Pro
Air Quality Monitor v8.0 b001
Please wait 30s
Configuring CO2 Sensor
Setting measurement range to: 5000
FF,99,1,0,0,0,0,0,66,
66,66
Measurement range changed!
Disabling ABC Funtion
Reseting Sensor
21,10,A0,FD,0,0,0,1,35,
Calculated crc: 52
Wrong reply from CO2 sensor!
FF,86,1,9A,3C,0,0,0,A3,
Calculated crc: A3
CO2 read: 431 - Temp: 20
FF,86,1,9A,3C,0,0,0,A3,
Calculated crc: A3
CO2 read: 431 - Temp: 20
FF,86,1,9A,3C,0,0,0,A3,
Calculated crc: A3
CO2 read: 431 - Temp: 20
FF,86,1,9A,3C,0,0,0,A3,
Calculated crc: A3
CO2 read: 431 - Temp: 20
FF,86,1,9A,3C,0,0,0,A3,
Calculated crc: A3
CO2 read: 431 - Temp: 20
FF,86,1,9A,3C,0,0,0,A3,
Calculated crc: A3
CO2 read: 431 - Temp: 20
FF,86,1,9A,3C,0,0,0,A3,
Calculated crc: A3
CO2 read: 431 - Temp: 20
FF,86,5,E4,3C,0,0,0,55,
Calculated crc: 55
CO2 read: 1585 - Temp: 20
FF,86,5,D9,3C,0,0,0,60,
Calculated crc: 60
CO2 read: 1573 - Temp: 20
Init MH-Z19 Ended
FF,86,5,F8,3C,0,0,0,41,
Calculated crc: 41
CO2 read: 0 - Temp: 20
My config_options are:
Code:
// --------------------------------------------------------------------------------------
// WeatherDuino - Air Quality Monitor v8.0 b001
// User Configurable Options
// --------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------
// Define ID and TX unit number
// --------------------------------------------------------------------------------------
const byte Station_ID = 0xA1; // Must be equal to your RX Unit (Value from 0x00 to 0xFF)
// --------------------------------------------------------------------------------------
// Define type of PM sensor
// --------------------------------------------------------------------------------------
#define PMSENSOR_TYPE 0 // 0= PMS7003, 1= nova SDS011
// --------------------------------------------------------------------------------------
// For the PMS7003 define data set
// --------------------------------------------------------------------------------------
#define PMS7003_DATASET 1 // 0= CF1, 1= Ambiente (You should always use this data set)
// --------------------------------------------------------------------------------------
// CO2 (MH-Z19) Settings
// Note: For outside use, the MH-Z19B model produces more accurate results
// --------------------------------------------------------------------------------------
#define USE_CO2 1 // 0= Not instaled, 1= Instaled
#define Z19_MODEL 2 // 1= Model A, 2= Model B (ATTENTION: Make sure you select the correct model)
// Set measure range
#define Z19_RANGE 5 // Don't change (Keeps default factory range 0..5000 ppm)
// Valid values for Model A: 1= 1000ppm, 2= 2000ppm, 3= 3000ppm, 5=5000ppm
// Valid values for Model B: 2= 2000ppm, 5= 5000ppm
#define ABC_FUNCTION 0 // 0= Disable, 1= Enable (For outside use, ABC function should be disabled)
int16_t CO2_OffSet = 0; // Fine adjust to compensate sensor error (This value should be determined case by case. Values between -50 and 50)
// --------------------------------------------------------------------------------------
// Define type of Temperature / Humidity sensor
// --------------------------------------------------------------------------------------
#define TH_SENSOR 3 // 1= HTU21D, 2= SHT2x, 3=SHT3x
// --------------------------------------------------------------------------------------
// Enable / Disable RF data transmission
// --------------------------------------------------------------------------------------
#define TX_MODE 1 // 0= No data will be transmitted via RF, 1= Transmit Data
// --------------------------------------------------------------------------------------
// Enable / Disable LCD Display
// --------------------------------------------------------------------------------------
#define LCD_DISPLAY 0 // 0= Disable Display, 1= Enable Display
// --------------------------------------------------------------------------------------
// SHT31 I2C Address - Default address will work most of the times!
// --------------------------------------------------------------------------------------
#define SHT31_ADDRESS 0x44 // Default value is 0x44, but it can be changed to 0x45
// --------------------------------------------------------------------------------------
// Debug helper on Serial Monitor
// --------------------------------------------------------------------------------------
//#define DEBUG_PM // Uncomment for debug help
#define DEBUG_CO2 // Uncomment for debug help


.