E-Ink Data Display

Tell us about your projects. Update us regularly.
Post Reply
Master Maker
Posts: 393
Joined: Tue Jun 24, 2014 8:25 pm
Location: Busselton

E-Ink Data Display

Post by parkview » Sat Jul 06, 2019 3:13 pm

I have a Raspberry Pi based home weather station and I collect other Crypto and Currency information that would be nice to view the current information without having to visit an internal Intranet webpage.

On my May 2019 visit to Shenzhen, I purchased a number of Waveshare (https://www.waveshare.com/)e-Ink displays and controllers, one of which is a 4.2" Black/White display. The dimensions are around: 91mm wide, 77mm high and 1.3mm thick. The screen resolution is: 400x300 pixels and it refreshes in around 2 seconds. They make a very cheap and handy ESP8266 based universal e-Ink controller that can be used for any (or at least most) of their e-Ink displays: https://www.waveshare.com/product/modul ... -board.htm

Yellow/Black/White 2.9" display with a ESP8266 controller:
Yellow/Black with ESP8266 Controller
SH-2019.1.jpg (210.12 KiB) Viewed 40 times
Even a flxible plastic display:
Flexible screen
SH-2019.2.jpg (208.42 KiB) Viewed 40 times
Initially I thought I could have my Intranet server create a data text file and the ESP8266 would wirelessly fetch the small data file and process it and push the data out to the connected display. While I could get text onto the display, I could never get this to work exactly as I wanted. I was either doing something wrong, or there is a bug in the ??? driver software I was using. Development was painful as I had to upload the code to the ESP8266 after every change.

I had an epiphany, in that perhaps I could do all the processing on the Intranet server and create a Bitmap image, host it on the webserver and the ESP8266 could then download it at a pre-programmed interval. This means if I want to change the Text layout, or include graphs etc, It all happens on the Intranet server and I don't need to re-program the ESP8266 with an update.

Currently I have a number of small Python scripts that compile different bits of information into a text files, one per data type. Kind of left over from my initial text display attempts. I then have a master script that reads all four data text files and assembles the data onto an image canvas using the Python Pillow module (https://en.wikipedia.org/wiki/Python_Imaging_Library). The image is then saved as a BMP format image file. Initially the display was only showing 50%-60% of the BMP file. Thinking it was a programming bug, or caching error, it took a while before I figured out the 150KB BMP file was too big to be displayed. I was using full colour (RGBA) canvas. Once I set the initial canvas to black and white the file size was reduced to a more manageable 16KB! A PNG based file was only 6KB, but I could never figure out how to display it.

The FreeBSD (https://www.freebsd.org/)server's CRON jobs take care of updating the Python generated text files, as different information is updated at different times (ranges from minutes to hours).

On the ESP8266 side, I used the following Libraries: GxEPD2 (https://github.com/ZinggJM/GxEPD2), Adafruit_GFX, Adafruit_SPITFT, ESP8266WiFi.

So I end up with (at the moment), a very simple text display on a 4.2" black/white display:
e-ink_4.2_sml.jpg (49.38 KiB) Viewed 40 times

User avatar
Posts: 198
Joined: Sun Jun 22, 2014 8:15 pm
Location: Bunbury WA

Re: E-Ink Data Display

Post by Jubbp » Thu Jul 11, 2019 8:43 am

A nice write up and and pretty cool solution.

Having to load a webpage to view the temperature data is pretty painful.

This makes it available at glance without running a full machine to display it.

Post Reply