Starting a new multi epaper driver component for ESP-IDF

User avatar
fasani
Posts: 88
Joined: Wed Jan 30, 2019 12:00 pm
Location: Berlin
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.
Backend developer-PHP Engineer
https://CALE.es ESP32 E-Ink Screen manager - Berlin, Germany

User avatar
fasani
Posts: 88
Joined: Wed Jan 30, 2019 12:00 pm
Location: Berlin
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.
Backend developer-PHP Engineer
https://CALE.es ESP32 E-Ink Screen manager - Berlin, Germany

User avatar
fasani
Posts: 88
Joined: Wed Jan 30, 2019 12:00 pm
Location: Berlin
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
Backend developer-PHP Engineer
https://CALE.es ESP32 E-Ink Screen manager - Berlin, Germany

User avatar
fasani
Posts: 88
Joined: Wed Jan 30, 2019 12:00 pm
Location: Berlin
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
Backend developer-PHP Engineer
https://CALE.es ESP32 E-Ink Screen manager - Berlin, Germany

User avatar
fasani
Posts: 88
Joined: Wed Jan 30, 2019 12:00 pm
Location: Berlin
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
Backend developer-PHP Engineer
https://CALE.es ESP32 E-Ink Screen manager - Berlin, Germany

User avatar
fasani
Posts: 88
Joined: Wed Jan 30, 2019 12:00 pm
Location: Berlin
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
Backend developer-PHP Engineer
https://CALE.es ESP32 E-Ink Screen manager - Berlin, Germany

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 13 guests