melkati / CO2-Gadget

An advanced CO2 Monitor/Meter firmware for ESP32 with Android and iOS App for real time visualization and charting of air data, data logger, a variety of communication options (BLE, WIFI, MQTT, ESP-Now) and many supported sensors.
https://emariete.com/medidor-co2-gadget/
GNU General Public License v3.0
68 stars 15 forks source link

Add support for e-Ink displays (ePaper Sharewave kind). Beta testers welcome! #190

Closed melkati closed 6 months ago

melkati commented 8 months ago

Support for e-Ink and e-Paper displays, such as Shareware. Preliminary work for the low CO2 consumption version of CO2 Gadget.

Developing actively with the following boards and displays:

Main tasks:

melkati commented 8 months ago

First basic version uploaded to the e-Ink CO2 Gadget branch image

Coscolin commented 8 months ago

Works on TTGO T5 E-ink GDEM0213B74 with SCD-41 sensor 👏🏻👏🏻👏🏻!!!

IMG_20240312_012407.jpg

Issues detected:

IMG_20240312_013530.jpg About 4th ☝🏻

IMG_20240312_013606.jpg About 8th ☝🏻

Good job Mario 👏🏻👏🏻👏🏻

Coscolin commented 8 months ago

As this board has a hardware switch, Do you think is possible to change RST button functionality to use for menu?

Button UP is assigned in platformio to pin 15, but must be set to IO39 -DBTN_UP=39

After changing button up to pin 39, serial menu works and it's functional.

melkati commented 8 months ago

Works on TTGO T5 E-ink GDEM0213B74 with SCD-41 sensor 👏🏻👏🏻👏🏻!!!

Great! Thank you for testing!

Issues detected:

  • a few display refreshments at start, about 12 o 20 times, numbers show very light.

These displays are very tricky to use as they do some flickering and redrawing for some seconds at full redraw. Also, they tend to dim or get dirty after some partial fast updates without flickering.

To improve this, after 5 wakeup cycles (it's fixed now but, in the future, it will be configurable by user) the displays do a full refresh to recover quality start fresh again.

I'm still working on improving this. On the displays I have at hand (DEPG0213BN and GDEM029T94) they are already working fairly well. For others we will have to fine tune them.

The problem with these displays is that each one is a different world, that's why it's not easy to support so many of them (especially without having them on hand to test and fine tune).

  • I can not enter in menu with serial or buttons. I suppose that is not implemented yet
  • this board has only two buttons, one for reset and one for up or down, so menu functionality it will be a challenge.

No, it's not implemented. I'm still thinking how this will work.

There will be some more differences with the "regular mode" caused by the lack of "real time" working to save power. For example, the buzzer functionality won't be supported. Sorry. 😒

Good job Mario 👏🏻👏🏻👏🏻

Keep into account this is the very first Alpha version (not even beta) with some coding pending to do to be considered beta.

Thank you very much. 😀

Coscolin commented 8 months ago

How to implement menu functionality to E-Ink boards with only one button

I would do the following:

- In deepSleep:

- "awake" in normal display:

- "awake" inside menu:

- If you are editing a menu option:

In this way we would have a fully interactive menu with only one button.

melkati commented 7 months ago

Just a quick update:

There is already a public beta with support for e-Ink displays and it's working fairly well.

The new beta 0.12.051-development is available both at the development branch in the GitHub repository (https://github.com/melkati/CO2-Gadget/tree/development) and at the Easy Web Installer (https://emariete.com/en/co2-meter-gadget/#CO2_Gadget_Version_Beta-Desarrollo).

This beta adds support for the following e-Ink displays:

ttgo-t5-EINKBOARDDEPG0213BN and ttgo-t5-EINKBOARDGDEW0213M21 are working very well, others still need some testing and fine adjustment.

At the moment I recommend the EINKBOARDDEPG0213BN as the one with the best visuals and working better with the current CO2 Gadget version: https://s.click.aliexpress.com/e/_DDFb2gl be sure to choose the board with the DEPG0213BN e-Ink panel).

This board will also be one of the first to support the upcoming LOW POWER version (1-3 months autonomy on battery). More here: https://emariete.com/en/co2-meter-co2-gadget-low-power-with-lilygo-ttgo-t5-epaper-and-sensor-sensirion-scd41/

melkati commented 6 months ago

This feature has been implemented in the latest release, so I will close the issue for now. Adequate testing for its support in low power mode is pending, but I am optimistic that it will function flawlessly.