MQ 135 Gas Sensor


I am working on a small project, where the MQ135 Gas sensor is supposed to return the C02 Quantity in the air.
I have some question regarding the sensor and i would like some help.

According the Datasheet of the MQ135, the quantity of CO2 in the air, depends (almost proportional) to the quotient of the Sensor Resistance at various concentration of gas over that at 100 ppm of NH3. And that the quotient is depend of the temperature of the sensor (logarithm, i think).


  1. When i plug the sensor to my arduino Uno (After a whole day of calibration) (5 V -> VCC, D4 -> D0, A0 -> A0, GND - > GND), i receive around 40 printed on the screen (Serial.println(analogRead(A0))). What are this value?

Thank you.


I have only used the NDIR type of CO2 sensor because it has fast response, high sensitivity and range, and minimal 'warm up' time. I work in an office where the air typically is 600-800 ppm of CO2. This is a very low level, less than 0.1 percent. If your number of "40" is from digitalRead()-ing an analog pin, then it represents a small number, which is consistent with the amount of CO2 in air. Do an experiment: place the sensor in an enclosure and breath the limited air inside, in order to elevate the CO2 level. Does the go way up?


actually, the sensor functions well. When i breath on it, the value (which was around 40) increases, then decreases.
I believe this value, is the resistance value of the sensor. Because the Sensor measures the quality of Air, and therefore of NH3, C02, Alcohol, ... . I think i am supposed to use the Graph in the Datasheet to pull out the CO2 level in the air. I wanted to make sure that the values that i receive from the sensor, really are the Resistance of the Sensor (... or are they the quotient?).

Your Arduino will read the voltage of the output of the sensor. analogRead() returns a number from 0 to 1023, which represents 0 volts to the voltage of your Arduino (usually 5 or 3.3 volts.) You can calibrate the output against known concentrations and do an analysis, but you cannot determine the sensor resistance this way.

If you wish to do so, construct a voltage divider, with the sensor on one side, and a precision resistor on the other. Read the voltage from the center and calculate the resistance from the voltage divider formula.