Overview

The MQ-135 is a broad-spectrum semiconductor air quality gas sensor manufactured by Winsen Electronics. It uses a tin-dioxide (SnO2\text{SnO}_2) sensitive layer whose electrical conductivity increases when exposed to hazardous airborne gases such as ammonia (NH3\text{NH}_3), nitrogen oxides (NOx\text{NO}_x), alcohol, benzene, smoke, and carbon dioxide (CO2\text{CO}_2).

Breakout modules incorporate an internal micro-heater, an LM393 voltage comparator with an adjustable threshold potentiometer, a digital output pin (DO), and an analog output pin (AO) providing a voltage proportional to gas concentration.

Quick reference

Operating voltage (VCC)5.0 V ±0.1 V\pm 0.1\text{ V} DC (5V required for internal heater)
Heater resistance (RHR_H)31 Ω±3 Ω31\text{ }\Omega \pm 3\text{ }\Omega
Heater power consumption800 mW\sim 800\text{ mW} (160 mA160\text{ mA} current draw)
Target gasesAmmonia (NH3\text{NH}_3), NOx\text{NO}_x, Alcohol, Benzene, Smoke, CO2\text{CO}_2 (estimated)
Concentration range10 ppm to 1000 ppm
OutputsAnalog voltage (AO: 0.1 V – 4.0 V) / Digital threshold (DO: TTL LOW when gas detected)

Pinout

Standard 4-Pin Breakout Module

PinNameTypeDescription
1VCCPowerSupply voltage (+5.0 V DC required for internal heater coil)
2GNDPowerGround (0 V)
3DODigital OutputDigital threshold output (HIGH in clean air, goes LOW when gas exceeds threshold)
4AOAnalog OutputAnalog output voltage (0.1 V in clean air, increases up to ~4.5 V as gas concentration rises)

Specifications

ParameterSymbolMinTypMaxUnitConditions
Sensor Circuit VoltageVCV_C5.05.0VDC
Heater VoltageVHV_H5.05.0VAC or DC
Load ResistanceRLR_L20Adjustable on breakout
Heater ResistanceRHR_H283134ΩRoom temperature (20 C20\text{ }^\circ\text{C})
Heater PowerPHP_H800mWVH=5.0 VV_H = 5.0\text{ V}
Sensing ResistanceRSR_S220in 50 ppm NH3\text{NH}_3
Preheat Timetpret_{pre}2448hoursInitial burn-in / stabilization

Sensitivity characteristics & calibration

The MQ-135 measures air quality by observing the resistance ratio RSR0\frac{R_S}{R_0}:

  • RSR_S: Sensor resistance in target gas at various concentrations.
  • R0R_0: Sensor resistance in clean air at specified temperature/humidity (20 C20\text{ }^\circ\text{C}, 65% RH).

Sensor Resistance (RS)=(VCVAOVAO)×RL\text{Sensor Resistance } (R_S) = \left(\frac{V_C - V_{AO}}{V_{AO}}\right) \times R_L

To convert analog voltage (VAOV_{AO}) to estimated gas concentration in PPM, calibrate R0R_0 in clean outdoor air (415 ppm CO2\approx 415\text{ ppm }\text{CO}_2 baseline), then apply the logarithmic power-law formula:

PPM=a×(RSR0)b\text{PPM} = a \times \left(\frac{R_S}{R_0}\right)^b

where aa and bb are scaling factors derived from the Winsen datasheet curves for specific target gases.

Wiring

MQ-135 ModuleMicrocontroller (Arduino Uno / ESP32)Notes
VCC5VMust be 5V DC (3.3V will not heat element sufficiently)
GNDGNDGround
AOAnalog Pin A0 (or ESP32 ADC1)Connects to ADC for quantitative measurement
DODigital Pin 2Optional digital alarm threshold input
Warning

High Current & Heating Hazard:

  • The MQ-135 internal heater draws up to 160 mA continuous current. Do NOT power the sensor from a microcontroller's 3.3V rail or low-current GPIO pin.
  • The sensor body gets warm to the touch during normal operation. This is normal behavior required to burn off contaminants on the SnO2\text{SnO}_2 substrate.

Common mistakes

  • Expecting true CO2\text{CO}_2 measurement: The MQ-135 is a metal-oxide semiconductor gas sensor, NOT an NDIR sensor. It estimates CO2\text{CO}_2 as an equivalent proxy based on total volatile organic compounds (VOCs). Use NDIR sensors (such as SCD30 or SCD41) for true carbon dioxide measurement.
  • Skipping preheat / burn-in period: New MQ-135 sensors require a 24 to 48-hour initial burn-in period to stabilize baseline readings. Allow 3–5 minutes of preheating upon power-up before taking measurements.
  • Powering with 3.3V: Operating the heater on 3.3V prevents the heating element from reaching its operating temperature, causing the sensor to output flat or erratic values.

Notes

  • Temperature and humidity affect sensor resistance RSR_S. For accurate indoor air quality monitoring, apply temperature compensation curves from the Winsen datasheet.

Assets & downloads