NO2 and O3 sensors reading zero

New sensors integration, sensor boards usage...
Post Reply
cdawber
Posts: 6
Joined: Wed Apr 25, 2018 11:27 am
Company: KeyWare ltd

NO2 and O3 sensors reading zero

Post by cdawber » Fri Dec 06, 2019 1:41 pm

Can you confirm that the NO2 and O3 sensors are working on my Smart Cities sensor:

Switch on:
[GASES PRO] ON function
[GASES PRO] Sensor power 3V3 to ON
[GASES PRO] Checksum generated OK
[GASES PRO] ******************************************************
[GASES PRO] SOCKET -> C
[GASES PRO] SERIAL NUMBER: 212900606 099
[GASES PRO] AFE VER: 3
[GASES PRO] SENSOR TYPE: NO2-4E
[GASES PRO] SENSITIVITY: -308.810 nA/ppm
[GASES PRO] BASELINE: 45.710 nA
[GASES PRO] O3-NO2 SENSITIVITY: 0.000 nA/ppm
[GASES PRO] AUX BASELINE: 14.500 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] ON function
[GASES PRO] Checksum generated OK
[GASES PRO] ******************************************************
[GASES PRO] SOCKET -> F
[GASES PRO] SERIAL NUMBER: 134870158 059
[GASES PRO] AFE VER: 3
[GASES PRO] SENSOR TYPE: SO2-4E
[GASES PRO] SENSITIVITY: 387.900 nA/ppm
[GASES PRO] BASELINE: 17.000 nA
[GASES PRO] O3-NO2 SENSITIVITY: 0.000 nA/ppm
[GASES PRO] AUX BASELINE: 15.800 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] ON function
[GASES PRO] Checksum generated OK
[GASES PRO] ******************************************************
[GASES PRO] SOCKET -> B
[GASES PRO] SERIAL NUMBER: 214890023 119
[GASES PRO] AFE VER: 3
[GASES PRO] SENSOR TYPE: O3-4E
[GASES PRO] SENSITIVITY: -523.130 nA/ppm
[GASES PRO] BASELINE: 32.470 nA
[GASES PRO] O3-NO2 SENSITIVITY: -524.300 nA/ppm
[GASES PRO] AUX BASELINE: 9.770 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

5 minute warm up then read:
[GASES PRO] SOCKET_1_C
[GASES PRO] VOL-WRK: -6.559 mV
[GASES PRO] Iwe: -0.060 uA
[GASES PRO] VOL-AUX: -7.824 mV
[GASES PRO] Iae: -0.071 uA
[GASES PRO] Iwe-Iae: 0.012 uA
[GASES PRO] Sensitivity temperature compensated (ppm): 0.999
[GASES PRO] T-Comp: 0.011 uA
[GASES PRO] Sensitivity: -308.810 nA/ppm
[GASES PRO] Concentration: -0.037 ppm
NO2 concentration: 0.0000 ppm
[GASES PRO] OFF function
[GASES PRO] SOCKET_3_F
[GASES PRO] VOL-WRK: 377.881 mV
[GASES PRO] Iwe: 3.435 uA
[GASES PRO] VOL-AUX: -176.451 mV
[GASES PRO] Iae: -1.604 uA
[GASES PRO] Iwe-Iae: 5.039 uA
[GASES PRO] Sensitivity temperature compensated (ppm): 1.000
[GASES PRO] T-Comp: 5.040 uA
[GASES PRO] Sensitivity: 387.900 nA/ppm
[GASES PRO] Concentration: 12.993 ppm
SO2 concentration: 12.9931 ppm
[GASES PRO] OFF function
[GASES PRO] SOCKET_5_
[GASES PRO] VOL-WRK: 15.336 mV
[GASES PRO] Iwe: 0.139 uA
[GASES PRO] VOL-AUX: -4.314 mV
[GASES PRO] Iae: -0.039 uA
[GASES PRO] Iwe-Iae: 0.179 uA
[GASES PRO] Sensitivity temperature compensated (ppm): 1.000
[GASES PRO] T-Comp: 0.179 uA
[GASES PRO] O3-NO2: 0.179 uA
[GASES PRO] Sensitivity: -523.130 nA/ppm
[GASES PRO] Concentration: -0.341 ppm
O3 concentration: 0.0000 ppm
[GASES PRO] OFF function
[GASES PRO] Sensor power 3V3 to OFF

I am asking because the NO2 and O3 concentrations are coming back as 0.0 and the last time we saw sensors do this there was a problem with the code. It looks like both sensors are reading a small negative value which is being reported as zero whereas the SO2 sensor is reporting a finite value which is being reported correctly.

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

Re: NO2 and O3 sensors reading zero

Post by libelium-dev » Tue Dec 10, 2019 11:43 am

Hi,

Could you please share the code uploaded to the node with us? Are you using the last API v043?

Please keep the sensor working for one hour without turning OFF them. You can use that example code

Code: Select all

#include <WaspSensorGas_Pro.h>

/*
 * Define object for sensor: gas_PRO_sensor
 * Input to choose board socket. 
 * Waspmote OEM. Possibilities for this sensor:
 * 	- SOCKET_1 
 * 	- SOCKET_2
 * 	- SOCKET_3
 * 	- SOCKET_4
 * 	- SOCKET_5
 * 	- SOCKET_6
 * P&S! Possibilities for this sensor:
 * 	- SOCKET_A
 * 	- SOCKET_B
 * 	- SOCKET_C
 * 	- SOCKET_F
 */
Gas gas_PRO_sensor(SOCKET_B);

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()
{
    USB.println(F("Electrochemical gas sensor example"));
	
    ///////////////////////////////////////////
    // 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:02:00", RTC_OFFSET, RTC_ALM1_MODE1, ALL_ON);

}
It's normal to get zero values when the concentration in the environment is very low due to the accuracy of the sensors, +-0.1 ppm in ideal conditions. The NO2 and O3 values seem correct but the SO2 value is too high. The SO2 value should be close to zero too. Please test the sensor keeping them ON continuously and share the output through the serial monitor with us. The values should tend to 0 once the sensors are properly warmed up.

Regards

cdawber
Posts: 6
Joined: Wed Apr 25, 2018 11:27 am
Company: KeyWare ltd

Re: NO2 and O3 sensors reading zero

Post by cdawber » Wed Dec 11, 2019 2:27 pm

Hi,

I have started to run your my Smart Cities sensor (API v043) and I get this:

Electrochemical gas sensor example
***************************************
Gas concentration: -1.0000000000 ppm
Temperature: 1424.1875000000 Celsius degrees
RH: -1000.0000000000 %
Pressure: -1000.0000000000 Pa

I have tried it with both the NO2 and O3 sensors plugged into socket B and I get the same result. For a Smart Cities device shouldn't we be using:

#include <WaspSensorCities_PRO.h>

?

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

Re: NO2 and O3 sensors reading zero

Post by libelium-dev » Thu Dec 12, 2019 8:58 am

Hi,

Sorry, we thought that you have Smart Environment PRO. Please test the following code. Connect only a gas sensor to socket B and the temp,hum, press sensor to socket A. Enable debug mode 2 inside WaspSensorGas_Pro.h file
and upload the code to the node. Then keep the sensor working for more than one hour and share the output with us.

Code: Select all

#define DEBUG_GASES_PRO		2

Code: Select all

#include <WaspSensorCities_PRO.h>

Gas gas_sensor(SOCKET_B);
bmeCitiesSensor bme(SOCKET_A);

// variables
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()
{
  USB.println(F("Electrochemical gas sensor example"));
  USB.println(F("A BME sensor in socket A is also required"));
}

void loop()
{
  ///////////////////////////////////////////
  // 1. Read Temperature, humidity and pressure sensor (BME)
  ///////////////////////////////////////////
  
  // switch off gas sensor for better performance
  gas_sensor.OFF();
  // switch on BME sensor (temperature, humidity and pressure)
  bme.ON();
  
  // Read enviromental variables
  temperature = bme.getTemperature();
  humidity = bme.getHumidity();
  pressure = bme.getPressure();
 
  // switch off BME sensor (temperature, humidity and pressure)
  bme.OFF();
  // switch on gas sensor again
  gas_sensor.ON();

  ///////////////////////////////////////////
  // 2. Read gas sensor
  ///////////////////////////////////////////

  // Wait heating time
  // some sensors demand at least one minute 
  // of heating time after switching them on
  USB.println(F("Enter deep sleep mode to wait for electrochemical heating time..."));
  PWR.deepSleep("00:00:02:00", RTC_OFFSET, RTC_ALM1_MODE1, ALL_ON);
  USB.ON();
  USB.println(F("wake up!!"));
  
  // Read the electrochemical sensor and compensate with the temperature internally
  concentration = gas_sensor.getConc(temperature);

  // And print the values via USB
  USB.println(F("***************************************"));
  USB.print(F("Gas concentration: "));
  USB.printFloat(concentration, 3);
  USB.println(F(" ppm"));
  USB.print(F("Temperature: "));
  USB.printFloat(temperature, 3);
  USB.println(F(" Celsius degrees"));
  USB.print(F("RH: "));
  USB.printFloat(humidity, 3);
  USB.println(F(" %"));
  USB.print(F("Pressure: "));
  USB.printFloat(pressure, 3);
  USB.println(F(" Pa"));
  USB.println(F("***************************************"));

  ///////////////////////////////////////////
  // 3. Sleep
  ///////////////////////////////////////////

  // Go to deepsleep
  // After 2 minutes, Waspmote wakes up thanks to the RTC Alarm
  USB.println(F("Enter deep sleep mode"));
  PWR.deepSleep("00:00:02:00", RTC_OFFSET, RTC_ALM1_MODE1, ALL_ON);
  USB.ON();
  USB.println(F("wake up!!"));

}
Regards

cdawber
Posts: 6
Joined: Wed Apr 25, 2018 11:27 am
Company: KeyWare ltd

Re: NO2 and O3 sensors reading zero

Post by cdawber » Fri Dec 13, 2019 11:53 am

This is the result for the NO2 sensor - I left it running for an hour and all readings were 0.000:

wake up!!
[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] ******************************************************
[GASES PRO] SOCKET -> B
[GASES PRO] SERIAL NUMBER: 212900606 099
[GASES PRO] AFE VER: 3
[GASES PRO] SENSOR TYPE: NO2-4E
[GASES PRO] SENSITIVITY: -308.810 nA/ppm
[GASES PRO] BASELINE: 45.710 nA
[GASES PRO] O3-NO2 SENSITIVITY: 0.000 nA/ppm
[GASES PRO] AUX BASELINE: 14.500 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

Enter deep sleep mode to wait for electrochemical heating time...
wake up!!
[GASES PRO] SOCKET_5_
[GASES PRO] VOL-WRK: -5.314 mV
[GASES PRO] Iwe: -0.048 uA
[GASES PRO] VOL-AUX: -5.959 mV
[GASES PRO] Iae: -0.054 uA
[GASES PRO] Iwe-Iae: 0.006 uA
[GASES PRO] Sensitivity temperature compensated (ppm): 1.305
[GASES PRO] T-Comp: 0.008 uA
[GASES PRO] Sensitivity: -308.810 nA/ppm
[GASES PRO] Concentration: -0.025 ppm
***************************************
Gas concentration: 0.000 ppm
Temperature: 19.700 Celsius degrees
RH: 55.961 %
Pressure: 98219.890 Pa
***************************************
Enter deep sleep mode


I will try O3 sensor now...

cdawber
Posts: 6
Joined: Wed Apr 25, 2018 11:27 am
Company: KeyWare ltd

Re: NO2 and O3 sensors reading zero

Post by cdawber » Fri Dec 13, 2019 12:48 pm

This is the O3 sensor:

wake up!!
[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] ******************************************************
[GASES PRO] SOCKET -> B
[GASES PRO] SERIAL NUMBER: 214890023 119
[GASES PRO] AFE VER: 3
[GASES PRO] SENSOR TYPE: O3-4E
[GASES PRO] SENSITIVITY: -523.130 nA/ppm
[GASES PRO] BASELINE: 32.470 nA
[GASES PRO] O3-NO2 SENSITIVITY: -524.300 nA/ppm
[GASES PRO] AUX BASELINE: 9.770 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

Enter deep sleep mode to wait for electrochemical heating time...
wake up!!
[GASES PRO] SOCKET_5_
[GASES PRO] VOL-WRK: 6.615 mV
[GASES PRO] Iwe: 0.060 uA
[GASES PRO] VOL-AUX: -0.881 mV
[GASES PRO] Iae: -0.008 uA
[GASES PRO] Iwe-Iae: 0.068 uA
[GASES PRO] Sensitivity temperature compensated (ppm): 1.000
[GASES PRO] T-Comp: 0.068 uA
[GASES PRO] O3-NO2: 0.068 uA
[GASES PRO] Sensitivity: -523.130 nA/ppm
[GASES PRO] Concentration: -0.130 ppm
***************************************
Gas concentration: 0.000 ppm
Temperature: 22.550 Celsius degrees
RH: 48.605 %
Pressure: 98228.890 Pa
***************************************
Enter deep sleep mode


There was a small positive reading on the first attempt of 0.024ppm but everything for the next hour was 0.000.

Are these sensors working correctly? Is it okay to deploy them live?

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

Re: NO2 and O3 sensors reading zero

Post by libelium-dev » Mon Dec 16, 2019 11:22 am

Hi,

According to the debug values, the NO2 and O3 sensors are working properly. Zero values are normal due to the low concentration in the environment and the accuracy of them, +-0.1ppm in ideal conditions. The sensors aren't reacting to the gases since the concentration is very low.

If you want to check how the sensors show values when there is enough gas concentration, you can put them close to a diesel car pipe.

Regards

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest