Starting a new multi epaper driver component for ESP-IDF

User avatar
fasani
Posts: 195
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

Starting a new multi epaper driver component for ESP-IDF

Postby fasani » Fri May 29, 2020 3:27 pm

Hello all,
I've started since 2 weeks to make plans and start a C++ component with the idea to make a multi-epaper component (Like GxEPD for Arduino) but for ESP-IDF. And I would like to know if there is anyone interested in:

- Collaborating
- Give C++ advice in case some my OOP is not right (I've only 1 yr and half experience so I need some more to get it right)
- Testing Epapers that you may have already at home

If it sparks any interest I started a WiKi here on the same repository where I'm testing this:
https://github.com/martinberlin/cale-idf/wiki

And I will be adding technical documentation of each Epaper, IC driver, etc. Along with information of how to implement the component and use it.
The mission is to make it:
  • Extendable
    Maintenable
    Easy to add a new eink driver
    Easy to implement and send stuff to your Eink
    ESP-IDF only (No Arduino classes)
    Human-understandable
    Well documented
So far it consists of the following parts:

MODELX class
^ implements:
Main Epd Abstract class -> Get's IO injected(SPI) <- inherits Adafruit GFX (So we have geometric functions + fonts)

The ideal model is not yet there, since I would like to add a "Bridge class" between Epd and Adafruit GFX so you can just use another library for graphics if you want.
But apart of that I'm open also to any kind of critic and opinions. It's a complicated task since every epaper has a different EC driver inside and every of them requires different SPI commands and a LUT initialization table to wake up with the right settings.
One command wrongly sent and displays nothing at all or makes nice TV noise :)
For now this is implementing now only SPI displays but I will love to extend IO to also accept parallel Epapers that seem to work much faster.

So far one 2.13" model is showing my pixels but I'm working hard every weekend in adding more.
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

User avatar
fasani
Posts: 195
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

Re: Starting a new multi epaper driver component for ESP-IDF

Postby fasani » Sun May 31, 2020 10:35 pm

Anyone would be interested in using a component like this?

I have a question about SPI. I started doing this EPD class following the Espressif master example (TFT)
After an initial success sending data to a 2.13" Waveshare flex epaper, I could not communicate so far with other Epaper ICs-

Can someone take a look at the SPI class and tell me if there is something wrong?

https://github.com/martinberlin/cale-id ... epdspi.cpp

Basically all Epapers follow the same pattern:
First there is a "wake up" process, where there are some SPI commands + data sent to power on, add some initial settings. Then come a init communication where LUT tables, that seem kind of initialization tables are sent, and then finally after sending the buffer there is a command to update the display and some additional ones to send it to sleep.

Well in this latest ones that I tried to do, I'm sending exactly the same commands as GxEPD library, but the Epaper stays freeze. Nothing happens, nicht, nada!
For sure I'm doing something wrong...So a logic analyzer is coming next week and I will check why my SPI is different than the other library.
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

User avatar
fasani
Posts: 195
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

Re: Starting a new multi epaper driver component for ESP-IDF

Postby fasani » Tue Jun 02, 2020 2:01 pm

So I'm looking forward someone with enough C++ and driver knowledge to help on this libraries.

I don't have sadly the right amount of money to invest, but the coder that wants to take the post, will get paid for his hours research time and also get the Epaper display tools for free that he / she can retain even after having the library done.

Of course the intention here is to have this library in the open source domain for anyone that wants to use ESP32 / ESP32S2 code and IDF, to have an alternative to GxEPD that easy to use and extendable. I think it's an exciting field since Eink has a lot of future and every week there new devices coming, so it can be also great for someones portfolio expertise.

If you are interested please send me a PM here or also an email to martin@cale.es
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

User avatar
fasani
Posts: 195
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

Re: Starting a new multi epaper driver component for ESP-IDF

Postby fasani » Fri Jun 05, 2020 5:30 am

New epaper model added this morning: gdew042t2 400*300 4.2 inches Good display
https://github.com/martinberlin/cale-id ... dew042t2.h
Image
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

User avatar
fasani
Posts: 195
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

Re: Starting a new multi epaper driver component for ESP-IDF

Postby fasani » Sat Jun 06, 2020 3:18 pm

Today I upload first version 0.9 of this epaper component for ESP-IDF

https://github.com/martinberlin/CalEPD

With the hope that someone can test it. Now it also supports Waveshare 7.5" 800*480 display that has quite a big buffer (48000 bytes) so I had to feed the watchdog, not sure if I'm doing it correctly:

Code: Select all

void Gdew075T7::update()
{
  _using_partial_mode = false;
  _wakeUp();

  IO.cmd(0x13);
  printf("Sending a %d bytes buffer via SPI\n",sizeof(_buffer));
  for (uint32_t i = 0; i < sizeof(_buffer); i++)
  {
    uint8_t data = i < sizeof(_buffer) ? _buffer[i] : 0x00;
    IO.data(data);
    // Let CPU breath. Withouth delay watchdog will jump in your neck
    if (i%8==0) {
       rtc_wdt_feed();
       vTaskDelay(pdMS_TO_TICKS(1));
     }
    if (i%500==0 && debug_enabled) printf("%d ",i);
  }

  IO.cmd(0x12); // Display refresh SPI command
  }
This a very nice display. There is an example on how to use it here:
https://github.com/martinberlin/cale-idf

This component needs my fork of Adafruit GFX as an additional component:
https://github.com/martinberlin/Adafrui ... ry-ESP-IDF

Image
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

User avatar
fasani
Posts: 195
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

CalEPD release 0.9.2

Postby fasani » Sat Jun 13, 2020 6:11 pm

The component is ready to be tested:
https://github.com/martinberlin/CalEPD

7 models where already added 8-)
https://github.com/martinberlin/cale-idf/wiki

Last one is a 12.48 inches multi epaper display from Waveshare (1304*984 pixels)

Classmap for those interested :geek:
Image
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

User avatar
fasani
Posts: 195
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

CalEPD new release supports some new manufacturers

Postby fasani » Wed Aug 05, 2020 7:01 pm

If you are interested in using ESP-IDF in your next project check it out, new models added include:

[*] Waveshare 12.48 with ESP32 devKitC connector (4 SPI epaper, should get an ESP32 with PSRAM update)
[*] Good display 5.83 B/w and also 3 colors Size: 600 * 448 Colors: B/W/RED
[*] A new very interesting manufacturer with offices in Germany that is called plasticlogic.com

Full list:
https://github.com/martinberlin/cale-idf/wiki
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

User avatar
fasani
Posts: 195
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

Announcing touch: FT6X36 I2C touch interface layer on the top of your display

Postby fasani » Mon Oct 12, 2020 6:42 am

1.0 Incorporates optional FocalTech touch interface

We are proud to announce that this version also has a demo for 2.7 inch epaper with touch interface.

Please refer to this demos to see how to implement this:

https://github.com/martinberlin/cale-id ... main/demos
There are 2 simple demos:

With the FT class implemented alongside the epaper
A more consistent example on how the FT class can be injected in the epaper class, making it display and rotation aware.

VIDEO Demo 1

VIDEO Demo 2
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

User avatar
fasani
Posts: 195
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

Added new Touch IC controller: L58

Postby fasani » Tue Apr 20, 2021 1:31 pm

In this release of FT touch component there is a new controller, ready to be used as an ESP-IDF component and tested in 4.2 & 4.4 versions:

https://github.com/martinberlin/FT6X36- ... s/tag/v1.2

L58 touch IC, an actual mobile-phone touch, is supported in this release with touch events. No idea where this brand comes (Is Chinese and not fully documented, only a scarce PDF)
The good news is that after some feedback from Lilygo I could get the I2C touch with events fully working. That means you can have real "tap detection" and also drag'n'drop events if you like to.
If anyone is interested in using the Lilygo EPD047 super fast parallel epaper this might be a very good option to build an user interface for your project.
Proof-of-concept video:
https://twitter.com/martinfasani/status ... 4922105864

epaper phone vs Lilygo EPD047
Image
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

Who is online

Users browsing this forum: awegel, Baidu [Spider] and 109 guests