🛒 Arduino, ESP32 & modules

Gas, Pressure, Air

Air quality and barometric pressure sensors — MQ-135 gas/smoke sensor and GY-BMP280 barometer-altimeter. For home air monitors, weather stations and drone projects.

Gas, Pressure, Air — buying guide

The Gas, Pressure, Air category is for projects that monitor the environment: you can measure atmospheric pressure and see changes in gases in the air. These two sensors work in different ways, so their wiring is also different.

What to look for

  • Pressure: GY-BMP280 measures pressure and temperature, and you can calculate altitude from the pressure. It does not measure humidity.
  • Air quality: MQ-135 responds to gases like ammonia, benzene, alcohol and smoke. It does not give an exact gas concentration; it gives a relative value based on how clean the air is.
  • Heating: MQ-135 has a built-in heater. After powering it, wait until the reading stabilizes. The sensor draws a lot of power, so it does not run on battery for long.
  • Voltage: BMP280 is connected over I2C. The analog output of the MQ-135 can go up to 5 V, so connect it to an ESP32 through a voltage divider.
  • Safety: MQ-135 is not a replacement for a certified gas detector.

Typical projects

  • A small weather station that shows pressure and temperature on a display.
  • A light that indicates when it is time to ventilate the room.
  • A device that roughly measures altitude.

Related categories

Does MQ-135 measure CO2?

The sensor also responds to CO2, but the reading is affected by other gases as well. So the result is considered a general indicator, not an exact CO2 concentration.

How accurate is altitude with BMP280?

Altitude is calculated from atmospheric pressure, and when the weather changes, the result changes too. It works better for seeing relative changes, for example, the difference between floors.