

The MQ-9 gas sensor, manufactured by Flying Fish (Part ID: MQ-9), is a versatile and reliable sensor designed to detect various gases, including methane (CH₄), propane (C₃H₈), carbon monoxide (CO), and other combustible gases. It operates on the principle of resistive change, where the sensor's resistance varies in the presence of target gases. This makes it an ideal choice for applications in safety systems, environmental monitoring, and industrial gas detection.








The MQ-9 sensor is designed for ease of use and integration into various systems. Below are its key technical details:
| Parameter | Value |
|---|---|
| Operating Voltage | 5V DC |
| Load Resistance (RL) | Adjustable (typically 10 kΩ) |
| Heater Voltage (VH) | 5V ± 0.1V |
| Heating Current | ≤ 180 mA |
| Sensing Resistance (RS) | 1 kΩ to 10 kΩ (in clean air) |
| Detection Range | 10 ppm to 10,000 ppm |
| Preheat Time | ≥ 24 hours |
| Operating Temperature | -20°C to 50°C |
| Humidity Range | 5% to 95% RH (non-condensing) |
| Dimensions | 32mm x 20mm x 22mm |
The MQ-9 sensor module typically comes with a 4-pin interface. Below is the pinout description:
| Pin Name | Description |
|---|---|
| VCC | Power supply pin (5V DC) |
| GND | Ground pin |
| AOUT | Analog output pin (provides gas concentration) |
| DOUT | Digital output pin (threshold-based signal) |
The MQ-9 sensor is straightforward to use in a circuit. Follow the steps below to integrate it into your project:
VCC pin to a 5V DC power source and the GND pin to ground.AOUT pin to an analog input pin of your microcontroller (e.g., Arduino) to measure gas concentration.DOUT pin to a digital input pin of your microcontroller. The digital output is triggered when the gas concentration exceeds a preset threshold, which can be adjusted using the onboard potentiometer.Below is an example of how to interface the MQ-9 sensor with an Arduino UNO to read analog values:
// MQ-9 Gas Sensor Example Code
// This code reads the analog output of the MQ-9 sensor and prints the value
// to the Serial Monitor. Ensure the sensor is preheated for accurate readings.
const int analogPin = A0; // Connect AOUT pin of MQ-9 to Arduino A0
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
Serial.println("MQ-9 Gas Sensor Reading...");
}
void loop() {
int sensorValue = analogRead(analogPin); // Read analog value from MQ-9
float voltage = sensorValue * (5.0 / 1023.0); // Convert to voltage (0-5V)
// Print the raw sensor value and voltage to the Serial Monitor
Serial.print("Sensor Value: ");
Serial.print(sensorValue);
Serial.print(" | Voltage: ");
Serial.print(voltage);
Serial.println(" V");
delay(1000); // Wait for 1 second before the next reading
}
No Output or Incorrect Readings
Fluctuating Readings
Digital Output Not Triggering
Sensor Not Responding to Gases
Q1: Can the MQ-9 detect multiple gases simultaneously?
A1: The MQ-9 can detect multiple gases, but it does not differentiate between them. It provides a combined response based on the presence of target gases.
Q2: How long does the MQ-9 sensor last?
A2: The sensor typically lasts for 2-3 years under normal operating conditions. Prolonged exposure to high concentrations of gases or harsh environments may reduce its lifespan.
Q3: Can I use the MQ-9 with a 3.3V microcontroller?
A3: The MQ-9 requires a 5V power supply for the heater. However, you can use a voltage divider or level shifter to interface the analog output with a 3.3V microcontroller.
Q4: Is the sensor waterproof?
A4: No, the MQ-9 is not waterproof. Avoid exposing it to water or excessive humidity to prevent damage.
By following this documentation, you can effectively integrate and use the MQ-9 gas sensor in your projects for reliable gas detection and monitoring.