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 sensitivity of the sensor can be adjusted by using the potentiometer.
FEATURES
* Good sensitivity to CO/Combustible gas
* High sensitivity to Methane, Propane and CO
* Long life and low cost
* Simple drive circuit
Connection
here are the connections for my sensor
Wemos | Gas Sensor |
---|---|
3v3 | VCC |
GND | GND |
NC | DOUT |
Analog A0 | AOUT |
Code
[codesyntax lang=”cpp”]
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); }
[/codesyntax]
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
MQ-9 Combustible Gas Detector Carbon Monoxide CO Sensor Module for Arduino