7.5inch E-Paper Display Monochrome Expansion Module HAT 800x480

Product Overview

This product is a 7.5-inch black-and-white e-ink display expansion module with a screen resolution of 800x480. It uses SPI communication and supports both full and partial refresh modes. The driver board is designed based on the 40-pin interface of Raspberry Pi, making it compatible with Raspberry Pi series boards. We provide example programs in C and Python for Raspberry Pi. A reserved SPI control interface allows easy integration with main control boards such as Arduino, STM32, and ESP32. We also offer example code for Arduino, STM32, and ESP32, which supports displaying images, English and numerical characters, and drawing points, lines, rectangles, and circles.

Product Specifications

Pixels800 x 480
Display ColorsMonochrome (Black and White)
Gray Levels2
Level-Shifting ChipTXS0108EPWR
Signal InterfaceSPI
Power Supply Voltage3.3V/5V
Display Area163.2mm x 97.9mm
Partial Refresh0.3s (4-wire SPI mode)
Full Refresh3s (4-wire SPI mode)
DimensionsScreen: 170.2mm x 111.2mm, Driver Board: 65mm (length) x 30mm (width)
Weight135g (net weight 55g)
E-paper Screen Dimensions
Figure 1-2 E-paper Screen Dimensions
Driver Board Dimensions
Figure 1-3 Driver Board Dimensions

Interface Definition

VCC3.3V/5V
GNDPower ground
RSTExternal reset pin (low level reset)
BUSYBusy status output pin
D/CData/Command control pin (high level for data, low level for command)
MOSISPI communication MOSI pin
CSSPI chip select pin (active low)
CLKSPI communication SCK pin
LED1_PLED1 control pin
LED2_PLED2 control pin
K1_PButton K1 control pin
K2_PButton K2 control pin

Usage

All example programs provided for this product are based on the 4-wire SPI mode, so the BS selection switch on the board is defaulted to the "0" position. Additionally, the RESE switch is defaulted to position A; setting it to position B may result in abnormal display.

Resource Overview

The overview of the driver resources is shown in the figure below:

① E-paper screen matching resistor selection switch(default is "A" position)

② E-paper screen connector

③ SPI lines count selection switch(default is "0" position)

④ Two LEDs

⑤ Two buttons

⑥ SPI control interface connector

⑦ Control pins for LEDs and buttons

⑧ Level-shifting chip TXS0108

⑨ Raspberry Pi 40-pin GPIO interface

Raspberry Pi Example Usage

The example code for the Raspberry Pi platform is divided into two versions: lgpio and wiringpi. The bookworm system uses the lgpio library, while the bullseye system uses the wiringpi library.

Raspberry Pi Platform Interface Definition

The example programs for the Raspberry Pi board use the BCM numbering for pin definitions with the lgpio library and the wiringpi numbering with the wiringpi library. The pin wiring definitions for the Raspberry Pi board are as shown in the table below:

Table 2-1 Driver Board and Raspberry Pi Pin Definitions
E-paper Interface (E-paper Connector)Pin FunctionBCM Numberingwiringpi Numbering
VCC3.3V
GNDGND
BUSYBusy Signal Pin245
RSTNReset170
D/CCommand/Data Select256
SDASPI Data Out/Slave In1012
SCLSPI Clock1114
CSBSPI Chip Select810
LED147
LED2181
K1272
K2223

wiringpi Library Installation

sudo apt-get install wiringpi
wget https://project-downloads.drogon.net/wiringpi-latest.deb #

Upgrade Raspberry Pi 4B Version

sudo dpkg -i wiringpi-latest.deb
gpio -v #

If version 2.52 appears, it indicates that the installation has been successful.

#For the Bullseye branch system, use the following command:

git clone https://github.com/WiringPi/WiringPi
cd WiringPi
. /build
gpio -v #

# Running "gpio -v" will show version 2.70. If it doesn't appear, it means there is an installation error.

If an error message "ImportError: No module named 'wiringpi'" appears when running a sample program in Python version, run the following command:

# For Python 2.x version

pip install wiringpi

# For Python 3.x version

pip3 install wiringpi

Note: If the installation fails, you can try the following compiled installation.

git clone --recursive https://github.com/WiringPi/WiringPi-Python.git

Note: The --recursive option can automatically pull submodules. Otherwise, you need to download them manually.

Enter the newly downloaded WiringPi-Python folder and use the following commands to compile and install:

# For Python 2.x version

sudo python setup.py install

# For Python 3.x version

sudo python3 setup.py install

If the following error occurs:

In this case, enter the command sudo apt install swig to install SWIG. After completing the installation, run sudo python3 setup.py install to compile and install. If you see similar information, it indicates that the installation was successful.

lgpio Library Installation

For the Bookworm system, the example programs use the lgpio library. The installation command for this library is:

wget https://github.com/joan2937/lg/archive/master.zip
unzip master.zip
cd lg-master
make
sudo make install

Enable the SPI Interface

sudo raspi-config

Enable the SPI Interface

Interfacing Options -> SPI -> Yes

Check the enabled SPI devices:

Is /dev/spi* #

This will print: "/dev/spidev0.0" and "/dev/spidev0.1"

Python Library Installation

The example program uses the Python 3 environment. To run the Python example program, you need to install the PIL, numpy, and spidev libraries. Enter the following commands to install them:

sudo apt-get install python3-pil
sudo apt-get install python3-numpy
sudo apt-get install python3-pip
sudo pip3 install spidev

C Version Example

Using the lgpio library as an example, navigate to the /demo codes/raspberry_pi/lgpio/c directory:

sudo make clean
sudo make
sudo ./main

After entering the above commands, you can observe the e-paper display.

Python Version Example

Using the lgpio library as an example, navigate to the /demo codes/raspberry_pi/lgpio/python directory.

sudo python3 gui_demo.py

After entering the above commands, you can observe the e-paper display.

Arduino Example Usage

Hardware Interface Configuration

Table 2-2 shows the wiring definitions between the Arduino Mega and the e-paper display.

E-paper InterfaceArduino Mega
VCC5V
GNDGND
CSD53
CLKD52
MOSID51
DCD8
RSTD9
BUSYD10

Table 2-3 E-paper Display and Arduino UNO Pin Definitions

E-paper InterfaceArduino UNO
VCC5V
GNDGND
CSD7
CLKD13
MOSID11
DCD10
RSTD9
BUSYD8

Example Usage

Open the project file /demo codes/Arduino_MEGA/Arduino_MEGA.ino or /demo codes/Arduino_UNO/Arduino_UNO.ino in the Arduino IDE. Select the correct Board and Port based on your setup. Click Verify, and once the verification is successful, upload it to the module. Observe the e-paper display.

STM32 Example Usage

The example code is based on STM32F103C8T6.

Hardware Interface Configuration

E-paper InterfaceSTM32 Interface
VCC3.3V
GNDGND
CSPB12
CLKPB13
MOSIPB15
DCPA8
RSTPA11
BUSYPA12

Example Usage

Open the example in the directory /demo codes/STM32 using Keil uVision5 software. After compiling without errors, download it to the module and observe the e-paper display.

ESP32 Example Usage

The example program uses the ESP32 module ESP32-WROOM-32E.

Hardware Interface Configuration

E-paper InterfaceESP32 Interface
VCC3.3V
GNDGND
CSIO27
CLKIO18
MOSIIO23
DCIO14
RSTIO33
BUSYIO13

Example Usage

Open the project file /demo codes/Arduino_ESP32 using the Arduino IDE. Select the correct Board and Port based on your setup. Click Verify, and once the verification is successful, upload it to the module and observe the e-paper display.

Image Creation and Mode Extraction

Image Creation

Create images with a resolution of 800 x 480 in pure black and white (grayscale is not supported). Save them as BMP or JPG files (BMP format is recommended). Due to limited memory on some MCU platforms, images may need to be smaller on these platforms, for example, 400 x 240 for Arduino.

Mode Extraction

You can use the image2lcd software for mode extraction. This software is provided in the compressed package. To achieve the effect shown in Figure 2-2, follow the mode extraction parameter settings as shown in Figure 2-3:

1 Open the image that needs to be extracted.

2 Output data type: Select "C language array (*.c)".

3 Scanning method: Select "Horizontal scan".

4 Output grayscale: Select "Monochrome".

5 Maximum width and height: Choose "800" and "480", then click the arrow to confirm.

6 Ensure that none of the following 5 items are checked.

7 Color Inversion: Select according to the actual situation.

8 Click "Save" to store the converted array in a file with the ".c" extension. For an image with a resolution of 800 x 480 in pure black and white, a 48,000-byte image array will be generated.

9 Finally, replace the corresponding array in the example program code with the array from the ".c" file.

Resources

Schematic

Example Programs

Product

Data Sheet

Image2Lcd.zip

Related Links

Python Image Library

For additional features, users can visit the official website to learn more: https://pillow.readthedocs.io/en/latest/handbook/index.html

Technical Support

Technical Support and Product Notes