Overview

The MQ-7 is a semiconductor gas sensor manufactured by Winsen Electronics specifically designed to detect toxic Carbon Monoxide (CO) gas concentrations in air (20 to 2000 ppm20\text{ to }2000\text{ ppm}).

Unlike general gas sensors (such as MQ-2 or MQ-135) that operate at a constant 5V heater voltage, the MQ-7 requires a high-low temperature cycling protocol: heating at 5.0 V for 60 seconds (cleaning phase) followed by heating at 1.4 V for 90 seconds (measurement phase). CO gas concentration is read at the end of the 1.4 V measurement phase.

Quick reference

High heater voltage (VH,highV_{H,high})5.0 V DC (60 seconds cleaning cycle)
Low heater voltage (VH,lowV_{H,low})1.4 V DC (90 seconds measurement cycle)
Circuit voltage (VCV_C)5.0 V ±0.1 V\pm 0.1\text{ V} DC
Heater resistance (RHR_H)33 Ω±3 Ω33\text{ }\Omega \pm 3\text{ }\Omega
Average heater power~350 mW (cycled)
Target gasCarbon Monoxide (CO)
Detection range20 ppm to 2000 ppm CO
OutputsAnalog voltage (AO) / Digital threshold (DO via LM393)

Pinout

Standard 4-Pin Breakout Module

PinNameTypeDescription
1VCCPowerSupply voltage (+5.0 V DC for circuit and high-cycle heater)
2GNDPowerGround (0 V)
3DODigital OutputDigital comparator output (HIGH clean, LOW on CO alarm)
4AOAnalog OutputAnalog output voltage (measured during 1.4V phase)

Specifications

ParameterSymbolMinTypMaxUnitConditions
High Heater VoltageVH,highV_{H,high}4.95.05.1V60 seconds cleaning cycle
Low Heater VoltageVH,lowV_{H,low}1.351.41.45V90 seconds measurement cycle
Sensing ResistanceRSR_S220in 100 ppm CO
Sensitivity Ratioα\alpha0.250.5RS(100ppm CO)/RS(clean air)R_S\text{(100ppm CO)} / R_S\text{(clean air)}
Cycle Heating Timetcyclet_{cycle}150s60s @ 5V + 90s @ 1.4V
Operating TemperatureTOPT_{OP}-2050°C
Operating HumidityRHOPRH_{OP}95% RHNon-condensing

Temperature Cycling Protocol & Timing

To measure CO accurately without cross-sensitivity to other gases, software or hardware PWM must cycle the heater element:

text
V_Heater  ───┐ 5.0V (60s Cleaning) ┌─── 1.4V (90s Measure) ───┐ 5.0V ...
             └─────────────────────┘                           └───────
Time      ◄─────── 60 sec ────────►◄───────── 90 sec ─────────►

                                            Read Analog Voltage (AO) Here
  1. Cycle 1 (Cleaning Phase): Apply VH=5.0 VV_H = 5.0\text{ V} for 60 seconds. The high temperature burns off stored contaminants and adsorbed gases from the tin-dioxide substrate. Do not read measurements during this phase.
  2. Cycle 2 (Measurement Phase): Lower VHV_H to 1.4 V (using PWM duty cycle 28%\sim 28\% on a 5V supply) for 90 seconds.
  3. Read Sensor: Read analog voltage on AO during the last 5 seconds of the 1.4 V low-voltage phase.

Wiring

MQ-7 Module PinMicrocontroller / DriverNotes
VCC (Circuit)5V DCPowers sensor circuit and comparator
GNDGNDGround
AOAnalog Input Pin A0Measure voltage during 1.4V phase
Heater VCCTransistor / MOSFET PWM PinCycle heater between 5V (100% PWM) and 1.4V (28% PWM)
Warning

Life-Safety Warning: The MQ-7 is an educational/hobbyist sensor. It is NOT rated for life-safety CO alarm systems or commercial building safety compliance. Always use certified commercial CO detectors for human life safety.

Common mistakes

  • Operating continuously at 5.0V: Running the heater constantly at 5.0V prevents the sensor from detecting CO gas effectively and causes false baseline readings.
  • Reading analog output during the 5.0V phase: Measurements taken during the 60-second 5.0V cleaning phase measure burned-off contaminants rather than actual CO concentration.
  • Skipping initial 24-hour burn-in: New MQ-7 sensors require a 24 to 48-hour continuous preheat period before initial calibration to establish a stable baseline R0R_0.

Notes

  • Calculate CO PPM: RS=VCVAOVAO×RLR_S = \frac{V_C - V_{AO}}{V_{AO}} \times R_L, then apply the Winsen logarithmic formula: PPM=100×(RSR0)1.5\text{PPM} = 100 \times \left(\frac{R_S}{R_0}\right)^{-1.5}.

Assets & downloads