

The MQ-7 Gas Sensor, manufactured by Flying Fish (Part ID: MQ-7), is a highly sensitive device designed to detect carbon monoxide (CO) concentrations in the air. It operates on the principle of resistive change in the presence of gas, providing an analog output proportional to the CO concentration. This sensor is widely used in air quality monitoring systems, safety devices, and industrial applications to ensure safe environments by detecting harmful CO levels.








| Parameter | Value |
|---|---|
| Operating Voltage | 5V DC |
| Load Resistance (RL) | Adjustable (typically 10 kΩ) |
| Heating Voltage (VH) | 5V DC (high) / 1.4V DC (low) |
| Heating Current | < 180 mA (high) / < 35 mA (low) |
| Detection Range | 20 ppm to 2000 ppm (CO) |
| Preheat Time | ≥ 24 hours |
| Analog Output Voltage | 0V to 5V (proportional to CO) |
| Sensitivity | Detects CO with high accuracy |
| Operating Temperature | -20°C to 50°C |
| Humidity Range | 33% to 85% RH |
| Dimensions | 32mm x 20mm x 22mm |
The MQ-7 sensor module typically has four pins. Below is the pinout description:
| Pin Name | Description |
|---|---|
| VCC | Power supply input (5V DC) |
| GND | Ground connection |
| AOUT | Analog output voltage (proportional to CO level) |
| DOUT | Digital output (threshold-based signal) |
VCC pin to a 5V DC power source and the GND pin to ground.AOUT pin to an analog input pin of a microcontroller (e.g., Arduino UNO) to read the CO concentration as a voltage.DOUT pin to a digital input pin of a microcontroller. The digital output is HIGH or LOW based on the preset threshold.Below is an example of how to interface the MQ-7 sensor with an Arduino UNO to read analog values:
// MQ-7 Gas Sensor Example Code for Arduino UNO
// Reads analog output from the sensor and prints CO concentration to Serial Monitor
const int analogPin = A0; // Connect AOUT pin of MQ-7 to Arduino A0
int sensorValue = 0; // Variable to store analog reading
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
pinMode(analogPin, INPUT); // Set A0 as input
}
void loop() {
sensorValue = analogRead(analogPin); // Read analog value from MQ-7
float voltage = sensorValue * (5.0 / 1023.0); // Convert to voltage (0-5V)
// Print the sensor value and voltage to 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 next reading
}
sensorValue) corresponds to the CO concentration. You can map this value to ppm using a calibration curve.No Output or Incorrect Readings:
Fluctuating or Unstable Readings:
Digital Output Always HIGH or LOW:
Sensor Not Responding:
Q1: Can the MQ-7 detect gases other than CO?
A1: The MQ-7 is specifically designed for carbon monoxide detection. While it may respond to other gases, its sensitivity and accuracy are optimized for CO.
Q2: How do I calibrate the MQ-7 sensor?
A2: Place the sensor in an environment with a known CO concentration and record the analog output. Use this data to create a calibration curve for mapping voltage to ppm.
Q3: Can I use the MQ-7 without the heating cycle?
A3: No, the heating cycle is essential for accurate CO detection. The sensor alternates between high and low heating phases to stabilize its readings.
Q4: What is the lifespan of the MQ-7 sensor?
A4: The typical lifespan of the MQ-7 sensor is around 2-3 years under normal operating conditions.