This post talks about using the MQ-135 Air Quality and Hazardous Gas sensor with an Arduino.
MQ-135 Air Quality and Hazardous Gas Sensor
The MQ-135 air quality and hazadous gas sensor is a small unit that reports the relative quality of the air.
This specific variant works particularly well with detecting carbon dioxide, benzene, alcohol, and smoke in the air.
These gasses are typically used as a measure of air quality. This is why this sensor is typically sold as a “Air quality and hazardous gas sensor”.
The analogue pin will output a relative value according to the amount of particulates in the air.
Without calibration it is not possible to relate this to a specific concentration (in parts per million) but works well as a relative measure.
When using this in an area you will be able to detect if the air quality is getting better or worse by the trend in values reported.
Wiring it up to an Arduino
This MQ-135 sensor has two pins which can be used to read the value of the sensor. The first is a basic analogue pin which will return a value between 0 and 5 volts.
This voltage represents a relative range of high to low gas concentration. The lower the voltage the lower the amount of gas detected.
On the underside of the sensor a potentiometer allows configuring of the digital pin. The digital pin will be brought high once a specific level of gas is detected. This level is set by the potentiometer on the back.
The VCC pin must be connected to the 5 volt pin on the Arduino. The GND pin must similarly be connected to the Ground pin on the Arduino.
Programming the Arduino with the MQ-135 Air Quality and Hazardous Gas Sensor
In this post I am using the analogue pin to read the relatively value of the sensor.