MQ 7 Gas Sensor Module Carbon Monoxide Detection

AED 25.00



The MQ-7 sensor module is an effective and cost-efficient Gas sensor module solution for monitoring and detecting carbon monoxide gas, helping to ensure safety and assess air quality in different environments. the MQ-7 carbon monoxide sensor detects 10 to 2000 ppm of CO in the air.


Package Includes:

  • 1x MQ-7 CO Sensor Module



  1. High sensitivity: The MQ-7 sensor module exhibits high sensitivity to carbon monoxide (CO), iso-butane, and propane gases, making it effective in detecting these gases.
  2. Wide range sensitivity: The module demonstrates good sensitivity to combustible gases across a wide range, allowing for the detection of various gases.
  3. Fast response time: The sensor module provides a rapid response to changes in gas concentration, ensuring timely detection and measurement.
  4. Easy positioning: The module is equipped with four screw holes, making it easy to position and install in different applications or setups.
  5. Long lifespan: The MQ-7 sensor module offers a long operating life, providing reliable gas detection capabilities over an extended period.
  6. Low cost: Despite its high sensitivity and performance, the module remains cost-effective, making it an affordable option for gas sensing applications.
  7. Simple drive circuit: The module features a straightforward drive circuit, requiring minimal external components for operation, simplifying the setup process.
  8. Wide concentration range: The MQ-7 sensor module can detect gas concentrations ranging from 10 to 10,000 parts per million (ppm), enabling measurement in a broad range of gas concentrations.
  9. Preheat duration: The module has a preheat duration of 20 seconds, allowing it to reach optimal operating conditions before accurate gas detection.
  10. Digital or analog output: The module can be used as both a digital and analog sensor, providing flexibility in data output based on the specific application requirements.
  11. Adjustable sensitivity: The module includes a potentiometer that allows you to vary the sensitivity of the digital output pin, providing control over the sensor's response to different gas concentrations.



The MQ-7 sensor module is a highly sensitive device designed to detect carbon monoxide (CO), iso-butane, and propane gases. It offers excellent sensitivity to a wide range of combustible gases, enabling effective gas detection in various environments. With its fast response time, the sensor can promptly react to changes in gas concentration. The module features four screw holes, allowing for easy positioning and installation. This convenient design facilitates its integration into different systems or setups. Additionally, the sensor module boasts a long lifespan while remaining cost-effective, making it a reliable choice for long-term gas sensing applications. Operating the MQ-7 sensor module is straightforward, thanks to its simple drive circuit. It requires minimal external components for operation, simplifying the setup process. The module supports both digital and analog output modes, offering flexibility in how the sensor data is utilized. By utilizing the built-in potentiometer, you can adjust the sensitivity of the digital output pin to fine-tune the sensor's response. With a wide detection range from 10 to 10,000 parts per million (ppm) and a preheat duration of 20 seconds, the MQ-7 sensor module provides precise and timely gas concentration measurements. Its versatility, reliability, and ease of use make it a suitable choice for various applications, including gas leakage detection, air quality monitoring, and safety systems.


Principle of Work:

The MQ-7 gas sensor module utilizes a chemical sensing element based on tin dioxide (SnO2). this is how the MQ-7 sensor works internally:

  1. Gas-Sensitive Material: The sensor contains a gas-sensitive material made of tin dioxide (SnO2). In clean air, SnO2 exhibits lower electrical conductivity.
  2. Heater: The sensor includes a built-in heater that raises the temperature of the gas-sensitive material. The heater is typically powered by a voltage of around 1.5V.
  3. Sensing Mechanism: When the heater is activated, the temperature of the gas-sensitive material increases. At higher temperatures, SnO2 becomes more reactive and can interact with certain gases, such as carbon monoxide (CO).
  4. Gas Interaction: When carbon monoxide (CO) gas comes into contact with the heated SnO2 material, a chemical reaction occurs on the sensor's surface. This reaction causes a change in the electrical conductivity of the gas-sensitive material.
  5. Electrical Conductivity: The change in electrical conductivity of the gas-sensitive material is directly related to the concentration of carbon monoxide gas in the environment. As the concentration of CO increases, the electrical conductivity of the SnO2 material also increases.
  6. Output Signal: The change in electrical conductivity is converted into an output signal that can be read by an external device, such as a microcontroller. This output signal can be in the form of either a digital signal (HIGH or LOW) or an analog voltage value (0-5V), depending on the specific module and configuration: 

    1. Adjusting Sensitivity: If the output LED and digital pin do not go high when exposed to the gas, the sensitivity can be adjusted. The module includes a potentiometer that can be tweaked to increase or decrease the sensitivity until the LED and digital pin respond as expected to the gas contact.

    2. Digital Output: The digital pin of the sensor can be connected to a microcontroller. By monitoring the state of the digital pin, the microcontroller can determine the presence or absence of the gas at the designated concentration. It can trigger actions or alerts based on the detected gas level.

    3. Analog Output: Alternatively, the analog pin of the sensor can be utilized. The microcontroller reads the analog voltage values (ranging from 0 to 5V) from the sensor. The voltage value obtained is directly proportional to the amount of gas detected by the sensor. The microcontroller can then process this analog value and interpret the gas concentration accordingly.

  7. Calibration: To ensure accurate gas detection, the sensor may require calibration. This involves exposing the sensor to known gas concentrations and adjusting its sensitivity or threshold accordingly.


Pinout of the Sensor:

Pin No:

Pin Name:




This pin powers the module, typically the operating voltage is +5V



Used to connect the module to the system ground


Digital Out

You can also use this sensor to get digital output from this pin, by setting a threshold value using the potentiometer


Analog Out

This pin outputs 0-5V analog voltage based on the intensity of the gas 



  1. Home and Industrial CO Detection: The MQ-7 sensor module can be used in homes, offices, and industrial settings to detect the presence of carbon monoxide, a potentially harmful gas emitted by fuel-burning appliances, generators, and industrial processes. It can help prevent CO poisoning and trigger alarms for immediate action.
  2. Automotive Applications: The sensor module can be employed in vehicles to monitor CO levels in the cabin or near the exhaust system. This is useful for ensuring passenger safety and detecting any malfunctioning exhaust systems that may produce high levels of CO.
  3. Environmental Monitoring: The MQ-7 sensor can be used in environmental monitoring systems to measure CO levels in the atmosphere. This data can help assess air quality, identify pollution sources, and monitor the impact of industrial activities on the environment.
  4. Gas Leak Detection: The sensor module can be integrated into gas leak detection systems to identify leaks in natural gas pipelines, storage facilities, or other gas distribution systems. Early detection of gas leaks can help prevent accidents and ensure the safety of personnel and property.
  5. Safety Systems: The MQ-7 sensor can be part of safety systems in enclosed spaces, such as underground parking lots, garages, and boiler rooms, where CO accumulation can occur. It can trigger alarms, activate ventilation systems, or shut down equipment to mitigate potential hazards.
  6. Indoor Air Quality Monitoring: By measuring CO levels indoors, the sensor module can contribute to monitoring and maintaining healthy indoor air quality. This is particularly important in buildings with combustion appliances, such as stoves, furnaces, and fireplaces.
  7. Research and Development: The MQ-7 sensor can be utilized in research and development projects involving gas analysis, emissions testing, or the study of combustion processes. Its sensitivity and ability to measure CO concentrations make it valuable for scientific investigations.



  1. Connect the VCC pin of the MQ-7 module to the 5V pin of the Arduino.
  2. Connect the GND pin of the MQ-7 module to the GND pin of the Arduino.
  3. Connect the A0 pin of the MQ-7 module to the analog input pin of the Arduino (in this case, pin 0).
  4. Optionally, connect an LED and a current-limiting resistor to a digital output pin of the Arduino (in this case, pin 13). This can be used to indicate the presence of a high concentration of gas.



This Module doesn't need any Library to function.



This example code is used to read the analog input from an MQ-7 gas sensor module connected to pin A0 of an Arduino board. It converts the sensor's analog value into a calculated gas concentration value, assuming a linear relationship between the sensor reading and gas concentration. The gas concentration value is then printed on the serial monitor, In the given code, the LED is turned on when the gas concentration exceeds the value of 400 ppm (parts per million). However, this threshold can be adjusted based on your specific needs. You may need to experiment and calibrate the sensor with known gas concentrations to determine the appropriate threshold for your application:

#define MQ7pin A0
float sensorValue; // variable to store sensor value
float gasConcentration; // variable to store calculated gas concentration

void setup() {
  pinMode(13, OUTPUT); // set pin 13 as OUTPUT for LED indicator
  Serial.begin(9600); // sets the serial port to 9600
  Serial.println("MQ7 warming up!");
  delay(20000); // allow the MQ7 to warm up

void loop() {
  sensorValue = analogRead(MQ7pin); // read analog input pin A0

  // Convert analog value to gas concentration value (adjust the conversion factor as per sensor calibration)
  gasConcentration = map(sensorValue, 0, 1023, 0, 10000); // assuming 0-1023 range corresponds to 0-10000ppm

  Serial.print("Sensor Value: ");
  Serial.print("\tGas Concentration: ");
  Serial.println(" ppm");

  if (gasConcentration > 400) {
    Serial.println("High gas concentration detected!");
    digitalWrite(13, HIGH); // turn on the LED indicator
  } else {
    Serial.println("Gas concentration within safe limits.");
    digitalWrite(13, LOW); // turn off the LED indicator

  delay(2000); // wait 2s for next reading

  1. The code begins by defining the constant MQ7pin as A0, which represents the analog input pin connected to the MQ-7 gas sensor module.

  2. Two variables are declared: sensorValue, which will store the raw sensor reading, and gasConcentration, which will hold the calculated gas concentration value.

  3. In the setup() function:

    • Pin 13 is set as an output pin to control an LED indicator.
    • The serial communication is initiated at a baud rate of 9600.
    • The message "MQ7 warming up!" is printed on the serial monitor.
    • A delay of 20,000 milliseconds (20 seconds) is added to allow the MQ-7 sensor to warm up before taking readings.
  4. In the loop() function:

    • The analogRead() function is used to read the analog input value from the MQ-7 sensor connected to pin A0. The raw sensor value is stored in the sensorValue variable.
    • The map() function is then used to convert the raw sensor value (ranging from 0 to 1023) to a gas concentration value (ranging from 0 to 10,000 ppm). The calculated gas concentration is stored in the gasConcentration variable.
    • The Serial.print() and Serial.println() functions are used to display the current sensor value and gas concentration value on the serial monitor.
    • The code checks if the gas concentration (gasConcentration) is greater than 400 ppm. If it is, it indicates a high gas concentration.
    • If the gas concentration is above the threshold, the code prints the message "High gas concentration detected!" on the serial monitor and turns on the LED connected to pin 13 using digitalWrite().
    • If the gas concentration is within the safe limits, the code prints the message "Gas concentration within safe limits." on the serial monitor and turns off the LED.
    • Finally, a delay of 2000 milliseconds (2 seconds) is added before the next reading is taken.


Technical Details:

  • Target Gas: carbon monoxide
  • Detectable Concentration: 10-10000ppm CO
  • Operating voltage: 5V
  • Heating Voltage VH: 5.0V±0.2V ACorDC(hight); 1.5V±0.1V ACorDC(low)
  • Load Resistance RL: Adjustable
  • Heating Resistance RH: 31Ω±3Ω(Room temperature)
  • Heating Power PH: ≤350mW
  • Surface Resistance of Sensitive Material R: 2KΩ-20KΩ(in100ppmCO)
  • Sensitivity S: Rs(in air)/Rs(100ppmCO)≥5
  • Concentration Slope: α ≤0.6(R300ppm/R100ppm CO)
  • Temperature, Humidity: 20℃±2℃; 65%±5%RH
  • Standard Test Circuit: Vc:5.0V±0.1V; VH(high): 5.0V±0.1V; VH(low): 1.5V±0.1V





A comparison between the MQ-7 and MQ-2 gas sensor modules:

MQ-7 Gas Sensor Module:

  • Gas Detection: Specifically designed to detect carbon monoxide (CO) gas.
  • Sensitivity: Highly sensitive to carbon monoxide in the range of 10 to 2000 ppm.
  • Operating Principle: Uses SnO2 (tin dioxide) as the gas-sensitive material, which exhibits decreased electrical conductivity in clean air. The electrical conductivity increases as the concentration of carbon monoxide rises.

MQ-2 Gas Sensor Module:

  • Gas Detection: Designed to detect multiple gases, including LPG (liquefied petroleum gas), butane, propane, methane, alcohol, and smoke.
  • Sensitivity: Broad sensitivity range for combustible gases.
  • Operating Principle: Uses a heating element and a gas-sensitive material (usually a metal oxide semiconductor) to detect gases. The gas molecules are ionized when they come into contact with the heated sensor, leading to changes in the sensor's electrical conductivity.


  1. Target Gas: MQ-7 specifically targets carbon monoxide (CO), while MQ-2 is designed to detect a broader range of gases such as LPG, butane, propane, methane, alcohol, and smoke.
  2. Sensitivity Range: MQ-7 is highly sensitive to carbon monoxide in the range of 10 to 2000 ppm, while MQ-2 has a broader sensitivity range for various combustible gases.
  3. Gas-Sensitive Material: MQ-7 uses SnO2 as the gas-sensitive material, while MQ-2 typically employs metal oxide semiconductors.
  4. Application Focus: MQ-7 is commonly used in environments where carbon monoxide detection is crucial, such as in industrial settings or for safety alarms. MQ-2 is often utilized for gas leak detection in applications like home gas detectors or gas leakage alarms.