CO2 Level Indicator (4x7 Segment RGB LED Manual Calibration)
Introduction: CO2 Level Indicator (4x7 Segment RGB LED Manual Calibration)
This DIY project shows you how to make your own CO2 level indicator, which shows you CO2 concentration (PPM - parts per million) when button is pressed and always on RGB LED shows constantly how good or bad your surrounding air quality is.
The project was done due to COVID-19 which spreads easily when air quality is poor. CO2 sensors with displays are nowadays quite expensive (starting from 120€ and above) and if you want to monitor multiple room air quality at the same time then it is reasonable to do few sensors with displays on your own. Making just one costs about 40-60€ depending from where you are getting your parts.
Supplies
1 x Soldering iron
1 x Cutting pliers
1 x Tweezers
1 x Multimeter (optional)
1 x Tin 20-100 cm depending on thickness
1 x CO2 sensor MH-Z19 or MH-Z19C
1 x 7-segment display TM1637
1 x Arduino nano
1 x 5 mm RGB LED 5 mm (common cathode)
3 x 220 ohm resistors (SMD 0603)
1 x PCB
1 x 3D printed case
Step 1: Ordering PCB
I ordered my PCBs from JLCPCB because they can produce really good quality PCBs for a very good price. You can order a minimum of 5 PCBs for just $2. To get the PCB manufactured, upload the Gerber file from this step. Upload the .zip file or you can also drag and drop the Gerber files. After uploading the zip file, you’ll see a success message at the bottom of the file that is successfully uploaded. Choose color of the PCB you want and place the order. You can review the PCB in the Gerber viewer to make sure everything is good.
Step 2: Schematics
Some documentation and schematics about this project.
Step 3: TM1637 Header Modfication
TM1637 7-segment display comes usually with JST RE 1x4 right angle male headers (2.54 mm pitch) but this PCB is designed this way that TM1637 is mounted on top of PCB with straight 1x4 JST RE male headers.
Step 4: Electronics Assembly
When you have modified your 7-segment display headers then your CO2 level indicator is ready for assembly. First thing to do is to solder SMD resistors on your PCB carefully with tweezers and soldering iron. Next thing which goes on PCB is RGB LED. Its important to use common cathode RGB LED. It has 4 legs and longest leg is cathode which goes through hole which has rectangle pad around it and has I-marking. Now push LED to the very end on the top side of the PCB. LED flat surface has to touch PCB. As the pads are close together you have to be very careful when soldering LED legs to the PCB. After soldering check visually if there is connection between those 4 pads (these should not be connected to each other). You can optionally use multimeter to determine if connections are as they should be. 472
Cut excess pins length using cutting pliers. Hard part is now over.
Now place Arduino Nano with headers on through PCB holes. Fix this part in place by soldering all pins to PCB. For next step place display and CO2 sensor through PCB holes and solder them in place. And for the last step you need two tactile switches. Place them through PCB and solder in place. Now is your electronics assembly finished.
Step 5: Case
Now its time to put electronics into 3D printed case. Place case bottom part on the table, open side up and button holes on the left. Place buttons into button holes while whole electronics assembly is diagonally and then align case USB hole with Arduino USB socket. Now pick up case lid and push it on. It should lock in place. Finally physical part is over. Next step is uploading code and testing
Step 6: Uploading Code and Testing
Download Arduino IDE and push that code on Arduino Nano. Everything will work unless you have some bad or wrong electrical connections from previous steps. There is also a servo output but then you need to change some code to use it.
Step 7: Usage
This little case has two button holes. Top one is for resetting Arduino and bottom one has two functions: quick press activates display for 30 seconds and long press (more than 5 seconds) activates manual calibration which has to be done outdoors and lasts 5 minutes. After calibration display should show number around 400 ppm which is normal CO2 concentration in nature. That number can vary depending on if you live in city where CO2 emission is bigger or in the countryside where CO2 concentration should be lower. 991