There are many reasons that may cause air pollution and affect the quality of the air. In many places, it is necessary to monitor air quality, such as in hospitals, and the rate of harmful gas emissions, such as in factories.
In this tutorial we make a high-efficiency alarm system that will notify you when harmful gases are released into the air using the MQ-135 sensor.
Connect the wires between the MQ-135 sensor and the Arduino, as shown in the image below.
Connections from the MQ135 sensor:
• VCC pin→ Arduino 5V pin
• GND pin→ Arduino GND pin
• A0 pin→ Arduino pin A0
Now access the serial monitor on your Arduino IDE by clicking on the magnifying glass icon at the top right corner.
As shown in the image below, the serial monitor now displays the sensor reading value and gas detection status. The value is updated and printed every second due to the delay we added in our code.