Go Down

Topic: Waveshare e-paper displays with SPI (Read 359251 times) previous topic - next topic

AntimatterArduino

#1770
Apr 02, 2020, 10:21 pm Last Edit: Apr 02, 2020, 10:24 pm by AntimatterArduino
Hi,

I'm using a Waveshare 4.2" three color e-paper module (with yellow) with the project from https://github.com/G6EJD/ESP32-e-Paper-Weather-Display. It's controlled by a WEMOS LOLIN32 board. Everything works but the display is not very clear. The black color is a little blurry. I think it has something to do with the yellow color which is not used.

Any idea how I can get the black to be more darker? 

Thanks.

ZinggJM

Hi,

I'm using a Waveshare 4.2" three color e-paper module (with yellow) with the project from https://github.com/G6EJD/ESP32-e-Paper-Weather-Display. It's controlled by a WEMOS LOLIN32 board. Everything works but the display is not very clear. The black color is a little blurry. I think it has something to do with the yellow color which is not used.

Any idea how I can get the black to be more darker?  

Thanks.
Hi AntimatterArduino,

Welcome to the forum. If you have not done yet, please read General Guidance and How to use the Forum.

Your link https://github.com/G6EJD/ESP32-e-Paper-Weather-Display doesn't tell which example you use.

I assume it is examples/Waveshare_4_2/Waveshare_4_2.ino.

This example is for the 4.2" b/w e-paper display. You would need to change line 62 from
Code: [Select]
GxEPD2_BW<GxEPD2_420, GxEPD2_420::HEIGHT> display(GxEPD2_420(/*CS=D8*/ EPD_CS, /*DC=D3*/ EPD_DC, /*RST=D4*/ EPD_RST, /*BUSY=D2*/ EPD_BUSY));

to
Code: [Select]
GxEPD2_3C<GxEPD2_420c, GxEPD2_420c::HEIGHT> display(GxEPD2_420c(/*CS=D8*/ EPD_CS, /*DC=D3*/ EPD_DC, /*RST=D4*/ EPD_RST, /*BUSY=D2*/ EPD_BUSY));


But you will still be disappointed. You should take a b/w e-paper for a b/w application, for the faster refresh and clearer display.

Jean-Marc

No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

AntimatterArduino

Hi AntimatterArduino,

Welcome to the forum. If you have not done yet, please read General Guidance and How to use the Forum.

Your link https://github.com/G6EJD/ESP32-e-Paper-Weather-Display doesn't tell which example you use.

I assume it is examples/Waveshare_4_2/Waveshare_4_2.ino.

This example is for the 4.2" b/w e-paper display. You would need to change line 62 from
Code: [Select]
GxEPD2_BW<GxEPD2_420, GxEPD2_420::HEIGHT> display(GxEPD2_420(/*CS=D8*/ EPD_CS, /*DC=D3*/ EPD_DC, /*RST=D4*/ EPD_RST, /*BUSY=D2*/ EPD_BUSY));

to
Code: [Select]
GxEPD2_3C<GxEPD2_420c, GxEPD2_420c::HEIGHT> display(GxEPD2_420c(/*CS=D8*/ EPD_CS, /*DC=D3*/ EPD_DC, /*RST=D4*/ EPD_RST, /*BUSY=D2*/ EPD_BUSY));


But you will still be disappointed. You should take a b/w e-paper for a b/w application, for the faster refresh and clearer display.

Jean-Marc


Thanks, I will try it. Indeed it's examples/Waveshare_4_2/Waveshare_4_2.ino.

Regards,
Peter

Kuttel

Hello,

Thank you for this helpful library.
Will you also support the GDEH0154D67 1.54" b/w Display with grey-levels in your GxEPD2-4G in the near future?
Thanks,
Torben

ZinggJM

#1774
Apr 07, 2020, 08:20 pm Last Edit: Apr 08, 2020, 06:42 am by ZinggJM
Hello,

Thank you for this helpful library.
Will you also support the GDEH0154D67 1.54" b/w Display with grey-levels in your GxEPD2-4G in the near future?
Thanks,
Torben
Hi Torben,

I don't know yet how near this future will be, but yes, I intend to. Your interest may help.

But I just checked on the Good Display website, it is not advertised as supporting grey levels.
This may mean that the electrophoretic fluid of this display is not suitable to produce clean and uniform grey levels. I had seen this on some other b/w e-paper I tried. I think the black particles need to have a controlled uniform size variance to produce clean grey levels.

1.54 inch e-paper display module partial refresh E-ink screen panel new GDEH0154D67

Jean-Marc

Addition:

The controller SSD1681 of this e-paper panel has all needed waveform tables for full refresh and differential refresh (fast partial update) in OTP memory. It does have a command (32h) to "Write LUT Register", and the LUT format is described. But there is no example LUT for grey levels. It would be possible to experiment with creating a waveform table for grey levels, but I think it is not worth the effort, as the outcome most likely would not be "pleasant".
No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

Kuttel

Hi Jean-Marc,

thank you for your answer. In fact I bought a 1.54" E-PAPER DISPLAY V2 from Waveshare. On their webpage the specs say „Grey level: 2". So I thought it has a grey-level support.

Torben

MichaelKe

Hi, I'm using a Waveshare 2.9'' bw display on an Arduino pro mini in my battery powered project. I was glad to find your library and it's mostly working. Unfortunately, I can't find a solution for the following reproduceable problem. When I take the example GxEPD2_U8G2_Fonts_Example and uncomment my display in the AVR section, add display.setRotation(1) in setup (I want landscape) and I change the x position in the void helloWorld() to zero (instead of centered) there is a blind section in the left display area when it's displaying helloWorld. After displaying helloArduino() call the blind section is gone the display works totally well the whole example. The size of the blind display area is changing when I vary MAX_DISPLAY_BUFFER_SIZE. My Project is doing one FullWindow display update and afterwards many PartialWindow updates. In this case every other PartialWindow update shows the blind area. Is this something I can change? I was helping me to add a dummy FullWindow update to avoid this problem. But in this way the display update takes twice as long and it will reduce battery life time. Any suggestion?
Regards and thanks
Michael


ZinggJM

Hi Michael,

Thank you for the detailed description of your issue. And welcome to the forum.
You may have hit an error of the library, so it would be interesting to find out.
But even with your detailed description it would take me considerable time to reproduce your issue.
And even then I would not be sure if I have reproduced your issue correctly.
And I am short on time, as I am always working on something, or answering some posts.

So you could spare me some time and effort, if you reduce your example to the minimum that shows the issue, and post this issue. It should be able to compile and run. Post your code using code tags, the <\> command symbol, or add it as zip-file, if too big.

Please read General Guidance and How to use the Forum if you haven't done yet.

Jean-Marc
No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

MichaelKe

Hi Jean-Marc, thanks for the quick response. I took the example and strip it down to reproduce the problem:

Code: [Select]
#include <GxEPD2_BW.h>
#include <U8g2_for_Adafruit_GFX.h>

#define MAX_DISPLAY_BUFFER_SIZE 800
#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8))
GxEPD2_BW<GxEPD2_290, MAX_HEIGHT(GxEPD2_290)> display(GxEPD2_290(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));    // 296 x 128 Pixel
#define ENABLE_GxEPD2_GFX 1

U8G2_FOR_ADAFRUIT_GFX u8g2Fonts;

void setup() {
  display.init();
  display.setRotation(1);
  u8g2Fonts.begin(display); // connect u8g2 procedures to Adafruit GFX

  uint16_t bg = GxEPD_WHITE;
  uint16_t fg = GxEPD_BLACK;
  u8g2Fonts.setFontMode(1);                 // use u8g2 transparent mode (this is default)
  u8g2Fonts.setFontDirection(0);            // left to right (this is default)
  u8g2Fonts.setForegroundColor(fg);         // apply Adafruit GFX color
  u8g2Fonts.setBackgroundColor(bg);         // apply Adafruit GFX color
  u8g2Fonts.setFont(u8g2_font_helvR14_tf);  // select u8g2 font from here: https://github.com/olikraus/u8g2/wiki/fntlistall
  uint16_t x = 10;
  uint16_t y = display.height() / 2;
  display.firstPage();
  do
  {
    display.fillScreen(bg);
    u8g2Fonts.setCursor(x, y); // start writing at this position
    u8g2Fonts.print("Hello World!");
  }
  while (display.nextPage());

  delay(2000);

  u8g2Fonts.setFontMode(1);                 // use u8g2 transparent mode (this is default)
  u8g2Fonts.setFontDirection(0);            // left to right (this is default)
  u8g2Fonts.setForegroundColor(fg);         // apply Adafruit GFX color
  u8g2Fonts.setBackgroundColor(bg);         // apply Adafruit GFX color
  u8g2Fonts.setFont(u8g2_font_helvR14_tf);  // select u8g2 font from here: https://github.com/olikraus/u8g2/wiki/fntlistall
  y = display.height() / 4;
  display.setPartialWindow(0, y - 14, display.width(), 20);
  display.firstPage();
  do
  {
    display.fillScreen(bg);
    u8g2Fonts.setCursor(x, y);
    u8g2Fonts.println("Hello Arduino!");
  }
  while (display.nextPage());


}

void loop() {
  // put your main code here, to run repeatedly:

}



After starting the example it looks like 1.jpg(see attachment) and 2 secongs later like 2.jpg.

I hope this helps

Regards Michael


ZinggJM

@MichaelKe,

Thank you for reporting this issue. I confirm there is an error in my library, but I had no time to analyze it yet. It is related to paged drawing. It is not related to the use of U8g2_for_Adafruit_GFX.

Jean-Marc
No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

MichaelKe

Hi Jean-Marc, thank for looking at my problem. I'm not I a hurry and I'll keep an eye on updates. Thanks o lot and stay healthy. Michael

ZinggJM

Version 1.2.7 of GxEPD2 is ready on GitHub and will be available with Library Manager soon.

- fix paged drawing of initial screen on GDEH029A1
- sometimes true is false, if applied the wrong way round

Jean-Marc

No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

iamcommando

Good day,

Great forum with lots of info!  I've been enjoying the discussion.  Now I've got a question of my own.

I've been working with the e-paper displays for a few months now.  I've been using the 2.9in b/w and 2.9in b/w/r with no problems using some modified the esp32 bluetooth example code provided by waveshare.  I'm connecting to the esp32 via a bluetooth connection from an rpi zero-w running a python script.  I reverse engineered the simple bluetooth transfer protocol for my python script.  Again, everything has been fine with the 2.9in screens.

When trying the 4.2in b/w/y screen, I can't seem to send a good bitmap to be reassembled by the esp32 and displayed on the screen.  When I send a picture via the android app to the esp, everything works fine for the 4.2, but when I send the same bitmap via my python script, I get garbage.

My question for the experts:  Is there a difference between the way that the 4.2b/w/y screen is supposed to be loaded?  I notice in the sample esp32 arduino code that the 4.2in has a more extensive init function, with modifications to the look up tables.  Would these LUT mods change how I need to preprocess my bitmap data before loading it?  I assumed the LUT mods were for color saturation, contrast, and screen update modifications, but I'm not really sure.  Any ideas on how to troubleshoot?


Thanks!
Bob

ZinggJM

@iamcommando,

Quote
Is there a difference between the way that the 4.2b/w/y screen is supposed to be loaded?
Not to my knowledge, but I don't know the Waveshare example.

Quote
Would these LUT mods change how I need to preprocess my bitmap data before loading it?
No, the LUT (waveform table) is only used to generate the appropriate waveform to display the controller memory content on the screen.

Quote
Any ideas on how to troubleshoot?
By comparing your code with the Waveshare app code. But I don't see your code, and I don't speak python.

BTW: did you read General Guidance and How to use the Forum

Jean-Marc
No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

lordofdav11

#1784
Apr 15, 2020, 11:44 am Last Edit: Apr 15, 2020, 12:01 pm by lordofdav11
Hi,

I'm trying to use GxEPD2 library with my ESP32 WROOM, but I'm getting "Busy Timeout!" error.
Same problem with older GxEPD library, but when I tried a waveshare's example code and it works so display isn't damaged. I also checked all wires by multimeter.

Could someone try to help me with the problem?

Details:
Display: aliexpress link
ESP32: aliexpress link
Working waveshare's code: github link
Connection images: imgur link
Code: github link
Pins: github link
Serial monitor log: github link

I can also provide more informations if needed.

Thanks for help,
David


Go Up