Wemos and MQ-9 gas sensor

The MQ-9 Analog Gas Sensor has high sensitity to Carbon Monoxide, Methane and LPG. The sensor can be used to detect different gases containing CO and combustible gases, it is low cost and suitable for a variety of applications.

The core sensing material of MQ-9 gas sensor is SnO2, which has a lower conductivity in clean air. It makes detection by cycling high and low temperature, and detects CO when low temperature (heated by 1.5V).
mq-9
The sensor’s conductivity is higher along with the gas concentration rising. When temperature rises (heated by 5.0V), it detects Methane, Propane, combustible gas,etc  and cleans the other gases adsorbed under low temperature.

 

The sensitivity of the sensor can be adjusted by using the potentiometer.

Specification

Item Parameter Min Typical Max Unit
VCC Working Voltage 4.9 5 5.1 V
PH Heating consumption 0.5 340 mW
RL Load resistance adjustable
RH Heater resistance 33Ω±5% Ω
Rs Sensing Resistance 2 20000 Ω
CO/CH4/LPG Scope Detecting Concentration 200 1000/10000/10000 ppm

 

FEATURES

* Good sensitivity to CO/Combustible gas
* High sensitivity to Methane, Propane and CO
* Long life and low cost
* Simple drive circuit

Parts List

I recommend you try and get a kit of all the MQ sensors, you can buy these individually but you can also get a kit for about $9

Here are the parts I used

Name Links
Wemos Mini
MQ sensors
Connecting cables

Connection

here are the connections for my sensor

Wemos Gas Sensor
3v3 VCC
GND GND
NC DOUT
Analog A0 AOUT

 

Code

 

void setup() 
{
  Serial.begin(9600);
}
 
void loop() 
{
  float sensorVoltage; 
  float sensorValue;
 
  sensorValue = analogRead(A0);
  sensorVoltage = sensorValue/1024*3.3;
 
  Serial.print("sensor voltage = ");
  Serial.print(sensorVoltage);
  Serial.println(" V");
  delay(1000);
}

 

 

Results

Again look at the serial monitor, you need to let the sensor stabilise. Remember it consists of a heating element, so you effectively have to let the sensor ‘heat up’.

sensor voltage = 0.40 V
sensor voltage = 0.40 V
sensor voltage = 0.40 V
sensor voltage = 0.42 V
sensor voltage = 0.41 V
sensor voltage = 0.41 V
sensor voltage = 0.41 V
sensor voltage = 0.41 V
sensor voltage = 0.40 V

 

Links

Mq-9 datasheet