I have no data with sensors CO, NO2, O3 and SO2

New sensors integration, sensor boards usage...
Post Reply
alcoy
Posts: 4
Joined: Thu Jun 27, 2019 12:14 pm
Company: Ayuntamiento Alcoy

I have no data with sensors CO, NO2, O3 and SO2

Post by alcoy » Mon Jul 01, 2019 1:47 pm

I'm programming a Waspmote Plug & Sense (Smart Environment PRO) with 4 gas sensors: CO, O3, NO2, and SO2. And all the readings give me 0.0000. This is my code:

#include <WaspSensorGas_Pro.h>
#include <WaspFrame.h>

#define SLEEP_TIME "00:00:01:00"
#define moteID "node_02"
#define socket SOCKET0
#define PORT 1

Gas CO_sensor(SOCKET_A);
Gas O3_sensor(SOCKET_B);
Gas NO2_sensor(SOCKET_C);
Gas ENV_sensor(SOCKET_E);
Gas SO2_sensor(SOCKET_F);



void setup()
{
USB.ON();
USB.println(F("===== Iniciant Control Sensor Mobil ====="));
frame.setID(moteID);

USB.print(" - Iniciant Sensor CO... ");
CO_sensor.ON();
USB.println("ok");
CO_sensor.showSensorInfo();
USB.print(" - Iniciant Sensor O3... ");
O3_sensor.ON();
USB.println("ok");
O3_sensor.showSensorInfo();
USB.print(" - Iniciant Sensor NO2... ");
NO2_sensor.ON();
USB.println("ok");
NO2_sensor.showSensorInfo();
USB.print(" - Iniciant Sensor SO2... ");
SO2_sensor.ON();
USB.println("ok");
SO2_sensor.showSensorInfo();

//PWR.deepSleep("00:00:01:00", RTC_OFFSET, RTC_ALM1_MODE1, ALL_ON);
USB.println();
}

void loop()
{
USB.println(F("+ Mesurant sensors..."));
float CO_concentration = CO_sensor.getConc();
float NO2_concentration = NO2_sensor.getConc();
float O3_concentration = O3_sensor.getConc();
float SO2_concentration = SO2_sensor.getConc();

// Imprimint els valors via USB
USB.println(F("***************************************"));
USB.print(F("Gas CO concentration: "));
USB.print(CO_concentration);
USB.println(F(" ppm"));
USB.println(F("***************************************"));
USB.print(F("Gas O3 concentration: "));
USB.print(O3_concentration);
USB.println(F(" ppm"));
USB.println(F("***************************************"));
USB.print(F("Gas NO2 concentration: "));
USB.print(NO2_concentration);
USB.println(F(" ppm"));
USB.println(F("***************************************"));
USB.print(F("Gas SO2 concentration: "));
USB.print(SO2_concentration);
USB.println(F(" ppm"));

PWR.deepSleep(SLEEP_TIME, RTC_OFFSET, RTC_ALM1_MODE1, ALL_ON);

}

and the output in the monitor serial is:

J#
===== Iniciant Control Sensor Mobil =====
- Iniciant Sensor CO... ok
[GASES PRO] ******************************************************
[GASES PRO] SOCKET -> A
[GASES PRO] SERIAL NUMBER: 132500137 098
[GASES PRO] AFE VER: 3
[GASES PRO] SENSOR TYPE: CO-4E
[GASES PRO] SENSITIVITY: 343.200 nA/ppm
[GASES PRO] BASELINE: -44.500 nA
[GASES PRO] O3-NO2 SENSITIVITY: 0.000 nA/ppm
[GASES PRO] AUX BASELINE: 11.000 nA
[GASES PRO] WORK ADJ: 0.000 | 1.0000000000
[GASES PRO] AUXL ADJ: 0.000 | 1.0000000000
[GASES PRO] WORK OFFSET: 0.046
[GASES PRO] AUX OFFSET: 3172.455
[GASES PRO] ZERO STATUS: 3C
[GASES PRO] ******************************************************
- Iniciant Sensor O3... ok
[GASES PRO] ******************************************************
[GASES PRO] SOCKET -> B
[GASES PRO] SERIAL NUMBER: 214500309 098
[GASES PRO] AFE VER: 3
[GASES PRO] SENSOR TYPE: O3-4E
[GASES PRO] SENSITIVITY: -516.020 nA/ppm
[GASES PRO] BASELINE: 36.260 nA
[GASES PRO] O3-NO2 SENSITIVITY: -526.350 nA/ppm
[GASES PRO] AUX BASELINE: 10.090 nA
[GASES PRO] WORK ADJ: 0.000 | 1.0000000000
[GASES PRO] AUXL ADJ: 0.000 | 1.0000000000
[GASES PRO] WORK OFFSET: 0.046
[GASES PRO] AUX OFFSET: 3172.455
[GASES PRO] ZERO STATUS: 3C
[GASES PRO] ******************************************************
- Iniciant Sensor NO2... ok
[GASES PRO] ******************************************************
[GASES PRO] SOCKET -> C
[GASES PRO] SERIAL NUMBER: 212470149 108
[GASES PRO] AFE VER: 3
[GASES PRO] SENSOR TYPE: NO2-4E
[GASES PRO] SENSITIVITY: -343.200 nA/ppm
[GASES PRO] BASELINE: 28.700 nA
[GASES PRO] O3-NO2 SENSITIVITY: 0.000 nA/ppm
[GASES PRO] AUX BASELINE: 13.200 nA
[GASES PRO] WORK ADJ: 0.000 | 1.0000000000
[GASES PRO] AUXL ADJ: 0.000 | 1.0000000000
[GASES PRO] WORK OFFSET: 0.046
[GASES PRO] AUX OFFSET: 3172.455
[GASES PRO] ZERO STATUS: 3C
[GASES PRO] ******************************************************
- Iniciant Sensor SO2... ok
[GASES PRO] ******************************************************
[GASES PRO] SOCKET -> F
[GASES PRO] SERIAL NUMBER: 134500014 098
[GASES PRO] AFE VER: 3
[GASES PRO] SENSOR TYPE: SO2-4E
[GASES PRO] SENSITIVITY: 395.800 nA/ppm
[GASES PRO] BASELINE: 3.500 nA
[GASES PRO] O3-NO2 SENSITIVITY: 0.000 nA/ppm
[GASES PRO] AUX BASELINE: 25.200 nA
[GASES PRO] WORK ADJ: 0.000 | 1.0000000000
[GASES PRO] AUXL ADJ: 0.000 | 1.0000000000
[GASES PRO] WORK OFFSET: 0.046
[GASES PRO] AUX OFFSET: 3172.455
[GASES PRO] ZERO STATUS: 3C
[GASES PRO] ******************************************************

+ Mesurant sensors...
***************************************
Gas CO concentration: 0.0000000000 ppm
***************************************
Gas O3 concentration: 0.0000000000 ppm
***************************************
Gas NO2 concentration: 0.0000000000 ppm
***************************************
Gas SO2 concentration: 0.0000000000 ppm

What am I doing wrong? Thank you!

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: I have no data with sensors CO, NO2, O3 and SO2

Post by libelium-dev » Tue Jul 02, 2019 8:24 am

Hi,

The sensors are recognized by the P&S. The zero values could be normal due to the low concentration of those gases on the environment and the accuracy of the sensors, +-0.1 ppm in ideal conditions.

Anyway, please enable debug mode 2 for gases sensors inside WaspSensorGas_Pro.h file and copy the output through the serial monitor here. So we will be able to debug the issue in more deep.

Code: Select all

#define DEBUG_GASES_PRO		2
On the other hand, please you don't declare the Gas ENV_sensor(SOCKET_E) since there isn't any gas sensor connected to socket E and it can cause a bad operation of the node.

Regards

alcoy
Posts: 4
Joined: Thu Jun 27, 2019 12:14 pm
Company: Ayuntamiento Alcoy

Re: I have no data with sensors CO, NO2, O3 and SO2

Post by alcoy » Tue Jul 02, 2019 11:20 am

Hi, Thanks for your answer. This is the output with the Debug mode activate:

J#
===== Iniciant Control Sensor Mobil =====
- Iniciant Sensor CO... [GASES PRO] ON function
[GASES PRO] Sensor power 3V3 to ON
[GASES PRO] Checksum generated OK
[GASES PRO] ******************************************************
[GASES PRO] SOCKET -> A
[GASES PRO] SERIAL NUMBER: 132500137 098
[GASES PRO] AFE VER: 3
[GASES PRO] SENSOR TYPE: CO-4E
[GASES PRO] SENSITIVITY: 343.200 nA/ppm
[GASES PRO] BASELINE: -44.500 nA
[GASES PRO] O3-NO2 SENSITIVITY: 0.000 nA/ppm
[GASES PRO] AUX BASELINE: 11.000 nA
[GASES PRO] WORK ADJ: 0.000 | 1.0000000000
[GASES PRO] AUXL ADJ: 0.000 | 1.0000000000
[GASES PRO] WORK OFFSET: 0.046
[GASES PRO] AUX OFFSET: 3172.455
[GASES PRO] ZERO STATUS: 3C
[GASES PRO] ******************************************************
[GASES PRO] AFE Configured

ok
- Iniciant Sensor O3... [GASES PRO] ON function
[GASES PRO] Checksum generated OK
[GASES PRO] ******************************************************
[GASES PRO] SOCKET -> B
[GASES PRO] SERIAL NUMBER: 214500309 098
[GASES PRO] AFE VER: 3
[GASES PRO] SENSOR TYPE: O3-4E
[GASES PRO] SENSITIVITY: -516.020 nA/ppm
[GASES PRO] BASELINE: 36.260 nA
[GASES PRO] O3-NO2 SENSITIVITY: -526.350 nA/ppm
[GASES PRO] AUX BASELINE: 10.090 nA
[GASES PRO] WORK ADJ: 0.000 | 1.0000000000
[GASES PRO] AUXL ADJ: 0.000 | 1.0000000000
[GASES PRO] WORK OFFSET: 0.046
[GASES PRO] AUX OFFSET: 3172.455
[GASES PRO] ZERO STATUS: 3C
[GASES PRO] ******************************************************
[GASES PRO] AFE Configured

ok
- Iniciant Sensor NO2... [GASES PRO] ON function
[GASES PRO] Checksum generated OK
[GASES PRO] ******************************************************
[GASES PRO] SOCKET -> C
[GASES PRO] SERIAL NUMBER: 212470149 108
[GASES PRO] AFE VER: 3
[GASES PRO] SENSOR TYPE: NO2-4E
[GASES PRO] SENSITIVITY: -343.200 nA/ppm
[GASES PRO] BASELINE: 28.700 nA
[GASES PRO] O3-NO2 SENSITIVITY: 0.000 nA/ppm
[GASES PRO] AUX BASELINE: 13.200 nA
[GASES PRO] WORK ADJ: 0.000 | 1.0000000000
[GASES PRO] AUXL ADJ: 0.000 | 1.0000000000
[GASES PRO] WORK OFFSET: 0.046
[GASES PRO] AUX OFFSET: 3172.455
[GASES PRO] ZERO STATUS: 3C
[GASES PRO] ******************************************************
[GASES PRO] AFE Configured

ok
- Iniciant Sensor SO2... [GASES PRO] ON function
[GASES PRO] Checksum generated OK
[GASES PRO] ******************************************************
[GASES PRO] SOCKET -> F
[GASES PRO] SERIAL NUMBER: 134500014 098
[GASES PRO] AFE VER: 3
[GASES PRO] SENSOR TYPE: SO2-4E
[GASES PRO] SENSITIVITY: 395.800 nA/ppm
[GASES PRO] BASELINE: 3.500 nA
[GASES PRO] O3-NO2 SENSITIVITY: 0.000 nA/ppm
[GASES PRO] AUX BASELINE: 25.200 nA
[GASES PRO] WORK ADJ: 0.000 | 1.0000000000
[GASES PRO] AUXL ADJ: 0.000 | 1.0000000000
[GASES PRO] WORK OFFSET: 0.046
[GASES PRO] AUX OFFSET: 3172.455
[GASES PRO] ZERO STATUS: 3C
[GASES PRO] ******************************************************
[GASES PRO] AFE Configured

ok

+ Mesurant sensors...
[GASES PRO] SOCKET_4_A
[GASES PRO] VOL-WRK: -447.273 mV
[GASES PRO] Iwe: -4.066 uA
[GASES PRO] VOL-AUX: -153.338 mV
[GASES PRO] Iae: -1.394 uA
[GASES PRO] Iwe-Iae: -2.672 uA
[GASES PRO] Sensitivity temperature compensated (ppm): 0.966
[GASES PRO] T-Comp: -2.580 uA
[GASES PRO] Sensitivity: 343.200 nA/ppm
[GASES PRO] Concentration: -7.518 ppm
[GASES PRO] SOCKET_1_C
[GASES PRO] VOL-WRK: -5.109 mV
[GASES PRO] Iwe: -0.046 uA
[GASES PRO] VOL-AUX: -7.361 mV
[GASES PRO] Iae: -0.067 uA
[GASES PRO] Iwe-Iae: 0.020 uA
[GASES PRO] Sensitivity temperature compensated (ppm): 0.971
[GASES PRO] T-Comp: 0.020 uA
[GASES PRO] Sensitivity: -343.200 nA/ppm
[GASES PRO] Concentration: -0.058 ppm
[GASES PRO] SOCKET_5_
[GASES PRO] VOL-WRK: -0.559 mV
[GASES PRO] Iwe: -0.005 uA
[GASES PRO] VOL-AUX: -5.701 mV
[GASES PRO] Iae: -0.052 uA
[GASES PRO] Iwe-Iae: 0.047 uA
[GASES PRO] Sensitivity temperature compensated (ppm): 1.000
[GASES PRO] T-Comp: 0.047 uA
[GASES PRO] O3-NO2: 0.047 uA
[GASES PRO] Sensitivity: -516.020 nA/ppm
[GASES PRO] Concentration: -0.091 ppm
[GASES PRO] SOCKET_3_F
[GASES PRO] VOL-WRK: -90.383 mV
[GASES PRO] Iwe: -0.822 uA
[GASES PRO] VOL-AUX: -22.861 mV
[GASES PRO] Iae: -0.208 uA
[GASES PRO] Iwe-Iae: -0.614 uA
[GASES PRO] Sensitivity temperature compensated (ppm): 1.003
[GASES PRO] T-Comp: -0.616 uA
[GASES PRO] Sensitivity: 395.800 nA/ppm
[GASES PRO] Concentration: -1.555 ppm
***************************************
Gas CO concentration: 0.0000000000 ppm
***************************************
Gas O3 concentration: 0.0000000000 ppm
***************************************
Gas NO2 concentration: 0.0000000000 ppm
***************************************
Gas SO2 concentration: 0.0000000000 ppm

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: I have no data with sensors CO, NO2, O3 and SO2

Post by libelium-dev » Wed Jul 03, 2019 7:53 am

Hi,

Is the temp, hum and press sensor connected to socket E?

Please perform the same test again but copy here the output after some hours working since it seems that the sensors aren't warm enough.

In addition, please test the CO sensor individually using the following example code and copy the output
http://www.libelium.com/development/was ... s-sensors/

Regards

alcoy
Posts: 4
Joined: Thu Jun 27, 2019 12:14 pm
Company: Ayuntamiento Alcoy

Re: I have no data with sensors CO, NO2, O3 and SO2

Post by alcoy » Wed Jul 10, 2019 6:08 pm

Hello!
This is the output after 4 hours measuring the CO sensor individually as you suggested:

J#
Electrochemical gas sensor example
[GASES PRO] ON function
[GASES PRO] Sensor power 3V3 to ON
[GASES PRO] Checksum generated OK
[GASES PRO] ******************************************************
[GASES PRO] SOCKET -> A
[GASES PRO] SERIAL NUMBER: 132500137 098
[GASES PRO] AFE VER: 3
[GASES PRO] SENSOR TYPE: CO-4E
[GASES PRO] SENSITIVITY: 343.200 nA/ppm
[GASES PRO] BASELINE: -44.500 nA
[GASES PRO] O3-NO2 SENSITIVITY: 0.000 nA/ppm
[GASES PRO] AUX BASELINE: 11.000 nA
[GASES PRO] WORK ADJ: 0.000 | 1.0000000000
[GASES PRO] AUXL ADJ: 0.000 | 1.0000000000
[GASES PRO] WORK OFFSET: 0.046
[GASES PRO] AUX OFFSET: 3172.455
[GASES PRO] ZERO STATUS: 3C
[GASES PRO] ******************************************************
[GASES PRO] AFE Configured

[GASES PRO] SOCKET_4_A
[GASES PRO] VOL-WRK: -19.586 mV
[GASES PRO] Iwe: -0.178 uA
[GASES PRO] VOL-AUX: -2.416 mV
[GASES PRO] Iae: -0.022 uA
[GASES PRO] Iwe-Iae: -0.156 uA
[GASES PRO] Sensitivity temperature compensated (ppm): 0.968
[GASES PRO] T-Comp: -0.151 uA
[GASES PRO] Sensitivity: 343.200 nA/ppm
[GASES PRO] Concentration: -0.440 ppm
***************************************
Gas concentration: 0.0000000000 ppm
Temperature: 25.5300006866 Celsius degrees
RH: 36.8710937500 %
Pressure: 94889.3593750000 Pa


Thank you for your attention!!

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: I have no data with sensors CO, NO2, O3 and SO2

Post by libelium-dev » Thu Jul 11, 2019 9:04 am

Hi,

The log is correct, the sensor returns 0ppm due to the low concentration of the CO gas in the environment and the accuracy of the sensor +-0.1ppm (in ideal conditions).

The gases sensors are calibrated but they have usually an offset. The sensors can be more accurate setting the zero point. The process is
- placing the node in a known concentration of zero ppm or a place where you know the concentration is very low
- connect the CO sensor to socket A and the temp,hum, pres sensor to the socket E
- upload the following code to the node
- the warm up is 30 minutes to make sure the sensor is warm enough
- When the code shows *** END *** through the serial monitor, the zero point is set
- Then, you can upload your code

Code: Select all

#include <WaspSensorGas_Pro.h>

Gas CO(SOCKET_A);

float co;	// Stores the concentration level in ppm
float temperature;	// Stores the temperature in ºC
float humidity;		// Stores the realitve humidity in %RH
float pressure;		// Stores the pressure in Pa

void setup()
{

    USB.println("Init test");
    ///////////////////////////////////////////
    // 1. Turn on the sensors
    /////////////////////////////////////////// 

    // Power on the electrochemical sensor. 
    // If the gases PRO board is off, turn it on automatically.
    CO.ON();
	
    // First sleep time
    // After 15 minutes, Waspmote wakes up thanks to the RTC Alarm
    PWR.deepSleep("00:00:30:00", RTC_OFFSET, RTC_ALM1_MODE1, ALL_ON);

    
    // set the zero ppm point at the current concentration
    // to better performance the sensor must be place in a known environment of 0 ppm
    CO.zeroPointSet();

    delay(2000);

    ///////////////////////////////////////////
    // 2. Read sensors
    ///////////////////////////////////////////  

    // Read the electrochemical sensor and compensate with the temperature internally
    co = CO.getConc();

    // Read enviromental variables
    temperature = CO.getTemp();
    humidity = CO.getHumidity();
    pressure = CO.getPressure();

    // And print the values via USB
    USB.println(F("***************************************"));
    USB.print(F("CO: "));
    USB.print(co);
    USB.println(F(" ppm"));
    USB.print(F("Temperature: "));
    USB.print(temperature);
    USB.println(F(" Celsius degrees"));
    USB.print(F("RH: "));
    USB.print(humidity);
    USB.println(F(" %"));
    USB.print(F("Pressure: "));
    USB.print(pressure);
    USB.println(F(" Pa"));

    USB.println(F("***************************************"));

    USB.println();

    USB.println("*** END ***");
}	

void loop()
{
}
Regards

alcoy
Posts: 4
Joined: Thu Jun 27, 2019 12:14 pm
Company: Ayuntamiento Alcoy

Re: I have no data with sensors CO, NO2, O3 and SO2

Post by alcoy » Fri Aug 02, 2019 12:34 pm

Thanks for your help!

Now the sensors give some reading occasionally.
My question continues because we have other libelium sensors that are installed in fixed positions on the street and give greater readings. This sensor is installed on the roof of a bus that runs along the same streets and the values are much lower. Usually 0.000 ppm. Is it possible that we have to adjust them to other levels of gas concentration? Thanks for everything.

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: I have no data with sensors CO, NO2, O3 and SO2

Post by libelium-dev » Fri Aug 02, 2019 1:22 pm

Hi,

Which values do you take with the sensors that report greater readings?

As we already said you can make a little adjustment with zeroPointSet function. In any case, you have to take account of the accuracy of the sensors and the degradation of the sensors over time.

Regards.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest