CO and SO2 sensors giving incorrect reading

nzagorec
Posts: 19
Joined: Tue Feb 20, 2018 9:06 am
Company: Verso Altima Group

CO and SO2 sensors giving incorrect reading

Post by nzagorec » Mon Nov 05, 2018 3:35 pm

Hi,

We have Plug & Sense! with CO, O3, NO2, SO2, TPH and PM. We've installed only CO sensor at socket A and put the sensor 10cm from diesel car exhaust pipe. These are the printout we're getting when we set DEBUG_GASES_PRO to 1:

Code: Select all

[GASES PRO] ON function
[GASES PRO] Sensor power 3V3 to ON
[GASES PRO] Checksum generated OK
[GASES PRO] AFE Configured
[GASES PRO] SOCKET_1_C
[GASES PRO] Iwe: -5.957 uA
[GASES PRO] Iae: -0.133 uA
[GASES PRO] Iwe-Iae: -5.824 uA
[GASES PRO] T-Comp: -5.824 uA
[GASES PRO] Sensitivity: 336.700 nA/ppm
[GASES PRO] Concentration: -17.297 ppm
CO: 0.0000000000 ppm
[GASES PRO] OFF function
[GASES PRO] Sensor power 3V3 to OFF
[GASES PRO] ON function
[GASES PRO] Sensor power 3V3 to ON
[GASES PRO] Checksum generated OK
[GASES PRO] AFE Configured
[GASES PRO] SOCKET_1_C
[GASES PRO] Iwe: -4.654 uA
[GASES PRO] Iae: -0.131 uA
[GASES PRO] Iwe-Iae: -4.523 uA
[GASES PRO] T-Comp: -4.523 uA
[GASES PRO] Sensitivity: 336.700 nA/ppm
[GASES PRO] Concentration: -13.433 ppm
CO: 0.0000000000 ppm
This is the complete code:

Code: Select all

#include <WaspSensorGas_Pro.h>

Gas CO(SOCKET_A);

void setup() {
  USB.ON();
}

void loop() {
  CO.ON();
  delay(120000);
  float co = CO.getConc();
  USB.print("CO: "); USB.print(co); USB.println(" ppm");
  CO.OFF();
  delay(3000);
}
We tried changing the socket (A, B, C and F), increasing the heating period etc. but nothing seems to work. Sometimes we get the first reading positive (e.g. 0.2 ppm, usually right after we've changed the socket) but the next one and every other are zeros.

We have 15 of these Plug & Sense! sets and we're seeing this problem on all of them.

Same thing goes for SO2 sensor.

Waspmote API v035

Any ideas?

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

Re: CO and SO2 sensors giving incorrect reading

Post by libelium-dev » Tue Nov 06, 2018 9:16 am

Hi,

In order to debug the problem, please perform the following test.
-Connect the CO sensor to socket A and BME sensor to socket E
-Upload the next code to the node
-Wait about 30-60minutes with the node in normal conditions
-Then, without turn off the node, put it close to a diesel car exhaust pipe.
-Wait about 5-10 minutes in that conditions

Please share with us the complete log obtained from the serial monitor. You can use google drive, dropbox, etc,. to share the complete file.

Regards

nzagorec
Posts: 19
Joined: Tue Feb 20, 2018 9:06 am
Company: Verso Altima Group

Re: CO and SO2 sensors giving incorrect reading

Post by nzagorec » Tue Nov 06, 2018 11:06 am

libelium-dev wrote:
Tue Nov 06, 2018 9:16 am
-Upload the next code to the node
What do you mean by "next code"? The code I attached?

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

Re: CO and SO2 sensors giving incorrect reading

Post by libelium-dev » Tue Nov 06, 2018 11:20 am

Hi,

Sorry we forgot to copy the code.

Code: Select all

#include <WaspSensorGas_Pro.h>

Gas gas_PRO_sensor(SOCKET_A);

float concentration;	// 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()
{
    ///////////////////////////////////////////
    // 1. Turn on the sensors
    /////////////////////////////////////////// 

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


void loop()
{

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

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

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

    // And print the values via USB
    USB.println(F("***************************************"));
    USB.print(F("Gas concentration: "));
    USB.print(concentration);
    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"));

    ///////////////////////////////////////////
    // 5. Sleep
    /////////////////////////////////////////// 

    // Go to deepsleep	
    // After 2 minutes, Waspmote wakes up thanks to the RTC Alarm
    PWR.deepSleep("00:00:00:30", RTC_OFFSET, RTC_ALM1_MODE1, ALL_ON);

}

nzagorec
Posts: 19
Joined: Tue Feb 20, 2018 9:06 am
Company: Verso Altima Group

Re: CO and SO2 sensors giving incorrect reading

Post by nzagorec » Tue Nov 06, 2018 4:17 pm

Hi,

We tried your code but still no luck.

Device was working for an hour and CO values were 0. After that device was turned off for an hour and then turned back on.

On this page you can find log: https://dumptext.com/KBsXkntQ#

Also there are comments where device was at time of measurement.

Regards

nzagorec
Posts: 19
Joined: Tue Feb 20, 2018 9:06 am
Company: Verso Altima Group

Re: CO and SO2 sensors giving incorrect reading

Post by nzagorec » Tue Nov 06, 2018 4:17 pm

PS. One more thing: Check out the Iwe and Iae values in my prinouts:

Office environment:

Code: Select all

[GASES PRO] Iwe: -0.152 uA
[GASES PRO] Iae: -0.165 uA
[GASES PRO] Iwe-Iae: 0.013 uA
[GASES PRO] T-Comp: 0.013 uA
[GASES PRO] Sensitivity: 336.700 nA/ppm
[GASES PRO] Concentration: 0.039 ppm
0.0388652992 ppm
Garage, next to car exhaust pipe:

Code: Select all

[GASES PRO] Iwe: -5.957 uA
[GASES PRO] Iae: -0.133 uA
[GASES PRO] Iwe-Iae: -5.824 uA
[GASES PRO] T-Comp: -5.824 uA
[GASES PRO] Sensitivity: 336.700 nA/ppm
[GASES PRO] Concentration: -17.297 ppm
CO: 0.0000000000 ppm
As you can see Iwe has increased dramatically in scenario when CO should increase. Could it be that the Iwe-Iae is upside down (shouldn't it be Iae-Iwe?) The concentration looks good but it's negative so it's rounded to zero.

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

Re: CO and SO2 sensors giving incorrect reading

Post by libelium-dev » Wed Nov 07, 2018 3:56 pm

Hi,

We are going to perform some test with CO sensor in order to check if there is any bug. We will let you know the result as soon as possible.

Regards

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

Re: CO and SO2 sensors giving incorrect reading

Post by libelium-dev » Thu Nov 08, 2018 2:14 pm

Hi,

After our tests, we have found the same behavior than in your tests. The sensor works properly in a normal environment but when it is put close the car exhaust pipe it starts to return wrong values because the air is warm, the humidity decrease and therefore the sensor dries internally. The sensor work properly in open air.

Regards

nzagorec
Posts: 19
Joined: Tue Feb 20, 2018 9:06 am
Company: Verso Altima Group

Re: CO and SO2 sensors giving incorrect reading

Post by nzagorec » Thu Nov 08, 2018 2:49 pm

I don't understand how getting a very large negative value for Iwe (and consequently very large negative value for ppm) in cases of high CO concentration should be threated as zero and incorrect sensor behavior?!

We have installed 13 SE-PRO devices throughout the city (open air), all of them near the roads, and for the past 2 weeks we've been getting 0.00000 ppm for all readings (24 readings/day x 15 days x 13 locations)! We're talking about "Carbon Monoxide Gas Sensor for low concentrations" and it's been unable to detect 0.000001 ppm?! At the same time you're saying that it also can't detect high values because it dries internally. So what concentrations should we be able to detect?!

Just for fun we replaced the following line in WaspSensorGas_Pro.cpp:

Code: Select all

    // Compensates WE with AE
    concentration -= conc_aux;
With:

Code: Select all

    concentration = conc_aux - concentration;
And we performed the same test. Here are the readings:
  • outdoors: 0 ppm
  • in office: 0 - 0.2 ppm
  • in garage with low air flow (floor -2): 9 ppm (notice that we haven't increased the temperature nor humidity here!)
  • next to diesel car exhaust pipe: 26 ppm
  • after 5 min outdoors: 0 - 0.2 ppm
To me this looks exactly what we're suppose to get from the sensor.

Let me know your thoughts.

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

Re: CO and SO2 sensors giving incorrect reading

Post by libelium-dev » Fri Nov 09, 2018 8:29 am

Hi,

The correct formula should be concentration -= conc_aux. We are going to investigate the issue more in deep because concentration should be higher than conc_aux. Please share with us the calibration values, they are showed when the sensors are turned ON if debug mode is enabled. So please run the code again and share with us the log, we need the beginning of the log.

Regards

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest