color gdeh042Z21 400x300 B%7CR gdew042Z15 B%7CR gdew042C37 B%7CY - martinberlin/cale-idf GitHub Wiki

  • Size: 400 * 300 4.2" Black/Red
  • Controller: UC8276
  • Status: Ready and merged in master
  • Refresh time: 14 seconds
  • Partial update: Not supported as in most of the 3 color epapers.

Note: Any links to Good-Display.com have been removed from this repository

Gdeh042Z21

Compatible with models:

  • Gdew042Z15 Black/Red Controller: IL0398
  • Gdew042C37 Black/Yellow Controller: UC8176 / also called IL0389

Gdew042C37 This epaper seems not to be anymore available (EOL)

Statistics (ms)

280 _wakeUp settings+send Buffer
2004 _powerOn
2284 total time in millis -> starts rendering after 2.2 seconds

Please note that all the statistics shown here are using SPI on the ESP32 at max CPU speed ( 260 Mhz )

Problems that I encountered implementing this

Initial aproach copying provided example When mixing red close to black it makes a strange effect and black is like "washed out". I coded this following Good display Arduino example that uses the default LUT initialization tables that come in UC8276. It seems not to work correctly for me, so I will contact them and ask if they can send another example.

Check image before this fix for Gdeh042Z21

Solution

When something like this happens check in the PDF specifications for "Boost start" usually sending a different settings than default is possible to make it better. In this case what worked is:

void Gdeh042Z21::_wakeUp(){
  IO.reset(10);
  IO.cmd(0x04);  
  _waitBusy("epd_wakeup");; //waiting for the electronic paper IC to release the idle signal
    
  IO.cmd(0x00);  //panel setting
  IO.data(0x0f); // LUT from OTP 400x300: No large initialization commands with this IC driver

  // Override bost soft start:  Without this Black appeared washed out near RED
  IO.cmd(0x06);  // Boost soft start setting
  IO.data(0x17); 
  IO.data(0x18);
  IO.data(0x18);
}

This is the result of this GFX demo:

   display.setFont(&Ubuntu_M18pt8b);
   uint8_t rectW = display.width()/4;
   uint16_t firstBlock = display.width()/4;  
   display.fillRect(    1,1,rectW, firstBlock,foregroundColor);
   display.fillRect(rectW,1,rectW, firstBlock,EPD_WHITE);
   display.fillRect(rectW*2,1,rectW,firstBlock,foregroundColor); 
   display.fillRect(rectW*3,1,rectW-2,firstBlock,EPD_WHITE);

   display.fillRect(    1,firstBlock,rectW,firstBlock,EPD_BLACK);
   display.fillRect(rectW,firstBlock,rectW,firstBlock,foregroundColor);
   display.fillRect(rectW*2,firstBlock,rectW,firstBlock,EPD_BLACK); 
   display.fillRect(rectW*3,firstBlock,rectW-2,firstBlock,foregroundColor);
   display.setCursor(10,firstBlock/2);
   display.setTextColor(EPD_WHITE);
   display.println("WHI");
   display.setCursor(firstBlock*1.5,firstBlock/2);
   display.setCursor(firstBlock*1.5,firstBlock/2);
   display.setTextColor(EPD_BLACK);
   display.println("BLACK");
   display.setCursor(display.width()/2-100,display.height()-108);
   display.println("BLA");
   display.setTextColor(EPD_RED);
   display.println("RED");
   display.setTextColor(EPD_BLACK);
   display.println("BLACK BLACK BLACK BLACK BLACK BLACK");
   display.update();
⚠️ **GitHub.com Fallback** ⚠️