Comparison · Intermediate · 3 min read
VOC and Indoor Air Quality Sensors
BME688, SGP40, ENS160 and MQ Types
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
VOC sensors detect a mix of organic gases from cleaners, paints and cooking and report a relative index rather than a precise gas amount. For digital I2C boards, the SGP40, ENS160 and BME688 are good choices. The cheap MQ-135 gives an analog value that needs warm-up and calibration. None of them replace a gas detector for safety.
Key specs at a glance
- SGP40
- I2C, VOC index through Sensirion's algorithm, low power
- ENS160
- I2C or SPI, AQI, TVOC and eCO2 estimates
- BME688
- Gas, temperature, humidity and pressure in one chip, I2C or SPI
- MQ-135
- Analog heater sensor, needs warm-up and calibration
- Supply
- Most digital sensors 1.8 to 3.6 V, check the breakout board
- Output
- Relative index, not exact gas concentration
What these sensors measure
Metal-oxide (MOX) sensors change resistance when gases such as alcohol, solvents and cooking fumes touch a heated surface. The chip turns that into a VOC index: a relative number where a rise means worse air. It cannot name the gas or give an exact ppm.
Some sensors also give an eCO2 value. This is an estimate calculated from VOC, not a true measurement of carbon dioxide. For real CO2, use an NDIR sensor such as the types in the air quality guide.
Which sensor to choose
Digital boards are easier than analog MQ sensors.
| Sensor | Interface | Output | Notes |
|---|---|---|---|
| Sensirion SGP40 | I2C | VOC index (with algorithm library) | Low power; needs humidity data for best results |
| ScioSense ENS160 | I2C / SPI | AQI, TVOC, eCO2 estimate | Often paired with a BME280 on one board |
| Bosch BME688 | I2C / SPI | Gas resistance, plus T, RH and pressure | Can be trained for gas patterns with Bosch software |
| MQ-135 | Analog / digital threshold | Voltage | Cheap; heater draws about 150 mA; slow to settle |
- Sensirion SGP40
- Interface:
- I2C
- Output:
- VOC index (with algorithm library)
- Notes:
- Low power; needs humidity data for best results
- ScioSense ENS160
- Interface:
- I2C / SPI
- Output:
- AQI, TVOC, eCO2 estimate
- Notes:
- Often paired with a BME280 on one board
- Bosch BME688
- Interface:
- I2C / SPI
- Output:
- Gas resistance, plus T, RH and pressure
- Notes:
- Can be trained for gas patterns with Bosch software
- MQ-135
- Interface:
- Analog / digital threshold
- Output:
- Voltage
- Notes:
- Cheap; heater draws about 150 mA; slow to settle
Wiring and software
Use the Qwiic or STEMMA QT connector if the breakout has one, or connect SDA and SCL with pull-ups (I2C guide). Install the vendor library, for example the Sensirion Gas Index Algorithm, so that the raw signal becomes a VOC index. Feed it temperature and humidity from a sensor like the BME280 for better stability.
Getting useful readings
MOX sensors drift for the first minutes and need hours or days of burn-in on first use.
Watch the trend and react to a rise, rather than to a fixed threshold.
and from direct airflow from a fan.
Carbon monoxide, LPG and smoke need certified detectors.
Try it: Adc resolution calculator
Change the values and the diagram and results update as you type.
Common mistakes to avoid
- Treating eCO2 as a real CO2 measurement.
- Using an MQ sensor straight after power-on.
- Powering a 3.3 V breakout from 5 V without a regulator.
- Expecting the sensor to name the gas.
- Using a VOC sensor as a smoke or gas leak alarm.
Frequently asked questions
What is a VOC index?
A relative score where about 100 is the typical indoor level and higher values mean the air has more organic gases.
Is eCO2 the same as CO2?
No. It is estimated from VOC and can be wrong, for example in a room without people.
BME688 or SGP40?
SGP40 is simpler and gives a clean VOC index. BME688 adds temperature, humidity and pressure, and can be trained, but needs more setup.
How long is the burn-in time?
Some hours up to a couple of days for the readings to stabilise; check the data sheet.
Can I use MQ-135 for CO2?
Not accurately. It responds to many gases and cannot be used as a reliable CO2 sensor.
Parts for this guide
Calculators
Terms in this guide
Projects that use it
Put this into practice: 1 step-by-step build in our project library uses parts from this guide.
Keep learning
Sources
- Sensirion SGP40 data sheet and VOC index application note
- Bosch BME688 data sheet
- ScioSense ENS160 data sheet
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.




