This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MQ-7 Gas sensor

Hi all! I would like to ask about this gas sensor. It has a quite difficult datasheet, difficult to understant, and there is a lot of confusing information in Internet. Like:

http://forum.sparkfun.com/viewtopic.php?f=14&t=18447

 

in which they use it for hydrogen measurement. I woul like to use it for CO sensing. After reading the datasheet and the webpage above, I decided not to get too complex and use a driver to conmute the volatge of the sensor. So I have 5V during 60 sec and 0V during 90sec. At the end of the 0V period I make my measurement. Well,I have done this, and I do not have proper results at all, my ADC readings are around 20 , that means I get a Rs of 2000K, which is impossible During the 5V period I get readings from 1800 to 2200, which I think is too large difference, si it could not be that I have to measure here, or yes?. Plus, how to convert this to COppm? I am really confused with te datasehhet, so, if anyone could help...my RL is 10k

the code I've done is the following:

 ADC12IE = 0x01;                           // Enable ADC12IFG.3
      halAdcStartRead();
      sprintf(str,"GasRaw: %.4f",SavedADC12MEM0);
     HalUARTWrite(0,str,20);
      memset(str,0,40);
      HalUARTWrite(0,salto,2);
     
            
      if (cont_GasV==60){           //PUT GAS INPUT TO 1.4V DURING 90sec
        Gas_val=0.0;
      P4OUT&=~BIT6;             //SETTING OUT AS 1 MAKES TRANSISTOR GIVE 0V        
    //  P7OUT&=~0x08;
     }
      else if (cont_GasV>=140&&cont_GasV<=149){
      ADC12IE = 0x01;                           // Enable ADC12IFG.3
      halAdcStartRead();
      Gas_val=SavedADC12MEM0+Gas_val;        // Store the sampled data
      }
     else if (cont_GasV==150){    //PUT GAS INPUT TO 5.0V DURING 60sec
       cont_GasV=0;
        P4OUT|=BIT6;                  //SETTING OUT AS 0 MAKES TRANSISTOR GIVE +5V
        Gas_val=Gas_val/10.0;
         Gas_val=(5.0*Gas_val)/4095.0;    //COMPUTE VRL
        Gas_val=10.0*((5.0-Gas_val)/Gas_val);               //COMPUTE RS
        char gas[20];
        sprintf(gas,"GAS: %.4f ",Gas_val);
        HalLcdWriteString(gas,8);
        char gasADC[20];
       sprintf(gasADC,"GASadc: %.4f ",SavedADC12MEM0);
       HalLcdWriteString(gasADC,7);

**Attention** This is a public forum