Skip to content
Gas & Air Quality

MQ-7 Carbon Monoxide Sensor

Dedicated CO sensor for indoor safety monitors and air-quality projects.

A gas sensor calibrated specifically for carbon monoxide detection, used in DIY CO alarm and indoor air-safety projects.

Specifications

Sensing elementSnO2 (tin dioxide) semiconductor, sensitivity decreases as CO concentration decreases in clean air
Operating voltage5 V DC (heater circuit and sensing circuit both run on 5V)
Detection range20-2000 ppm carbon monoxide (CO)
Heating cycle5 V for 60s (high-temp burn-off), then 1.4V for 90s (low-temp sensing) — 150s total cycle for spec-accurate CO readings
Current draw~150 mA during the 5V heating phase — noticeably more than typical digital sensors, budget accordingly
Preheat timeUsable within minutes, but full stabilization for accurate baseline readings takes up to 48 hours of burn-in
OutputAnalog voltage (AOUT) proportional to gas concentration, plus a threshold digital output (DOUT) via onboard comparator
InterfaceAnalog (AOUT) — requires ADC and Rs/Ro curve conversion to get ppm; DOUT is a simple threshold trigger

Pinout

PinNameDescription
1VCCPower, 5V DC — also powers the internal heating element
2GNDGround
3AOUTAnalog voltage output, proportional to gas concentration — read with an ADC, not a direct ppm value
4DOUTDigital threshold output — trips based on the onboard comparator, threshold set by the potentiometer on the module

The heating cycle is not optional for spec accuracy — many breakout boards simply tie VCC straight to a constant 5V, which the sensor will tolerate and still respond to CO, but the datasheet's accuracy figures assume the 60s-high/90s-low duty cycle. If CO-selectivity actually matters for your project (vs. just "some gas is present"), drive the heater pin with a MOSFET or relay on a timer/PWM to reproduce that cycle rather than running it at a constant voltage.

AOUT is raw voltage, not ppm — converting to a ppm figure requires computing the Rs/Ro resistance ratio and mapping it against the sensor's datasheet curve, plus a clean-air calibration step to establish your board's Ro baseline. Treat raw analogRead() values as relative/qualitative unless you've done this calibration.

DOUT needs calibration too — the trigger threshold is set by the onboard potentiometer and is not accurate out of the box. Adjust it while exposing the sensor to a known-safe CO level (i.e., clean air) before trusting DOUT as an alarm trigger.

Power budget — the ~150mA heater draw is easy to overlook if you're used to sub-10mA digital sensors. On a 3.3V-logic board reading AOUT through a voltage divider, make sure your 5V supply rail (not just logic) can actually source this current, especially if several MQ-series sensors run simultaneously.

Sensor lifetime and drift — SnO2 elements degrade over 1-3 years of use and drift with humidity and temperature; periodic recalibration against known-clean air is necessary for any long-term deployment, not just a one-time setup step.

Variants

Use the MQ-7 specifically when carbon monoxide is the gas you actually care about — its dual-voltage heating cycle exists precisely to give it CO selectivity that the MQ-2 and MQ-135 don't have. Don't substitute the cheaper MQ-2 for a CO safety project; it will respond to CO somewhat, but it isn't calibrated or reliable for it.

VariantPrice
MQ-7~$2-4
MQ-2~$1-3
MQ-9~$2-4
MQ-135~$1-3

Related