-
-
Notifications
You must be signed in to change notification settings - Fork 26
Model plasticlogic0XX.h
PlasticLogic has 3 different classes
- plasticlogic011.h size: 148 * 72, 1.1" -> Tested and working. Merged in master
- plasticlogic014.h size: 180 * 100, 1.4" -> Tested and working. Merged in master
- plasticlogic021.h size: 240 * 146, 2.1" -> Tested with issues on Partial updates (Read NOTE below) setRotation() & partial-update still not working as they should (NOTE)
- plasticlogic031.h size: 312 * 76 -> Untested
Please note that ordering this products in PlasticLogic shop may take up to 5 weeks. I don't know why the delivery time is so long, but all I can say, is that at the end is delivered by FedEx and that it does arrive securely. Just keep in mind that the final price is in dollars even if you are buying from Europe and that there are some weeks wait between placing the order and getting the products. But don't loose patience at the end it will arrive to your place, just place your order weeks ahead, while you prepare the other part of the electronics (For example purchasing my SPI adapter and an ESP32 Tinypico) I though this would be a fair note to help organizing your purchase some time ahead.
This is one was created by Fasani Corporation and it's actually the cheapest option to drive this small epapers. It's designed to be placed on top of Tinypico.com very small ESP32 board made by Unexpected maker. Tinypico SPI adapter for UC8156 displays.
If you get one of this please let us know if you need help to implement it. Read more about the UC8156 PCB adapter in my personal page.
- Buffer size in bytes: width * height / 4. every pixel has 2 bits
- Gray levels: 4
- Controller: UC8156
- Status: Working
- Partial update: Working perfectly
- Manufacturer: Plasticlogic.com
- 1st demo video 2nd temperature read
NOTE: Epapers >= 2.1 inches from PlasticLogic need something that is called "Buffer scrambling" that I still need to understand. Basically is about updating pixel buffer before sending it to the peripheral. It takes one pixel from one part and moves it to the other in 2 Operations:
1 ¹> . . . . | . . . . . . ²> Sends the pixel to the beginning (mirrors it)
2 ²< . . . . |>¹ . . . . . 2nd half taken --> Goes to 1st half
We should find a way to do this smarter since is not rotation aware and is also bringing issues with partial refresh. This happens only for epapers >= 2.1 inches. Full update works great same as in the others. Only limitation is that you cannot use setRotation() and should only use full updates until is fixed.
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 you can read a register from MISO pin. 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 you are implementing.
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.
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.
And this is temperature query, data incoming via MISO pin, 31° C
This should work both on ESP32 and esp32S2 provided you are on IDF Version >= 4.0
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.
Revision v.1.3 | Firmware for ESP-IDF >= v. 4.3
Documentation written by Fasani Corp.
We are also launching a new company called Marespa.es that will help EU citizens find an affordable apartment in Spain. With the price of Rent going through the roof in 2024, this might be the moment to make an investment, if you plan to work from the spanish coast. With this project we are also supporting our open source projects.