Interfacing MQ-135 Gas Sensor with Arduino

Interfacing MQ-135 Gas Sensor with Arduino

In this article, you will see how to interface MQ-135 sensor to Arduino and read Co2 levels in the atmosphere. According to need, you can display the CO2 levels on Serial Monitor or LCD. I made this article simple and easy to understand so that beginners can also understand. Before getting started you must know about MQ-135. MQ-135 is a gas sensor which is sensitive to CO2. The change in CO2 levels changes the resistance of sensor which results in the change in the output of the sensor. The output generated from the sensor is feed to Analog Input to Arduino board ( In my case Arduino Uno). The analog data is taken by ADC of Arduino, according to the voltage levels, it displays CO2 levels in ppm.

Specifications

mq2 sensorMQ135 pinout

A0 – Analog Output of the Sensor

D0 – Digital Output of the Sensor

GND – Ground

VCC – 5V

You can use both A0 and D0, where A0 gives analog output by which we determine the value of CO2 in PPM. The D0 of the sensor gives output high when the CO2 reaches the high threshold.

Components Required

  • Arduino Uno
  • USB Cable A to B
  • LCD Display Screen 16×2 I2C  (Optional)
  • Gas Sensor – MQ-135
  • Bread Board
  • Jumper Wires (Male to Male)  – 3
  • Jumper Wires Pack (Male to female) – 4

Connections

MQ-135 sensor with Arduino

mq135 arduino

MQ-135 Gas sensor with LCD and Arduino

mq135 arduino with lcd

Download Libraries

MQ-135 Arduino Code
How to Make Arduino Weather Station

How to make CO, LPG and Smoke Detector

1 thought on “Interfacing MQ-135 Gas Sensor with Arduino”

Leave a Reply