GxEPD2 with Waveshare 5.65" 7-Color ePaper only getting _PowerOn _refresh and _PowerOff

Hello everyone,

I am having some trouble with ESP32 + Waveshare 5.65" 7-Color ePaper Display. The Waveshare example works fine. However, with GxEPD2_HelloWorld example, nothing is displayed and I am only getting the following from serial:

_PowerOn : 2
_refresh : 2
_PowerOff : 2

Not sure if I am making the right display selection. The chip I am using is a ESP-WROOM-32. I only made 3 changes in GxEPD2_display_selection_new_style.h:

Comment out this
//#define GxEPD2_DISPLAY_CLASS GxEPD2_BW

Uncomment this
#define GxEPD2_DISPLAY_CLASS GxEPD2_7C
Uncomment this
#define GxEPD2_DRIVER_CLASS GxEPD2_565c // Waveshare 5.65" 7-color

Also, as it was working with the Waveshare example, and some of the pins are not exposed in my ESP32 board, I followed the wiring in the Waveshare manual:

Comment out this
//GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=5*/ EPD_CS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // my suggested wiring and proto board

Uncomment this
GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=*/ 15, /*DC=*/ 27, /*RST=*/ 26, /*BUSY=*/ 25)); // Waveshare ESP32 Driver Board

Did some further testing and here are my observations:

  1. Added a Serial.println statement at the beginning of setup(). The log line is not printed.
  2. When I completely disconnect the monitor and boot just the ESP32 board, it entered setup() and also helloWorld().

Any idea on what might went wrong is highly appreciated!

Hi @nkhin , welcome to the forum!

Please report your wiring used, pin-to-pin.

You may need to remap SPI pins, if you don't use the default/standard HW SPI pins.
The Waveshare ESP32 Driver board uses nonstandard pins.
-jz-

Hi @ZinggJM , thanks for your prompt response, your comment enlightened me.

If my setup works with the Waveshare example which is designed to work with the Waveshare ESP32 Driver Board, then I should be using the Waveshare ESP32 configuration even though my ESP32 board is not from Waveshare.

So I tried the GxEPD2_WS_ESP32_Driver example. The display is now going full black and then full white in a loop. This is what I am getting from the serial, also keep looping:

_PowerOn : 96000
Busy Timeout!
_refresh : 25002108
_PowerOff : 4971000

I also tried uncommenting #define USE_HSPI_FOR_EPD in GxEPD2_display_selection.h in the GxEPD2_HelloWorld example, but still observing the behavior in #1.

Here is my wiring:

BUSY -> D25
RST -> D26
DC -> D27
CS -> D15
CLK -> D13
DIN -> D14
GND -> GND
VCC -> 3V3

@nkhin , thank you for the details and the picture.

I will need to retest with this display, first with my proto board with my standard suggested wiring, then with the wiring you reported. Clever idea to use angle pin connectors, I will do the same.

I don't understand why you can't use the suggested wiring. Your board looks quite usual, except for the cooling head.

This is strange. Are there exceptions reported in between?

In a next step I may need the exact code of the example you use; all files posted in a zip-file.
But first I need to check if something went wrong with my current release.
-jz-

Thank you for looking into this @ZinggJM , please let me know if there is anything I can test from my side.

I am working on a photo frame-like project, so trying to squeeze all the components in a tight space.

You are suggesting RST -> 0 for "ESP32 Dev Module", but I do not see a D0 on my board. Same for the other suggestion that uses RST -> 16, there is no D16 marked on the board. Maybe it's just labeled differently but I am not familiar with wiring, I am more of a software person :slight_smile:

I have a couple of these heat sinks lying around, so I am sticking one to every ESP32 board I have. I don't think it's a temperature issue, it's not even working at bootup.

The only exception is the Busy Timeout! in #3.

Thank you. I have found one error in this driver class, but there seems to be another one.
It's Sunday and lots of sport on TV now. Please be patient.
-jz-

This is not a suggestion, it is how the FPC connector is wired.
D0 is missing on many boards, as it is connected to the BOOT switch. I miss it, for a connection during program upload.

The error found makes all buffered graphics displays fail on this display.
With the fix they work, except the first one. So still no "Hello World!".
But you can try to add these two lines at the end of _InitDisplay:

  _PowerOn();
  _init_display_done = true;

I have pinpointed the other error. Should get fixed and tested tomorrow afternoon CET.

I have updated the 7-color driver classes code on GitHub (Version 1.5.5).
You can download and replace this file: GxEPD2_565c.cpp.

Please confirm if it works for you. Else post your complete code in a zip-file.
Thank you for having reported this issue.

I will tag this version for release later, after some more release tests.
-jz-

Hey @ZinggJM Sorry I was having a super busy week, I spent most of my time in the air.

I saw the library in Arduino has been updated to v1.5.5 so I used that directly. Confirmed that it is working perfectly. Thank you so much for your great work!

I just have 2 questions:

  1. You mentioned:

Does it mean I cannot use the suggested wiring on this board?

  1. The ESP32 board I am using is not from Waveshare but it only works with #define USE_HSPI_FOR_EPD. How do I tell when this is needed and when not?

Hi @nkhin ,

Thank you for the confirmation!

I just try to give a short answer, as I am short of time.

I still don't know why you need a different wiring than the suggested one:

// mapping suggestion for ESP32, e.g. LOLIN32, see .../variants/.../pins_arduino.h for your board
// NOTE: there are variants with different pins for SPI ! CHECK SPI PINS OF YOUR BOARD
// BUSY -> 4, RST -> 16, DC -> 17, CS -> SS(5), CLK -> SCK(18), DIN -> MOSI(23), GND -> GND, 3.3V -> 3.3V

This wiring doesn't use D0.

If you need to use different pins for the SPI connection, different than the default HW SPI pins of the board you compile for, then you have two options, assuming standard ESP32:

  • you can remap the pins of the standard VSPI channel, by preselection using SPI.begin(...).
  • you can use the other HW SPI channel HSPI, by creating an instance for it and preselecting its pins.

All other pins to the e-paper panel can be chosen as you like, you just need to adapt the constructor parameters to your wiring. And watch out for strapping pins (boot mode issues).
-jz-

Hey @ZinggJM Thanks for your time.

This wiring is using D16, which is also not labelled on my board. I will stick to my current wiring.

This is pretty much all I need to know. Appreciate it!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.