Waveshare e-paper displays with SPI

Just bumped into this:

enkoopa:
I'm trying to reverse engineer a display in a product ( eInk Weather Station )

Here's some captures:

Power-on:

Full update?

Zoomed-in section of full update

Just wondering if this looks familiar and I could try to get this display working with this library, or if I have to go full reverse-engineering on it.

Note the green/blue have pulse lengths as short as 83nS. Seems to use these 5 channels - a 6th is used but only has 1 pulse for an entire update frame, and also for the initialization it looks like.

I would check if the controller chip is the following:

Being from the same brand, could be the one which is receiving the signals from the microcontroller.

First signal could be the SCL clock, and the big pulse could be the chip enable or the charge pump enable.
Trying to decode the other signals to find which one is the SDA could be worth the effort, specially cross checking with the specs of the e-Paper controller.
Others could be returning signals like the "BUSY".

Have you disconnected the ribbon to check which of those signals are being generated by the microcontroller?

Hope this helps, this is a very interesting display for Arduino projects!

ciconde

Hi this is such a great library!

I have the ESP32 working with the IT8951 HAT using the GxEPD2_Example. (6" display)

Great stuff!

Hi,

I have some doubt about power consumption. When the upload process is complete and the new image is drawn, what happens if the Vcc power is disconnected? Is the image erased or keep in the e-paper?

Thanks

Regards,

Hi corecore,

The e-paper is a persistent display, and does not require power to maintain the picture.
The picture contrast only degrades very slowly over time; it is still visible after a year normally.
Before removing power a powerOff command should be sent to the controller.

The copy of the image in the controller is lost when power is removed. This means that the first update after restoring power needs to be a full refresh for b/w e-papers with differential update, aka "fast partial update".

Thanks for your response @ZinggJM

Regards,

Hiya,

I've stumbled here because of the following quote found by google

ssa75:
Hi this is such a great library!

I have the ESP32 working with the IT8951 HAT using the GxEPD2_Example. (6" display)

Great stuff!

Thing is I also have an IT8951 HAT with a 6" waveshare display and am currently hopelessly trying to get a raspberry pi to give me a terminal on the eInk display.
this is my dream for a long time to get a linux terminal on eInk.

now I do have an ESP32 lying around but before getting into compiling this library and connicting the display to the esp32, I wanted to ask, is there any way to maybe then get a serial connection esp/display to use it as a terminal display from a raspberry (or any computer?) Or any other way I could use this to make the display/esp32 combi into a linux terminal?

Thanks for a point in the right direction (or a short give up, in case I'm totally barking up the wrong tree.) :slight_smile:

Hi mchack,

It should be easy to use this e-paper with my library as a serial terminal display, but I have no example for it. I believe searching for "serial terminal" will give results. But my libraries don't have touch support, and the display doesn't have either.

BTW: the 6" e-paper used is a Carta display from E-Ink, afaik. I hope Waveshare will provide the IT8951 HAT also for other parallel IF e-papers from Good Display, e.g. the 6" and 8".

I also hope Waveshare will publish the programming or parameterization of the IT8951 HAT, and provide it separately, sometimes.

Hi ZinggJM,

thanks for the heads up, I'll try and connect it up and see how far I'll come (I'll keep you updated :wink: ... as for no touchscreen, I'd rather have a mechanical keyboard anyway.

Would it be possible to connect some kind of usb (or bluetooth?) keyboard to the esp32+display combi? then it would in fact be a standalone serial console (like in the olden days :D)


As for "programming or parameterization of the IT8951 HAT" the chinese waveshare wiki page has in fact a programing manual and schematic for the IT8951 HAT
(http://www.waveshare.net/wiki/6inch_e-Paper_HAT)
https://translate.google.com/translate?sl=auto&tl=en&u=http%3A%2F%2Fwww.waveshare.net%2Fwiki%2F6inch_e-Paper_HAT

Well you probably already know of those, but I thought I'd mention them anyway. Problem is I'm pretty much code iliterate :frowning: so I can't quite say how useful this stuff is, if at all.

Would it be possible to connect some kind of usb (or bluetooth?) keyboard to the esp32+display combi? then it would in fact be a standalone serial console (like in the olden days )

The ESP32 and ESP8266 don't have USB support by the processor. A separate chip is used on boards with ESP32 or ESP8266 for serial USB connection.

Some STM32 processors and the SAM and SAMD processors have on-chip general USB support; look for examples for USB on the Arduino packages for these processors. The Atmega32u4 (Arduino Pro Mini, Leonardo) also have USB support, but not enough RAM for e-paper displays (need heavy paging).

Information on Waveshare Universal e-Paper Driver Shield.

Note that the VCC pin (pin-hole) is NOT connected to the Arduino 5V pin, contrary to the description, but in accordance to the schematics. It receives ~4.2V through level converter from Arduino data pins (back-feed through protection diodes), and varies with data pin levels connected to the converter (max of the data pin levels). This leads to spurious errors. On Nucleo it receives ~3.0V, and does not work reliable. So you need to connect VCC to 5V for Arduino, 3.3V for Nucleo.

I have reported this to Waveshare service, but got no adequate response yet:

Hello,

To make the e-paper work, it require the voltage of the data pins should be same as the VCC pins input for level convertion.

Jean-Marc

and now:

Hello,

You should first confirm the working voltage of the NCULEO which you have.

I got it confirmed:

Hello,

If the IO pins of the NUCLEO is 3.3V, then you need to connect the VCC to 3.3V as well like the post.
Please test it.

mchack:
Hi ZinggJM,

thanks for the heads up, I'll try and connect it up and see how far I'll come (I'll keep you updated :wink: ... as for no touchscreen, I'd rather have a mechanical keyboard anyway.

Would it be possible to connect some kind of usb (or bluetooth?) keyboard to the esp32+display combi? then it would in fact be a standalone serial console (like in the olden days :D)


As for "programming or parameterization of the IT8951 HAT" the chinese waveshare wiki page has in fact a programing manual and schematic for the IT8951 HAT
(6inch e-Paper HAT - Waveshare Wiki)
https://translate.google.com/translate?sl=auto&tl=en&u=http%3A%2F%2Fwww.waveshare.net%2Fwiki%2F6inch_e-Paper_HAT

Well you probably already know of those, but I thought I'd mention them anyway. Problem is I'm pretty much code iliterate :frowning: so I can't quite say how useful this stuff is, if at all.

I used this one for connecting my d32 with a usb keyboard

Here the entire project configuration

Hi Jean-Marc,

I have 1.54 C e-paper from waveshare and I'm interfacing it with ESP8266 driver board. I read through the specification below and it seems the e-paper internal temperature sensor , vcom, and OTP registers can be read by an MCU. When I send SPI command 0x40 for temperature feedback, I recieve 0. I also receive 0 when I access the other mentioned registers. Can you please review the attached project and let me know what I missed.

https://www.waveshare.com/w/upload/a/ac/1.54inch_e-Paper_Module_C_Specification.pdf

I'm newbie to Arduino and e-papers. I appreciate your feedback!

epd1in54c.zip (13.4 KB)

Hi msteifismail,

you hit a long time pending project of mine, I never had the time and energy to pursue.

The controllers of (most of) these e-papers have read capability.
But the e-papers have only a DIN (MOSI) pin.
So I assume for bidirectional data transfer an SPI mode/configuration with common data wire is needed.
I do not know (yet) which processors support this with hardware SPI, and if any Arduino SPI driver supports this. And I didn't search for a SW SPI driver for this yet.
The configuration would need to be an open drain pin with pull-up, as the SPI transfer would send and receive at the same time, sending 0xFF when expecting to receive.

I don't think simply connecting DIN to MOSI and MISO in parallel is sufficient.

Jean-Marc

Hi. I have
Waveshare e-paper X00109DIF7 2.9inch e-Paper Module
and a
nRF52832 Feather of Adafruit

I can't found any usable Pin Mapping << >:(

My nRF52832 have SPI interface with MOSI MISO SCK
I can't found SPI_CS, DC, BUSY

I just search for many hours on internet and into projects sources where my nRF52 is tagged.
I write to Waveshare also.
I found github.com/leonrinkel/nRF52-eink-epaper
I just installed GxEPD2 library

Thanks, -Federico

Hi Federico

Thanks for providing links to the products in question.

Just the link to the nRF52832 Feather of Adafruit is missing; I assume this is it:

This page has a lot of information on it, but I don't see at first sight which processor is used.
If you could tell which board you select in the Arduino to compile for it, and which Arduino package this board belongs to, I might be better able to help.

In general the pins to use for HW SPI are fixed, can be found in pins_arduino.h for the board.
For CS you normally use SS, but you can use any general IO pin, as well as for DC and BUSY.

But other users had troubles with Adafruit HUZZAH32, and never reported if they finally succeeded. I don't have one.

Same might be true for your board, who knows. Important for GxEPD2 is that your wiring must correspond to the constructor parameters, means you adapt these parameters to your wiring.
Some pins of ESP32 or ESP8266 can cause boot mode problems, then you need to avoid these "strapping pins".

Good Luck!

Jean-Marc

found this package: GitHub - adafruit/Adafruit_nRF52_Arduino: Adafruit code for the Nordic nRF52 BLE SoC on Arduino

variant.h

#define PIN_SPI_MISO         (14)

#define PIN_SPI_MOSI         (13)

#define PIN_SPI_SCK          (12)

static const uint8_t SS   = 18 ;

static const uint8_t MOSI = PIN_SPI_MOSI ;

static const uint8_t MISO = PIN_SPI_MISO ;

static const uint8_t SCK  = PIN_SPI_SCK ;

Adding constructor for a new processor:

The constructors in GxEPD2_Example are in conditional compile blocks.
You either create a new conditional compile block for your processor, if you know the suitable defined symbol, or you copy one line for your e-paper display to outside of a conditional block, and adapt it.

Thanks ZinggJM.

board selected in the Arduino is:
"Adafruit Bluefruit Feather nRF52832"

Arduino package this board belongs to:
"Adafruit nRF52 by Adafruit"

I usually use I2C and now start with SPI for e-Paper.
There

Today I studied how SPI works and one thing that confused me is that the display does not have an input to connect "MISO"

Then there is that "DC" that stands for
Data / Command Selector: High>Data Low>Command
Works in parallel with the SPI channel.

For the SPI connection we talk about 3/4 wires but then there are 3 extra ones.

Now I resume the tests. Meanwhile, I thank you

@felisari,

Standard SPI uses SCK, MOSI, MISO and SS. SS or CS is only needed if you use SPI as a (multi slave) bus, but is used in general, as a slave does (should) not listen if CS is inactive.
In my opinion, this should be called 4-wire SPI, but this is not true in most cases.
In my opinion, 3-wire SPI would be the special case where MISO and MOSI are taken together for SDIO, see also post #1352.

Displays have in general an additional address line, called "RS" for register select or DC or D/C to distinguish between data or command phase. This is not an SPI signal, but often also counted for for the other use of the "4-wire" versus "3-wire" names, as used e.g. by Waveshare and Good Display. They use "3-wire" for 9-bit SPI transfers, where the DC address bit is an additional bit in the data stream.

These e-paper displays have no MISO line, so MISO is not counted.

Displays often have an additional line to reset the display controller.

The e-paper displays have an additional line to indicate BUSY state. During BUSY state no command should be sent to the e-paper display.

Hi,

I've manage to get a 9.7inch e-Paper for the Driver board (IT8951). The 6" code works fine right now but only fill 800x600 of the screen.

Which variable should I be looking to change to be able to write to the full resolution (1200x825)? (I have the firmware loaded for 1200x825)

Thanks in advance!

ssa75:
Hi,

I've manage to get a 9.7inch e-Paper for the Driver board (IT8951). The 6" code works fine right now but only fill 800x600 of the screen.

Which variable should I be looking to change to be able to write to the full resolution (1200x825)? (I have the firmware loaded for 1200x825)

Thanks in advance!

Hi ssa75,

Did you buy the 9.7" with the Driver board, or did you get the firmware for the 9.7" for your existing board from Waveshare? Was it easy to get the firmware?

You need to change lines 26 & 27 in GxEPD2_it60.h (or better create a GxEPD2_it97 class).

   static const uint16_t WIDTH = 800;
    static const uint16_t HEIGHT = 600;

This should be quite obvious. I hope this is the only change needed, I can't verify.

Please note that I can only support hardware that I have myself.
Sponsors are welcome, but I assume Waveshare sells too few of these to justify to sponsor me.
They should know me, as they refer to this Forum topic in their Wiki pages, but their service answers for me don't show much appreciation, and sales didn't answer at all. #1349

Jean-Marc

@ZinggIM and others, can anyone of you recommend me the fastest display available for partial update in the 2,6/2,7/2,9" range? I only need two color (black and white). I'm planning a project where to move small images in the display (not animations) and need it to be as fast as possible.