4.2inch epaper display not working on esp32

Hello,

I want to use a 4.2inch e paper display with an esp32 board
The issue is that I tried several tutorials, spent hours on it and I just can't get the display to work.
Each time the code uploads perfectly with no errors whatsoever but it doesn't do anything afterward.
I've tested the display with a raspberry pi 3 and it worked just fine so the problem doesn't come from here.
I've also tried with 2 different boards but got the same result each time.

For information, I've used the example code provided with the library, and the corresponding pin layout.

I don't know what else to do and that's the most frustrating part
If you have any ideas of what I could try I would really really appreciate,
thanks in advance

We don't know which library you are using
We don't know what code you are using
We don't know which display you are using
We don't know what your schematic is

1 Like

Yes sorry

I'm using the GxEPD library (tried GxEPD 2 aswell but got the same result)
I'm using the example code from this library, and the connections indicated therein (from the code i only kept the parts related to the board I was using)
I'm using this display :
https://www.waveshare.com/product/displays/e-paper/4.2inch-e-paper-module-b.htm

#include <GxEPD.h>

//#include <GxGDEW042T2/GxGDEW042T2.h>      // 4.2" b/w
#include <GxGDEW042Z15/GxGDEW042Z15.h>    // 4.2" b/w/r


#include GxEPD_BitmapExamples

// FreeFonts from Adafruit_GFX
#include <Fonts/FreeMonoBold9pt7b.h>
#include <Fonts/FreeMonoBold12pt7b.h>
#include <Fonts/FreeMonoBold18pt7b.h>
#include <Fonts/FreeMonoBold24pt7b.h>


#include <GxIO/GxIO_SPI/GxIO_SPI.h>
#include <GxIO/GxIO.h>

GxIO_Class io(SPI, /*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16); // arbitrary selection of 17, 16
GxEPD_Class display(io, /*RST=*/ 16, /*BUSY=*/ 4); // arbitrary selection of (16), 4


void setup()
{
  Serial.begin(115200);
  Serial.println();
  Serial.println("setup");

  display.init(115200); // enable diagnostic output on Serial

  Serial.println("setup done");
}

void loop()
{
  showBitmapExample();
  delay(2000);
}
  
//#if defined(_GxGDEW042Z15_H_)
//#define HAS_RED_COLOR

void showBitmapExample()
{
  /*
#if defined(__AVR)
  display.drawBitmap(BitmapExample1, sizeof(BitmapExample1));
#else
  // draw black and red bitmap
  display.drawPicture(BitmapExample1, BitmapExample2, sizeof(BitmapExample1), sizeof(BitmapExample2));
  delay(5000);
  display.drawPicture(BitmapExample3, BitmapExample4, sizeof(BitmapExample3), sizeof(BitmapExample4));
  delay(5000);
  display.drawPicture(BitmapWaveshare_black, BitmapWaveshare_red, sizeof(BitmapWaveshare_black), sizeof(BitmapWaveshare_red));
  delay(5000);
  display.drawBitmap(BitmapExample1, sizeof(BitmapExample1));
  delay(2000);
  display.drawExampleBitmap(BitmapExample1, 0, 0, GxEPD_WIDTH, GxEPD_HEIGHT, GxEPD_BLACK);
  display.update();
#endif
*/
display.drawPicture(BitmapExample1, BitmapExample2, sizeof(BitmapExample1), sizeof(BitmapExample2));
}



void showFont(const char name[], const GFXfont* f)
{
  display.fillScreen(GxEPD_WHITE);
  display.setTextColor(GxEPD_BLACK);
  display.setFont(f);
  display.setCursor(0, 0);
  display.println();
  display.println(name);
  display.println(" !\"#$%&'()*+,-./");
  display.println("0123456789:;<=>?");
  display.println("@ABCDEFGHIJKLMNO");
  display.println("PQRSTUVWXYZ[\\]^_");
#if defined(HAS_RED_COLOR)
  display.setTextColor(GxEPD_RED);
#endif
  display.println("`abcdefghijklmno");
  display.println("pqrstuvwxyz{|}~ ");
  display.update();
  delay(5000);
}

void showFontCallback()
{
  const char* name = "FreeMonoBold9pt7b";
  const GFXfont* f = &FreeMonoBold9pt7b;
  display.fillScreen(GxEPD_WHITE);
  display.setTextColor(GxEPD_BLACK);
  display.setFont(f);
  display.setCursor(0, 0);
  display.println();
  display.println(name);
  display.println(" !\"#$%&'()*+,-./");
  display.println("0123456789:;<=>?");
  display.println("@ABCDEFGHIJKLMNO");
  display.println("PQRSTUVWXYZ[\\]^_");
#if defined(HAS_RED_COLOR)
  display.setTextColor(GxEPD_RED);
#endif
  display.println("`abcdefghijklmno");
  display.println("pqrstuvwxyz{|}~ ");
}


void drawCornerTest()
{
  display.drawCornerTest();
  delay(5000);
  uint8_t rotation = display.getRotation();
  for (uint16_t r = 0; r < 4; r++)
  {
    display.setRotation(r);
    display.fillScreen(GxEPD_WHITE);
    display.fillRect(0, 0, 8, 8, GxEPD_BLACK);
    display.fillRect(display.width() - 18, 0, 16, 16, GxEPD_BLACK);
    display.fillRect(display.width() - 25, display.height() - 25, 24, 24, GxEPD_BLACK);
    display.fillRect(0, display.height() - 33, 32, 32, GxEPD_BLACK);
    display.update();
    delay(5000);
  }
  display.setRotation(rotation); // restore
}

Are your voltages correct? ESP32 is 3.3V and the last I knew RasPi's were 5V

as far as I know yes, the manufacturer indicates that the operating voltage is between 3.3V and 5V

4.2 inch color e-ink epd display for electronic price tag, GDEY042Z98_e-ink display-Good Display (good-display.com)

4.2 inch three colors e-paper display red electronic paper screen module, GDEH042Z96_e-ink display-Good Display (good-display.com)

4.2 inch red e-paper display color electronic paper screen module, GDEH042Z21_e-ink display-Good Display (good-display.com)

4.2 tri-color e-ink display SPI digital price tag e-ink screen, GDEQ042Z21_e-ink display-Good Display (good-display.com)

All these panels use controllers different from the

//#define GxEPD2_DRIVER_CLASS GxEPD2_420c // GDEW042Z15 400x300, UC8176 (IL0398)

supported by GxEPD2 and GxEPD.

I have no idea which panel the actual Waveshare 4.2" 3-color e-paper display uses.

Jean-Marc

Thanks, I tried the example codes from the links you shared but got the exact same result as last time :

esptool.py v3.0-dev
Serial port COM4
Connecting....
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 3c:61:05:31:39:28
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 4096.0 kbit/s)...
Hash of data verified.
Compressed 17120 bytes to 11164...
Writing at 0x00001000... (100 %)
Wrote 17120 bytes (11164 compressed) at 0x00001000 in 0.1 seconds (effective 971.3 kbit/s)...
Hash of data verified.
Compressed 259872 bytes to 116070...
Writing at 0x00010000... (12 %)
Writing at 0x00014000... (25 %)
Writing at 0x00018000... (37 %)
Writing at 0x0001c000... (50 %)
Writing at 0x00020000... (62 %)
Writing at 0x00024000... (75 %)
Writing at 0x00028000... (87 %)
Writing at 0x0002c000... (100 %)
Wrote 259872 bytes (116070 compressed) at 0x00010000 in 2.0 seconds (effective 1047.9 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 128...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.0 seconds (effective 1638.4 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

I get that each time but nothing happens afterward

@baparm,

I can't help you, as it won't work with any of my libraries anyway.

The Waveshare board has level converters and the "clever" reset circuit. See schematics.
The panel may not work if the board is fed from 3.3V, because of the LDO voltage drop.
If you feed from 5V, you should use a series resistor on the BUSY line, to protect the ESP32.

Did you tell us if it works with the Waveshare code with the ESP32?

Maybe Waveshare can help you with this issue; they also might know what panel is used.

It didn't worked with the waveshare code either so I guess you're right the problem might be my power supply and the voltage must be too low.

I would like to try with 5v to see if it makes a difference, could you tell me how to proceed ?
Should I just connect the vcc port to a 5V supply?

Yes but. Then you would have to deal with the signals coming back to the esp32. I would try this:

  1. add a 10k resistor in series with any signal coming from the display to the esp32.
  2. power the display with 4v (if you can) else 5v. Here we would be hoping the display will recognize a 3.3v signal.

I just received a pull request related to this topic: Added support for Waveshare 4.2 3-color V2 by vladkozlov69 · Pull Request #44 · ZinggJM/GxEPD2 · GitHub.

As noted in my CONTRIBUTING.md I will not merge pull requests.
I support only panels or displays I have.
But the support is there, you can try if it helps.

Jean-Marc

I have got an answer from Waveshare.

The panel is GDEQ042Z21, same as 4.2 tri-color e-ink display SPI digital price tag e-ink screen, GDEQ042Z21_e-ink display-Good Display (good-display.com)

Jean-Marc

A huge thank you for your time and help,
unfortunately, I tried with the sample code provided by good-display but i did not worked either, and I didn't found this particular display in your library

At this point, either I am doing something wrong or one of the components is not working as it should, but I can't understand what.