How to use the MQ9 Gas Sensor for Arduino

How to use the MQ9 Gas Sensor for Arduino

MQ9 Gas Sensor for Arduino

 

INTRODUCTION

The Gas Sensor MQ9 is a low cost semiconductor sensor which can detect the presence of gases such as carbon monoxide at concentrations from 0.05 mg/L to 10 mg/L. The sensitive material used for this sensor is SnO2 (Tin Oxide) which conductivity is lower in clean air.

APPLICATIONS

The gas sensor is suitable can be used as a safety device detecting gas leaks in low concentrations indoors. This sensor works just like the MQ3 Alcohol Sensor.

WIRING DIAGRAM

VCC – 5V

AOUT – Analog Pin A0

DOUT – Digital Pin 5

GND – GND

MQ9 Gas Sensor Connections

 

CODE

 int analogsensor = A0;

void setup() {
  // put your setup code here, to run once:

pinMode(analogsensor, OUTPUT);
Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
int inputdigital = digitalRead(digitalsensor);
int inputanalog = analogRead(analogsensor);

Serial.println(inputanalog);

delay(100);
}

END RESULT

Open serial monitor and place some lighter fluid in front of the sensor. The numbers displayed on the serial monitor should increase with the presence of the lighter fluid.

ADDITIONAL RESOURCES

http://www.learningaboutelectronics.com/Articles/MQ-3-alcohol-sensor-circuit-with-arduino.php

https://www.elprocus.com/mq-135-alcohol-sensor-circuit-and-working/