Skip to content

Model plasticlogic0XX.h

Martin edited this page Aug 3, 2020 · 19 revisions

PlasticLogic has 3 different classes

  • plasticlogic011.h size: 148 * 72 Inches: 1.1 -> Tested and working
  • plasticlogic021.h size: 240 * 146 -> Untested
  • plasticlogic031.h size: 312 * 76 -> Untested

PlasticLogic.com flexible epapers

Technical information

The 1.1″ Lectum display is a flexible active-matrix EPD with Ultrachip UC8156 single chip EPD controller, integrated drivers and power management. The technology of this epapers is very modern and they refresh super fast this one taking less than half a second. They also support 3 levels of gray plus white and partial refresh. A demo is available, just update main/CMakeLists.txt to compile the plasticlogic demo uncommenting:

SRCS "demo-epaper-plasticlogic.cpp"

Compiling any demo first requires running first:

idf.py menuconfig

And editing the Display configuration referencing the GPIOs you have wired to the SPI display interface. Keep in mind that the MOSI, RST and CLOCK pin should be output pins. In the folder config-examples we left some demos of pin configurations that are proved to be working.

One cool feature of this controller is that uses a 4 wire SPI and returns a display size ID using MISO. It can return the ambient temperature in real time and also the size id, which is very useful, since you can validate that the connected epaper is the one that is supported by the class.

Four gray levels

Strictly speaking, 3 gray levels plus white, since every pixel takes 2 bits you have the following gray levels:

EPD_BLACK 0x00
EPD_DGRAY 0x01
EPD_LGRAY 0x02
EPD_WHITE 0x03

This constants can be used in any of the display methods just as fillscreen(COLOR) or setTextColor(COLOR). Grayscales work great in this epaper and they render very fast.

Commands/Data need to be atomic without DC pin

Since this 4 wire SPI has no Data Command pin, the data should follow the command in a single transaction, it cannot be sent in a transaction followed by a next one with data. As an example this is how the initial commands are sent: MOSI wakeup

And this is temperature query, data incoming via MISO pin: MISO read temperature

This should work both on ESP32 and esp32S2 provided you are on IDF Version >= 4.0

How to use

Check the example in main/demo-epaper-plasticlogic.cpp Like the other classes you need to reference the right class and inject IO. For example for the 1.1" eink:

#include <plasticlogic011.h>
EpdSpi2Cs io;
PlasticLogic011 display(io);

After that you have already the display class available. For example you can print a dark gray "Hello PlasticLogic" in the display:

extern "C" {
   void app_main();
}
#include <Fonts/ubuntu/Ubuntu_M16pt8b.h> // Let's assume plasticlogic0XX.h is already included and instantiated

void app_main(void){
    display.setFont(&Ubuntu_M16pt8b);
    display.setCursor(2,20);
    display.setTextColor(EPD_DGRAY);
    display.print("Hello PlasticLogic");
    display.update(); // without arguments runs a full update
}

Many thanks to Robert from Paperino project for sending two Epaper samples to my studio in Berlin.

Clone this wiki locally