Help with ESP32 S3 and Waveshare 7.5" E-ink display

Hello,
I am quite new to hardware tinkering and Arduino, so please don't be too hard on me. :slightly_smiling_face:

I have the following Waveshare 7.5" E-Ink Display Rev 2.3 HAT:

And I also have the following Lilygo T-Energy S3 ESP32:

The ESP32 is powered via USB and is connected to the e-ink display this way:
VCC->3V
GND->GND
DIN->FSPID/GPIO35
CLK->FSPICL/GPIO36
CS->GPIO47
DC->GPIO21
RST->GPIO48
BUSY->ADC2_CH3/TOUCH14/GPIO14
PWR->3V (but also tried 5V)

Im using GxEPD2 library to show some test message on the screen. But so far without any success.
I tried these two driver configurations:
GxEPD2_750_T7
GxEPD2_750_GDEY075T7

The code compiles and runs, according to the log everything is okay, but the screen remains empty. I have also tried the example from GxEPD2, but the result is the same.

My case is very similar to this:

It is the same e-ink display, the only difference is that I have a different ESP32.
The solution over there didn't work for me. (VCC and PWR should be both connected to 3V)

Did I connect the display to incorrect GPIOs?
I am stuck here already a few days, any help is appreciated!

Thank you!

Welcome!

Request for Information to Assist with Your Problem:

I find your question interesting, but I have a problem understanding your setup. After reading your description, I still have no idea what your actual configuration looks like. To help you better, please provide the following:

  1. Annotated Schematic: Post a clear, annotated schematic of your setup showing all connections, including power, ground, and any power supplies. I do not work with Fritzing diagrams or unclear pictures. However, a readable photo of a hand-drawn schematic is perfectly fine.
  2. Technical Details: Provide links to the technical information for all hardware components used in your setup. There are many different and sometimes incompatible devices that look similar but behave differently, so it's crucial that we have accurate information. Avoid linking to marketplace sites like Amazon that often lack detailed specifications.
  3. Why This Matters: All you want is to make everything work together correctly, and all we want is to help you achieve that. By providing the correct details, we can offer more targeted and effective assistance.

Helpful Resources:

Please share these details so we can guide you toward the right solution. We're here to help!

First of all thank you for your response!

1.I made an annotated schematic image, it was my first time doing so, so the image might not be the greatest. Hope the setup is understandable.
You can see on the picture that the ESP32 board has support for 18650 battery, but I haven't used that, I powered it through USB port.

2.Technical details
-Information about the Waveshare 7.5" e-paper HAT (mine is V2)
There is a section about working with ESP32, but that is for their Waveshares own ESP32 Driver board.

-Information about Lilygo T-Energy S3 ESP32 and its Github
There is no other website with information about this device, I also bought it here in its official website.

I appreciate your work but I have no experience with these parts. It is possible you damaged it by putting 5V on the 3V3 pin but that is not a given.

Have you tried the blink program and other simple programs to be sure they upload and work? I will look around but do not expect me to find anything. Hopefully others have the information you need.

There are many possible reasons for your problem. And there are many posts related to GxEPD2 in this forum.

You could have a panel that is not supported in GxEPD2. The inking on the flexible connector can give a first clue. Report it. And compare it to the inking of the supported panels found in GxEPD2/examples/GxEPD2_Example/GxEPD2_display_selection_new_style.h at master · ZinggJM/GxEPD2 · GitHub

Your wiring may not correspond to the constructor parameters used for the display driver. Compare it. And report the example you used (better: use GxEPD2_Example) and the constructor line used by it.

Your SPI connections may be wrong. Report the board you selected to compile for, to know the default HW SPI pins used. Maybe you need to remap SPI pins for your wiring.

GxEPD2_Example produces diagnostic output to the Serial Monitor. Report it, as it might be helpful.

@gilshultz @silentobserver Thank you for the responses!

I have tried a simple blink program with multiple GPIOs, and those worked well, so I think the ESP32 seems to be okay.

I checked the compatible panels, mine seems to be compatible (FPC-C001 is on the flexible connector).

I tried multiple samples and got different result. And of course I changed the pins defined in the samples to match my wiring.

  • Waveshare sample: the display flashes black and white during init. The code sees the display is busy, it keeps waiting and then crashes. But at least this was the first time I saw something on the display!
  • GxEPD2 sample: No error in the log, everything seems fine there, but the display stays empty. This is the log:
setup
Display initialized.
Screen cleared.
Text drawn.
Rectangle drawn.
_PowerOn : 4
_Update_Full : 1
Display updated. Done.
_Update_Full : 1
_PowerOff : 1
  • Hello World from GxEPD2 discussion: This worked for someone who uses the same display. Sadly it didnt work for me, at start it waits for BUSY to go low, but that never happens

Im thinking my problem might be related to the connections, since both the Waveshare sample and the Hello World sample were waiting for BUSY to go low.
Is this because the BUSY pin's connection has problem or other pins can also cause this?

For now I have already ordered a different ESP32 board (FireBeetle 2 ESP32-E), that I saw others were successful using with this epaper display. Hopefully that will also work for me.

Your isssue is most likely with HW SPI pins.
But without knowing which board you select to compile for, you can't be helped.

Sorry, I seemed to have overlooked this. You mean which board is selected inside Arduino IDE, right?
I have selected ESP32S3 Dev Module.
I followed the settings I found on this board official Github page.
These are my settings:

Setting Value
Board ESP32S3 Dev Module
Upload Speed 921600
USB Mode Hardware CDC and JTAG
USB CDC On Boot Enabled
USB Firmware MSC On Boot Disabled
USB DFU On Boot Disabled
CPU Frequency 240MHz (WiFi)
Flash Mode QIO 80MHz
Flash Size 16MB (128Mb)
Core Debug Level None
Partition Scheme 16M Flash (3MB APP/9.9MB FATFS)
PSRAM OPI PSRAM
Arduino Runs On Core 1
Events Run On Core 1

arduino-esp32/variants/esp32s3/pins_arduino.h at master · espressif/arduino-esp32

static const uint8_t SS = 10;
static const uint8_t MOSI = 11;
static const uint8_t MISO = 13;
static const uint8_t SCK = 12;

You need to remap SPI pins for use with your wiring.

See e.g. GxEPD2/examples/GxEPD2_Example/GxEPD2_Example.ino at master · ZinggJM/GxEPD2 · GitHub
line 187.

Thank you for your answer!
I modified pins_arduino.h to this:

static const uint8_t TX = 43;
static const uint8_t RX = 44;

static const uint8_t SDA = 8;
static const uint8_t SCL = 9;

static const uint8_t SS = 47;
static const uint8_t MOSI = 35;
static const uint8_t MISO = 37;
static const uint8_t SCK = 36;

But unfortunately still no luck. Did I do the mapping wrong?

Im a bit confused regarding the pins_arduino.c mapping and the code you linked. At line 187 it maps the pins using this:
SPI.begin(18, -1, 16, 33);
In some samples I found, this SPI.begin is not used.
Does this override the mapping in pins_arduino.c file?

SPI.begin(); without parameters uses the default pins from pins_arduino.h

SPI.begin(18, -1, 16, 33); uses the pin numbers from the parameters.

display.init(); also calls SPI.begin() without parameters.
if this is a second call to SPI.begin, then it does nothing.

So you can override the SPI.begin() of display.init().

There are other options.

It is bad practice to modify the pins_arduino.h, unless it is for a new board.

@silentobserver Thanks for all the replies! It just does not work with this board.

But I could test this display today with a different ESP32 board (WEMOS LOLIN32 Lite), and with this everything works as it should be. GxEPD2 and the Waveshare sample both without any problem. So maybe the previous board was somehow not compatible with this display.