

The MQ-9 Gas Sensor, manufactured by ZWET (Part ID: MQ-9), is a versatile gas sensor designed to detect a variety of gases, including carbon monoxide (CO), methane (CH₄), and liquefied petroleum gas (LPG). It operates on the principle of resistive change in the presence of target gases, providing an analog output proportional to the gas concentration. This sensor is widely used in air quality monitoring, industrial safety systems, and home safety devices.








| Parameter | Value |
|---|---|
| Operating Voltage | 5V DC |
| Load Resistance (RL) | Adjustable (typically 10 kΩ) |
| Heater Voltage (VH) | 5V ± 0.1V |
| Heater Power Consumption | ≤ 350 mW |
| Detection Range | 10 ppm to 1000 ppm (CO) |
| Preheat Time | ≥ 24 hours |
| Operating Temperature | -20°C to 50°C |
| Humidity Range | 33% to 85% RH |
| Output Signal | Analog voltage |
The MQ-9 sensor typically comes with a 4-pin or 6-pin configuration. Below is the pinout description:
| Pin Number | Label | Description |
|---|---|---|
| 1 | VCC | Power supply (5V DC) |
| 2 | GND | Ground |
| 3 | AOUT | Analog output signal |
| 4 | DOUT | Digital output signal (threshold) |
| Pin Number | Label | Description |
|---|---|---|
| 1 | H1 | Heater pin 1 |
| 2 | AOUT | Analog output signal |
| 3 | GND | Ground |
| 4 | H2 | Heater pin 2 |
| 5 | DOUT | Digital output signal (threshold) |
| 6 | VCC | Power supply (5V DC) |
Below is an example of how to connect and read data from the MQ-9 sensor using an Arduino UNO:
| MQ-9 Pin | Arduino UNO Pin |
|---|---|
| VCC | 5V |
| GND | GND |
| AOUT | A0 |
| DOUT | Digital Pin 2 |
// MQ-9 Gas Sensor Example Code
// Reads analog data from the sensor and prints it to the Serial Monitor
const int analogPin = A0; // Analog pin connected to AOUT
const int digitalPin = 2; // Digital pin connected to DOUT
void setup() {
Serial.begin(9600); // Initialize serial communication
pinMode(digitalPin, INPUT); // Set DOUT as input
}
void loop() {
int analogValue = analogRead(analogPin); // Read analog value from AOUT
int digitalValue = digitalRead(digitalPin); // Read digital value from DOUT
// Print the sensor readings to the Serial Monitor
Serial.print("Analog Value: ");
Serial.print(analogValue);
Serial.print(" | Digital Value: ");
Serial.println(digitalValue);
delay(1000); // Wait for 1 second before the next reading
}
| Issue | Possible Cause | Solution |
|---|---|---|
| No output signal | Incorrect wiring | Verify all connections and pinouts. |
| Unstable readings | Insufficient preheat time | Preheat the sensor for 24 hours. |
| False positives or negatives | Environmental interference | Ensure proper ventilation and avoid |
| placing near strong air currents. | ||
| Low sensitivity to target gas | Incorrect load resistor value (RL) | Adjust RL to optimize sensitivity. |
Can the MQ-9 detect multiple gases simultaneously?
How do I calibrate the MQ-9 sensor?
What is the lifespan of the MQ-9 sensor?
Can I use the MQ-9 sensor outdoors?
By following this documentation, users can effectively integrate the MQ-9 gas sensor into their projects for reliable gas detection and monitoring.