Grove - Multichannel Gas Sensor not detect any gas how solve the problem

Dear Friends , i am using Grow - Multichannel Gas Sensor . i tested it with lpg ,smoke and smoke lighter but it nothing show any concentration of gases .please guide about that sensor how to test it .

You have to connect it to Arduino properly and write some code for it first. The code you write must be written correctly.

I am using this code , the code is correct but it not detect gases please guide me

#include <Wire.h>
#include "MutichannelGasSensor.h"

void setup()
{
    Serial.begin(9600);  // start serial for output
    Serial.println("power on!");

    mutichannelGasSensor.begin(0x04);//the default I2C address of the slave is 0x04
    //mutichannelGasSensor.changeI2cAddr(0x10);
    //mutichannelGasSensor.doCalibrate();

    mutichannelGasSensor.powerOn();
}

void loop()
{
    float c;

    c = mutichannelGasSensor.measure_NH3();
    Serial.print("The concentration of NH3 is ");
    if(c>=0) Serial.print(c);
    else Serial.print("invalid");
    Serial.println(" ppm");

    c = mutichannelGasSensor.measure_CO();
    Serial.print("The concentration of CO is ");
    if(c>=0) Serial.print(c);
    else Serial.print("invalid");
    Serial.println(" ppm");

    c = mutichannelGasSensor.measure_NO2();
    Serial.print("The concentration of NO2 is ");
    if(c>=0) Serial.print(c);
    else Serial.print("invalid");
    Serial.println(" ppm");

    c = mutichannelGasSensor.measure_C3H8();
    Serial.print("The concentration of C3H8 is ");
    if(c>=0) Serial.print(c);
    else Serial.print("invalid");
    Serial.println(" ppm");

    c = mutichannelGasSensor.measure_C4H10();
    Serial.print("The concentration of C4H10 is ");
    if(c>=0) Serial.print(c);
    else Serial.print("invalid");
    Serial.println(" ppm");

    c = mutichannelGasSensor.measure_CH4();
    Serial.print("The concentration of CH4 is ");
    if(c>=0) Serial.print(c);
    else Serial.print("invalid");
    Serial.println(" ppm");

    c = mutichannelGasSensor.measure_H2();
    Serial.print("The concentration of H2 is ");
    if(c>=0) Serial.print(c);
    else Serial.print("invalid");
    Serial.println(" ppm");

    c = mutichannelGasSensor.measure_C2H5OH();
    Serial.print("The concentration of C2H5OH is ");
    if(c>=0) Serial.print(c);
    else Serial.print("invalid");
    Serial.println(" ppm");

    delay(1000);
    Serial.println("...");
}

You have to connect the sensor to the Arduino properly as well.

What does that code print out when you run it?

i am connected it properly. but i am not using any base shield

That's not very helpful Gul-Khan. Why don't you show a picture or diagram of how it's hooked up. These devices are designed to work only when the software and hardware is set correctly.

Dear Sir, I am writing to you to guide us on how to test Grove - Multichannel Gas Sensor with unhealthful gases becoz i tested it with lpg ,smoke and somke lighter gases but it couldn't show any concentration of gases . i uploaded the Multichannel Gas Sensor library code to arduino and and Scl pin of gas sensor connected to scl pin of arduino and sdl connected to sdl pins of arduino.I am not using any base shield for arduino , i connected it with jumper wire . Kindly Guide how to test it . Your prompt response would be highly appreciated.

A/ you must connect the shield properly to the power, ground and I2C pins on an arduino. B/ you need a driver - see https://github.com/Seeed-Studio/Mutichannel_Gas_Sensor

put that in your libraries directory.

Now use that to read the sensor and send the data to the serial monitor in the arduino IDE with serialPrint as a test.

how far have you got?

Allan

You could try loading an I2C scanner program and see if it detects your gas sensor at the address 0x04 (which, from your code, appears to be the default address): http://playground.arduino.cc/Main/I2cScanner

What Arduino are you connecting the sensor to ?

Gul-Khan123456: Dear Sir, I am writing to you to guide us on how to test Grove - Multichannel Gas Sensor with unhealthful gases becoz i tested it with lpg ,smoke and somke lighter gases but it couldn't show any concentration of gases . i uploaded the Multichannel Gas Sensor library code to arduino and and Scl pin of gas sensor connected to scl pin of arduino and sdl connected to sdl pins of arduino.I am not using any base shield for arduino , i connected it with jumper wire . Kindly Guide how to test it . Your prompt response would be highly appreciated.

And the power wires ?

Hi, Have you got the 4k7 pullup resistors on the SDA and SCL lines?

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Can you please post a picture of your project?

Thanks.. Tom... :)

thanks for your response i am not using pull up resistor . i connected it directly the SDL pin of Gas sensor to SDL pin of arduino and the ScL pin of Gas sensor to SCL pin of arduino. please guide me if pul up resistor need for connection , how to connect pull up resistor to arduino and gas sensors pins .What is the value of resistor

here is my connection arduino meaga 2560 to Grove Multiple Chanel gas sensor

co.jpg

That looks ok - now what about the driver?

regards

Allan.

Gul-Khan123456: here is my connection arduino meaga 2560 to Grove Multiple Chanel gas sensor

You need 4.7Kohm resistor between scl and sda lines to 5V to pull those lines high

And here is the library and examples you should use: https://github.com/Seeed-Studio/Mutichannel_Gas_Sensor

but Arduino meaga is builtin Pull up resistors on sda and scl pins

Yes, for some applications you need to remove the resistor pack so that external 3.3V pullups can be used without interference, and turn off the pullups in the Wire,h library.

CrossRoads thanks for your response

i think i dont need pull up resistor beacuse multilechannel gas sensor have already pull resistor of 10 k on sda and sdl pins

You still appear to be struggling with this. Have you tried the first suggestion in post #8 ? That is simple to do and will show if it is a basic I2C connectivity problem ?

i tried the 12c scaner it work perfect and detect 12c communication