- All products
- Sensors & Modules
- Gas
- MQ 7 Gas Sensor Carbon Monoxide CO (Analog and Digital out) RobotDYN
- Gas
Features
- Designed primarily for carbon monoxide (CO) detection.
- MQ-7 semiconductor gas-sensing element.
- Provides both analog and digital outputs.
- Adjustable digital detection threshold using the onboard potentiometer.
- High sensitivity to carbon monoxide.
- Fast response to changes in gas concentration.
- Simple interface for Arduino and other microcontroller platforms.
- Onboard comparator for digital threshold detection.
- Four mounting holes for convenient installation.
- Suitable for air-quality and gas-detection prototypes.
- Requires a heater cycle for proper MQ-7 operation.
- Low-cost solution for educational and development projects.
Principle of Operation
The MQ-7 uses a heated semiconductor sensing material whose electrical resistance changes in response to the concentration of carbon monoxide in the surrounding atmosphere. As the CO concentration changes, the sensing element's resistance changes accordingly, producing a measurable electrical signal.
![]()
The module makes this sensor response available through its Analog Output (AO). The analog signal can be connected to an analog input of a microcontroller and monitored to observe changes in the sensor response.

The Digital Output (DO) is generated by an onboard comparator. The detection threshold can be adjusted using the onboard potentiometer. When the sensor signal crosses the configured threshold, the digital output changes state, allowing the module to be used for simple alarm or trigger applications.
The MQ-7 is a heater-cycle sensor and requires a specific high- and low-voltage heater cycle for proper CO measurement. A simple fixed 5V supply can be used for basic experimentation, but it does not reproduce the complete MQ-7 measurement cycle and should not be used to claim accurate ppm measurements.
Applications
- Carbon monoxide detection prototypes.
- Air-quality monitoring projects.
- Arduino and microcontroller experiments.
- ESP32 and ESP8266 IoT gas-monitoring projects.
- Educational gas-sensing experiments.
- Environmental monitoring prototypes.
- Gas detection and alarm demonstrations.
- Data logging and sensor experimentation.
- Robotics and embedded-system projects.
Pinout

| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply input. Typically +5V. |
| 2 | GND | Ground connection. |
| 3 | Digital Out (DO) | Digital output controlled by the onboard comparator and adjustable threshold potentiometer. |
| 4 | Analog Out (AO) | Analog signal representing the sensor's electrical response to the detected gas. |
Wiring
For a basic Arduino analog-reading experiment, connect the module's VCC to the Arduino 5V pin, GND to GND, and AO to an analog input such as A0. The optional DO output can be connected to a digital pin when threshold-based detection is required.

| MQ-7 Module | Arduino |
|---|---|
| VCC | 5V |
| GND | GND |
| AO | A0 |
| DO | Optional digital pin |
Important: The MQ-7 requires a specific heater-voltage cycle for proper CO measurement. Supplying the module with a fixed 5V heater voltage is suitable for basic sensor demonstrations, but it does not provide the correct MQ-7 measurement cycle or guarantee accurate CO concentration readings. This module is intended for development and educational purposes and should not be used as a certified safety or life-protection CO detector.
Library
No external Arduino library is required for basic operation. The module can be read using the standard Arduino analogRead() and digitalRead() functions.
Arduino Example
#define MQ7_PIN A0
#define LED_PIN 13
int sensorValue;
void setup() {
pinMode(LED_PIN, OUTPUT);
Serial.begin(9600);
Serial.println("MQ-7 RobotDYN sensor warming up...");
delay(20000);
Serial.println("Sensor ready.");
}
void loop() {
sensorValue = analogRead(MQ7_PIN);
Serial.print("Sensor Value: ");
Serial.println(sensorValue);
if (sensorValue > 400) {
digitalWrite(LED_PIN, HIGH);
} else {
digitalWrite(LED_PIN, LOW);
}
delay(2000);
}
This example reads the MQ-7 analog output through Arduino analog pin A0 and turns the built-in LED on when the raw ADC reading exceeds 400. The value of 400 is only an example threshold and must not be interpreted as a specific CO concentration in ppm.
Technical Specifications
| Parameter | Specification |
|---|---|
| Sensor Type | Semiconductor gas sensor |
| Target Gas | Carbon Monoxide (CO) |
| Typical Detection Range | 10–10,000 ppm CO |
| Module Operating Voltage | 5V |
| Heater Voltage (High) | 5.0V ± 0.2V AC or DC |
| Heater Voltage (Low) | 1.5V ± 0.1V AC or DC |
| Load Resistance (RL) | Adjustable |
| Heater Resistance (RH) | 31Ω ± 3Ω at room temperature |
| Heater Power (PH) | ≤350mW |
| Sensor Resistance | 2KΩ–20KΩ in 100 ppm CO |
| Sensitivity | Rs (in air) / Rs (100 ppm CO) ≥ 5 |
| Interface | Analog and digital output |
| Digital Threshold | Adjustable using onboard potentiometer |
Resources
- Information about MQ Gas Sensor Series
- Introduction to Gas Sensors: Construction, Types, Working and Applications
- Arduino CO Monitor Using MQ-7 RobotDYN Sensor
- Arduino MQ-7 RobotDYN Gas Sensor Tutorial
Comparison with Other MQ-Series Sensors
The MQ-7 is optimized for carbon monoxide detection, while other MQ-series sensors are designed for different gases or combinations of gases. For example, the MQ-2 is commonly used for smoke and combustible gas detection, while the MQ-7 is primarily intended for carbon monoxide.
For applications requiring quantitative CO concentration measurements in ppm, the sensor must be operated using the correct heater cycle and properly calibrated under controlled conditions. Temperature, humidity, sensor aging, and other environmental factors can affect the sensor response. Therefore, the raw analog output from the module should not be treated as a direct ppm measurement without appropriate calibration and signal processing.
Features
- Designed primarily for carbon monoxide (CO) detection.
- MQ-7 semiconductor gas-sensing element.
- Provides both analog and digital outputs.
- Adjustable digital detection threshold using the onboard potentiometer.
- High sensitivity to carbon monoxide.
- Fast response to changes in gas concentration.
- Simple interface for Arduino and other microcontroller platforms.
- Onboard comparator for digital threshold detection.
- Four mounting holes for convenient installation.
- Suitable for air-quality and gas-detection prototypes.
- Requires a heater cycle for proper MQ-7 operation.
- Low-cost solution for educational and development projects.
Principle of Operation
The MQ-7 uses a heated semiconductor sensing material whose electrical resistance changes in response to the concentration of carbon monoxide in the surrounding atmosphere. As the CO concentration changes, the sensing element's resistance changes accordingly, producing a measurable electrical signal.
![]()
The module makes this sensor response available through its Analog Output (AO). The analog signal can be connected to an analog input of a microcontroller and monitored to observe changes in the sensor response.

The Digital Output (DO) is generated by an onboard comparator. The detection threshold can be adjusted using the onboard potentiometer. When the sensor signal crosses the configured threshold, the digital output changes state, allowing the module to be used for simple alarm or trigger applications.
The MQ-7 is a heater-cycle sensor and requires a specific high- and low-voltage heater cycle for proper CO measurement. A simple fixed 5V supply can be used for basic experimentation, but it does not reproduce the complete MQ-7 measurement cycle and should not be used to claim accurate ppm measurements.
Applications
- Carbon monoxide detection prototypes.
- Air-quality monitoring projects.
- Arduino and microcontroller experiments.
- ESP32 and ESP8266 IoT gas-monitoring projects.
- Educational gas-sensing experiments.
- Environmental monitoring prototypes.
- Gas detection and alarm demonstrations.
- Data logging and sensor experimentation.
- Robotics and embedded-system projects.
Pinout

| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply input. Typically +5V. |
| 2 | GND | Ground connection. |
| 3 | Digital Out (DO) | Digital output controlled by the onboard comparator and adjustable threshold potentiometer. |
| 4 | Analog Out (AO) | Analog signal representing the sensor's electrical response to the detected gas. |
Wiring
For a basic Arduino analog-reading experiment, connect the module's VCC to the Arduino 5V pin, GND to GND, and AO to an analog input such as A0. The optional DO output can be connected to a digital pin when threshold-based detection is required.

| MQ-7 Module | Arduino |
|---|---|
| VCC | 5V |
| GND | GND |
| AO | A0 |
| DO | Optional digital pin |
Important: The MQ-7 requires a specific heater-voltage cycle for proper CO measurement. Supplying the module with a fixed 5V heater voltage is suitable for basic sensor demonstrations, but it does not provide the correct MQ-7 measurement cycle or guarantee accurate CO concentration readings. This module is intended for development and educational purposes and should not be used as a certified safety or life-protection CO detector.
Library
No external Arduino library is required for basic operation. The module can be read using the standard Arduino analogRead() and digitalRead() functions.
Arduino Example
#define MQ7_PIN A0
#define LED_PIN 13
int sensorValue;
void setup() {
pinMode(LED_PIN, OUTPUT);
Serial.begin(9600);
Serial.println("MQ-7 RobotDYN sensor warming up...");
delay(20000);
Serial.println("Sensor ready.");
}
void loop() {
sensorValue = analogRead(MQ7_PIN);
Serial.print("Sensor Value: ");
Serial.println(sensorValue);
if (sensorValue > 400) {
digitalWrite(LED_PIN, HIGH);
} else {
digitalWrite(LED_PIN, LOW);
}
delay(2000);
}This example reads the MQ-7 analog output through Arduino analog pin A0 and turns the built-in LED on when the raw ADC reading exceeds 400. The value of 400 is only an example threshold and must not be interpreted as a specific CO concentration in ppm.
Technical Specifications
| Parameter | Specification |
|---|---|
| Sensor Type | Semiconductor gas sensor |
| Target Gas | Carbon Monoxide (CO) |
| Typical Detection Range | 10–10,000 ppm CO |
| Module Operating Voltage | 5V |
| Heater Voltage (High) | 5.0V ± 0.2V AC or DC |
| Heater Voltage (Low) | 1.5V ± 0.1V AC or DC |
| Load Resistance (RL) | Adjustable |
| Heater Resistance (RH) | 31Ω ± 3Ω at room temperature |
| Heater Power (PH) | ≤350mW |
| Sensor Resistance | 2KΩ–20KΩ in 100 ppm CO |
| Sensitivity | Rs (in air) / Rs (100 ppm CO) ≥ 5 |
| Interface | Analog and digital output |
| Digital Threshold | Adjustable using onboard potentiometer |
Resources
- Information about MQ Gas Sensor Series
- Introduction to Gas Sensors: Construction, Types, Working and Applications
- Arduino CO Monitor Using MQ-7 RobotDYN Sensor
- Arduino MQ-7 RobotDYN Gas Sensor Tutorial
Comparison with Other MQ-Series Sensors
The MQ-7 is optimized for carbon monoxide detection, while other MQ-series sensors are designed for different gases or combinations of gases. For example, the MQ-2 is commonly used for smoke and combustible gas detection, while the MQ-7 is primarily intended for carbon monoxide.
For applications requiring quantitative CO concentration measurements in ppm, the sensor must be operated using the correct heater cycle and properly calibrated under controlled conditions. Temperature, humidity, sensor aging, and other environmental factors can affect the sensor response. Therefore, the raw analog output from the module should not be treated as a direct ppm measurement without appropriate calibration and signal processing.

