Build a CO2 meter 3D-printed with sound alarm and colored display to indicate ranges. All information is given so you can build your own CO2 meter.
Since in winter of 2020 one way to fight the corona virus is to keep the air fresh in closed rooms. One indicator of freshness of air is the CO2 concentration which should be kept below 1000ppm and should definitely be less than 2000ppm.
So the idea of Mark and myself was to build a CO2 meter which can be used in kindergarten and schools.
The CO2 concentration is therefore measured and displayed by a colored ring meter so it is easy to understand what needs to be done.
Also the temperature and humidity are measured and displayed. The parameter which is prominently shown as a ring meter can be toggled with the lower button.
An alarm sound is triggered when the CO2 concentration crosses the threshold of 2000ppm. The CO2 meter has a battery so it can be carried around to wherever it is needed, since the TTGO has also WiFi and BLE one could stream the values to a central control device.
In this blog we give all what is needed to build a CO2 meter yourself
The software is available at GitHub
We printed the housing with an Artillery Genius which as 330€ on Amazon and about 220€ on Banggood.
You can find the .stl files so you can print the housing and the design elements yourself at Thingiverse.
The housing was designed using Fusion 360. This was my first experience with a CAD tool and it took about two weeks to get a housing I was happy with.
To learn how to use Fusion 360 I watched a fair amount of videos, the following list might help when you want to find your way into Fusion 360.
Fusion 360 Snap Fit Cases | 3D-Printable Raspberry Pi Case
Fusion 360 Tutorial – PCB Mounting Plates
Fusion 360 Tapered Loft Tutorial! FF86
Loft in Fusion 360: Beginner to Advanced Techniques
Loft: adding centerline rail
Loft: if you don’t have center point you can create one by project one or point sketch feature - - https://www.youtube.com/watch?v=3Iu6UVemyiA
Fusion 360 - Cutting a hole
Sliding Dovetail Lid for 3D Printed Box | Fusion 360 Tutorial
Importing and Editing STL Files in Fusion 360
Fusion 360 Tutorial – Easy Snap Fit Cases!
centralize item
How to Create 2D Drawings in Fusion 360 (Beginners) - Learn Autodesk Fusion 360 in 30 Days: Day #26
Copy and Paste Sketches and Components in Fusion 360
How to Create Assemblies and Joints in Fusion 360 - Learn Autodesk Fusion 360 in 30 Days: Day #25
NDIR CO2 Sensor MH-Z14A PWM NDIR Infrared Carbon Dioxide Sensor Module
Where to buy?
GY-BME280 Barometric Sensor Parent
Where to buy?
TTGO T-Display ESP32 CP2104 WiFi bluetooth Module 1.14 Inch LCD
Where to buy?
KEPO KPMB-G2212L-K6406 Miniatur Summer
Where to buy?
3.7V 820mAh 1S LiPo Battery or bigger
Where to buy?
I used screws for plastic from SCREWERK
STP33A0300100S
Black steel screw are nicer if the housing is printed with black filament.
Using the PWM signal of the CO2 sensor the following schematics works provided that the inputs of the TTGO are defined accordingly. The UART output can be used as well but is not needed with the SW we are using
The software for the TTGO was developed by Mark and it is written in C. We are working to make the SW publicly available TBD, once it is available the blog will be updated.
The TTGO can be programmed using the Arduino IDE. The tutorial Installing the ESP32 Board in Arduino IDE shows what needs to be done to use the Arduino IDE to program the ESP32 for - Windows - Linux - Mac OS X
Note, the above solution did not work on MacBook Pro with Catalina , what worked is described in https://github.com/espressif/arduino-esp32/blob/master/docs/arduino-ide/mac.md
And comes down to set those commands in a terminal
mkdir -p ~/Documents/Arduino/hardware/espressif && \
cd ~/Documents/Arduino/hardware/espressif && \
git clone https://github.com/espressif/arduino-esp32.git esp32 --depth 1 && \
cd esp32 && \
git submodule update --init --recursive --depth 1 && \
cd tools && \
python get.py
The following libraries are needed
https://github.com/Xinyuan-LilyGO/TTGO-T-Display Copy TFT_eSPI to the <C:User Name> directory
https://github.com/tobiasschuerg/MH-Z-CO2-Sensors
https://github.com/finitespace/BME280
https://github.com/PaulStoffregen/SoftwareSerial
https://github.com/fernandomalmeida/protothreads-arduino
https://github.com/vancegroup-mirrors/avr-libc/blob/master/avr-libc/include/avr/interrupt.h
As reported on GitHub there is a problem when using a Mac, I had the same issue and could fix it by installing CP210x USB to UART Bridge VCP Drivers
For attribution, please cite this work as
Sterr (2020, Nov. 27). Uwe's Blog: DIY CO2 meter with elefant. Retrieved from http://uwesterr.de/posts/2020-11-26-diy-co2-meter-with-elfant/
BibTeX citation
@misc{sterr2020diy, author = {Sterr, Uwe}, title = {Uwe's Blog: DIY CO2 meter with elefant}, url = {http://uwesterr.de/posts/2020-11-26-diy-co2-meter-with-elfant/}, year = {2020} }