Skip to content

hpsaturn/co2_m5coreink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PlatformIO ViewCount

M5CoreInk Multi Sensor

This project use the CanAirIO Sensors Library to have a complete air quality device. Thanks to this library you able to have many posibilities of sensors and variables automatically, for example you can connect one CO2 sensor or the combination of it with particulate meter sensors (PM2.5) or environment sensors (T, H, P, Alt, etc). The library able to detect and select each driver and thrid party library for handling these sensors and give you the complete list of variables with a few lines of code. Plese see the demo video

Also the installation of this firmware in your device is possible only with one click via an easy Web installer without WiFi or compiling anything.

Demo

CanAirIO Sensors Lib DEMO with M5CoreInk

Features

  • Multi variable - multi sensor support with auto configuration
  • CO2 sensor calibration via wheel button
  • Continuos mode or low power consumption mode
  • Automatic sensor refresh interval on USB connection
  • Partial update (fast refresh without blink) in USB mode
  • Support two I2C channel (Hat or external port).
  • Auto selection of sample time by sensor type
  • Low power consumption in Battery mode (Deep sleep via RTC)
  • Able to set beep alarm for PM2.5 or CO2
  • Redraw complete screen and first setup via midle button
  • Demo mode with button down
  • UART implementation for ext port via menu
  • Auto selection of sample time in order of sensor type
  • NTP sync via WiFi or Bluetooth
  • Compatibility with CanAirIO project

Installation

We have some alternartives for install the firmware:

Easy way via CanAirIO Web Installer

It's the more easy alternative, you only need a USB cable and Chrome or Edge browser, then only enter to CanAirIO Web Installer page and choose on special versions section the option: M5CoreInk Basic Air Station and follow the instructions.

video_2021-11-13_23-36-10

Alternative: Build your own firmware

Alternative to compiling and inatall your own firmware via PlatformIO with your favourite IDE (i.e. VSCode). Follow this instructions. Also, you may need to install git in your system.

Clone the repo

git clone https://github.com/hpsaturn/co2_m5coreink.git

and after that:

Via IDE (vscode)

Connect the M5CoreInk or compatible board via USB. In Windows 10, drivers are installed automatically. I guess with other OS will be automatically installed too.

Open cloned folder with your PlatformIO IDE and build & upload it. For details please see the documentation, but the process flow is more easy than Arduino IDE flow, but you can also import it to the Arduino IDE if you want.

PlatformIO Build tool

Via PlatformIO CLI

After the clone, enter to directory and you can build and upload the current firmware from CLI:

pio run --target upload

and that it is! :D

Usage

This firmware works out of box without any configuration, but it has 3 modes:

Button Middle

For full refresh of the screen, only use that for example the screen is corrupted when the battery over.

Button Up

For enter to CO2 calibration mode. Only send the command when you are with the sensor on outdoors for more than 10 minutes. Please read the documentation.

Button Down

In this mode the green LED turn on and the device try to detect in execution any sensor, also it show the variables continously. For exit, only press the middle button. This mode consume the battery.

M5CoreInk Air statation Calibration mode


3D Printed sensors

Ext-port multi-sensor alternative

M5Core Ink Ext port sensor alternative

You can have one of this on Tindie for support my work or build one.

CO2 Hat alternative

In this repo you able to download the 3DPrint files for making a CO2 hat for M5CoreInk/M5StickC, this use a Sensirion SCD30 sensor for get CO2 values.

Components

Description Store link
M5CoreInk M5Stack
M5Stack Proto M5Stack
Sensirion SCD30 Mouser
M5StickC (compatible) M5Stack
M5StickC Plus (compatible) M5Stack

M5coreInk CO2 hat

3D print Files

Credits

Thanks to CanAirIO communitie for the feedback and tests.