Zum Inhalt springen

9528 – MQ-135 Gas Sensor/en

Aus JW Tech Wiki

Documentation notice: This technical documentation was independently rewritten from an archived supplier source. Check technical details and commands against the product version and manufacturer documentation before use.

Summary

The MQ-135 uses tin dioxide (SnO2) as sensing material. It is sensitive to ammonia, sulfide and benzene vapors; conductivity rises with gas concentration.

Related products at JW Tech

Technical overview

  • Sensing material: tin dioxide (SnO2); low conductivity in clean air
  • Sensitive gases: ammonia, nitrogen oxides, alcohols, aromatic compounds, sulfides, fumes
  • Supply voltage: 2.5 V to 5.0 V
  • Dimensions: 40.0 mm × 21.0 mm; mounting hole Ø 2.0 mm
  • Analog output on AOUT; digital output on DOUT
  • Pico wiring: VCC→3.3 V, GND→GND, AOUT→GP26, DOUT→GP22
  • STM32F103RBT6 wiring: VCC→3.3 V, GND→GND, AOUT→PA6, DOUT→PA4
  • Arduino UNO wiring: VCC→5 V, GND→GND, AOUT→A0, DOUT→D2
  • Demo code available for Pico (C/MicroPython), STM32 (HAL/Keil) and Arduino (Gas_Sensor.ino)
  • Preheat: about 1 minute needed before the sensing material reaches operating temperature

Commands and examples – verify before use: 

sudo apt-get install p7zip-full
cd ~
sudo wget https://files.waveshare.com/upload/e/e9/MQ-135-Gas-Sensor-code.7z
7z x MQ-135-Gas-Sensor-code.7z -o./MQ-135-Gas-Sensor-code
cd ~/MQ-135-Gas-Sensor-code/Pico/c/build/
cmake ..
make -j9
cp main.uf2 /media/pi/RPI-RP2/

Notes and version constraints

  • STM32 examples are based on STM32F103RBT6 or STM32H743; other boards require custom porting
  • Arduino examples target the UNO; compatibility of other boards must be verified
  • Pico firmware must be flashed beforehand; use the exact firmware version from the demo archive
  • The ~1-minute preheat time is often underestimated; readings are only meaningful after that
  • No calibration data, certifications or warranty information are provided in the source

Source and revision record