Waveshare e-paper display not working properly with UNO

I recently bought two waveshare e-paper displays (2.13inch e-Paper HAT Rev2.1 V4 (b/w/r) and 2.7inch e-Paper HAT Rev2.2 V2).
I'm using Arduino IDE 2.2.1 on Windows 11 and tried several libraries including Waveshare epd-library and GxEPD2). Connections are made according to instructions.

With WaveShare library nothing is appearing on the displays when I upload and compile the example sketches. With GxEPD2 the smaller display is refreshing but showing 'garbage' in stead of the content described in the example sketch and nothing is happening on the larger display.

@stefaanh , Hi, welcome to the forum!

Please read How to get the best out of this forum, if you haven't done yet.

It is important to provide as much information as possible to get good answers!

Please always provide links to the devices in question, to make clear what you write about.

2.13inch E-Paper HAT (B), 250x122, Red/Black/White, SPI Interface
264x176, 2.7inch E-Ink display HAT for Raspberry Pi
These are the devices I found on the Waveshare website. Please confirm, or post links.

Note that the Waveshare examples use different wiring on UNO than the suggested wiring of GxEPD2.

Connections are made according to instructions.

Please report effective connections used, pin-to-pin.

For the Waveshare examples, tell exactly which examples you used. Link to their example on GitHub is the preferred report.

For GxEPD2 report which example you used and which selection you used.
Report diagnostics from Serial Monitor, in a code window, please (code tags, ).
GxEPD2_Example would provide the optimum information.
-jz-

Hi Jean-Marc,

Thanks for takling time to assist!

I try to be as complete as possible, hope you can pinpoint the issue

The 2.13 (3-color) device is
2.13inch E-Paper HAT (B), 250x122, Red/Black/White, SPI Interface (waveshare.com) - on the box X002MZUGXN

The 2.7 (2-color) device is
264x176, 2.7inch E-Ink display HAT for Raspberry Pi, SPI interface | WF10190CZ22 (waveshare.com) - on the box B07PKSZ3XK

I'm using an Arduino Uno R3 on Windows 11 Arduino IDE 2.2.1

GxEDP2 Library v1.5.5

In both cases i run this sketch GxEPD2/examples/GxEPD2_Example at master ยท ZinggJM/GxEPD2 (github.com)

#define GxEPD2_DISPLAY_CLASS GxEPD2_3C

for 3 color display

#define GxEPD2_DRIVER_CLASS GxEPD2_213_Z98c // GDEY0213Z98 122x250, SSD1680, (FPC-A002 20.04.08)

only 213 with 122x250 pixels

Connections as per suggestion checked multiple times

// mapping suggestion for AVR, UNO, NANO etc.
BUSY -> 7, 
ST -> 9, 
DC -> 8, 
CS-> 10,
CLK -> 13,
DIN -> 11

Serial Monitor:

setup
pages = 10 page height = 25

setup
pages = 10 page height = 25
_PowerOn : 8
_Update_Full : 8
_PowerOff : 8
_PowerOn : 8
_Update_Part : 8
_Update_Part : 8
_Update_Part : 8
_Update_Full : 8
_PowerOff : 8
_PowerOn : 8
_Update_Full : 8
_PowerOff : 8
_PowerOn : 8
_Update_Full : 8
_PowerOff : 8
_PowerOn : 8
_Update_Full : 8
_PowerOff : 8
_PowerOn : 8
_Update_Part : 8
_Update_Part : 8
_Update_Part : 8
_Update_Part : 8
_Update_Part : 8
_Update_Part : 8
_Update_Part : 8
_Update_Part : 8
_Update_Part : 8
_Update_Part : 16
_Update_Part : 8
_Update_Part : 8
_Update_Part : 8
_Update_Part : 8
_Update_Part : 8
_Update_Part : 8
_Update_Part : 8
_Update_Part : 8
_Update_Part : 8
_Update_Part : 8
_Update_Part : 8
_Update_Part : 8
_Update_Part : 8
_Update_Part : 12
_Update_Part : 8
_Update_Part : 8
_Update_Part : 8
_Update_Part : 8
_PowerOff : 8
_PowerOn : 8
_Update_Full : 8
_PowerOff : 8
_PowerOn : 8
_Update_Full : 8
_PowerOff : 8
_PowerOn : 8
_Update_Full : 8
_PowerOff : 8
setup done

The display flashes several times, it is doing some partial updates, turns black but is for the rest showing only garbage. End display contains random black, white and red pixels.

For the 2.7 I changed the following lines in the GxEPD2_display_selection_new_style.h

#define GxEPD2_DISPLAY_CLASS GxEPD2_BW

#define GxEPD2_DRIVER_CLASS GxEPD2_270     // GDEW027W3   176x264, EK79652 (IL91874), (WFI0190CZ22)

Connections as per your wiring examples:

// mapping suggestion for AVR, UNO, NANO etc.
BUSY -> 7, 
RST -> 9, 
DC -> 8, 
CS-> 10, 
CLK -> 13, 
DIN -> 11

It runs through the sketch without errors, but nothing happens on the screen
(I enabled some of the Serial.print so I can follow what should be displayed)

= 8 page height = 36
setup
pages = 8 page height = 36
helloWorld
_PowerOn : 8
_Update_Full : 8
_PowerOff : 8
helloWorld done
helloFullScreenPartialMode
_PowerOn : 8
refresh : 8
helloFullScreenPartialMode done
helloArduino
refresh : 8
helloArduino done
helloEpaper
refresh : 8
helloEpaper done
_Update_Full : 8
_PowerOff : 8
_PowerOn : 8
_Update_Full : 8
_PowerOff : 8
helloWorld
_PowerOn : 8
_Update_Full : 8
_PowerOff : 8
helloWorld done
_PowerOn : 8
refresh : 8
refresh : 8
refresh : 8
refresh : 8
refresh : 8
refresh : 8
refresh : 8
refresh : 8
refresh : 8
refresh : 8
refresh : 8
refresh : 8
refresh : 8
refresh : 8
refresh : 8
refresh : 8
refresh : 8
refresh : 8
refresh : 8
refresh : 8
refresh : 12
refresh : 8
_PowerOff : 8
deepSleepTest
_PowerOn : 8
_Update_Full : 8
_PowerOff : 8
_PowerOff : 8
_PowerOn : 8
_Update_Full : 8
_PowerOff : 8
_PowerOn : 8
_Update_Full : 8
_PowerOff : 8
_PowerOff : 8
deepSleepTest done
setup done

@stefaanh , unfortunately you seem to have bought displays with panels that are not supported with GxEPD2.

If you take a look at comments in the driver classes you selected:
https://github.com/ZinggJM/GxEPD2/blob/master/src/epd3c/GxEPD2_213_Z98c.h

// Panel: GDEY0213Z98 : https://www.good-display.com/product/392.html
// Controller: SSD1680 : https://v4.cecdn.yun300.cn/100001_1909185148/SSD1680.pdf

2.13 inch eink,3-color 2.13_Good Display (good-display.com)
Looks different compared to the panel on your HAT, I think.

https://github.com/ZinggJM/GxEPD2/blob/master/src/epd/GxEPD2_270.h

// based on Demo Example from Good Display: http://www.e-paper-display.com/download_list/downloadcategoryid=34&isMode=false.html
// Controller: IL91874 : http://www.e-paper-display.com/download_detail/downloadsId=539.html

Is so old that I didn't add the link to the panel.
The link with WF10190CZ22 would correspond to the inking on my panel (WFI0190CZ22):

//#define GxEPD2_DRIVER_CLASS GxEPD2_270     // GDEW027W3   176x264, EK79652 (IL91874), (WFI0190CZ22)

But the new panel might be 2.7 inch E-Ink Screen Display 264x176 SPI, GDEY027T91

//#define GxEPD2_DRIVER_CLASS GxEPD2_270_GDEY027T91 // GDEY027T91 176x264, SSD1680, (FB)

You could give it a try.
And report the inking you see on your display panels, on the flexible connector.
-jz-

Could you please change the title of your topic
from "Waveshare e-paper display not working properly with UNO"
to "Waveshare e-paper display not working properly with UNO for me"
this would be less offending and more correct. Thank you.

Thanks for your efforts Jeam-Marc,

I made some progress today on the 2.13 (b/w/r) display ... First of all, I just tried it again without making any changes to my latest sketch (which was not working as it should) and it its a lot better now (restart pc and reconnect arduino). I made no changes to the display selection.

Further more I added a 'wait for key to be pressed' at the start of a number of the functions and now I can see the proper content on my display (but not yet everything that should be shown by the demo). At least this gives me hope and I will keep trying until it is OK.

Maybe you could foresee a keypress in your sketches (turn on/off with small change in the code) and I'm not too familiar yet but maybe the delay time can be set with variables rather than fixed values so they can be changed througout the sketch with modification of just a couple of lines.

Have a nice day !

void WaitForIt(char C)
{
while (Serial.read() != (unsigned char)C);
}
void loop()
{
}
// note for partial update window and setPartialWindow() method:
// partial update window size and position is on byte boundary in physical x direction
// the size is increased in setPartialWindow() if x or w are not multiple of 8 for even rotation, y or h for odd rotation
// see also comment in GxEPD2_BW.h, GxEPD2_3C.h or GxEPD2_GFX.h for method setPartialWindow()
const char HelloWorld[] = "Hello World!";
const char HelloArduino[] = "Hello Arduino!";
const char HelloEpaper[] = "Hello E-Paper!";
void helloWorld()
{
Serial.println("helloWorld");
WaitForIt('G');
display.setRotation(1);

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