This is an easy to use sensor module you can use to sense the amount of contaminant in surrounding air, giving the reading of air quality index. This is a famous sensor module commonly used with Arduino to build smoke detectors, IoT environment monitoring and smart agricultural projects.
Note : This sensor works with both digital and analog mode. You can connect analog output (AO) to get the air quality index reading (conversion required), or you can connect the digital output (DO) to sense the threshold of air quality. Adjust the potentiometer (a.k.a. trimmer) to set the digital output (DO) sensitivity.
This gas sensor heating element is alternating between 1.4V and 5V.
Sensitive to Gas
- Carbon Monoxide (CO)
- Flammable gases
Common Features
- Operating voltage : 5V
- Output type : DIGITAL and ANALOG
- Preheat duration : 20s
- Adjustable sensitivity via potentiometer
- Comes with LED indicators for POWER and OUTPUT
- Fixed screw holes for easy installation
-
Model : FC-22
Pinout and Wiring:

| Label |
Meaning |
Connection |
| VCC |
Power source |
Connect to 5V of system |
| GND |
Ground |
Connect to GND of system |
| DO |
Digital Output |
Connect to digital IO pin |
| AO |
Analog Output |
Connect to analog input pin |
Code
Hardware Components
You will require the following hardware for Interfacing MQ-9 Gas Sensor with Arduino:
| S.no |
Component |
Value |
Qty |
| 1. |
Arduino |
UNO |
1 |
| 2. |
Gas Sensor |
MQ9 |
1 |
| 3. |
Red LED |
– |
1 |
| 4. |
Resistor |
1KΩ |
1 |
| 5. |
Breadboard |
– |
1 |
| 6. |
Jumper Wires |
– |
1 |
Schematic
Make connections according to the circuit diagram given below.
Wiring / Connections
| Arduino |
MQ9 Gas Sensor |
LED |
| 5V |
VCC |
|
| GND |
GND |
-ve with Resistor |
| A0 |
A0 |
|
| D8 |
D0 |
|
| D2 |
|
Positive |