CO₂ Meter with MQ-135 sensor (Don't miss it, it's not what it looks like)

Last modified 7 months

In this article I am going to tell you what you need to do to set up a CO2 meter with one sensor MQ-135 (sic). An easy and cheap tutorial (it's free).

I hope that, if you are reading this article, it is because you have thought about build an easy and cheap meter with a MQ-135 sensor and an Arduino or ESP8266You have searched the internet and came up with this page.

The sole objective of this page is that people who want to build a CO₂ meter with a MQ-135 sensor find this information AND DON'T DO IT!

The same title of CO₂ meter with an MQ-135 sensor is an incongruity in on to find out why.

There are many projects that promise to measure CO2 but actually use it, as in this case, electrochemical sensors for general use for the detection of organic volatiles which not only measure CO2, but also all these gases togetherso that they really you don't know what you are measuring.

These sensors they are not suitable for measuring CO2. These sensors measure all organic gases together (Ammonia, Nitrogen Dioxide, Alcohol, Benzene, Carbon Dioxide and Monoxide, Smoke, etc), so if there is someone who is throwing themselves hydroalcoholic gel or someone smoking or there is a source of combustion, such as a chimney, the measurements will be triggered. no way of knowing what is making them go off.

The only parameter you could get with sensors like the MQ-135 would be a: "Value in unknown units of something unknown in the air, which we do not know what it is or how much of it there is.". As you can see, something very unhelpful.

What a CO₂ meter has to do, as obvious as it may seem, is to measure CO₂, and to do so with as much CO₂ as possible. accuracy better.


I have written this article because many users have come to the Telegram group or have written in comments, full of excitement, because they had built a CO2 meter with the MQ-135but it was not working properly and they asked for help. The best help would be if they had read an article like this one..

If you really want to build a reliable, accurate CO2 meter that actually measures CO2, check out this tutorial:

The rest of the article, from here on, is of no importance. I have written it simply so that if you want to set up a meter with the MQ-135 sensor to waste your time and money, you will know how to do it.

Materials needed

To mount the MQ-135 sensor meter you will need the following:

  • 1 Sensor called MQ-135 which is worthless.
  • 1 Arduino

As I don't want you to build this meter (have you already read why?), I'm not going to give you the schematic here. You will have to look it up yourself on the internet.

Code for Arduino

Here is some code to use this sensor with the Arduino. In case you want to build the meter, really and despite my warnings, I recommend you to look for it because I don't even know if this one works.

Library Repository :
Author : Damrongwit Nusuk
Email : [email protected]
Website :

#include "MQ135.h"
#define ANALOGPIN A0 // Define Analog PIN on Arduino Board
#define RZERO 206.85 // Define RZERO Calibration Value
MQ135 gasSensor = MQ135(ANALOGPIN);

void setup()
  float rzero = gasSensor.getRZero();
  Serial.print("MQ135 RZERO Calibration Value : ");

void loop() {
  float ppm = gasSensor.getPPM();
  Serial.print("CO2 ppm value : ");

You can find the page where this code is published in GitHub here (sorry, the author seems to have removed the repository).

Final advice

Of course, my only advice is to click below and build a proper CO₂ meter:

3 thoughts on “Medidor de CO₂ con sensor MQ-135 (No te lo pierdas, no es lo que parece)”

Leave a comment