Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
the-butcher committed May 22, 2024
1 parent 88a2dff commit f727fea
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 36 deletions.
39 changes: 18 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,52 @@
# MOTH.CO2.2
# moth.CO2.2

This projects provides instructions for building a CO₂ sensor from commercially available electronic parts combined with 3D printed housing parts.
This projects provides instructions for building a CO₂ sensor from off the shelve electronic parts combined with 3D printed housing parts.

![CO₂-Sensor fully assembled](/images/sensor01_800.jpg?raw=true)

- CO₂, temperature, humidity, pressure, altitude.

- 2 months on one battery charge, when operated in low power mode (no WiFi, 3 minute display update).
- 6 weeks on a single battery charge, when operated in low power mode (no WiFi, 3 minute display update).

- [Sensirion SCD-41](https://www.adafruit.com/product/5190) Sensor used, a small and high performance photoacoustic CO₂ sensor.

- Chart with 1h, 3h, 6h, 12h or 24h data history.

![CO₂-Sensor fully assembled](/images/sensor03_800.jpg?raw=true)

- Dark mode (inverted) available.
- Dark mode (inverted) optional.

- Configurable Thresholds for CO₂, temperature und humidity.

- Configurable temperature unit °C and °F and timezone.
- Configurable temperature unit (°C/°F) and timezone.

- Unlimited measurement history through internal SD-Card storage.

- WiFi for access to current and historic measurements and to change device configuration, calibration, update firmware.

![CO₂-Sensor fully assembled](/images/sensor04_800.jpg?raw=true)

- MQTT can be configured to auto publish Measurements ([MQTT](https://de.wikipedia.org/wiki/MQTT)).
- MQTT can be configured to auto publish measurements ([MQTT](https://de.wikipedia.org/wiki/MQTT)).

- The housing can be wall mounted, with or without theft protection.

---
## The root folder of the project is structured as follows:
### [MOTH Core](moth_core/README.md)

### [Core](moth_core/README.md)

This project is built with [PlatformIO](https://platformio.org/). Please refer to the instructions provided on the PlatformIO website. PlatformIO makes development with the ESP32 microcontroller easier and faster compared to the Arduino IDE. If you have not switched yet i advise you to do so, it will save you time after a very short period of time.
The PlatformIO project, and configuration files can be found here.

---
### [MOTH Parts and Assembly](moth_parts/README.md)
### [Building instructions](moth_parts/README.md)

Building instructions, drawings and printable files for the device.

---
### [MOTH Client](moth_client/README.md)
### [Client](moth_client/README.md)

A react administration UI for the device.
A react UI for data retrieval and administration of the device.

![web-app client](/images/moth_client.gif)

Expand All @@ -55,25 +56,21 @@ A react administration UI for the device.

- #### On display

The device display supports two display modes, "table" and "chart". In table mode the latest CO₂, temperature and humidity values are shown numerically

TODO :: image here
The device display supports multiple display modes, "table", "chart" and "calibration".

In chart mode one of CO₂, temperature, humidity or pressure are shown in a simple chart.
- In table mode the latest CO₂, temperature and humidity values are shown numerically.
- In chart mode one of CO₂, temperature, humidity or pressure are shown in a simple chart.
- In calibration mode, the most recent history of values is shown together with simple statistics. The device can then be calibrated either to a configurable value and button press, or through the wifi-rest-api and value that can be specified by the user.

TODO :: image here
- #### Over the wifi-rest-api

- #### Over Wifi

The device provides various possibilities to access current and historic data.
The device provides various possibilities to access current and historic data over the wifi-rest-api.

- #### MQTT

It is possible to configure a mqtt connection and upload a certificate. The device will make connections in configurable intervals und publish it's measurements.
It is possible to configure a mqtt connection and upload the mqtt brokers certificate if needed. The device will make connections in configurable intervals und publish it's measurements.
Even though no POC has been made so far, it should be straightforward to integrate the sensor into i.e. Home Assistant.

- #### TODO :: here or somewhere (!) have a set of basic introductions

---

### License
Expand Down
Binary file added images/device_ui_00_800.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/device_ui_01_800.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/device_ui_02_800.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/device_ui_03_800.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 44 additions & 4 deletions moth_client/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,47 @@
## MOTH CLient
## CLient

---

A small webapp helping to understand and use the device api.
The client subproject is react-web-application, storable on the device's SD-card, then consumable with any browser directly from the device.

<img src="../images/moth_client.gif">
The Client UI is split into 3 main pages:

---

The api lets you do the following
- #### client-chart

<img src="../images/device_ui_00_800.gif">

It is possible to show recent and historic CO₂, temperature, humidity, pressure and battery data.

<img src="../images/device_ui_01_800.gif">

Date/Time Pickers can be used to specify the range of data to be shown in the chart.

The current range of data can also be exported to:

- CSV
- PNG

---

- #### client-config

<img src="../images/device_ui_02_800.gif">

This pages offers a convient way to configure the device through a reactive UI.

- #### client-api

<img src="../images/device_ui_03_800.png">

This is a helper page to descibe the device's api. You can either use this page as-is, or if you are into scripting, it will help to understand the device api.

---

#### server-rest-api

A short list of the device's api:

|url|method|type|description|parameters|
|---|---|---|------------|--------------|
Expand All @@ -30,4 +63,11 @@ The api lets you do the following
|/api/esprst|GET|json|reset the device||
|/api/update|POST|json|update device firmware|"content"<br>multipart file containing the new binary|

---

There are multiple ways the device can connect to the internet:

- When no wifi-connection has been configured yet, the device will start in AP-mode, providing it's own network. You can connect you mobile phone or computer to that network and configure i.e. your home wifi.
- When wifi-connections have been configured, the device will connect to the network with the highest signal strength.

What has been working for me is configuring my home network and my mobile's wifi-hotspot. That way the sensor will connect to the home network most of the time, but there is a fallback to the hotspot of my phone when i'm away. When in a hotel i add the hotel network, so i can save data on the hotspot.
10 changes: 5 additions & 5 deletions moth_core/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# MOTH Core
# Core

This folder contains the Arduino Sketch for the MOTH.CO2.2 sensor and a set of configuration files in [SD](SD) that need be copied to the SD card of the device.
This folder contains the Arduino Sketch for the moth.CO2.2 sensor and a set of configuration files in [SD](SD) that need be copied to the SD card of the device.

The moth_core folder of the project is structured as follows:

---

Historic versions of the project (kept for reference):

#### [moth_core_020](moth_core_020)
#### [moth_core_021](moth_core_021)
- #### [moth_core_020](moth_core_020)
- #### [moth_core_021](moth_core_021)

Most recent PlatformIO project:

## [moth_core_022](moth_core_022)
- #### **[moth_core_022](moth_core_022)**

---

Expand Down
10 changes: 5 additions & 5 deletions moth_parts/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# <a name="moth_parts">MOTH Parts and Assembly</a>
# <a name="moth_parts">Parts and Assembly</a>
Building the sensor is split into two main parts. Electric assembly and housing.

---
### [Electric parts](electricparts.md)

List of parts that need to be bought
List of parts that need to be bought.

---
### [Electric Assembly](electricassembly.md)

Assembly instructions for the electric parts.
Assembly instructions for the electric parts. Simple soldering required.

---
### [Printed parts](printedparts.md)

List of printable parts and some postprocessing hints
List of printable parts and some postprocessing hints.

---
### [Device Assembly](deviceassembly.md)

Assembly of the device from electric and printed parts
Assembly of the device from electric and printed parts.
Binary file modified moth_parts/co2sensor_06_plain.skp
Binary file not shown.
2 changes: 1 addition & 1 deletion moth_parts/electricassembly.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ Attach the Buzzer so its pins go into GND and A1.

---

The Electric Assembly is now ready to be configured and to have a sketch uploaded. Please refer to [MOTH Core](../moth_core/README.md) for further instructions.
The Electric Assembly is now ready to be configured and to have a sketch uploaded. Please refer to [Core](../moth_core/README.md) for further instructions.

---

0 comments on commit f727fea

Please sign in to comment.