Go Down

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

jinology

@jinology,

Anyone able to guess what library you used, and understand what you mean? Sorry, not me.

If you haven't done yet, please read General Guidance and How to use the Forum and Learn How To Use The Forum.

Provide a link to the e-paper you use, clickable using "insert a link" symbol, and tell what library or code you use.

Jean-Marc

@jinology,

Anyone able to guess what library you used, and understand what you mean? Sorry, not me.

If you haven't done yet, please read General Guidance and How to use the Forum and Learn How To Use The Forum.

Provide a link to the e-paper you use, clickable using "insert a link" symbol, and tell what library or code you use.

Jean-Marc

Sorry for the missing information, I modified my post already.  

ZinggJM

@jinology,

Quote
I brought the flexible epaper from here https://www.waveshare.com/product/2.9inch-e-paper-hat-d.htm

I downloaded the code from here https://github.com/ZinggJM/GxEPD

I am used GxEPD_SPI_TestExample

> #include <GxGDEW029Z10/GxGDEW029Z10.cpp>    // 2.9" b/w/r
At first i wanted to use 2.9" b/w for this epaper but it didn't work, end up I use b/w/r
This is an unsupported use of my library. I am tempted to just answer I can't help you.

Both GxEPD and GxEPD2 have a README.MD with a list of supported displays.

If you would like to have support for an additional display, you could ask either Waveshare or Good Display to offer me a free sample, to promote this display.

The panel of your display 2.9 inch flexible 4 grayscale e ink display module e paper display buy epd display manufacture GDEW029I6F has the same controller as the GDEW029Z10 you have chosen, but also as the GDEW029T5. So you could also try with GDEW029T5. It may be sub-optimal for partial refresh, as it might need a different wavetable.

For new users, Newbies, and new projects, I recommend to use GxEPD2.

Both libraries have options to draw flipped bitmaps, as some vendor bitmaps are flipped.

Both Waveshare and Good Display have descriptions for how to create bitmap code using image2lcd.
I have no experience with this, as I only use vendor example bitmaps in my examples.

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.

deltatrinity

#1802
Apr 22, 2020, 04:35 pm Last Edit: Apr 22, 2020, 04:43 pm by deltatrinity
Hello!

First of all: Thank you, Jean-Marc for your awesome libraries!!!  :)

I used them without a problem with small displays (2,13in) and ESP8266 in my projects and recently bought a big 3C Display (7,5in GDEW075Z08 800x480). I had to use an ESP32 because SSL and Display buffer wouldn't fit in a 8266 RAM.

But after a few weeks I noticed some stripes on either side of the display, that even got worse over time... (See attached photos)

Does anybody have any idea how to fix that? Or what could have caused it? Do I have to contact waveshare?

The stripes seem permanent now, and stay there when I use another program or another ESP32 or 8266.

Best regards and thanks in advance for your help!
Michael

PS. I tried different background colors to erase the effect, the one with the white background (epaperstripes3) was the initial one, the usage time between epaperstripes3 and 1 and 2 is one week.

ZinggJM

#1803
Apr 22, 2020, 05:17 pm Last Edit: Apr 22, 2020, 05:50 pm by ZinggJM
Hi Michael,

the big e-paper panels are susceptible to marginal voltage supply, especially the 3-color versions.

If the voltage printed on the display is the supply voltage VIN to the processor, then the processor will have less than 3.3V. This could be the cause. Please post the supply circuit schematics.

You didn't tell how you have connected the panel to your processor, what connection module you use.

The actual E-paper HAT from Waveshare has level converters and a LDO (series regulator) that leads to marginal voltage below 3 Volts when fed from 3.3V from ESP32 or ESP8266.

It was a good idea to check with different backgrounds. But you should also check with different pictures, and e.g. the GxEPD2_Example, and even with the demo from Waveshare.

But it could also be that some connector bumps of the controller have lost contact, or part of the TFT panel failed.

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.

deltatrinity

Hey Jean-Marc,

thank you for your quick reply!  :)

I use the "epaper HAT for the Raspberry Pi" from Waveshare.

I tried different pictures and also used the GxEPD2_Example.

And now I tried using an external 3.3V (I also tried 3,5V) power supply with the GxEPD2_Example, but sadly nothing changed...   :(

The strange thing is, that it seems to get worse over time and that only the short edges are affected.

Any other ideas?  ;)

Best regards,
Michael

deltatrinity

(...)
If the voltage printed on the display is the supply voltage VIN to the processor, then the processor will have less than 3.3V. This could be the cause. Please post the supply circuit schematics.
(...)
The printed voltage is the battery voltage from another temperature sensor outside. ;)

I used a Wemos/Lolin D1mini pro and a Lolin D32 pro with 5V USB supply and connected it directly to the Raspberry Pi HAT which worked fine for about 2-3 weeks.

Thanks again for your quick answers!

Best regards,
Michael

ZinggJM

@deltatrinity,

I think your e-paper display is defective, and you should ask for a replacement.

It looks like the controller doesn't have good contact to the TFT panel at both edges, maybe the panel has been bent slightly too much. The controller is the grey slab visible near the flex connector.

I have only one e-paper panel in constant use since about 1.5 years, a 7.5" b/w 640x384 GDEW075T8, with full screen update every 3 minutes. It shows no degradation.
I had one 1.54" b/w in test for over a year, with partial update every second. This is about 10 times the number of refreshes specified. It showed some degradation.

My other e-papers are only used for library updates tests so far. I don't like the 3-color ones, because of the refresh behaviour. But the b/w/r could be used for alarm indications (or for the mail-box flag, if ever I get a post delivery detector working reliably).

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.

ksedgwic

Is it possible to probe at runtime to safely determine whether a GDEH0154D67 is present?

The "LetheKit" project at https://github.com/BlockchainCommons/bc-lethekit uses a
"Waveshare 200x200, 1.54inch E-Ink display module".  Recently they've started shipping
a new version ("Rev2.1" on the silkscreen) which is incompatible with the previous versions
from a few months ago.

The previous versions work great with the GxEPD2_154 driver.
The new versions work great with the GxEPD2_154_D67 driver.

Is there anyway I can probe the display on startup and instantiate the correct driver for the particular board?

Many thanks in advance!

Ken

ZinggJM

Hi Ken,

Thank you for this interesting question, asked here for the first time. And thank you for the interesting link.

The answer is: yes, it would be possible, but not easy.

Most e-paper controllers don't have the typical "manufacturer registers" known from TFT controllers.
But in general they have information in OTP, e.g. waveform tables, default configuration values etc.
And they have commands to read from OTP, and to program OTP.

The SPI e-paper controllers I know don't have a MISO pin, they only have a DIN pin. For reading it serves as a DIO pin.
For most processors this means you need a SW SPI implementation to read from these controllers.
I needed this, to be able to read waveform table information. Therefore I have a replacement class for GxEPD2_EPD with SW SPI. This is available in the library: https://github.com/ZinggJM/GxEPD2/tree/master/extras/sw_spi complete with README. It can even switch between using SW and HW SPI.

You would need to experiment with this, to find usable differences between these two controllers.
I would then recommend to use one display instance for each controller, and select at run-time the instance to use (if you have enough RAM).

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.

ksedgwic

Jean-Marc,

Thank you for the thoughtful response!

I tried the approach you suggested and it seems to work!

I wasn't sure how to condition the state of the controller prior to reading data.  The simplest thing I could
think of was reading a byte immediately after initialization.  The older controllers return 0xff and the new
Rev2.1 controllers return 0x00.  Is this good enough?  I'm not sure what I'm reading ...

My mods are visible here:
https://github.com/BlockchainCommons/bc-lethekit/pull/36/files

What is a good way to integrate the SW SPI driver into our release?  Is there some way to modify GxEPD2 so
it can optionally support SW SPI in the released configuration?  I'd be happy to contribute a PR to further this.

Again, thank you so much, this looks very promising!

Ken

ZinggJM

#1810
Apr 27, 2020, 04:01 pm Last Edit: Apr 27, 2020, 04:08 pm by ZinggJM
Hi Ken,

thank you for your answer.

Quote
The simplest thing I could
think of was reading a byte immediately after initialization.  The older controllers return 0xff and the new
Rev2.1 controllers return 0x00.  Is this good enough?  I'm not sure what I'm reading ...
Neither am I. I think it is more or less random what you get, if you don't send a command to read from OTP first.

The controller specs are downloadable from Good Display, e.g. 1.54 inch e-paper display module partial refresh E-ink screen panel new GDEH0154D67
http://www.e-paper-display.com/download_detail/downloadsId=825.html

Quote
What is a good way to integrate the SW SPI driver into our release?  Is there some way to modify GxEPD2 so
it can optionally support SW SPI in the released configuration?  I'd be happy to contribute a PR to further this.
I don't want to have this in the standard release. And I decided to not merge any PRs.

If you need this in your project, you should use your own fork.

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.

ZinggJM

#1811
Apr 28, 2020, 06:21 am Last Edit: Apr 28, 2020, 06:26 am by ZinggJM
@ksedgwic,

in https://github.com/ZinggJM/GxEPD2/blob/master/src/epd/GxEPD2_1248.cpp you can find two examples for a method that temporarily switches to SW SPI for reading from a controller: line 666

Code: [Select]
void GxEPD2_1248::_readController(uint8_t cmd, uint8_t* data, uint16_t n, int8_t cs, int8_t dc)


and:  line 634

Code: [Select]
void GxEPD2_1248::_getMasterTemperature()


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.

glogge64

Hey,

I can not operate my waveshare 7.5''.

board : Arduino MKR WAN 1300
E-Ink  : waveshare 7.5'' B - V2  - 3 SPI or 4 SPI communication modes
E-Ink is connected with E-Paper Driver HAT with the settings B (> 2.9'') and 0 (4-line-SPI)

code : pd7in5b_V2-demo.ino

pins :

BUSY --> D10 (MISO)
RST --> D4
DC --> D3
CS --> D5
CLK --> D9 (SCK)
DIN --> D8 (MOSI)
GND --> GND
3.3V --> 3.3V

I hope you can help me

ZinggJM

#1813
Apr 28, 2020, 03:24 pm Last Edit: Apr 28, 2020, 05:10 pm by ZinggJM
@glogge64,

Hi,

I can operate my Waveshare 7.5" 3-color 800x480 e-paper.

But I use my library GxEPD2 and usually DESPI-C02 for connection.

I have no experience with the Waveshare demo code epd7in5b_V2-demo.ino.

Your e-paper and connection module seem to be: 800×480, 7.5inch E-Ink display HAT for Raspberry Pi, three-color

The wiki page is: https://www.waveshare.com/wiki/7.5inch_e-Paper_HAT_(B)

Waveshare has a link on that page to this topic, that's why you ask here, most likely.

You see, it takes already some effort to collect this information, and it gets much easer for any reader or helper if clickable links are provided.

For a start you could read General Guidance and How to use the Forum

I can take a look at their code in the meantime, to see where they select the pins, and if they correspond to your wiring.

Jean-Marc

In https://github.com/waveshare/e-Paper/blob/master/Arduino/epd7in5bc_V2/epdif.h

Code: [Select]
// Pin definition

#define RST_PIN         8

#define DC_PIN          9

#define CS_PIN          10

#define BUSY_PIN        7



Did you adapt these values to your wiring?

BTW: the e-paper hat may supply insufficient voltage to the e-paper, when connected to 3.3V, because of the LDO. This may cause malfunction, especially for the big e-paper panels.

https://github.com/waveshare/e-Paper/blob/master/Arduino/epd7in5bc_V2/epdif.cpp

At least they now use HW SPI:

Code: [Select]
#include "epdif.h"

#include <SPI.h>



But claim exclusive use of SPI:

Code: [Select]
int EpdIf::IfInit(void) {

    pinMode(CS_PIN, OUTPUT);

    pinMode(RST_PIN, OUTPUT);

    pinMode(DC_PIN, OUTPUT);

    pinMode(BUSY_PIN, INPUT);

    SPI.begin();

    SPI.beginTransaction(SPISettings(2000000, MSBFIRST, SPI_MODE0));

    return 0;

}






Pinout-MKRWAN1300_latest.pdf
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.

glogge64

Jean-Marc,

Thanks for your quick answer!

I am using this hardware:

e-paper: https://www.waveshare.com/wiki/7.5inch_e-Paper_HAT_(B)

connection module: https://www.waveshare.com/wiki/E-Paper_Driver_HAT

µ-controller: https://store.arduino.cc/arduino-mkr-wan-1300-lora-connectivity-1414


Are my hardware settings right, especially the wiring from µ-controller to the connection module?

e-paper --> arduino mkr wan 1300
BUSY --> D10 (MISO)
RST --> D4
DC --> D3
CS --> D5
CLK --> D9 (SCK)
DIN --> D8 (MOSI)
GND --> GND
3.3V --> 3.3V


It is a little bit difficult because waveshare just have an example for the Arduino UNO, where they use these wiring:

e-paper --> arduino UNO
BUSY --> D7
RST --> D8
DC --> D9
CS --> D10
CLK --> D13
DIN --> D11
GND --> GND
Vcc --> 3.3V



Yes, i adapted the values to my wiring.

Code: [Select]
// Pin definition
#define RST_PIN         6
#define DC_PIN          7
#define CS_PIN          4
#define BUSY_PIN        5



Thanks for your note to insufficiency of the voltage, but i have to use a big e-paper for my project.


Sorry, I didn' understand what do you want me to say in the last section about SPI. Do i have to adapt my Code or the settings of the connection module (my setting: 0 --> 4-line-SPI)?


Fabian

Go Up