Maker.io main logo

The world's most programmer-favored CO2 monitor

2023-10-16 | By M5Stack

Share

M5Stack

* Thanks for the source code and project information provided by @komasayuki

 

Project View

1

2

3

4

 

Story

 

Development platform

2

System Configuration

2

parts

  • Octocat figure 3 inch
  • M5Stack Atom Matrix 
  • CO2 sensor MH-Z19C
  • 5V output step-up DCDC converter
  • Diode that steps down 0.15V or more (I used the 1S2076A I had)
    • Since the operating voltage of MH-Z19C is narrow between 4.9V and 5.1V, it may come off when using the USB voltage (5V±5%).
    • Step down the USB voltage with a diode and then output 5V with a 5V output step-up DCDC
  • Electrolytic capacitor 47uF
  • Ceramic capacitor 0.1uF
  • If you want to supply 5V power from a source other than USB-C, use a DC jack etc.

Case (Octocat) processing

Place the USB-C with the USB-C facing outward so that you can rewrite software with the USB-C. Bend the 4 jumper cables at 90 degrees, insert them into the M5Stack, and harden them with UV resin. (Only the cable will be hardened with resin, and the M5Stack will be removable)

Bundle the cables together with heat shrink tubing and thread them through the holes in the Octocat's jaw.

The CO2 sensor is installed by making a small cut in the back of the head and embedding a pin socket. The DCDC converter is embedded in your head. Insert the DC jack into the head and secure it with a nut from the inside.

Octocat figures can be easily cut with a craft knife. The Octocat figure is 3inch = 7.62cm tall so it is small.

It feels like having surgery but try to make the hole as small as possible and make it as inconspicuous as possible.

software

The source code is here. https://github.com/komasayuki/co2-monitor

Arduino IDE uses PlatformIO because it is difficult to pass dependent libraries. Mac users

Copy Code
% brew install platformio

You can install it with If you don't have a Mac, please visit the PlatformIO official website .

After fetching the source code from the repository, first create a file to write your WiFi settings.

Copy Code
% cp ./src/config_CHANGE_ME_.h ./src/config.h

Please replace the SSID and PASSWORD in ./src/config.h with your home WiFi information.

Copy Code
#define WIFI_SSID ("xxxxxx")
#define WIFI_PASSWORD ("yyyyyyyyyyyy")

Now let's build it and write it to M5Stack Atom Matrix.

Copy Code
# build
% platformio run

# upload to M5Stack Atom Matrix
% platformio run -t upload

Background

Octocat is a mascot much loved by programmers. I kept the cuteness of Octocat as much as possible so that the wiring was as invisible as possible.

For programmers, CO2 is important because it affects their ability to concentrate. Plug it into your laptop at a cafe and show them you're a programmer.

The LED matrix displays the value of Round (CO2ppm / 100). It's in the 100th place of CO2 concentration.

  • 4-7 is green
  • 8-9 are yellow
  • 10- is red

This device connects via WiFi and becomes a web server. You can check the 24-hour log of CO2 on http://octocat.local.

This CO2 monitor is version 2. The left side is version 1.

2

NeoPixel SK6812MINI-E 5 lights emitting light in the head are passed through optical fiber to make the suction cups on the feet glow.

2

Atom Matrix is ​​small and easy to use. I released the source code so that everyone can integrate Atom Matrix in various ways.

Mfr Part # C008-B
ATOM MATRIX ESP32 DEV KIT
M5Stack Technology Co., Ltd.
Mfr Part # C123
ATOM S3 DEV KIT W/ 0.85-INCH SCR
M5Stack Technology Co., Ltd.
More Info
View More Details
Add all DigiKey Parts to Cart
Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.