Making a CO2 Concentration Alert Keychain With Infrared SCD41 Photoacoustic Sensor
by Jaychouu in Circuits > Sensors
1990 Views, 27 Favorites, 0 Comments
Making a CO2 Concentration Alert Keychain With Infrared SCD41 Photoacoustic Sensor
![首图.png](/proxy/?url=https://content.instructables.com/F86/TFEB/LG3ZI4BE/F86TFEBLG3ZI4BE.png&filename=首图.png)
![QQ图片20230330110542.png](/proxy/?url=https://content.instructables.com/FEM/PJ38/LG15XSA8/FEMPJ38LG15XSA8.png&filename=QQ图片20230330110542.png)
![ezgif.com-optimize (1).gif](/proxy/?url=https://content.instructables.com/FYX/AFUS/LG15XS3A/FYXAFUSLG15XS3A.gif&filename=ezgif.com-optimize (1).gif)
![How A Photoacoustic CO2 Sensor Works - Gravity: I2C SCD41 Infrared CO2 Sensor (400 - 5000 ppm)](/proxy/?url=https://content.instructables.com/F3W/0VJX/LG15XRMC/F3W0VJXLG15XRMC.jpg&filename=How A Photoacoustic CO2 Sensor Works - Gravity: I2C SCD41 Infrared CO2 Sensor (400 - 5000 ppm))
![ezgif.com-optimize - 副本.gif](/proxy/?url=https://content.instructables.com/FYQ/ZIF5/LG15XS05/FYQZIF5LG15XS05.gif&filename=ezgif.com-optimize - 副本.gif)
Background
Carbon dioxide emissions seem to be a major culprit of environmental pollution. Not only do they cause a decrease in air quality, but they can also lead to symptoms such as headaches, drowsiness, and decreased attention. I don't want to become a lazy panda due to poor indoor air quality, do you?
If you're like me and worried about your indoor environment quality, you may need a portable carbon dioxide detection device. A detection card made using an infrared light sound carbon dioxide sensor should be able to help us achieve this. This type of detection card can help us understand the concentration of carbon dioxide in the surrounding environment. That way, we can determine when to ventilate or go outside for fresh air. No more complaining about dizziness and blurred vision due to insufficient oxygen indoors! With this small device, we can always be aware of indoor air quality.
Supplies
![QQ图片20230329133454.png](/proxy/?url=https://content.instructables.com/FYK/F6SO/LG15XS77/FYKF6SOLG15XS77.png&filename=QQ图片20230329133454.png)
Infrared carbon dioxide sensor ×1
1.47" 172×320 IPS LCD Display ×1
3.7V battery ×1
3D printed shell ×1
Acrylic board ×1
Switch ×1
Connection Schematics
![电路图.png](/proxy/?url=https://content.instructables.com/FE1/AIX7/LG15XSAA/FE1AIX7LG15XSAA.png&filename=电路图.png)
ESP32-C3 -- Infrared Light Sound Carbon Dioxide Sensor
3.3V - VCC
GND - GND
9 - SCL
8 - SDA
ESP32-C3 -- 1.4 Inch High-definition Display
3.3V - VCC
GND - GND
4 - SCLK
6 - MOSI
7 - CS
2 - RES
1 - DC
10 - BLK
ESP32-C3 -- RGB LED Strip
3.3V - VCC
GND - GND
20 - DI
Shell Design
![QQ图片20230313113040.jpg](/proxy/?url=https://content.instructables.com/FQM/ISL7/LG15XS76/FQMISL7LG15XS76.jpg&filename=QQ图片20230313113040.jpg)
![QQ图片20230329141946.png](/proxy/?url=https://content.instructables.com/FFM/W4NI/LG15XS79/FFMW4NILG15XS79.png&filename=QQ图片20230329141946.png)
![QQ图片2023032.png](/proxy/?url=https://content.instructables.com/FCB/5HMJ/LG15XS5X/FCB5HMJLG15XS5X.png&filename=QQ图片2023032.png)
![QQ图片20230329150259.png](/proxy/?url=https://content.instructables.com/F9L/H65A/LG15XS7B/F9LH65ALG15XS7B.png&filename=QQ图片20230329150259.png)
![QQ图片20230329152044.png](/proxy/?url=https://content.instructables.com/FDF/XCIF/LG15XS7C/FDFXCIFLG15XS7C.png&filename=QQ图片20230329152044.png)
![QQ图片20230329152401.jpg](/proxy/?url=https://content.instructables.com/F19/CEYZ/LG15XS7F/F19CEYZLG15XS7F.jpg&filename=QQ图片20230329152401.jpg)
- To create a 3D shell, first, measure the spatial layout and size of the hardware.
- I used Solidworks to draw the model, which consists of a 3D printed shell and an acrylic board cover, with reserved positions for the type-C interface, switch, and probe hole.
- Slice and print the 3D model.
- Cut the acrylic cover: According to the size of the shell, use CAD software to draw a cutting diagram. The blue and black lines in the drawing are used to distinguish processing priority, with black parts being processed first followed by blue parts.
I used a 1mm black semi-transparent acrylic board.
Hardware Soldering
![QQ图片20230329171709.png](/proxy/?url=https://content.instructables.com/FWD/1YZR/LG15XS7H/FWD1YZRLG15XS7H.png&filename=QQ图片20230329171709.png)
![QQ图片20230330095526.png](/proxy/?url=https://content.instructables.com/FLZ/1L58/LG15XS7I/FLZ1L58LG15XS7I.png&filename=QQ图片20230330095526.png)
![QQ图片20230330102347.jpg](/proxy/?url=https://content.instructables.com/F5P/SBQ8/LG15XS8T/F5PSBQ8LG15XS8T.jpg&filename=QQ图片20230330102347.jpg)
The hardware that needs to be soldered includes: ESP32-C3, infrared light sound carbon dioxide sensor, 1.4 inch high-definition display, 3.7V battery, RGB LED strip, and switch.
Complete the circuit soldering according to the circuit connection diagram. Be sure to note that pin 10 of the ESP32-C3 is on the back.
Then, the soldering work is done.
Hardware Assembly
![QQ图片20230329141942.png](/proxy/?url=https://content.instructables.com/F1T/E6K3/LG15XS78/F1TE6K3LG15XS78.png&filename=QQ图片20230329141942.png)
![ezgif.com-video-to-gif.gif](/proxy/?url=https://content.instructables.com/FRG/R3EH/LG15XS5V/FRGR3EHLG15XS5V.gif&filename=ezgif.com-video-to-gif.gif)
![ezgif.com-optim.gif](/proxy/?url=https://content.instructables.com/FOR/SCW4/LG15XRXT/FORSCW4LG15XRXT.gif&filename=ezgif.com-optim.gif)
![QQ图片20230330102343.jpg](/proxy/?url=https://content.instructables.com/F64/NHBT/LG15XS8S/F64NHBTLG15XS8S.jpg&filename=QQ图片20230330102343.jpg)
![QQ图片20230330102338.jpg](/proxy/?url=https://content.instructables.com/F9I/BFT6/LG15XS8R/F9IBFT6LG15XS8R.jpg&filename=QQ图片20230330102338.jpg)
![QQ图片20230330102353.jpg](/proxy/?url=https://content.instructables.com/FJK/6E75/LG15XSA2/FJK6E75LG15XSA2.jpg&filename=QQ图片20230330102353.jpg)
![QQ图片20230330102403.jpg](/proxy/?url=https://content.instructables.com/FDT/RWW9/LG15XSA3/FDTRWW9LG15XSA3.jpg&filename=QQ图片20230330102403.jpg)
![QQ图片20230330102408.jpg](/proxy/?url=https://content.instructables.com/FE0/ANHN/LG15XSA4/FE0ANHNLG15XSA4.jpg&filename=QQ图片20230330102408.jpg)
![QQ图片20230330102418.jpg](/proxy/?url=https://content.instructables.com/FW2/WWVH/LG15XSA5/FW2WWVHLG15XSA5.jpg&filename=QQ图片20230330102418.jpg)
![QQ图片20230330102429.jpg](/proxy/?url=https://content.instructables.com/FLP/KPM3/LG15XSA7/FLPKPM3LG15XSA7.jpg&filename=QQ图片20230330102429.jpg)
![QQ图片20230330102424.jpg](/proxy/?url=https://content.instructables.com/FSZ/Q7DI/LG15XSA6/FSZQ7DILG15XSA6.jpg&filename=QQ图片20230330102424.jpg)
- Secure the switch with hot glue.
- Secure the battery with double-sided tape on the shell.
- Use the protrusion points on the model and the sensor's hole position to secure the infrared carbon dioxide sensor, and apply a small amount of hot glue at the four points of contact.
- Install the ESP32-C3 and align the type-C interface with the reserved position.
- Use M2 screws to fasten the main control board to the mounting bracket to avoid displacement of the main control board when inserting the data cable.
- Paste double-sided insulating tape on the back of the LED strip for easy fixing and to prevent short circuits caused by contact with solder joints.
- Use hot melt glue to fix the screen.
- Finally, apply UV glue to the outer shell and install the acrylic cover.
Uploading Program
![QQ图片20230329164823.png](/proxy/?url=https://content.instructables.com/FBV/U5U4/LG15XS7G/FBVU5U4LG15XS7G.png&filename=QQ图片20230329164823.png)
Connect the device to the computer using a USB cable and upload the program.
In the program, the data read by the infrared light sound carbon dioxide sensor is displayed on the screen.
The trend line of changes in carbon dioxide concentration is displayed on the screen.
The number of LED beads/light strip breathing frequency is lit by the RGB LED strip to reflect the size of the carbon dioxide concentration.
Testing
![ezgif.com-optimize (1) - 副本.gif](/proxy/?url=https://content.instructables.com/FVG/ZACI/LG15XS0T/FVGZACILG15XS0T.gif&filename=ezgif.com-optimize (1) - 副本.gif)
When you see the keychain light up red, remember to open the window for ventilation or go outside for fresh air.