CO2 Sensor, for your concentration!


Have you ever felt tired, weak or asphyxiated? Maybe there are many people in a small place? If your answer is affirmative, the most probably cause is the Carbon Dioxide. This gas isn’t toxic but, at high concentrations, it makes you less productive (there are many studies and researches about this). I have noticed this problem when I was at school and I decided to solve it. This sensor can tell you when there is an excessive level of CO2 in your classroom, or in your office. At this point, to solve the problem, you can open the windows for a few minutes and change of air (ideal would be a ventilation system). In this article, I’m going to show you how to construct this sensor with Arduino for a minimal cost.


What we need?

  • Arduino Nano
  • Breadboard (400 points)
  • MQ135 air-quality sensor (here the library)
  • Wires for connections
  • Yellow and red leds
  • 220 Ohm Resistors
  • 3D printer (optional)
  • HC-06 Bluetooth module (optional)
  • 3D files at this link
  • You can do anything without the Arduino code! Download it here

As you can see, I added a bluetooth module to the sensor. It is optional but with it you can look up the PPM (Parts Per Million) level with your Android smartphone. I’m sorry for Apple users… 😉


In normal conditions, and outside, the level is nearly to 400 ppm (but, unfortunately, it is increasing rapidly as you can see on this website). The level of 1500 PPM can be considered a threshold value for work and concentration, then it is impossible to work to fullest potential (efficiency decrease about 50%) . Furthermore, the 3d printer is optional because you can make the case with another material. For those who want to print it, I suggest them to print with PLA.



Don’t worry about the electronics, if you are a beginner with Arduino, you should see the wiring diagram to understand how this sensor works and all the connections I have made. I also shared the Arduino code so you can immediately start monitoring your “emissions”.

This slideshow requires JavaScript.

Actually, you should use 220 Ohm resistors for the leds, that I have forgotten them on the wiring diagram. You can also see that I have used some magnets and cents to hold the face to the case. For the code, you should download the library and replace the value with the current atmosphere ppm level (look up here). Then upload the code, that I had shared, on Arduino, also changing here the current value. However, I added a tutorial on the code that I had shared. If you are interested about how the sensor works, you can visit the website of Davide Gironi.

You can download all the files from Thingiverse from the link in the list … I wait you for the next tutorial!


I hope I was helpful and clear in the description, any clarification or suggestion is welcome. Thanks for reading the article!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s