Go Down

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

sallo1723

Hi Jean-Marc,

I hadn't noticed that the RST line doesn't goes to the level converter of the shield. Thank you for noticed that.
I put a resistor in that line and the display works.

I have to do more tests but I think that is the problem of that e-paper shield.

By the way, I'm still using the waveshare demo code.

Best regards, Sebastian

ZinggJM

#1081
Jan 20, 2019, 05:44 pm Last Edit: Jan 20, 2019, 05:51 pm by ZinggJM
The one you know is 2.9" the other is BW 4.2''
The fade was seen on the bigger display, as I update the small one fully each time.

For this large display, I use a custom font, which is size 120 so the digits have large black surfaces.

I can wait, there is no hurry. Thanks.
I tried an example with your font, with partial update every minute. The contrast looks good on my display, but you can see some sort of boarder remains from previous numbers:


With the waveform table from the actual demo source, the contrast is lower, and the remains are more prominent:


Note that the first picture was taken by daylight, the second with light from a LED lamp, which gave more contrast.

You can experiment with the waveform table for this display, by changing the cycles values for partial refresh:

Code: [Select]
#define TP0A  2 // sustain phase for bb and ww, change phase for bw and wb
#define TP0B 45 // change phase for bw and wb

const unsigned char GxGDEW042T2_lut_20_vcom0_partial[] PROGMEM =
{
  0x00,
  TP0A, TP0B, 0x01, 0x00, 0x01,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};



in https://github.com/ZinggJM/GxEPD2/blob/master/src/epd/WaveTables.h
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.

lesept

Thanks Jean Marc, I'll have a look.
A force d'essayer on finit par réussir... Donc, plus ça rate, plus on a de chances que ça marche (proverbe Sharduinok).

lesept

I see you added support for GDEW029T5 : is it the one I sent you? If yes, I should use this constructor.

Quote
You can experiment with the waveform table for this display, by changing the cycles values for partial refresh:
Code: [Select]
#define TP0A  2 // sustain phase for bb and ww, change phase for bw and wb
#define TP0B 45 // change phase for bw and wb

const unsigned char GxGDEW042T2_lut_20_vcom0_partial[] PROGMEM =
{
  0x00,
  TP0A, TP0B, 0x01, 0x00, 0x01,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
I don't understand what I should play with... What are the meanings of all these numbers? Which one(s) are to be tested? And what values: anything between 0 and 255?

Do you think that the delay between 2 consecutive partial update may play a role in the fade 'amplitude' ?
A force d'essayer on finit par réussir... Donc, plus ça rate, plus on a de chances que ça marche (proverbe Sharduinok).

ZinggJM

#1084
Jan 22, 2019, 04:25 pm Last Edit: Jan 22, 2019, 04:45 pm by ZinggJM
@lesept,

Quote
I see you added support for GDEW029T5 : is it the one I sent you? If yes, I should use this constructor.
Yes, there is a sticker on the backside with that name. Yes, with the new version you should use the constructor for it.

Quote
I don't understand what I should play with... What are the meanings of all these numbers? Which one(s) are to be tested? And what values: anything between 0 and 255?
Note that this is for the 4.2" b/w e-paper display GxGDEW042T2.

Code: [Select]
#define TP0A  2 // sustain phase for bb and ww, change phase for bw and wb
#define TP0B 45 // change phase for bw and wb


You can try with other values instead of 2 and 45. These are numbers of some clock cycles for phase length of the waveform used for partial refresh. Values between half and double of these values could be interesting. Documentation for waveform tables is hard to find... I would need to search for the rare document that has it. Fortunately I kept this link:

https://forum.arduino.cc/index.php?topic=487007.msg3465934#msg3465934

Note that the partial update waveform of the actual demo code uses one phase only for differences only, of length 25. Same as Ben Krasnow, with even shorter length. Having a "sustain phase" helped keeping the white parts white with my partial update tests. But I didn't use too much time in experimenting, this takes time!

Quote
Do you think that the delay between 2 consecutive partial update may play a role in the fade 'amplitude' ?
Yes, if you don't call powerOff() after partial update with intervals of maybe 20 seconds or so.
I used powerOff() with the 1 minute interval.
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.

lesept

Quote
Note that this is for the 4.2" b/w e-paper display GxGDEW042T2.
Understood, that's the one I'll use partial refresh on.
A force d'essayer on finit par réussir... Donc, plus ça rate, plus on a de chances que ça marche (proverbe Sharduinok).

ZinggJM

You complained about fading contrast, but you never posted a photo. Maybe you could do that.
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.

lesept

OK, I'll do that as soon as possible.
A force d'essayer on finit par réussir... Donc, plus ça rate, plus on a de chances que ça marche (proverbe Sharduinok).

lesept

#1088
Jan 24, 2019, 07:14 pm Last Edit: Jan 24, 2019, 07:18 pm by lesept
Here are 2 pictures of the large display, on which I first print 12:43, then I do a partial refresh and print at the same place 12:14




You can see that on the second picture, the ghost of 43 is still visible on the 14



Here is the code I use, maybe it's not correct ?


Code: [Select]
void LargeTimeHoriz () {
  uint16_t w = grand.width();
  uint16_t h = grand.height();
  grand.setFont(&Open_Sans_ExtraBold_120);
  grand.setFullWindow();
  grand.firstPage();
  char Time[6] = "12:43";
  int DigitPos[5] = {37, 110, 183, 217, 290};
  int y = 200;
  do
  {
    grand.fillScreen(GxEPD_WHITE);
    grand.drawRect(0, 0, w, h, GxEPD_BLACK);
    for (byte i = 0; i < 5; i++) {
      grand.setCursor(DigitPos[i], y);
      grand.print(Time[i]);
    }
  }
  while (grand.nextPage());
  delay(2500);
  grand.setPartialWindow(217, y - 100, 150, 110);
  Time[3] = '1';
  Time[4] = '4';
  do
  {
    int x = 0;
    int y = 200;
    grand.fillScreen(GxEPD_WHITE);
    for (byte i = 3; i < 5; i++) {
      grand.setCursor(DigitPos[i], y);
      grand.print(Time[i]);
    }
  }
  while (grand.nextPage());
  grand.powerOff();
}
A force d'essayer on finit par réussir... Donc, plus ça rate, plus on a de chances que ça marche (proverbe Sharduinok).

ZinggJM

Your code looks ok, but your picture doesn't. And I have no idea what the reason could be.

I would like to avoid to scroll through all your posts, so you could tell once more the processor board you use and the connection board. And the setting of the RESE jumper or switch on the connection board.

Please measure the supply voltage to the display, and check if it is stable.

Observe the diagnostic output in the Serial Monitor, and report it, so I can check if BUSY active times are reasonable.

I have 2 or 3 of the 4.2" b/w displays, one as display board from Waveshare and the other panels from Good Display that I connect with DESTM32-S2 connection boards. But my panels are quite old, so I may have different behaviour than with current panels.

With the wavetable fixes for the GDEW029T5 and GDEW0213I5F I checked in today, I also added the option to use the wavetable of the current demo for the 4.2" b/w instead of my version, with the same fix applied to the wavetable as for the other 2 displays. You would need to uncomment line 404 to check with this version (Wavetables.h). I  would expect the result to be worse.

That's about what comes to my mind.
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.

lesept

#1090
Jan 24, 2019, 09:03 pm Last Edit: Jan 24, 2019, 09:10 pm by lesept
Not sure I understand everything you said Jean Marc
Quote
I would like to avoid to scroll through all your posts, so you could tell once more the processor board you use and the connection board. And the setting of the RESE jumper or switch on the connection board.

Please measure the supply voltage to the display, and check if it is stable.

Observe the diagnostic output in the Serial Monitor, and report it, so I can check if BUSY active times are reasonable.
This, I can do.

For now, I use a LOLIN32 Lite ESP32 board. My objective is to transfer to a LOLIN32 (not Lite) when everything works.
The RESE switch is on the left side (470 ohms?)



How do I measure the voltage ? Between pins 3.3V and GND ?
If yes, using a multimeter (ANENG AN8008), I measure 3.259 V steady

Here is the output from the serial monitor (setup is the beginning of the setup):
Code: [Select]

setup
_PowerOn : 68090
_Update_Full : 4208159
_Update_Part : 1019862
_Update_Part : 1019881
_Update_Part : 1019883
_PowerOff : 40949


For the rest of your message, I don't understand. Should I first update my version of the library? I have version 1.1.0 GxEPD2
A force d'essayer on finit par réussir... Donc, plus ça rate, plus on a de chances que ça marche (proverbe Sharduinok).

ZinggJM

RESE is 0.47ohm, is correct for this display.

The actual Version is 1.1.3, it is already available through Library Manager.

But update will fail if you modified the library, it seems it gets installed in a different directory then, and the IDE gets confused. Delete it first and install it new with Library Manager.

Your serial output looks ok, times are as expected.

The FCP connector on the board is different. I don't have any DESPI-C02 yet. So I can't judge if your connection is good. Is there some lever on the left side to loosen and fasten?

In an earlier version of GxEPD, when the demo code had only full update waveform, I had both waveform versions, mine the Ben Krasnow version, and there was one report that my versions was less good.

Maybe the actual demo version works better with the actual display, but it has an error, one table contained different (the old version) values.
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.

lesept

Quote
The FCP connector on the board is different. I don't have any DESPI-C02 yet. So I can't judge if your connection is good. Is there some lever on the left side to loosen and fasten?
You can see it all on the picture: the lever is the black rectangle on the left side of the connector on the right side of the picture.

I installed the new version of the library. I'll try it then change line 404 and get back...
A force d'essayer on finit par réussir... Donc, plus ça rate, plus on a de chances que ça marche (proverbe Sharduinok).

lesept

#1093
Jan 24, 2019, 10:25 pm Last Edit: Jan 24, 2019, 10:33 pm by lesept
Here is the picture with the raw library, line 404 of WaveTables.h is still commented:


And here, with the uncommented line: it's much better. I think I can use this configuration, unless you want to tweak it a little more...


I also tried the constuctor for the GxEPD2_290_T5 display; it works like a charm :)
A force d'essayer on finit par réussir... Donc, plus ça rate, plus on a de chances que ça marche (proverbe Sharduinok).

ZinggJM

I was about to ask you to run the GxEPD2_Example with the 3-color 4.2" display selected.
And to post a photo of the backside of the display, with the label sticker on it.
This because your photos look a bit brownish, as would be expected running b/w on a b/w/r display.
But your photo of the 2.9" b/w also looks a bit brownish.

It is not explainable for me, why a shorter change phase should give more contrast than a longer one.
It is up to you to decide if you want to experiment with different TP0A and TP0B values (e.g. 0 and 0x19 like the demo version).

I would need an actual version of the 4.2" b/w display to check.

But I leave the wavetable of the library as it is, until I get more feedback from more users.

For any user who wants to help, please check with commenting/uncommenting line 404 of WaveTables.h

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.

Go Up