• sales

    +86-0755-88291180

2.66inch-e-Paper-Module-G User Guide

Resources

Documentation

Demo code

Development Resources

Certification

Related Resources


Overview

Parameters

Dimensions2.66inch
Driver board dimensions85mm × 38.5mm
Display dimensions60.05mm × 30.69mm
Outline dimensions (screen only)72.59 × 37.11 × 1mm
Operating voltage3.3V / 5V (IO level should be consistent with the power supply)
Communication interfaceSPI
Dot pitch0.1668 × 0.1668mm
Resolution360 × 184
Display colorBlack, White, Red, Yellow
Grey scale2
Refresh time26s
Refresh power<50mW (typ.)
Standby current< 0.01uA (almost 0)
  • Refresh time: The refresh time is the experimental results, the actual refresh time will have errors, and the actual effect shall prevail. There will be a flickering effect during the global refresh process, this is a normal phenomenon.
  • Power consumption: The power consumption data is the experimental results. The actual power consumption will have a certain error due to the existence of the driver board and the actual use situation. The actual effect shall prevail.

SPI Communication Timing


  • CSB (CS): Slave chip select, when CS is low, the chip is enabled.
  • SCL (SCK/SCLK): UART clock signal.
  • D/C (DC): Data/command control pin, writes commands at a low level; writes data/parameter at a high level.
  • SDA (DIN): Serial data signal.
  • Timing: CPHL=0, CPOL=0 (SPI0)

【Remarks】For more information about SPI, you can search for information online.

Working Principle

This product is an E-paper device adopting the image display technology of Microencapsulated Electrophoretic Display, MED. The initial approach is to create tiny spheres, in which the charged color pigments are suspended in the transparent oil and would move depending on the electronic charge. The E-paper screen display patterns by reflecting the ambient light, so it has no background light requirement. Under ambient light, the E-paper screen still has high visibility with a wide viewing angle of 180 degrees. It is the ideal choice for E-reading.

Program Principle

For a four-color e-Paper screen, we can refer to black and white four-level grayscale images for understanding, but there are still some differences. To save memory space, the e-Paper screen compresses pixels as follows:
Black: Corresponds to 00b
White: Corresponds to 01b
Yellow: Corresponds to 10b
Red: Corresponds to 11b
Let's take four pixels as an example:

pixel1234
bit01234567
Stored Data00011011
ColorBlackWhiteYellowRed
byte0x1B

Writing the data 0x1B to register 0x10 will set the four pixels on the e-Paper screen to display black, white, yellow, and red colors based on the encoding scheme mentioned earlier.

Precautions

  1. For E-paper displays that support partial refresh, please note that you cannot refresh them with the partial refresh mode all the time. After refreshing partially several times, you need to fully refresh EPD once. Otherwise, the display effect will be abnormal, which cannot be repaired!
  2. It is a normal phenomenon that the three-color EPD will have a certain color difference in different batches. Hence, It is recommended to use the program to clear all the pictures on the EPD and store it facing up. Please clear the screen several times before powering on.
  3. Note that the screen cannot be powered on for a long time. When the screen is not refreshed, please set the screen to sleep mode or power off it. Otherwise, the screen will remain in a high voltage state for a long time, which will damage the e-Paper and cannot be repaired!
  4. When using the e-Paper display, it is recommended that the refresh interval be at least 180s, and refresh at least once every 24 hours. If the e-Paper is not used for a long time, you should use the program to clear the screen before storing it. (Refer to the datasheet for specific storage environment requirements.)
  5. After the screen enters sleep mode, the sent image data will be ignored, and it can be refreshed normally only after initializing again.
  6. Control the 0x3C or 0x50 (refer to the datasheet for details) register to adjust the border color. In the demo, you can adjust the Border Waveform Control register or VCOM AND DATA INTERVAL SETTING to set the border.
  7. If you find that the created image data is displayed incorrectly on the screen, it is recommended to check whether the image size setting is correct, change the width and height settings of the image and try again.
  8. The working voltage of the e-Paper display is 3.3V. If you buy the raw panel and you need to add a level convert circuit for compatibility with 5V voltage. The new version of the driver board (V2.1 and subsequent versions) has added a level processing circuit, which can support both 3.3V and 5V. The old version only supports a 3.3V working environment. You can confirm the version before using it. (The one with the 20-pin chip on the PCB is generally the new version.)
  9. The FPC cable of the screen is fragile, Please note: Do not bend the cable along the vertical direction of the screen to avoid tearing the cable; Do not repeatedly excessive bending line, to avoid line fracture; Do not bend the cable toward the front of the screen to prevent the cable from being disconnected from the panel. It is recommended to use fixed wiring during debugging and development.
  10. The screen of e-Paper is relatively fragile, please try to avoid dropping, bumping, and pressing hard.
  11. We recommend that customers use the sample program provided by us to test with the corresponding development board.

Picture Production

Picture production and conversion of multi-color E-ink.

Preparation

Required software: Adobe PhotoShop CC, Painting

Introduction

  • Floyd-Steinberg dithering algorithm is very suitable for showing rich layering when color is less. More color combinations for better shadow rendering of the original image. It is especially suitable for various usage scenarios of e-ink screens.
  • The following will introduce how to convert ordinary pictures into Floyd-Steinberg scatter plots.
  • If you are interested in the actual algorithm, you can read about our algorithm porting on ESP32 link hereand ESP8266 link here.

Operating Steps

Preparation: Download color sheet to PC, and unzip to get the file as shown below, we are going to use "N-color.act." or "4-color.act".

1. The new Photoshop project sets the width and height according to the actual resolution of the e-Paper display, the color mode uses RGB. The resolution of this module is 800*480. Change the width to 800 pixels and the height to 480 pixels.

2. Prepare the corresponding picture, copy it into the project, and adjust the parameters such as size and contrast (similar to the steps for processing pictures in general Photoshop).

3. Select File -> Export -> Save for Web (Legacy).

4. Select the color table as shown below. Load the color table provided in Preparation.

5. For seven-color pictures, load N-color. act, then click Save and save as a gif file. Then convert it into BMP format and use it on this module.
For four-color images, load 4-color. act, then click Save and save as a gif file. Then convert it into BMP format and use it on this module.

6. Open the gif file with Paint and save it as a 24-bit BMP image.
Pica7.png

7. By now, the color picture available for this module has been made, and it can be put into the SD card of the Raspberry Pi or e-Paper Shield module for use.

Image Data Conversion

Download the Program

Note: Theis application is provided for your convenience and is open source, our company does not provide technical support for it.

Bug Fixing

If your computer is running on the Win10/Win11 system and doesn't have Microsoft Visual Studio or any other Microsoft development tools installed, you may encounter error prompts: "ucrtbased.dll" and "vcruntime 140d.dll" can not be found.
This indicates that your computer lacks these two components. Here's the solution:

  1. Install VS (Microsoft Visual Studio) or other Microsoft development tools (such as Visual C++ Redistributable).
  2. Use the file we provide:


Place these two files into the directory C:\Windows\System32, then restart your computer.

How to Convert

  • Put the prepared picture and the corresponding "exe" application in the same folder, and you can put multiple pictures at the same time.
  • Drag and drop the picture in the "exe" file, and the program will convert the picture into "a .c" file with a fixed name.
  • Double-click the "cmd" file, and the program will convert all the pictures in the folder that meet the size to generate a ".c" file with the corresponding name.
  • Click on the image to see the demonstration.
  • Four-color single-image demonstration:


  • Four-color multi-picture demonstration:


  • Seven-color single picture demonstration:


  • Seven-color multi-picture demonstration:


Working With Raspberry Pi

Hardware Connection

When connecting the Raspberry Pi, you can directly insert the board into the 40PIN pin header of the Raspberry Pi, and pay attention to the correct pins.
If you choose to connect with an 8PIN cable, please refer to the pin correspondence table below:

Raspberry Pi Pinout
e-PaperRaspberry Pi
BCM2835Board
VCC3.3V3.3V
GNDGNDGND
DINMOSI19
CLKSCLK23
CSCE024
DC2522
RST1711
BUSY2418
PWR1812

Enable SPI Interface

  • Open the Raspberry Pi terminal and enter the following command in the config interface:
sudo raspi-config
Choose Interfacing Options -> SPI -> Yes Enable SPI interface


Then reboot your Raspberry Pi:

sudo reboot
  • Check /boot/config.txt, and you can see 'dtparam=spi=on' was written in.

  • To make sure SPI is not occupied, it is recommended to close other drivers' coverage. You can use ls /dev/spi* to check whether SPI is occupied. If the terminal outputs /dev/spidev0.1 and /dev/spidev0.1, SPI is not occupied.

C

  • 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 details, you can refer to: https://github.com/gpiozero/lg
  • Install gpiod library (Optional):
#Open the Raspberry Pi terminal and run the following commands: 
sudo apt-get update
sudo apt install gpiod libgpiod-dev
  • Install BCM2835:
#Open the Raspberry Pi terminal and run the following command
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.71.tar.gz
tar zxvf bcm2835-1.71.tar.gz
cd bcm2835-1.71/
sudo ./configure && sudo make && sudo make check && sudo make install
# For more information, please refer to the official website: http://www.airspayce.com/mikem/bcm2835/
  • Install WiringPi (Optional):
#Open the Raspberry Pi terminal and run the following command:
sudo apt-get install wiringpi
#For Raspberry Pi systems after May 2019 (earlier than before, you may not need to execute), you may need to upgrade:
wget https://project-downloads.drogon.net/wiringpi-latest.deb
sudo dpkg -i wiringpi-latest.deb
gpio -v
#Run gpio -v and version 2.52 will appear. If it does not appear, the installation is wrong.

#Bullseye branch system use the following command:
git clone https://github.com/WiringPi/WiringPi
cd WiringPi
./build
gpio -v
# Run gpio -v and version 2.60 will appear. If it does not appear, it means that there is an installation error.
  • Download the demo via GitHub (You can skip this step if you have downloaded it.)
git clone https://github.com/waveshare/e-Paper.git
cd e-Paper/RaspberryPi_JetsonNano/
  • Download the demo (You can skip this step if you have downloaded it.)
wget https://files.waveshare.com/upload/7/71/E-Paper_code.zip
unzip E-Paper_code.zip -d e-Paper
cd e-Paper/RaspberryPi_JetsonNano/
  • Alternative decompression methods:
sudo apt-get install p7zip-full
7z x E-Paper_code.zip -O./e-Paper
cd e-Paper/RaspberryPi_JetsonNano/
  • Compile the demo (Note: -j4 is to compile with 4 threads, the numbers can be modified by yourself; EPD=epd2in66 is to specify a macro definition, and epd2in66 corresponds to the test demo in the main function).
# Now at e-Paper/RaspberryPi_JetsonNano
cd c
sudo make clean
sudo make -j4 EPD=epd2in66g

Note: If you get a message about missing files during compilation, run "sudo apt install gpiod libgpiod-dev" in the terminal.

  • Run the demo
sudo ./epd

Python

  • Install the 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 RPi.GPIO
sudo pip3 install spidev
  • Install function library (python2):
sudo apt-get update
sudo apt-get install python-pip
sudo apt-get install python-pil
sudo apt-get install python-numpy
sudo pip install RPi.GPIO
sudo pip install spidev
  • Install gpiozero library (it is installed in the system by default, if not, you can install it by following the commands below):
sudo apt-get update
# python3
sudo apt install python3-gpiozero
# python2
sudo apt install python-gpiozero
  • Download the demo via GitHub (You can skip this step if you have downloaded it.)
git clone https://github.com/waveshare/e-Paper.git
cd e-Paper/RaspberryPi_JetsonNano/
  • Download the demo (You can skip this step if you have downloaded it.)
wget https://files.waveshare.com/upload/7/71/E-Paper_code.zip
unzip E-Paper_code.zip -d e-Paper
cd e-Paper/RaspberryPi_JetsonNano/
  • Alternative decompression method:
sudo apt-get install p7zip-full
7z x E-Paper_code.zip -O./e-Paper
cd e-Paper/RaspberryPi_JetsonNano/
  • Run the demo.
# Make sure it's in e-Paper/RaspberryPi_JetsonNano/
cd python/examples/
python3 epd_2in66g_test.py
  • If it doesn't run, reboot and call the python file again.

Working With Arduino

Hardware Connection

Use an 8PIN cable to connect, please refer to the pin correspondence table below:

Connect To Arduino
e-PaperArduino UNOMega2560
VCC5V5V
GNDGNDGND
DIND11D51
CLKD13D52
CSD10D10
DCD9D9
RSTD8D8
BUSYD7D7
PWRD6D6

Install IDE

Run The Demo

  • Download the demo in Resource, unzip it to the "E-Paper_code" directory, and you can see the following content:


  • Open the test demo: E-Paper_code\Arduino\epd2in13g\epd2in66g.ino


  • Select the corresponding Board and Port in the Tools in the Arduino IDE.


  • Finally, click upload, the upload is successful as follows (Arduino 1.8.13).


Working With Jetson Nano

Hardware Connection

The 40PIN pin of Jetson Nano is compatible with the 40PIN pin of Raspberry Pi and provides a Jetson.GPIO library with the same API as the RPI.GPIO library of Raspberry Pi, so the serial number connected here is the same as that of Raspberry Pi. The module can be directly inserted into the 40Pin headers of the Jetson Nano when using the 40PIN interface.
If you choose to connect with an 8PIN cable, please refer to the pin correspondence table below:

Connect to Jetson nano
e-PaperJetson Nano Developer Kit
BCM2835Board
VCC3.3V3.3V
GNDGNDGND
DIN10 (SPI0_MOSI)19
CLK11 (SPI0_SCK)23
CS8 (SPI0_CS0)24
DC2522
RST1711
BUSY2418
PWR1812

C

  • Download the demo via GitHub (you can skip this step if you have downloaded it.)
git clone https://github.com/waveshare/e-Paper.git
cd e-Paper/RaspberryPi_JetsonNano/
  • Download the test demo: (you can skip this step if you have downloaded it.)
wget https://files.waveshare.com/upload/7/71/E-Paper_code.zip
unzip E-Paper_code.zip -d e-Paper
cd e-Paper/RaspberryPi_JetsonNano/
  • Alternative decompression method:
sudo apt-get install p7zip-full
7z x E-Paper_code.zip -O./e-Paper
cd e-Paper/RaspberryPi_JetsonNano/
  • Compile the demo (Note: JETSON is the specified device, and RPI is not specified by default. -j4 is to compile by 4 threads, and the number can be changed by yourself. "EPD=epd2in66" is to specify a macro definition, and "epd2in66" corresponds to the test demo in the main function.)
# Now at e-Paper/RaspberryPi_JetsonNano
cd c
sudo make clean
sudo make JETSON -j4 EPD=epd2in66g
  • Run the demo
sudo ./epd

Python

  • 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 via GitHub (you can skip this step if you have downloaded it.)
git clone https://github.com/waveshare/e-Paper.git
cd e-Paper/RaspberryPi_JetsonNano/
  • Download the demo (you can skip this step if you have downloaded it.)
wget https://files.waveshare.com/upload/7/71/E-Paper_code.zip
unzip E-Paper_code.zip -d e-Paper
cd e-Paper/RaspberryPi_JetsonNano/
  • Alternative decompression method:
sudo apt-get install p7zip-full
7z x E-Paper_code.zip -O./e-Paper
cd e-Paper/RaspberryPi_JetsonNano/
  • Run the demo.
# Make sure it's in e-Paper/RaspberryPi_JetsonNano/
cd python/examples/
python3 epd_2in66g_test.py

Working With Sunrise X3 Pi

Hardware Connection

When connecting the Sunrise X3 Pi, you can directly insert the board into the 40PIN pin header of the Sunrise X3 Pi, and pay attention to the correct pins.
If you choose to connect with an 8PIN cable, please refer to the pin correspondence table below:

Connect to Sunrise X3 Pi
e-PaperSunrise X3 Pi
BCMBoard
VCC3.3V3.3V
GNDGNDGND
DINMOSI19
CLKSCLK23
CSCE024
DC2522
RST1711
BUSY2418
PWR1812

Enable SPI

  • SPI is enabled by default. If you have disabled it, you can enable it by following the steps below.
  • Enter the command: sudo srpi-config




Python

  • The corresponding library has been installed in the function. If you uninstall it accidentally, please use the following command to install it.
sudo apt-get update
sudo apt-get install python-pip
sudo apt-get install python-pil
sudo apt-get install python-numpy
sudo pip install Hobot.GPIO
sudo pip install spidev
  • Download the demo via GitHub (skip this step if you have downloaded it).
git clone https://github.com/waveshare/e-Paper.git
cd e-Paper/RaspberryPi_JetsonNano/
  • Download the demo (skip this step if you have downloaded it).
wget https://files.waveshare.com/upload/7/71/E-Paper_code.zip
unzip E-Paper_code.zip -d e-Paper
cd e-Paper/RaspberryPi_JetsonNano/
  • Alternative decompression method:
sudo apt-get install p7zip-full
7z x E-Paper_code.zip -O./e-Paper
cd e-Paper/RaspberryPi_JetsonNano/
  • Run the demo.
# Make sure you are in e-Paper/RaspberryPi_JetsonNano/
cd python/examples/
python3 epd_2in66g_test.py

Working With STM32

Hardware Connection

Connect to STM32
e-PaperSTM32
VCC3.3V
GNDGND
DINPA7
CLKPA5
CSPA4
DCPA2
RSTPA1
BUSYPA3
PWRPA6

Run The Demo


  • Use Keil to open epd-demo.uvprojx in the E-Paper_code\STM32\STM32-F103ZET6\MDK-ARM directory
  • Open Keil's compilation toolbar (usually already open).


  • Select the EPD_2in66g_test at the location shown in the picture.


  • Click to compile.


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