The MQ-7 Carbon Monoxide (CO) Gas Sensor Module is a semiconductor gas sensor designed to detect carbon monoxide in the surrounding air. It uses a tin dioxide (SnO2) sensing element whose resistance changes in response to CO concentration.
The module features analog and digital outputs, an adjustable detection threshold, and a compact PCB design, making it suitable for Arduino, ESP32, Raspberry Pi, and other microcontroller-based monitoring projects.
The MQ-7 uses a cyclic heating process to improve its sensitivity to carbon monoxide. It is suitable for educational experiments, environmental monitoring prototypes, and gas sensing applications.
Key Features
-
Carbon Monoxide Detection: Designed primarily for sensing CO gas.
-
Semiconductor Technology: Uses a tin dioxide (SnO2) sensing element.
-
Analog Output (AO): Provides a variable voltage related to sensor resistance and gas concentration.
-
Digital Output (DO): Provides a HIGH/LOW signal based on an adjustable threshold.
-
Adjustable Threshold: Onboard potentiometer allows digital detection sensitivity adjustment.
-
5V Operating Supply: Suitable for common microcontroller development systems.
-
Onboard Indicators: Power and digital output status LEDs.
-
Compact Design: Easy integration into electronic prototypes.
-
Microcontroller Compatibility: Can interface with Arduino, ESP32, and Raspberry Pi using appropriate circuitry.
Technical Specifications
| Specification |
Details |
| Model |
MQ-7 |
| Sensor Type |
Carbon Monoxide Gas Sensor |
| Sensor Technology |
Metal Oxide Semiconductor (MOS) |
| Sensing Material |
Tin Dioxide (SnO2) |
| Module Supply Voltage |
5V DC |
| Target Gas |
Carbon Monoxide (CO) |
| Typical Detection Range |
10–1,000 ppm CO |
| Analog Output |
Variable Voltage |
| Digital Output |
HIGH/LOW Logic |
| Digital Threshold |
Adjustable Potentiometer |
| Sensor Heater |
Cyclic Heating Required |
| Heater High Phase |
5V, Typically 60 Seconds |
| Heater Low Phase |
1.4V, Typically 90 Seconds |
| Operating Temperature |
Approximately -10°C to +50°C |
| Module Dimensions |
Approximately 32 × 20 mm |
| Interface |
Analog and Digital |
| Connection |
4 Pins |
Pin Configuration
| Pin |
Description |
| VCC |
5V DC Power Supply |
| GND |
Ground |
| AO |
Analog Sensor Output |
| DO |
Digital Threshold Output |
Arduino UNO Connection Example
| MQ-7 Pin |
Arduino UNO |
| VCC |
5V |
| GND |
GND |
| AO |
A0 |
| DO |
D2 (Optional) |
Arduino can read the analog output to monitor relative changes in sensor response or read the digital output to detect when the adjustable threshold is reached.
Note: Accurate CO concentration measurements require calibration and the correct sensor heating cycle.
ESP32 Connection Example
| MQ-7 Pin |
ESP32 |
| VCC |
5V |
| GND |
GND |
| AO |
GPIO34 Through Voltage Divider |
| DO |
Digital GPIO Through Level Shifter |
Important: ESP32 GPIO pins operate at 3.3V. The MQ-7 module may produce 5V output signals, so suitable voltage-level protection is required.
Raspberry Pi Compatibility
The MQ-7 can be connected to Raspberry Pi boards using additional interface components.
-
Analog Reading: Requires an external ADC such as ADS1115 or MCP3008.
-
Digital Reading: Requires suitable voltage-level shifting.
-
Power Supply: Requires a suitable 5V supply.
Applications
- Carbon monoxide sensing experiments
- Indoor air monitoring prototypes
- Environmental monitoring systems
- Arduino gas sensor projects
- ESP32 IoT monitoring
- Raspberry Pi sensor applications
- Educational electronics projects
- Embedded gas sensing systems
- Laboratory demonstrations
- Data logging and sensor research
Important Notes
- The MQ-7 is primarily designed for detecting carbon monoxide (CO).
- The sensor may respond to other gases and is not completely selective to CO.
- The sensor requires a controlled heating cycle for measurements according to its specified operating method.
-
Standard MQ-7 breakout modules may not implement the required heating cycle automatically. Supplying a constant 5V to the module does not guarantee accurate CO measurements.
- The analog output does not directly represent CO concentration in ppm. Calibration and appropriate signal processing are required.
- The onboard potentiometer adjusts the digital switching threshold.
- Sensor readings can be affected by temperature, humidity, and other gases.
- Preheating and initial sensor conditioning are required.
- Do not connect 5V output signals directly to 3.3V-only microcontroller GPIO pins.
- This module is not a certified carbon monoxide alarm and must not be used as a substitute for an approved life-safety CO detector.
Package Includes