Grove - Multichannel Gas Sensor V2 gives 0 ppm for each value with the current code

Hell everyone,

Currently, I am starting in the fancy world of Arduino and sensors. After buying the Grove - Multichannel Gas Sensor V2, together with the Grove Base Shield V2 and the Arduino Rev V3, I did some research on connecting the sensor. It says to preheat the sensor to get the best values.

The Grove Base Shield V2 is placed on top of the Arduino and the gas sensor is connected to the Base shield using the delivered I2C cables. All leds were turned on after connecting the system via USB to my PC, so it seemed to me that the first phase was a success. Then, without disconnecting from the PC, I did the preheating by leaving the arduino connected (via USB) to my PC for 24 hours. After this, I downloaded the zip library via GitHub - Seeed-Studio/Seeed_Arduino_MultiGas: This library could be used to detect four different gas concentrations and display them on the terminal. (archive/master.zip) and created some relatively simple code to print all the values of the gas sensors:

#include <Multichannel_Gas_GMXXX.h>
#include <Wire.h>
GAS_GMXXX<TwoWire> gas;
 
void setup() {
  Serial.begin(9600);
  gas.begin(Wire, 0x08); // use the hardware I2C
}
 
void loop() {
  // put your main code here, to run repeatedly:

  // GM102B NO2 sensor
  int valNO2 = gas.getGM102B();
  if (valNO2 > 999) valNO2 = 999;
  // GM302B C2H5CH sensor
  int valC2H5CH = gas.getGM302B();
  if (valC2H5CH > 999) valC2H5CH = 999;
  // GM502B VOC sensor
  int valVOC = gas.getGM502B();
  if (valVOC > 999) valVOC = 999;
  // GM702B CO sensor
  int valCO = gas.getGM702B();
  if (valCO > 999) valCO = 999;

  // Print the readings to the console
  Serial.print("NO2: ");
  Serial.print(valNO2);
  Serial.println("ppm");

  Serial.print("C2H5CH: ");
  Serial.print(valC2H5CH);
  Serial.println("ppm");

  Serial.print("VOC: ");
  Serial.print(valVOC);
  Serial.println("ppm");

  Serial.print("CO: ");
  Serial.print(valCO);
  Serial.println("ppm");


  delay(100);
 
}

Running this code, the serial monitor shows only 0 ppm values for each specific sensor, so it seems that the sensor is not picking up any gases.
Another thing is that disconnecting the sensor, the program still prints 0 ppm, so it could be that the connection between Arduino and the gas sensor is working incorrectly somehow. However, the blue led of the gas sensor is turned on when connected, so it must receive power.

Does anyone know what the problem could be in my case and know of any possible solutions?

Looking forwards to your reply, thanks!

1 Like

Do you get proper values when you run example code from the Multichannel_Gas_GMXXX library?

Please post a schematic of the wiring. Written descriptions are always more ambiguous than a drawing. Hand drawn, photographed and posted is fine. Include all pin names/numbers, components, their part numbers and/or values and power supplies.

Post technical data for the relevant components, please.

The preheating "burn-in" requires the sensor heater to be powered for 24 h (72 h if the sensor has not been used for six months). Are you quite sure that this is the case, seeing that you downloaded the library after the burn-in step?

Thanks a lot for your answer. Sadly, running other code does not work as well. I have just tried this code: Seeed_Arduino_MultiGas/demo_background_gas_name.ino at master · Seeed-Studio/Seeed_Arduino_MultiGas · GitHub, and it also prints 0.00V for each sensor.

I've taken two images of the system:

The following products are used for this system:

The USB is connected via my PC, so the output is 5V (?).

Does this give enough information, or would you like more information?

And in two posts, since there can only be 2 links per post:

and an image showing the Base Shield on top of the Arduino / Sintron:

I did power it for 24h, although without running the library. Is this a prerequisite? If so, where can I find this information, such that I will avoid making these kind of mistakes in the future? Thanks a lot for your answer.

@jremington @groundFungus Do you have an idea?

Start over. Download the library, attach the sensor and run the sample code.

Collect measurements for 24 hours and post a graph of the data. Hopefully, the sensor output will stabilize after some period of time.

the serial monitor shows only 0 ppm values for each specific sensor

If that happens, there is a wiring problem, or you have a defective sensor.

Good morning,

In the photo, the module is connected to D5!
It must be connected below to one of the four I2C connectors.

Thank you very much for your reply. It was a stupid mistake, and now the values are correctly coming in. In the next step, I have also tried to measure the values for a garlic using the following code:


#include <Multichannel_Gas_GMXXX.h>

#ifdef SOFTWAREWIRE
    #include <SoftwareWire.h>
    SoftwareWire myWire(3, 2);
    GAS_GMXXX<SoftwareWire> gas;
#else
    #include <Wire.h>
    GAS_GMXXX<TwoWire> gas;
#endif

static uint8_t recv_cmd[8] = {};

void setup() {
    Serial.begin(9600);
    gas.begin(Wire, 0x08); 
}

void loop() {
    uint8_t len = 0;
    uint8_t addr = 0;
    uint8_t i;
    uint32_t val = 0;
    float val_vol = 0.0;

    char gm102b_sensor[] = "GM102B\n";
    char gm302b_sensor[] = "GM302B\n";
    char gm502b_sensor[] = "GM502B\n";
    char gm702b_sensor[] = "GM702B\n";

    val = gas.getGM102B(); 
    val_vol = gas.calcVol(val);
    // Serial.print("GM102B: "); Serial.print(val); Serial.print("  =  ");
    // Serial.print(val_vol); Serial.println("V");
    Serial.write(gm102b_sensor, sizeof(gm102b_sensor));
    Serial.write('u');
    Serial.write((uint8_t*)&val, sizeof(val));
    Serial.write('f');
    Serial.write((uint8_t*)&val_vol, sizeof(val_vol));

    val = gas.getGM302B(); 
    val_vol = gas.calcVol(val);
    // Serial.print("GM302B: "); Serial.print(val); Serial.print("  =  ");
    // Serial.print(val_vol); Serial.println("V");
    Serial.write(gm302b_sensor, sizeof(gm302b_sensor));
    Serial.write('u');
    Serial.write((uint8_t*)&val, sizeof(val));
    Serial.write('f');
    Serial.write((uint8_t*)&val_vol, sizeof(val_vol));

    val = gas.getGM502B();
    val_vol = gas.calcVol(val);
    // Serial.print("GM502B: "); Serial.print(val); Serial.print("  =  ");
    // Serial.print(val_vol); Serial.println("V");
    Serial.write(gm502b_sensor, sizeof(gm502b_sensor));
    Serial.write('u');
    Serial.write((uint8_t*)&val, sizeof(val));
    Serial.write('f');
    Serial.write((uint8_t*)&val_vol, sizeof(val_vol));

    val = gas.getGM702B();
    val_vol = gas.calcVol(val);
    // Serial.print("GM702B: "); Serial.print(val); Serial.print("  =  ");
    // Serial.print(val_vol); Serial.println("V");
    Serial.write(gm702b_sensor, sizeof(gm702b_sensor));
    Serial.write('u');
    Serial.write((uint8_t*)&val, sizeof(val));
    Serial.write('f');
    Serial.write((uint8_t*)&val_vol, sizeof(val_vol));

    delay(10000);
}

However, I get the following values over time, which seem to be very inconsistent:
garlic2_measurements
The trend can partly be explained by sensor drift. However, I cannot explain the sinusoidal downward curves for GM302B and GM702B. Do you perhaps have an idea how this could have happened? And how to mitigate these issues in the future? Thanks!

The garlic was packaged as follows:

Good morning,

The library is not optimized.
The sensors indicate values ​​much higher than reality.
I don't have an answer to your question.
See here for more information:

[Grove Multichannel gas sensor v2 calibration - #7 by oksaw - Grove - Seeed Forum]

Sincerelynt

Most likely, you forgot to burn in (preheat) the sensor for 24-72 hours, as required.

This tutorial on related sensors is very instructive.

Thank you for your reply and the extra information :grinning:

1 Like

Thanks a lot, I will check the tutorial and probably need to buy the same sensor and do proper pre-heating.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.