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.
This is the second version of a my previous project. It’s more complex but it’s more complete than the first. The most important changes are: the add of an OLED display, the Carbon Monoxide Sensor (toxic gas that derivates from incomplete combustions), the ventilation system and the possibility to record data. I have recorded the CO2 PPM in my classroom and this is the result. When we have opened the windows, the values have decresed until 400 PPM. Thanks to the RTC module, we know the time of a determined record.
What we need?
- Arduino Mega (another Arduino doesn’t have enough memory for the libraries)
- MQ7 CO sensor
- RTC module (Date, hour and temperature)
- 2 switches
- 1 button
- Fan 5V 30mm
- Micro-SD module
- Power bank (suggested)
- OLED display
- Wires for connections
- Yellow and red leds
- 220 Ohm Resistors
- 3D printer (optional)
- HC-06 Bluetooth module (optional)
- 3D files at this link
- Libraries at this link
- Arduino code: Under revision
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.
To calibrate the CO sensor you can read the value near a car exhaust pipe (where there are about 60 PPM). Over this threshold value, a buzzer will sound acoustic signals.
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, also changing here the current value. However, I added a mini-tutorial inside the code. If you are interested about how the MQ135 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!