MQ7 Carbon Monoxide Sensor Pinout

The MQ7 is an analog carbon monoxide (CO) gas sensor that detects the presence of carbon monoxide in the air by measuring changes in electrical resistance. Carbon monoxide is a colorless, odorless, and highly toxic gas produced by the incomplete combustion of fuels such as gasoline, natural gas, coal, and wood, making it impossible to detect without specialized equipment.

The MQ7 uses a dual-temperature heating cycle to improve the accuracy and selectivity of CO detection. Due to its reliability and affordability, it is widely used in carbon monoxide alarms, air quality monitoring systems, industrial safety equipment, and portable gas detection devices.

What is MQ7?

mq7 sensor

The sensitive material of the MQ7 gas sensor is SnO2, which has lower conductivity in clean air. It makes detection by cycling between high and low temperatures, detecting CO at low temperature (heated by 1.5V). The sensor’s conductivity increases along with CO gas concentration rising. At high temperature (heated by 5.0V), it cleans the other gases adsorbed at low temperature.

This dual-temperature cycling is what makes the MQ7 fundamentally different from every other MQ-series sensor. All other MQ sensors run their heater at a single fixed voltage. The MQ7 alternates between 1.5V for 90 seconds to detect CO and 5V for 60 seconds to burn off any interfering gases that accumulated on the sensing surface. Without this cleaning phase, cross-sensitivity to hydrogen and methane would make reliable CO detection impossible.

MQ7 overview

ParameterValue
Sensor TypeMetal Oxide Semiconductor (MOS) Gas Sensor
Target GasCarbon Monoxide (CO)
Detection Range10 – 500 ppm CO
Circuit Voltage (VC)≤10V DC (standard 5V)
Heater Voltage (VH) — High5.0V ±0.1V AC or DC (cleaning phase)
Heater Voltage (VH) — Low1.5V ±0.1V AC or DC (detection phase)
Heater Time — High60s ±1s
Heater Time — Low90s ±1s
Heater Resistance29Ω ±3Ω (room temperature)
Heater Power Consumption≤900mW
Output TypeAnalog (AO) + Digital TTL (DO)
Operating Temperature−10°C to +50°C
CommunicationAnalog Voltage / Digital Threshold
Mounting TypeThrough Hole (6-pin bare sensor)
Compatible BoardsArduino Uno, ESP32, Raspberry Pi

Pinout

MQ7 Pinout

Breakout Module Pinout (4-pin)

PinTypeDescription
VCCPowerModule supply — 5V
GNDPowerGround
DOOutputDigital TTL output — LOW when CO exceeds threshold, HIGH otherwise
AOOutputAnalog output — voltage proportional to CO concentration (0V – 5V)

Working principle

The MQ7 is the only sensor in the MQ series that requires a two-voltage heater cycle to work correctly. Running it at a fixed 5V like other MQ sensors will produce readings, but those readings will include significant interference from H₂ and CH₄ — making CO-specific detection unreliable.

The heater voltage must be at 1.5V ±0.1V during CO detection (low temperature phase) and at 5V ±0.1V during the resuming period (high temperature cleaning phase). The low temperature phase lasts 90 seconds and the high temperature phase lasts 60 seconds, alternating continuously.

The cycle in practice:

PhaseHeater VoltageDurationPurpose
Detection1.5V90 secondsSensor cools, CO adsorbs onto SnO2, resistance drops, read AO
Cleaning5.0V60 secondsSensor heats, burns off H₂, CH₄, and other interfering gases

The analog output is read at the end of the detection phase when the sensor has fully cooled and CO readings have stabilised. Reading AO during the heating phase will give incorrect values.

The output voltage in 150ppm CO under standard conditions is 2.5V to 4.3V, with a recommended load resistance of 4.7kΩ. The sensitivity is defined as Rs(air)/Rs(150ppm CO) ≥ 5.

Sensitivity to different gases (relative):

GasRelative Sensitivity
Carbon Monoxide (CO)Highest (primary target)
H₂Medium (cleaned during high-temp phase)
CH₄Low
AirBaseline

Warm-up requirement: Preheat time must be over 48 hours for first use. After storage: less than one month — no less than 48 hours; 1–6 months — no less than 72 hours; more than six months — no less than 168 hours.

MQ7 module construction

MQ7 Module Construction

MQ7 Sensor Element The sensor is composed of a micro Al₂O₃ ceramic tube with a tin dioxide (SnO2) sensitive layer, measuring electrodes, and a heater coil, all fixed into a crust made of plastic and stainless steel mesh. The stainless steel mesh allows CO to diffuse freely into the sensing chamber.

Unlike flammable gas sensors where the mesh prevents ignition propagation, here its primary role is mechanical protection and dust filtering — CO itself is not explosive at the concentrations being measured.

Heater Voltage Switching Circuit Unique to the MQ7 module. A transistor or PWM-based circuit on the board alternates the heater supply between 1.5V and 5V on the correct timing cycle. On simpler breakout boards this switching is left to the microcontroller, the firmware must toggle a GPIO pin or use PWM to drive the heater at the correct voltages and timing. More advanced modules include an onboard timer IC that handles the cycle automatically.

LM393 Voltage Comparator Converts the analog signal into a digital TTL output. It compares the sensor voltage against the reference set by the potentiometer and switches DO LOW when the CO threshold is exceeded.

Sensitivity Adjustment Potentiometer Sets the LM393 reference voltage and controls the CO concentration level at which DO triggers. Calibrating against a known CO concentration gives the most reliable threshold setting.

Power LED Illuminates when 5V is applied to VCC, confirming the module is powered.

Threshold LED Turns on when the DO pin triggers, providing immediate visual confirmation that the set CO concentration threshold has been crossed.

Decoupling Capacitors Filter supply noise from the heater switching transitions. The rapid voltage change between 1.5V and 5V on the heater circuit can inject transients onto the supply rail that affect AO readings without proper decoupling.

Specifications

ParameterValue
Target GasCarbon Monoxide (CO)
Detection Range10 – 500 ppm CO
Circuit Voltage (VC)≤10V DC (standard 5V ±0.1V)
Heater Voltage — High (cleaning)5.0V ±0.1V (AC or DC)
Heater Voltage — Low (detection)1.5V ±0.1V (AC or DC)
Heater Time — High60s ±1s
Heater Time — Low90s ±1s
Heater Resistance29Ω ±3Ω (room temperature)
Heater Power Consumption≤900mW
Sensitivity (S)Rs(air) / Rs(150ppm CO) ≥ 5
Output Voltage (Vs)2.5V – 4.3V (in 150ppm CO)
Concentration Slope (α)≤0.6 (R300ppm / R50ppm CO)
Recommended Load Resistance4.7kΩ (adjustable)
Analog Output (AO)0V – 5V
Digital Output (DO)TTL — LOW when CO exceeds threshold
Comparator ICLM393
DO ThresholdAdjustable via onboard potentiometer
Preheat Time (first use)≥48 hours
Preheat Time (after 1–6 months storage)≥72 hours
Preheat Time (after 6+ months storage)≥168 hours
Standard Test Temperature20°C ±2°C
Standard Test Humidity55% ±5% RH
Operating Temperature−10°C to +50°C
Operating Humidity<95% RH (non-condensing)
Module Supply5V DC
Sensor Package6-pin through hole (plastic cap)

Helpful resources

Leave a Comment