MQ-135 Air Quality Sensor
Detects ammonia, benzene, CO2, and smoke — for indoor air quality monitoring projects.
An air-quality sensor commonly used in indoor air monitors, capable of sensing CO2, ammonia, benzene, and smoke. The MQ-135 is a metal-oxide semiconductor gas sensor whose surface resistance shifts in response to a broad mix of harmful gases and vapors, producing a single combined analog signal that rises with overall air-quality degradation — a popular, low-cost way to add general indoor air-quality monitoring to a home automation or environmental logging project, though it reports relative pollutant load rather than any single gas's precise concentration.
Specifications
| Sensor type | MQ-135 metal-oxide semiconductor (MOS) gas sensor, tuned for air-quality/pollutant gases |
| Operating voltage | 5V DC |
| Detectable gases | NH3 (ammonia), NOx, benzene, CO2, alcohol vapor, smoke — broad-spectrum air-quality sensing rather than a single specific gas |
| Detection range | ~10-300 ppm depending on the target gas |
| Warm-up time | Requires several minutes of heater warm-up (some sources recommend a longer burn-in period) before readings stabilize |
| Output | Analog voltage proportional to overall detected gas concentration, plus a digital threshold output (DO) on breakout modules |
| Sensitivity adjustment | Onboard potentiometer sets the digital-output trigger threshold |
| Interface | 1 analog pin (AO) + 1 digital pin (DO, breakout-dependent) |
Pinout
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power, 5V DC (powers both the internal heater and sensing circuit) |
| 2 | GND | Ground |
| 3 | AO | Analog output — voltage proportional to combined air-quality gas concentration |
| 4 | DO | Digital output — threshold-triggered HIGH/LOW based on the onboard potentiometer setting |
Allow several minutes of heater warm-up before trusting readings, and treat the analog output as a general relative air-quality trend rather than a precise ppm reading for any single gas, since the sensor responds to a broad mix of gases simultaneously; results also drift with ambient humidity and temperature over time.
Variants
The MQ-135 is a good low-cost choice for a general 'is the air getting worse' indicator. If the project needs actual calibrated CO2/TVOC numbers rather than a relative analog trend, the CCS811 gives digital, pre-calibrated readings at a higher price point.
| Variant | Temp range | Hum range | Accuracy | Protocol | Price |
|---|---|---|---|---|---|
| MQ-135 breakout | ~$1-3 | ||||
| MQ-2 | ~$1-3 | ||||
| CCS811 | ~$5-10 |