2.15inch e-Paper HAT+ (G) Manual

From Waveshare Wiki
Jump to: navigation, search
2.15inch e-Paper HAT+ (G) Raw display
360px-2.15inch-e-Paper-G-1.jpg

296 × 160, RPI, SPI
2.15inch e-Paper HAT+ (G)
With driver board
360px-2.15inch-e-Paper-HAT+-G-intro.jpg

296 × 160, RPI, SPI
{{{name3}}}

{{{name4}}}

{{{name5}}}

{{{name6}}}

Overview

Parameters

Size 2.15inch
Driver Board Size 65mm × 34mm
Display Size 48.10mm × 26mm
Outline Dimensions
(raw display)
60.8mm × 31.8mm × 1.00mm
Operating Voltage 3.3V / 5V (IO level voltage should be the same as the supply voltage)
Communication Interface SPI
Dot Pitch 0.1625mm × 0.1625mm
Resolution 296 × 160
Display Color Black, White, Red, Yellow
Grayscale 2
Refresh Time 20s
Refresh Power <50mW(typ.)
Sleep Current < 0.01uA (close to 0)
Operating Temperature 0 ~ 40 ℃
Storage Temperature 0 ~ 40 ℃
  • Refresh time: The refresh time is based on experimental test data, and there may be errors in the actual refresh time. The actual results shall prevail. There will be a flickering effect during the global refresh process, which is a normal phenomenon.
  • Refresh power consumption: The power consumption data is experimental test data, and the actual power consumption may have certain errors due to the presence of the driver board and actual usage. The actual results shall prevail.
  • Refresh at low temperatures may cause a color cast, and it is necessary to stand still at 25°C for 6 hours before refreshing.

Communication Method

Working Principle

Programming Principle

Collapse

Precautions

  1. The screen supports partial refresh. Please note that when using it, you cannot always use partial refresh to refresh the screen. You need to perform a full refresh of the screen after several partial refreshes. Otherwise, the screen display effect will be abnormal.
  2. When three-color or multi-color ink screens are produced in batches, there will be a certain color difference. This is a normal phenomenon. It is recommended to store the screen with the white side facing up. Before use, power on and do several whitening operations.
  3. Note that the screen cannot be powered on for a long time. When the screen does not refresh, the screen must be set to sleep mode or power off. Otherwise, the screen will remain in a high voltage state for a long time, which will damage the diaphragm and cannot be repaired.
  4. When using the e-paper screen, it is recommended that the refresh interval is at least 180s, and refreshed at least every 24 hours. If the e-paper screen is not used for a long time, it should be whitened and stored. (Refer to the data sheet for specific storage environment requirements)
  5. After the screen enters sleep mode, the image data sent will be ignored, and it can only be refreshed normally after re-initialization.
  6. Control the 0x3C or 0x50 (refer to the data sheet for details) register to adjust the border color. In the example demo, you can adjust the Border Waveform Control register or VCOM AND DATA INERTVAL SETTING to set it.
  7. If you find that the data of the created image is displayed incorrectly on the screen, it is recommended to check whether the image size is set correctly, and try again by changing the width and height settings.
  8. The working voltage requirement for an ink screen is 3.3V. If you purchase a raw display and need to work in a 5V environment when designing the circuit, it is recommended to perform level conversion processing. The new version of the driver board (Rev2.1 and subsequent versions) has added a level processing circuit, which can support both 3.3V and 5V working environments simultaneously. The old version can only support 3.3V working environment. When using it, you can first confirm the version number (which is under the board name).
  9. The FPC cable of the screen is relatively fragile. Please note: do not bend the cable in the vertical direction of the screen to avoid the cable being torn; do not repeatedly bend the cable excessively to avoid the cable breaking; do not bend the cable toward the front of the screen to prevent the cable from being disconnected from the panel. During debugging and R&D, it is recommended to fix the wiring before use.
  10. The ink screen screen is relatively fragile, so be careful to avoid falling, colliding, or pressing hard.
  11. We recommend that customers first use the sample demo we provide and use the corresponding development board to test after getting the screen.
Collapse

Picture Processing

Picture production and conversion of multi-color e-Paper

Picture production

Picture Data Conversion

Collapse

Raspberry Pi

Hardware connection

When connecting to the Raspberry Pi, you can directly plug the board into the 40PIN pin header of the Raspberry Pi, and be careful to align the pins.
If you choose to use an 9PIN cable to connect, please refer to the pin corresponding table below:

Raspberry Pi connection pin correspondence
e-Paper Raspberry Pi
BCM2835 encoding Board physical pin number
VCC 3.3V 3.3V
GND GND GND
DIN MOSI 19
CLK SCLK 23
CS CE0 24
DC 25 22
RST 17 11
BUSY 24 18
PWR 18 12

Enable SPI Interface

  • Open the Raspberry Pi terminal and enter the following command to enter the configuration interface:
sudo raspi-config
Select Interfacing Options -> SPI -> Yes to enable the SPI interface

RPI open spi.png

  • Restart Raspberry Pi:
sudo reboot
  • Check /boot/config.txt and you can see that 'dtparam=spi=on' has been written to

RPI open spi 1.jpg

  • To ensure that SPI is not occupied, it is recommended that other driver overlays be temporarily turned off. You can use ls /dev/spi* to check the SPI occupancy. The terminal output /dev/spidev0.0 and /dev/spidev0.1 indicates that the SPI situation is normal

RPI open spi 2.jpg

Run C demo

  • Install lg library
#Open the Raspberry Pi terminal and run the following commands:
wget https://github.com/joan2937/lg/archive/master.zip
unzip master.zip
cd lg-master
make
sudo make install
# For more information, please refer to the source code: https://github.com/gpiozero/lg
  • Install gpiod library (optional)
  • Install BCM2835 (optional)
  • Install wiringPi (optional)
  • Download the demo (you can skip it if you have already downloaded it)
wget https://files.waveshare.com/wiki/common/2in15_e-Paper_G.zip
unzip 2in15_e-Paper_G.zip -d 2in15_e-Paper_G
cd 2in15_e-Paper_G/RaspberryPi_JetsonNano/
  • Alternate decompression method
  • Download the demo via GitHub (alternative method, skip if already downloaded)
  • Compiler demo (Note: -j4 means using 4 threads for compilation, the number can be modified by yourself)
# It is now in 2in15_e-Paper_G/RaspberryPi_JetsonNano
cd c
sudo make clean
sudo make -j4
  • Run demo
sudo ./epd

Run python demo

  • Install function library
sudo apt-get update
sudo apt-get install python3-pip
sudo apt-get install python3-pil
sudo apt-get install python3-numpy
sudo pip3 install spidev
  • Install function library (python2)
  • Install gpiozero library (the system has installed it by default, if it is not installed, please follow the following command to install it)
  • Download the demo (you can skip it if you have already downloaded it)
wget https://files.waveshare.com/wiki/common/2in15_e-Paper_G.zip
unzip 2in15_e-Paper_G.zip -d 2in15_e-Paper_G
cd 2in15_e-Paper_B/RaspberryPi_JetsonNano/
  • Alternate decompression method
  • Download the demo via GitHub (alternative method, skip if already downloaded)
  • Run demo
# Make sure it is in 2in15_e-Paper_G/RaspberryPi_JetsonNano/
cd python/examples/
python3 epd_2in15g_test.py


Collapse

Arduino

Hardware connection

Use an 9PIN cable to connect, please refer to the pin corresponding table below:

Arduino connection pin correspondence
e-Paper Arduino UNO Mega2560
VCC 5V 5V
GND GND GND
DIN D11 D51
CLK D13 D52
CS D10 D10
DC D9 D9
RST D8 D8
BUSY D7 D7
PWR D6 D6

Install IDE

Arduino IDE Windows Installation Tutorial

Run demo

  • In the Resources section download the Demo, then unzip it and enter the 2in15_e-Paper_G directory to see the following content

E-paper arduino cede-R4-2.jpg

  • Open the demo: 2in15_e-Paper_G\Arduino_R4\Arduino_R4.ino

E-paper arduino cede-R4-3.jpg

  • In the Arduino IDE, select the corresponding development board (Board) and port (Port) in the Tools menu

E-paper arduino cede-R4-1.jpg

  • Finally, click Upload, and the upload is as follows (Arduino 1.8.13)

E-paper arduino cede3.jpg


Collapse

Jetson Nano

Hardware connection

The 40PIN pin of Jetson Nano is compatible with the 40PIN pin of Raspberry Pi, and it provides a Jetson.GPIO library that is consistent with the API of RPI.GPIO library of Raspberry Pi, so the serial number connected here is the same as that of Raspberry Pi. When using the 40PIN interface, you can directly insert the module into the 40Pin header of the Jetson Nano.
If you choose to use an 9PIN cable to connect, please refer to the pin corresponding table below:

Jetson nano connection pin correspondence
e-Paper Jetson Nano Developer Kit
BCM2835 encoding Board physical pin number
VCC 3.3V 3.3V
GND GND GND
DIN 10(SPI0_MOSI) 19
CLK 11(SPI0_SCK 23
CS 8(SPI0_CS0) 24
DC 25 22
RST 17 11
BUSY 24 18
PWR 18 12

Run C demo

  • Download the demo (you can skip it if you have already downloaded it)
wget https://files.waveshare.com/wiki/common/2in15_e-Paper_G.zip
unzip 2in15_e-Paper_G.zip -d 2in15_e-Paper_G
cd 2in15_e-Paper_B/RaspberryPi_JetsonNano/
  • Alternate decompression method
  • Download the demo via GitHub (alternative method, skip if already downloaded)
  • Compiler demo (Note: JETSON specifies the device as jetson nano, if not specified, the default is Raspberry Pi; -j4 means using 4 threads for compilation, the number can be modified by yourself)
# It is now in 2in15_e-Paper_G/RaspberryPi_JetsonNano 
cd c
sudo make clean
sudo make JETSON -j4 
  • Run demo
sudo ./epd

Run python demo

  • Install function library
sudo apt-get update
sudo apt-get install python3-numpy
sudo apt-get install python3-pip
sudo pip3 install Jetson.GPIO
  • Download the demo (you can skip it if you have already downloaded it)
wget https://files.waveshare.com/wiki/common/2in15_e-Paper_G.zip
unzip 2in15_e-Paper_G.zip -d 2in15_e-Paper_G
cd 2in15_e-Paper_G/RaspberryPi_JetsonNano/
  • Alternate decompression method
  • Download the demo via GitHub (alternative method, skip if already downloaded)
  • Run demo
# Make sure it is in 2in15_e-Paper_G/RaspberryPi_JetsonNano/
cd python/examples/
python3 epd_2in15g_test.py


Collapse

Sunrise X3 Pi

Hardware connection

When connecting to the Sunrise, you can directly plug the board into the Sunrise's 40PIN pin header, and be careful to align the pins.
If you choose to use an 9PIN cable to connect, please refer to the pin corresponding table below:

Sunrise X3 Pi connection pin correspondence
e-Paper Sunrise X3 Pi
BCM encoding Board physical pin number
VCC 3.3V 3.3V
GND GND GND
DIN MOSI 19
CLK SCLK 23
CS CE0 24
DC 25 22
RST 17 11
BUSY 24 18
PWR 18 12

Enable SPI

  • SPI is turned on by default. If it is turned off accidentally, please follow the following methods to turn it on.

Run python demo

  • The corresponding library has been installed in the function. If you accidentally uninstall it, please use the following command to install it.
  • Download the demo (you can skip it if you have already downloaded it)
wget https://files.waveshare.com/wiki/common/2in15_e-Paper_G.zip
unzip 2in15_e-Paper_G.zip -d 2in15_e-Paper_G
cd 2in15_e-Paper_G/RaspberryPi_JetsonNano/
  • Alternate decompression method
  • Download the demo via GitHub (alternative method, skip if already downloaded)
  • Run demo
# Make sure it is in 2in15_e-Paper_G/RaspberryPi_JetsonNano/
cd python/examples/
python3 epd_2in15g_test.py


Collapse

STM32

Hardware connection

Use an 9PIN cable to connect, please refer to the pin corresponding table below:

STM32 connection pin correspondence
e-Paper STM32
VCC 3.3V
GND GND
DIN PA7
CLK PA5
CS PA4
DC PA2
RST PA1
BUSY PA3
PWR PA6

Run demo

  • Click to download the Demo, then unzip it and enter the 2in15_e-Paper_G directory to see the following content

E-paper stm32 cede1 f103zet6.jpg

  • Use Keil to open epd-demo.uvprojx in the 2in15_e-Paper_G\STM32-F103ZET6\MDK-ARM directory
  • Open Keil's compilation toolbar (which is generally open) < br/>

E-paper stm32 cede1.jpg

  • Click Compile

E-paper stm32 cede3.jpg

  • Make sure the appropriate programmer is connected, then click LOAD to download the demo to the microcontroller
Collapse

ESP32/8266

ESP32

For more details, please click on the url below to view
https://www.waveshare.com/wiki/E-Paper_ESP32_Driver_Board

ESP8266

For more details, please click on the url below to view
https://www.waveshare.com/wiki/E-Paper_ESP8266_Driver_Board

Collapse

FAQ

Software Issues

Hardware Issues

Screen Issues

Support



Technical Support

If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 PM GMT+8 (Monday to Friday)