PDFPrintE-mail


Analog Smoke/LPG/CO Gas Sensor(MQ2)
View Full-Size Image


Analog Smoke/LPG/CO Gas Sensor(MQ2)

( E )
SG$5.20


The Analog Smoke/LPG/CO Gas Sensor(MQ2) module utilizes an MQ-2 as the sensitive component and has a protection resistor and an adjustable resistor on board. The MQ-2 gas sensor is sensitive to LPG, i-butane, propane, methane, alcohol, Hydrogen and smoke. It could be used in gas leakage detecting equipments in family and industry. The resistance of the sensitive component changes as the concentration of the target gas changes.

Application Idea

  • Domestic gas leakage detector
  • Industrial gas detector
  • Portable gas detector

Features

  • Power supply needs: 5V
  • Fast response and High sensitivity
  • Wide detecting scope
  • Simple drive circuit,Stable and long life

 

 

 

 

Hardware Installation

Arduino UNOGas Sensor
5V VCC
GND GND
Analog A0 A0

Demo code

1.Put the sensor in a clear air, copy the demo code to your sketch, then upload to Arduino UNO board.

void setup() {
  Serial.begin(9600);
}
 
void loop() {
  float sensor_volt; 
  float RS_air;                 //  Get the value of RS via in a clear air
  float R0;                     // Get the value of R0 via in H2
  float sensorValue;
 
/*--- Get a average data by testing 100 times ---*/   
    for(int x = 0 ; x < 100 ; x++)
  {
    sensorValue = sensorValue + analogRead(A0);
  }
  sensorValue = sensorValue/100.0;
/*-----------------------------------------------*/
 
  sensor_volt = sensorValue/1024*5.0;
  RS_air = (5.0-sensor_volt)/sensor_volt; // omit *RL
  R0 = RS_air/10.0;                       // The ratio of RS/R0 is 10 in a clear air
 
  Serial.print("sensor_volt = ");
  Serial.print(sensor_volt);
  Serial.println("V");
 
  Serial.print("R0 = ");
  Serial.println(R0);
  delay(1000);
}

2.Open the monitor of Arduino IDE, you can see some data are printed, write down the value of R0 and you need to use it in the following program. During this step, you want to spent time to test the value of R0.

3.Put the sensor in one gas where the environment you want to test in. However, don't forget to replace the R0 below with value of R0 tested above

void setup() {
  Serial.begin(9600);
}
 
void loop() {
 
  float sensor_volt;
  float RS_gas; // Get value of RS in a GAS
  float ratio; // Get ratio RS_GAS/RS_air
  int sensorValue = analogRead(A0);
  sensor_volt=(float)sensorValue/1024*5.0;
  RS_gas = (5.0-sensor_volt)/sensor_volt; // omit *RL
 
  /*-Replace the name "R0" with the value of R0 in the demo of First Test -*/
  ratio = RS_gas/R0;  // ratio = RS/R0 
  /*-----------------------------------------------------------------------*/
  Serial.print("sensor_volt = ");
  Serial.println(sensor_volt);
  Serial.print("RS_ratio = ");
  Serial.println(RS_gas);
  Serial.print("Rs/R0 = ");
  Serial.println(ratio);
  Serial.print("nn");
  delay(1000);
}

Now, we can get the concentration of gas.

 

 

 


Availability

This product is currently not available.
Usually ships in:

not_available.gif


Customer Reviews:

There are yet no reviews for this product.
Please log in to write a review.




Products Categories

We Accept


 


Shopping Cart

Your Cart is currently empty.

NOTE..


-> NO GST -> NO GST -> NO GST

Product Search



Advanced Search

Currency Selector




HTTPS Secure