Waveshare e-paper displays with SPI

There seem to be two variants:

Advanced Color ePaper (ACeP)- E Ink Gallery™

Advanced Color ePaper (ACeP)- E Ink Gallery Palette™

The less expensive Palette variant has less colors. This is the case with the 5.65" 7-color display.

The guy ended up with the correct palette and not the tweaked one (he showed that in the video), right?

Looking at his converter tool he's using the 8-colour palette he shows in his video, including the supposedly unavailaible "purpley whitish" colour:

uint8_t palette[8*3] = {
	0, 0, 0,
	255, 255, 255,
	67, 138, 28,
	100, 64, 255,
	191, 0, 0,
	255, 243, 56,
	232, 126, 0,
	194 ,164 , 244 
};

corresponding to the colour constants:

#define EPD_5IN65F_BLACK   0x0	///	000
#define EPD_5IN65F_WHITE   0x1	///	001
#define EPD_5IN65F_GREEN   0x2	///	010
#define EPD_5IN65F_BLUE    0x3	///	011
#define EPD_5IN65F_RED     0x4	///	100
#define EPD_5IN65F_YELLOW  0x5	///	101
#define EPD_5IN65F_ORANGE  0x6	///	110
#define EPD_5IN65F_CLEAN   0x7	///	111   unavailable  Afterimage

However whether that improves the contrast, I don't know.
I'd be interested to see the same example 3-colour image you showed above on the 7-colour display.

Version 1.2.14 of library GxEPD2 is available through Library Manager.

[color=#426c6d]- [/color]added support for 6" 1448x1072 ED060KC1 on Waveshare e-Paper IT8951 Driver HAT
[color=#426c6d]- [/color]fixed GxEPD2_WiFi_Example.ino: new GitHub fingerprint for ESP8266, certificate for ESP32
[color=#426c6d]- [/color]fixed color discriminator for 7-color display in GxEPD2_7C.h
[color=#426c6d]- [/color]added multicolor support for 7-color display in GxEPD2_WiFi_Example, GxEPD2_Spiffs_Example,
[color=#426c6d]- [/color]and GxEPD2_SD_Example, GxEPD2_SerialFlash_Example
[color=#426c6d]- [/color]fixed paged write to 7-color display controller (transaction and CS handling issue)
[color=#426c6d]- [/color]some more fixes

Support for [iurl=https://www.waveshare.com/product/displays/e-paper/6inch-hd-e-paper-hat.htm]ED060KC1 1448x1072[/iurl] is thanks to a donation by [iurl=https://forum.arduino.cc/index.php?action=profile;u=626654][color=#007e83]claudius310[/color][/iurl].

Jean-Marc

Original

7-Color

3-Color

E-Paper (Sorry it is a very bad photo, my camera on the phone is broken)

PS: Thanks Jean Marc for pushing the new version! 8)

ZinggJM:
@Rebehy,

I took a quick look at the drawGrayscaleBitmap() methods of Adafruit_GFX.
These methods only work with Adafruit monochrome display classes, e.g. Adafruit_GrayOLED.
The reason is the color value passed to the drawPixel() method. drawGrayscaleBitmap() directly passes a 0..255 grey level value, whereas drawPixel() in GxEPD, GxEPD2 etc. expects values in standard TFT RGB565 format.

I should have time this week to create a solution for GxEPD2_4G. I will try to make it general enough to be also usable for GxEPD_HD, by using a depth parameter. I hope I can make up my mind for the name to use, grey or gray or monochrome, bitmap or image; different from Adafruit_GFX in any case.

Jean-Marc
from Wikipedia.

Maybe I will call the upper level (buffered graphics) method drawGreyPixmap().

I have oceans of code and Variable naming with no documentation! It's the way I am I guess. Your response has taught me the importance of documenting and labeling. I can easily work on other parts of my project for a few weeks. Let me know how you go but don't feel rushed. I am just so grateful for your input to our project. I will run any copyright and/or acknowledgement compliance with you pre-production phase. Thanks again for the help and keep safe. Try to take time off for Christmas and new year :slight_smile:

E-Paper (Sorry it is a very bad photo, my camera on the phone is broken)

Thanks, and yes I see what you mean, it does look washed out compared to the 3-colour one.
But interestingly it looks similar to the monochrome version, in terms of contrast.

No, i can say contrast is definitely better on the monochrome.

Hello,

I hope this is the correct thread to ask about this. I recently got a Waveshare 12.48b screen along with the ESP32 board which neatly sits into the slot on the controller. I was eventually able to get some sample code running from the Waveshare wiki. (Their instructions are pretty bad!). I know the screen and ESP32 work together and the sample code was showing text and images fine.

The Waveshare site for this screen is here.

I came across the GxEPD2 library when searching how to display an image from a webpage. That's exactly what I'd like to do with mine. I was hoping the GxEPD2_1248 settings in this library would work with the Waveshare 12.48b, but it doesn't seem to.

First I tried GxEPD2_WIFI_EXAMPLE which connected to my Wifi fine and ran through all the downloads of the images. However, there was absolutely no response on the EPaper Screen.

I then tried GxEPD2_Example which did actually update the screen, but not as it should. Some images did appear, but the screen wasn't cleared before each image so they were just a blur. I thought this might be an issue with partial refresh, so I set hasPartialUpdate=False in GxEPD2_1248.h.

These are the pin settings I am using which correspond with the settings in the Waveshare wiki. (I couldn't see what the "miso" pin represented. No mention of that on the Waveshare site. Not sure if that's relevant.)

GxEPD2_BW < GxEPD2_1248, GxEPD2_1248::HEIGHT / 4 >
display(GxEPD2_1248(/*sck=*/ 13, /*miso=*/ 12, /*mosi=*/ 14, /*cs_m1=*/ 23, /*cs_s1=*/ 22, /*cs_m2=*/ 16, /*cs_s2=*/ 19,
                             /*dc1=*/ 25, /*dc2=*/ 17, /*rst1=*/ 33, /*rst2=*/ 5, /*busy_m1=*/ 32, /*busy_s1=*/ 26, /*busy_m2=*/ 18, /*busy_s2=*/ 4));

I was hoping someone could help me with this. Is it just a case that the GxEPD2 library doesn't support the Waveshare 12.48inch e-Paper Module (B) that I have?

In the sample code from Waveshare, the screen does a full flicker and clear before updating. I couldn't reproduce this using the GxEPD2 library, so I'm wondering if the problem is with how the screen is being cleared.

I can provide the console output or any other info required.
Any help or advice appreciated! This is all new to me. I have a 7.5" EInk running a weather dashboard using a RiPiZero but I wanted to use the ESP32 for this project. My plan is for a Raspi to produce the dashboard as a Bitmap, then the ESP32 to pick up that from web location and display.

Thanks,
Conor

@cdensel, Hi Conor,

Is it just a case that the GxEPD2 library doesn't support the Waveshare 12.48inch e-Paper Module (B) that I have?

Yes, GxEPD2 only supports the b/w version. And the two versions need to be considerably different, so I can't give any suggestions about what you could try. Btw: getting the b/w version to work was not easy.

Jean-Marc

@ZinngJM
Hi Jean-Marc,

Thanks for your response. Ok, I guess I'll have to work with the Waveshare sample code and drivers they provided.

Hopefully there are functions from your library that I can still use to grab the images and convert them.

Thanks,
Conor

Hi,
I've bought the 1.54" Waveshare E-Paper display and connected it to a Wemos D1 Mini via SPI and got it working so I can add test tothe display but I have a strange problem.

I cannot program the D1 mini with the display connected, I have to diconnect it to flash the D1 and also I have to powerup the D1 with the display disconnected and connect it afterwards otherwise the disply doesn't work.

anyone seen this before?

Thanks,
Phil

@gadjet,

Hi Phil

Yes, this is a known issue, especially with the Waveshare modules with level converters.
You should post a link, clickable, so we can know.
The level converter pulls the CS line up, but it should be low for correct boot mode.
Try with a 3.3k pull-down resistor on the CS pin.

Jean-Marc

@Rebehy,

I have updated the library GxEPD2_4G.

Version 1.0.2 of library GxEPD2_4G is available, downloadable and installable as ZIP-file.

  • added method drawGreyPixmap() to buffered graphics
  • void drawGreyPixmap(const uint8_t pixmap[], int16_t depth, int16_t x, int16_t y, int16_t w, int16_t h);

Jean-Marc

@Jean-Marc
Thank you for the info. I'll give that a try :slight_smile:

Phil

Hi there all
I buy this e-paper display from waveshare that is 2.13'' and have also red color other than black,
and I want to make it work with a NodeMcu.
The e-paper have a board that work at 3.3V and 5V also.

So I downloaded last recent version of GxEPD2 and in the GxEPD2_Example
I uncomment this line:

GxEPD2_3C<GxEPD2_213c, GxEPD2_213c::HEIGHT> display(GxEPD2_213c(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4));

I map the pin like in the example:

GxEPD2_3C<GxEPD2_213c, GxEPD2_213c::HEIGHT> display(GxEPD2_213c(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4));

At the first run, the screen was blank... so I try to change the CS pin from GPIO15 to GPIO5(D1)
and also the code like this:

GxEPD2_3C<GxEPD2_213c, GxEPD2_213c::HEIGHT> display(GxEPD2_213c(/*CS=D8*/ 5, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4));

...but unfortunately the screen is still blank.

I also try another NodeMcu just to see if the first was no broke.

I don't know or I don't understand... where (in the code) I tell to the board that must work at 3.3V and not at 5V?
Can anybody tell me if I must uncomment other record in the source in order to make it work please ?

Thanks all in advance
Denis

@denisj, Hi Denis,

Most likely the panel on your Waveshare board is not supported by GxEPD2.

You find the list of supported panels in README.md.

The supported 2.13" 3-color display panel is GDEW0213Z16. This panel is no longer available from Good Display:
Tri-color e-paper displays

You could ask Waveshare to provide their actual 2.31" 3-color HAT to me. link

I don't know or I don't understand... where (in the code) I tell to the board that must work at 3.3V and not at 5V?

The HAT has LDO and level converters on board. It is intended to work with both 3.3V or 5V.

Jean-Marc

The controller is UC8151d, found on page 45 of 2.13inch_e-Paper_V3_Specification.pdf, a.k.a. IL0373.

As this is the same controller, it should work with GxEPD2, with the driver class you selected.

Please report the inking on the flex connector, and diagnostic output from Serial Monitor in a code window, please.

Dear Jean-Marc,
thanks a lot for your answer... I have try all yesterday to make it work :slight_smile:
But I would like to use your library cause there is a lot of community around.

For the other that will have same problem,
for the 2.13 black and red color, for the moment, I have use the official lib of waveshare
For a Nodemcu I have change the map of pin in the epdif.h file like this:

//nodemcu pin map
#define RST_PIN         5  //D1
#define DC_PIN          0  //D3
#define CS_PIN          15 //D8
#define BUSY_PIN        4  //D2
//CLK -> GPIO14 > D5
//DIN -> GPIO13 > D7

The demo it's work very well :slight_smile:
Thanks again
Denis

Dear Jan-Mark,
I know that I'm little OT but please let me ask you a shop info.

Because I have a lot of problem with my 2.13 black+red display with official waveshare lib.
I want to ask you if I can buy this display with it's board and be sure that is compatible with your library please ?
It is true that the e-paper tricolor have no a partial refresh ?

Other think... is there e-paper display with a board driver that allready have arduino like on board,
and obviously compatible with your lib ?

Thanks a lot
Denis

@denisj,

I want to ask you if I can buy this display with it's board and be sure that is compatible with your library please ?

See list in README.md, please. The answer is no. Only b/w 2.6" is supported.

### Supported SPI e-paper panels from Good Display:
- GDEP015OC1     1.54" b/w
- GDEH0154D67    1.54" b/w, replacement for GDEP015OC1
- GDEW0154T8     1.54" b/w 152x152
- GDEW0154M09    1.54" b/w 200x200
- GDEW0154M10    1.54" b/w 152x152 DES
- GDEW0154Z04    1.54" b/w/r 200x200
- GDEH0154Z90    1.54" b/w/r, replacement for GDEW0154Z04
- GDE0213B1      2.13" b/w
- GDEH0213B72    2.13" b/w, replacement for GDE0213B1
- GDEH0213B73    2.13" b/w, new replacement for GDE0213B1, GDEH0213B72
- GDEW0213I5F    2.13" b/w flexible
- GDEW0213Z16    2.13" b/w/r
- GDEH029A1      2.9" b/w
- GDEW029T5      2.9" b/w
- GDEW029Z10     2.9" b/w/r
- GDEW026T0      2.6" b/w
- GDEW027C44     2.7" b/w/r
- GDEW027W3      2.7" b/w
- GDEW0371W7     3.7" b/w
- GDEW042T2      4.2" b/w
- GDEW042Z15     4.2" b/w/r
- ACeP565        5.65" Waveshare 5.65" 7-color e-paper display 600x448
- GDEW0583T7     5.83" b/w
- GDEW0583T8     5.83" b/w 648x460
- GDEW075T8      7.5" b/w
- GDEW075T7      7.5" b/w 800x480
- GDEW075Z09     7.5" b/w/r
- GDEW075Z08     7.5" b/w/r 800x480
- GDEH075Z90     7.5" b/w/r 880x528
- GDEW1248T3    12.48 b/w 1304x984
#### Supported SPI e-paper panels & boards from Waveshare: compare with Good Display, same panel
#### other supported panels
- ED060SCT        6" grey levels, on Waveshare e-Paper IT8951 Driver HAT
- ED060KC1        6" grey levels, 1448x1072, on Waveshare e-Paper IT8951 Driver HAT

Other think... is there e-paper display with a board driver that allready have arduino like on board,
and obviously compatible with your lib ?

I don't know of any I can recommend. But there are users of TTGO T5.

At the end I'll buy a LILYGO® TTGO T5 V2.2 ESP32 2.9"
Thanks a lot :slight_smile:
Denis