2.13inch e-Paper Cloud Module

From Waveshare Wiki
Jump to: navigation, search
2.13inch e-Paper Cloud Module
2.13inch e-Paper Cloud Module

Universal e-Paper Driver HAT, supports various Waveshare SPI e-Paper raw panels
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

Overview

2.13inch e-Paper Cloud Module is a wireless network driver board designed for the 2.13-inch e-Paper display. Onboard battery header for power supply and Type-C interface. As it supports Arduino development, you can use it as an Arduino board. Support receiving image information from a PC or smartphone via WiFi or Bluetooth and display it on the e-paper screen.

Features

  • Incorporates ESP32, and supports Arduino development.
  • No backlight, keeps displaying the latest content for a long time even when powered down.
  • Voltage detection circuit for preventing the battery from over-discharging.
  • Features battery connector and recharge circuit, allows offline running.
  • Provides Android APP for refreshing the module via Bluetooth EDR, easy to use.
  • Provides HTML host computer code for refreshing the module via the remote webpage, easy to integrate into sorts of Internet applications.
  • Supports Floyd-Steinberg's dithering algorithm, more color combinations, and better shadow rendering for the original image.
  • Supports popular image formats: BMP, JPEG, GIF, PNG, etc.
  • Delivered with embedded e-Paper driver (open source).

Specifications

  • WiFi Standard: 802.11b/g/n
  • Interface: SPI
  • Bluetooth: 4.2 (BR/EDR/BLE included)
  • Communication Interface: 3-wire SPI, 4-wire SPI (default)
  • Power Supply: Battery
  • Charge Current: 1A
  • Outline Dimensions: 71mm × 30.2mm
  • Display Dimensions: 48.55mm × 23.7mm
  • Dot Pitch: 0.194 × 0.194mm
  • Resolution: 250*122
  • Display Color: Black, white
  • Grey Level: 2
  • Partial Refresh Time: 0.3s
  • Full Refresh Time: 2s

【Note】:
Refresh time: The data provided is experimental data, the actual time may be a little different. It is normal that the e-paper blinks when fully updated.
Power: The power data is experimental data.

Application

This product cooperates with the ink screen and is suitable for the application scenario of wireless refreshing.

  • Electronic name card
  • Device label
  • Shelf label
  • Information storage
  • Serial information display board, etc.

Pinout

PIN (e-Paper) ESP32 Description
VCC VCC Power input (3.3V)
GND GND GND
KEY 12 User button
SCK 13 CLK pin of SPI, clock input
DIN 14 MOSI pin of SPI, data input
CS 15 Chip select pin of SPI, Low active
BUSY 25 Busy pin, indicates whether the e-Paper is busy
RST 26 Reset pin, Low active
DC 27 Data/Command control pin, Low for Command and High for Data
ADC 36 ADC data input, the voltage detected is 1/3 of the battery voltage.

PS: The pins described above were connected by default, you need to operate them.

Preparation

Hardware Connection

  • Use a Type-C cable to connect the ESP32 driver board to the computer.

Hardware Connectionesp32.png

Download examples

Three examples were provided for the display, Bluetooth, WiFi example, and offline example. You can find the files in the #Resource or directly download the link here to download.
Unzip the archive and you will get the following examples:
Epd esp32 download 1.png

  • ePape_Esp32_Loader_APP: Bluetooth App source code (Android Studio)
  • examples: local demos
  • Loader_esp32bt: Bluetooth demos
  • Loader_esp32wf: WiFi demos
  • app-release.apk: Bluetooth demo App installation package

Environment Debugging


Image Process Algorithm

In the Bluetooth example and the WiFi example, we use two kinds of Image algorithms, Level and Dithering.

Level

An image can be divided into several large color gamuts. Each pixel on the image is classified into the corresponding color gamuts according to how close the color is to these color gamuts. This method is more suitable for images that have few colors, such as bright or three-color shapes or text images. Take the black, white, and red e-paper screen as an example. When processing the image, we hope to process it into black, white, and red. Therefore, for an image, we can divide all the colors of the image into three color areas: black area, white area, and red area.
For example, according to the figure below, if the value of a certain pixel in the grayscale image is equal to or less than 127, we regard this pixel as a black pixel, otherwise, it is white.
Epd esp32 lever 1.png
As we know, color images have three color channels called RGB. Compared with the red channel, we can collectively call blue and green the blue-green channel or the non-red channel. According to the figure below, if a pixel on a color image has a high red channel value but a low blue-green channel value, we classify it as a red pixel; if the value of both the red and blue-green channels are very low, we classify it as a black pixel; if the values of the red and blue-green channels are both high, we classify it as white.
Epd esp32 lever 2.png
In the algorithm, the color definition is calculated based on the difference between the RGB value and the sum of squares of the expected color value. The expected color value refers to the color value that the pixel is closest to, and these values are stored in the curPal array.
Epd esp32 lever 3.png

Dithering

For images with more colors or more gradient areas, the above color scale method is not suitable. In many cases, the pixels in the gradient area in the image may be very close to all color gamuts. If you use the Level method, the image will lose a lot of image details. Many pictures taken by cameras use the method of mixing colors to draw shadows and transition areas. In these images, the gradual area accounts for most of them.
For the human eye, it is easy to confuse very small colors. For example, set two colors red and blue side by side, if it is reduced to a small enough size, it will become a mixture color of red and blue to the human eye. The defect of the human eye means that we can deceive the human eye and use the "mixing" method to obtain more colors that can be expressed. The dithering algorithm uses this phenomenon.
The Floyd-Steinberg algorithm is based on the error diffusion method(published by Robert Floy and Louis Steinberg in 1976). The formula is based on the error diffusion of the image below.
Epd esp32 dithering 1.png
X is the error (a scalar (vector) difference between the original color and the gray-scale value (the color value)), and the error spreads to the right, bottom right, bottom, and bottom left, adding weights of 7/16, 1/16, 5/16, and 3/16, respectively, to the values of the four pixels. If you are interested in the algorithm, you can search online for more resources.

Expected result of two methods

Original picture

Epd esp32 compare 1.png

"Black/White-Level" and "Colors-Level"

Epd esp32 compare 2.png Epd esp32 compare 2-2.png

"Black/White-Dithering" and "Colors-Ditherring"

Epd esp32 compare 3.png Epd esp32 compare 3-2.png

Bluetooth Demo

Download example

  • Go to the Loader_esp32bt directory, double click the Loader_esp32bt.ino file to open the example.
  • Choose Tools -> Boards -> ESP32 Dev Module and select the correct Port according to Device Manager: Tools -> Port.

Epd esp32 bluetooth 1.png

  • Click the Upload icon to build the project and upload it to the ESP32 driver board.
  • Install the APP to the Android board and open it:

Epd esp32 bluetooth 2.jpg

  • APP has five buttons on the main page:
    • BLUETOOTH CONNECTION: This button is used to connect the ESP32 device via Bluetooth.
    • SELECT DISPLAY TYPE: This button is used to select the type of display according to what you buy.
    • LOAD IMAGE FILE: Click it and choose a picture to open. It is only available after choosing the display type.
    • SELECT IMAGE FILTER: This button is used to choose the image process method.
    • UPLOAD IMAGE: Upload the processed image to the ESP32 driver board and update to e-Paper display.
  • Please first open the Bluetooth function of your phone. Click the BLUETOOTH CONNECTION button -> Click the SCAN icon on the top-right to scan the Bluetooth device.
  • Find the ESP32 device and connect. If your phone is the first time to connect this device, it requires pairing, complete the pairing process according to the prompt. (Note: The APP cannot work with pairing.)
  • Click "SELECT DISPLAY TYPE" to choose the display type.
  • Click "LOAD IMAGE FILE" To choose a picture from your phone and cut it.
  • Click " SELECT IMAGE FILTER" to choose a process algorithm and confirm.
    • "LEVEL: MONO": This option will process the picture to a monochrome image.
    • "LEVEL" COLOR": This option will process the picture to the tricolor image according to the display colors of the display (only valid for colorful displays).
    • "DITHERING: MONO": This option will process the picture to a monochrome image.
    • "DITHERING: COLOR": This option will process the picture to the tricolor image according to the display colors of the display (only valid for colorful displays).
  • Click "UPLOAD IMAGE" to upload the image to the ESP32 device and display it.

WiFi Demo

Provide WiFi demos with an HTML host computer.
Note: The module only supports the 2.4G network band.

How to Use

  • Go to the Loader_esp32wf directory, double click Loader_esp32wf.ino file to open the project.
  • Choose Tools -> Boards -> ESP32 Dev Module in the IDE menu, and select the correct COM port: Tools -> Port.

Epd esp32 wifi01.png

  • Open the srvr.h file and change the ssid and password to the actual WiFi username and password used.

Epd esp32 wifi-2.png

  • Press win + R and type CMD to open the command line and get the IP of your computer.

Epd esp32 wifi-example3.png

  • Open the srvr.h file, modify the network segment in the location shown in the picture to the corresponding network segment. Note: the IP address of ESP32 (that is, the fourth bit) should not be the same as the address of the computer, and the rest should be exactly the same as the IP address of the computer.

Epd esp32 wifi-5.jpg

  • Then click upload to compile and download the demo to the ESP8266 driver board.
  • Open the serial monitor and set the baud rate to 115200, you can see the serial port print out the IP address of the ESP32 driver board as follows:

Epd esp32 wifi-6.png

  • Open the browser on your computer or cell phone (note that the network you are accessing needs to be on the same network segment as the wifi connected to the ESP8266), enter the IP address of the ESP8266 in the URL input field, and open it, you can see the operation interface as follows.

Epd esp32 wifi07.png

  • The entire operation interface is divided into five areas:
    • Image Operation Area:
      Select Image file: Click to choose an image from your computer or phone
      Level: mono: Black and white image processing algorithm
      Level: color: Multi-color image processing algorithm (only effective for multi-color screens)
      Dithering: mono: Black dithering image processing algorithm
      Dithering: color: Multi-color dithering image processing algorithm (only effective for multi-color screens)
      Update image: Upload image
    • IP information display area: This displays the IP address information of the module you are currently connected to
    • Image size setting area: Here, x and y can be set to specify the starting position of the display, which is relative to the image file you have selected. For example, if you choose an 800x480 image but the e-ink screen you are connected to is 2.9 inches, the screen will not be able to display the entire image. In this case, the processing algorithm will automatically crop the image from the upper left corner and send a portion of it to the e-ink screen for display. You can set x and y to customize the starting position of the cropping. W and h represent the resolution of the current e-ink screen. Note: If you modify the x and y coordinates, you need to click on the processing algorithm again to generate a new image.
    • Model selection area: Here, you can choose the e-ink screen model you are connected to.
    • Image display area: Here, the selected image and the processed image will be displayed.
    • PS: During image upload, the upload progress will be displayed at the bottom.
  • Area ①: Click "Select Image file" to choose an image, or drag and drop the image directly into the "Original image" area.
  • Area ④: Choose the corresponding e-ink screen model, for example, 1.54b.
  • Area ①: Click on an image processing algorithm, for example, "Dithering: color".
  • Area ①: Click "Upload image" to upload the image to the e-ink screen display.

ESP32 e-Paper WiFi-Example.png

Offline Demo

Provides offline ESP32-based demos without WiFi, Bluetooth, and other devices.

Demo Usage

  • Open Arduino IDE to view the project file folder location (please do not modify it).

ESP8266 e-paper offline example01.jpg
ESP8266 E-paper offline example02.jpg

  • Go to the E-Paper_ESP32_Driver_Board_Code\examples directory and copy the entire esp32-waveshare-epd folder to the libraries directory in the project folder.

ESP32 E-paper offline example03.jpg
ESP32 E-paper offline example04.jpg

  • Close all Arduino IDE windows, reopen the Arduino IDE, and select the corresponding example demo as shown:

ESP8266 E-paper offline example05.jpg

  • Choose the corresponding board and COM port.

ESP8266 E-paper offline example06.jpg
ESP8266 E-paper offline example07.jpg

Resource

Document

Demo codes

ESP32 Resources

Driver

FAQ

 Answer:
ESP32 Flash : 4M

SRAM: 520KB
ROM: 448KB
PARAM : 0
Freq. : 240MHz
E-Paper ESP32 FAQ011.png

{{{5}}}


 Answer:
Open the Device Manager and check if the corresponding port number is used for the corresponding location.

E-Paper ESP32 FAQ012.png
If the corresponding driver is not installed, it will be displayed as follows, or in the unknown device.
E-Paper ESP32 FAQ013.png
Possible reasons for such illumination:
1. the computer port is bad.
2. the data line has problems.
3. the switch on the board is not dialed to ON.
E-Paper ESP32 FAQ014.jpg

{{{5}}}


 Answer:
  • Open epd2in13.h in the project and change the following value to 1.

Epd2in13 esp chose.png


 Answer:
* Open epd1in54.h in the project and change the following value to 1.

In54.png


 Answer:
Download Arduino-ESP32 Package,Unzip the files in the compressed package to the hardware\espressif\esp32 path in the Arduino IDE installation directory, select "OK to overwrite the file" (remember to back up the original file), and then re-run the routine after power off. (Note: If the path does not exist in the installation directory, you can create it manually).


 Answer:
Try to reduce the baud rate, you can try to adjust to 115200, as shown in the figure below:

FAQ arduino.png



 Answer:
Connecting........................................................................................................................................................................_____....._____.... .____Error uploading project_A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
You need to press and hold the boot button on the ESP32 baseboard when the Connecting... prompt appears


 Answer:
It is necessary to confirm that the hardware connection is correct and select the corresponding ink screen model




 Answer:
Compatible with more ink screen models, which can be adjusted according to the display effect.



 Answer:

Without battery, around 6mm; with battery, around 14.5mm.

{{{5}}}



 Answer:
If the ESP32 device is recognized by your Mac PC but fails in Arduino IDE, please check the security settings, it maybe blocked while installing the required driver. Please check the driver in the system settings, details list.
ESP32-driver-install-Mac.png

{{{5}}}


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 AM GMT+8 (Monday to Friday)