The MQ-7 CO Carbon Monoxide Coal Gas Sensor is a low-cost, highly sensitive semiconductor gas detection module designed for monitoring carbon monoxide (CO) and coal gas in domestic, industrial, and portable gas detection applications. Built around the MQ-7 sensor with a tin dioxide (SnO₂) sensing layer, this module offers high sensitivity to CO while using a unique high-low temperature cycle to maintain reliable long-term performance. It is an ideal solution for household CO alarms, industrial gas leak detectors, and portable safety instruments.
At the heart of the module is the MQ-7 sensor element, whose conductivity increases as the concentration of CO rises. Unlike simple gas sensors, the MQ-7 employs a cycling heater method: it heats to 5.0V for 60 seconds to clean the sensing element, then drops to 1.5V for 90 seconds to detect CO. This high-low temperature cycle is critical for accurate and stable CO measurement. The module provides two independent outputs: an analog output (AO) that varies continuously with gas concentration, and a digital output (DO) that switches when the concentration exceeds a user-adjustable threshold set by the onboard potentiometer.
The module operates from 5V DC with a typical current consumption of approximately 150mA. It is compatible with Arduino, ESP32, and other 5V microcontrollers; Raspberry Pi users require an external ADC. The board features a compact 32 × 20mm form factor and an onboard LED indicator for power and digital output status.
Important Note: The MQ-7 requires a significant preheat time for stable operation. The sensor should be powered on for not less than 48 hours in clean air before initial calibration. After each power-up, allow adequate time for the heater to stabilize. Critical: Most standard MQ-7 breakout boards do not include the heater cycling circuit required for proper operation. You must either implement the 5V/1.5V heater cycle manually (using a PWM pin or external circuit) or modify the board. Without proper heater cycling, readings will be inaccurate. The sensor is not a calibrated industrial-grade detector and should not be used as a sole life-safety device. The sensor surface becomes hot during operation — avoid touching it. The module is not waterproof and should be kept dry.
Whether you are building a home CO alarm, an industrial safety monitor, or an educational sensor project, the MQ-7 module provides a reliable, affordable solution for carbon monoxide detection.
Features
-
MQ-7 SnO₂ semiconductor sensor — High sensitivity to carbon monoxide (CO) and coal gas
-
High-low temperature cycling — 5.0V heating (60s) for cleaning, 1.5V (90s) for CO detection
-
Dual output — Analog (AO) for concentration trends, Digital (DO) for threshold alarms
-
Adjustable threshold — Onboard potentiometer sets the digital output trigger point
-
Wide detection range — 10–1000 ppm (standard); some variants up to 10,000 ppm
-
5V operation — Compatible with Arduino, ESP32, and other 5V microcontrollers
-
LED indicators — Power and digital output status feedback
-
Compact form factor — 32 × 20mm PCB for easy integration
-
Fast response — Quick detection of CO concentration changes
-
Wide application range — Household CO alarms, industrial detectors, portable instruments
Technical Specifications
Usage
Getting Started
-
Connect power — Connect VCC to 5V and GND to ground. The onboard power LED should light up.
-
Connect outputs — Connect AO to an analog input on your microcontroller (e.g., A0 on Arduino) and DO to a digital input if threshold detection is needed.
-
Implement heater cycling (CRITICAL) — Most standard MQ-7 boards do not cycle the heater automatically. You must control the heater pin with a PWM signal or external circuit: 5.0V for 60 seconds, then 1.5V for 90 seconds, and take your CO reading at the end of the 90-second low-voltage phase.
-
Preheat — Allow the sensor to warm up. For first-time use, power it in clean air for not less than 48 hours for best accuracy.
-
Calibrate (recommended) — In clean air, note the analog reading. Adjust the onboard potentiometer so the DO output switches just above this baseline.
-
Read data — Use analogRead() for concentration trends, or digitalRead() for threshold-based alarms.
Pin Connections
Example Arduino Code (Basic Reading — Heater Cycling Required)
#define MQ7_AO A0
#define MQ7_DO 8
#define HEATER_PIN 9
void setup() {
Serial.begin(9600);
pinMode(MQ7_DO, INPUT);
pinMode(HEATER_PIN, OUTPUT);
}
void loop() {
analogWrite(HEATER_PIN, 255);
delay(60000);
analogWrite(HEATER_PIN, 72);
delay(90000);
int analogValue = analogRead(MQ7_AO);
int digitalState = digitalRead(MQ7_DO);
Serial.print("CO Level: ");
Serial.print(analogValue);
Serial.print(" | Alarm: ");
Serial.println(digitalState == LOW ? "TRIGGERED" : "Normal");
}
Note: This simplified example uses PWM approximation for 1.5V. For precise heater control, use a dedicated circuit with a transistor or MOSFET as described in MQ-7 application notes.
Typical Applications
-
Household CO alarms — Detect carbon monoxide from stoves, heaters, and fireplaces
-
Industrial CO detectors — Monitor coal gas and CO in workshops and facilities
-
Portable gas detection instruments — Handheld CO detectors for field work
-
Educational STEM projects — Teaching analog sensing, gas detection, and heater cycling principles
Notes for Business Buyers
-
Heater cycling is essential — Standard breakout boards lack this circuit; factor the modification or external control into your design
-
Preheat is critical — The 48-hour initial burn-in is required for stable readings; factor this into production testing timelines
-
Not a precision instrument — MQ sensors provide relative trend data, not exact ppm readings for specific gases
-
Suitable for bulk purchasing — Ideal for CO alarm manufacturers, educational kit suppliers, and industrial safety product developers
Q: What is the MQ-7 sensor used for?
It is a gas sensor for detecting carbon monoxide (CO) and coal gas in household CO alarms, industrial gas leak detectors, and portable gas detection instruments.
Q: What is the difference between the analog and digital outputs?
AO provides a continuous voltage that changes with gas concentration for trend monitoring. DO switches LOW when the concentration exceeds the onboard potentiometer threshold, ideal for simple alarms.
Q: Why does the sensor need a long preheat time?
The SnO₂ sensing element requires heating to reach stable operating temperature. The datasheet specifies a preheat time of not less than 48 hours for reliable operation.
Q: Why is my MQ-7 reading inaccurate or unstable?
The most common cause is improper heater cycling. Most standard MQ-7 boards do not cycle the heater between 5V and 1.5V automatically. You must implement this cycle manually or modify the board.
Q: What is the heater cycling sequence?
Heat to 5.0V for 60 seconds to clean the sensor, then 1.5V for 90 seconds to detect CO. Take your reading at the end of the low-voltage phase.
Q: What voltage does the module require?
It operates from 5V DC with approximately 150mA current consumption.
Q: Does the sensor respond to other gases?
The MQ-7 is designed for high sensitivity to CO, but may respond to other combustible gases. It is not fully selective.
Q: Is the sensor safe to touch?
No. The sensor surface becomes hot during operation due to the internal heater. Avoid touching it.
Q: Can I use this module with a Raspberry Pi?
Yes, but the Pi lacks a built-in ADC. Use an external ADC (e.g., MCP3008) to read the AO output.
Q: Can I purchase in bulk for a product development project?
Yes. This module is suitable for bulk purchasing by CO alarm manufacturers, educational kit suppliers, and industrial safety product developers.