Linkit One and MQ-9 gas sensor example

MQ-9 gas sensor has high sensitity to Carbon Monoxide, Methane and LPG. The sensor could be used to detect different gases contains CO and combustible gases, it is with low cost and suitable for different application.

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

Linkit one 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