1.9inch Segment e-Paper Module Manual

From Waveshare Wiki
Revision as of 06:43, 30 August 2022 by Eng52 (talk | contribs)
Jump to: navigation, search
1.9inch Segment e-Paper
1.9inch Segment e-Paper Module.jpg
1.9inch Segment e-Paper Module
1.9inch Segment e-Paper Module02.jpg
{{{name3}}}

{{{name4}}}

{{{name5}}}

Overview

Parameters

Dimensions 1.9inch
Driver board dimensions 51mm × 34 mm
Display dimensions 41.35mm × 28.11 mm
Outline dimensions (screen only) 49.35mm × 32.11mm × 1.13 mm
Operating voltage 3.3V / 5V (5V is requuired for power and signal)
Communication bus I2C
Segment 91 segments
Display color Black, White
Grey scale 2
Partial refresh time 0.3s
Full Refresh time 2s
Refresh power < 5 mW(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.
  • IIC address: 0x3c and 0x3d are used by default
Instruction transfer address: 0x3c/0x3e
Data transfer address: 0x3d/0x3f

I2C Communication Protocol

From the above function pin table, it is known that I2C communication is used, I2C communication, one data cable, and one clock cable. There are three types of signals in the process of transmitting data on the I2C bus: start signal, end signal, and response signal.
TSL2591.png
Start signal: When SCL is high level, SDA jumps from high level to low level, and starts to transmit data.
End signal: When SCL is at high level, SDA transitions from low level to high level, ending data transmission.
Response signal: After receiving 8-bit data, the IC that receives data sends a specific low-level pulse to the IC that sends data, indicating that the data has been received.

  • I2C writing data sequence

TSL25911 Light Sensor-2.png
First, the host (that is, the Raspberry Pi, collectively referred to as the host) will send a start signal, and then combine its I2C 7-bit address and the write operation bit into 8-bit data and send it to the slave (that is, the TSL2581 sensor module, collectively referred to as the following) Slave), the slave will respond with a response signal after receiving it, the master will send the address of the command register to the slave at this time, the slave will receive the send response signal, at this time the master will send the value registered in the command, and the slave will respond with a response signal until the host sends a stop signal, the I2C write data operation ends.

  • I2C reading data sequence

TSL25911 Light Sensor-3.png
First, the host will send a start signal, and then combine its I2C 7-bit address and write operation bits into 8-bit data and send it to the slave. After receiving it, the slave will respond with a response signal, and the host will send the address of the command register To the slave, the slave receives the send response signal, at this time the master sends a start signal again, and combines its 7-bit address and read operation bits into 8-bit data to send to the slave, and the slave sends a response after receiving the signal, and then send the value in its register to the host, and the host will give a response signal until the host sends a stop signal, and the communication ends.

  • 1.9inch Segment e-Paper I2C address

Command Address: 0x3c
Data Address: 0x3D

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

We define the pixels in a monochrome picture, 0 is black and 1 is white.
White:□: Bit 1
Black:■: Bit 0

  • The dot in the figure is called a pixel. As we know, 1 and 0 are used to define the color, therefore we can use one bit to define the color of one pixel, and 1 byte = 8pixels
  • For example, If we set the first 8 pixels to black and the last 8 pixels to white, we show it by codes, they will be 16 bit as below:

E-paper hardware work 1.png

For computer, the data is saved in MSB format:
E-paper hardware work 2.png
So we can use two bytes for 16 pixels.

Segment Code Table

1.9inch Segment e-Paper Module Spec01.jpg

Number correspondence table (without decimal point):
0: 0 x bf, 0 x 1f
1: 0 x 1f (position 1), 0 x 00, 0 x 1f (other positions)
2: 0 x fd, 0 x 17
3: 0 x f5, 0 x 1f
4: 0 x 47, 0 x 1f
5: 0 x f7, 0 x 1d
6: 0 x ff, 0 x 1d
7: 0 x 21, 0 x 1f
8: 0 x ff, 0 x 1f
9: 0 x f7, 0 x 1f
The decimal point and % are the 5th place in the 4th, 8th, and 10th positions respectively.
The 13th position can display Celsius (0 x 05) and Fahrenheit (0 x 06), the 0th position is the bottom line, the 1st position is the middle line, the 2nd position is other displays, the 3rd position shows the Bluetooth logo, and the 4th position Bit shows the power identification, number 14 is useless.

Precautions

1. For the screen that supports partial refresh, please note that you cannot keep refreshing the screen partially when using it, you need to perform a full refresh on the screen after refreshing partially. Otherwise, the screen display effect will be abnormal and cannot be repaired!
2. Note that the screen cannot be powered on for a long time. When the screen is not refreshed, set the screen to sleep mode or power off. Otherwise, if the screen maintains a high voltage state for a long time, the screen will be damaged and cannot be repaired!
3. When using the ink screen, it is recommended that the refresh interval be at least 180s, and refresh at least every 24 hours. If the ink screen is not used for a long time, the ink screen should be clear and stored. (Refer to the datasheet for specific storage environment requirements.)
4. After the screen enters sleep mode, the image data sent will be ignored, and it can only be refreshed normally after re-initialization.
5. The working voltage requirement of the ink screen is 3.3V. If you buy a bare screen, if you need to match the 5V working environment when designing the circuit, it is recommended to do some level conversion processing. The new version (V2.1 and subsequent versions) has added a level processing circuit, which can support both 3.3V and 5V working environments. The old version can only support 3.3V working environments. You can confirm the version before using it. (The ones with 20-pin chips on the PCB are generally new versions.)
6. The FPC cable of the screen is relatively fragile, pay attention to bending the cable along the horizontal direction of the screen when using it, and not bending the cable along the vertical direction of the screen.
7. The screen of the ink screen is relatively fragile, so pay attention to avoid dropping, bumping, and pressing hard.
8. We recommend that customers use the sample program we provide and use the corresponding development board to test after getting the screen.

Raspberry Pi

Provides BCM2835, WiringPi, IO, RPI (Python) libraries and demos.

Hardwware Connection

If the e-Paper you have is the HAT version which has 40pin GPIO, you can directly attach the e-Paper HAT on Raspberry Pi, otherwise, you can connect your e-Paper to Raspberry Pi by an 8pins cable provided.
To connect the e-Paper, you can follow the table below:

Raspberry Pi Pin Connection
e-Paper Raspberry Pi
BCM2835 Board
VCC 3.3V 3.3V
GND GND GND
SDA SDA.1 3
SCL SCL.1 5
RST 4 7
BUSY 17 11

1.9inch Raspberry Pi Guides01.jpg

Enable I2C Interface

The communication interface of e-Paper is SPI, to use it, we should firstly enable the SPI interface.
Open terminal of Raspberry Pi, and open the configuration by the following command:
sudo raspi-config
Choose Interfacing Options -> SPI -> Yes
Restart Raspberry Pi
sudo reboot

RPI open spi.png

Install libraries

Open the terminal of Raspberry Pi and run the following commands to install the corresponding libraries:

  • Install lg library:
#Open the Raspberry Pi terminal and run the following command:
wget https://github.com/joan2937/lg/archive/master.zip
unzip master.zip
cd lg-master
make
sudo make install
#For more details, you can find in the source code:https://github.com/gpiozero/lg
  • Install BCM2835 libraries
#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 libraries
#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 demo (you can skip this step if you have downloaded it.)
sudo apt-get install p7zip-full
wget  https://files.waveshare.com/upload/f/f6/E-Paper-Segment-Code.zip
7z x E-Paper-Segment-Code.zip -O./e-Paper
cd e-Paper/RaspberryPi/
  • Compile demo (Note: -j4 is compiled with 4 threads, the number can be modified by yourself)
# Now at e-Paper/RaspberryPi location
cd c
sudo make clean
sudo make -j4
  • Run the demo
sudo ./main

Run Python Demo

  • Install library
sudo apt-get update
sudo apt-get install python3-pip
sudo apt-get install python3-pil
sudo apt-get install python3-numpy
sudo apt-get install python3-smbus
  • Install function library
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 apt-get install python-smbus
  • Download demo (you can skip this step if you have downloaded it.)
sudo apt-get install p7zip-full
wget  https://files.waveshare.com/upload/f/f6/E-Paper-Segment-Code.zip
7z x E-Paper-Segment-Code.zip -O./e-Paper
cd e-Paper/RaspberryPi/
  • Run the demo
#Make sure it is in e-Paper/RaspberryPi/
cd python/examples/
sudo python3 main.py


STM32

The program provided is based on STM32F103RBT6, so you should connect it according to the pins of STM32F103RBT6. If you want to port the program, you must connect it based on the actual pins.

Hardware Connection

STM32F103RB pin
e-Paper STM32
VCC 3.3V
GND GND
SDA PB9/D14
SCL PB8/D15
RST PA9/D8
BUSY PA8/D7

Take our XNUCLEO-F103RB as an example, the connection is as follows:
1.9inch STM32 Guides02.jpg

Run the Demo

  • Download the demo and unzip it to enter the E-Paper_code to view the following content:
  • Find the STM32 program file directory after decompression, open epd-segmented-demo.uvprojx in the E-Paper-Segment-Code\STM32\epd-segmented-demo\MDK-ARM directory, and you can see the program.
  • Comment out the corresponding function in main.c:
// EPD_1in9_test();

Modify it to:

EPD_1in9_test();
  • Then, compile it to download.


Arduino

All demos have been tested in Arduino uno. If you use Arduino in different models, you need to check the connection of the pins.

Hardware Connection

Arduino pins
e-Paper Arduino UNO Mega2560
Vcc 5V 5V
GND GND GND
SDA SDA SDA
SCL SCL SCL
RST D8 D8
BUSY D7 D7

1.9inch Segment e-Paper Module-Aduino.jpg

Install Compile Software (Windows)

Run the Program

Please download E-paper-segment-code and unzip it. Arduino program is in "~/Arduino/…"
1.9inch Arduino Guides02.jpg
Open the test program: E-Paper-Segment-Code\Arduino\EPD_1in9\EPD_1in9.ino
1.9inch Arduino Guides033.jpg
After selecting the board in Arduino IDE, compile and download it.

Resource

Documentation

Program

Datasheet

FAQ

Question about Software

 Answer:
Install the imaging library using the command sudo apt-get install python-imaging.
{{{3}}}
{{{4}}}

{{{5}}}


 Answer:
Install the imaging library using the command sudo apt-get install python-imaging.
{{{3}}}
{{{4}}}

{{{5}}}


 Answer:
In this case, the customer needs to reduce the position of the round brush and clear the screen after 5 rounds of refreshing (increasing the voltage of VCOM can improve the color, but it will increase the afterimage).
{{{3}}}
{{{4}}}

{{{5}}}


 Answer:
The process of re-awakening the e-ink screen is actually the process of re-powering on the power. Therefore, when the EPD wakes up, it must first clear the screen, so as to avoid the afterimage phenomenon to the greatest extent.
{{{3}}}
{{{4}}}

{{{5}}}


 Answer:
*It may be caused by the unsuccessful spi driver.

1. First check whether the wiring is correct.
2. Check whether the spi is turned on and whether the parameters are configured correctly (spi baud rate, spi mode and other parameters).

{{{3}}}
{{{4}}}

{{{5}}}


Question about Hardware

 Answer:
Yes, now there is a level conversion chip onboard, supporting 3.3V drive.
{{{3}}}
{{{4}}}

{{{5}}}


 Answer:
The rated input voltage of the ink screen is 2.3~3.6V. If it is a 5V system, level conversion is required. In addition, the voltage should not be lower than 2.5V, so as not to affect the display effect of the ink screen.

Device selection can use the model in the schematic diagram we provide or choose according to the data sheet.

{{{3}}}
{{{4}}}

{{{5}}}


 Answer:
Yes, pay attention to the correct timing.
{{{3}}}
{{{4}}}

{{{5}}}


 Answer:
Check if SPI communication is normal.

Confirm whether the BUSY pin is normally initialized to input mode.
It may be that there is no normal reset, try to shorten the duration of the low level during reset (because the power-off switch is added to the drive circuit, the reset low level is too long, which will cause the drive board to power off and cause the reset to fail). If the busy function sends the 0x71 command, you can try to comment it out.

{{{3}}}
{{{4}}}

{{{5}}}


Question about Screen

 Answer:
*【Working conditions】Temperature range: 0~50°C; Humidity range: 35%~65%RH.
  • 【Storage conditions】: Temperature range: below 30°C; Humidity range: below 55%RH; Maximum storage time: 6 months.
  • 【Transportation conditions】: Temperature range: -25~70°C; Maximum transportation time: 10 days.
  • 【After unpacking】: Temperature range: 20°C±5°C; Humidity range: 50±5%RH; Maximum storage time: Assemble within 72 hours.
{{{3}}}
{{{4}}}

{{{5}}}


 Answer:
*refresh mode
    • Full brush: The electronic ink screen will flicker several times during the refresh process (the number of flickers depends on the refresh time), and the flicker is to remove the afterimage to achieve the best display effect.
    • Bureau brush: The electronic ink screen has no flickering effect during the refresh process. Users who use the partial brushing function note that after refreshing several times, a full brush operation should be performed to remove the residual image, otherwise the residual image problem will become more and more serious, or even damage the screen (currently only some black and white e-ink screens support partial brushing, please refer to product page description).
    • refresh rate
    • During use, it is recommended that customers set the refresh interval of the e-ink screen to at least 180 seconds (except products that support the local brush function).
    • During the standby process (that is, after the refresh operation), it is recommended that the customer set the e-ink screen to sleep mode, or power off operation (the power supply part of the ink screen can be disconnected with an analog switch) to reduce power consumption and prolong the life of the e-ink screen. (If some e-ink screens are powered on for a long time, the screen will be damaged beyond repair.)
    • During the use of the three-color e-ink screen, it is recommended that customers update the display screen at least once every 24 hours (if the screen remains the same screen for a long time, the screen burn will be difficult to repair).
  • Application
    • The e-ink screen is recommended for indoor use. If it is used outdoors, it is necessary to avoid direct sunlight on the e-ink screen, and at the same time, take UV protection measures, because charged particles will dry out under strong light for a long time, resulting in loss of activity and failure to refresh. This situation is irreversible. When designing e-ink screen products, customers should pay attention to determining whether the use environment meets the requirements of e-ink screen.
{{{3}}}
{{{4}}}

{{{5}}}


 Answer:
Ideally, with normal use, it can be refreshed 1,000,000 times (1 million times).
{{{3}}}
{{{4}}}

{{{5}}}


 Answer:
Power on the development board for a long time, after each refresh operation, it is recommended to set the screen to sleep mode or directly power off processing, otherwise the screen may burn out when the screen is in a high voltage state for a long time.
{{{3}}}
{{{4}}}

{{{5}}}


 Answer:
Yes, but you need to re-initialize the electronic paper with software.
{{{3}}}
{{{4}}}

{{{5}}}


 Answer:
The display gray scale of electrophoretic electronic paper is determined by the spatial position of the particles in the microcapsule or microcup. The electrophoresis phenomenon occurs between black particles and white particles under the action of voltage. This voltage sequence that promotes the electrophoretic movement of the particles is the driving force of the electronic paper. waveform. The driving waveform is the core part of the electronic paper display, and the optimization of the driving waveform will directly affect the display effect of the display. The driving waveform file is used to describe the parameters formed by the voltage sequence that promotes the electrophoretic movement of the particles, and it needs to be called regularly when the electronic paper is refreshed.

Different batches of e-paper diaphragms and electrophoretic matrices require different voltage values ​​when driving the display due to materials, manufacturing processes, etc. The waveform of the e-ink screen is reflected in the relationship between grayscale, voltage and temperature. Generally speaking, after each batch of electrophoresis matrix is ​​generated, there will be a corresponding waveform file in the form of a .wbf file. The film manufacturer will provide the waveform file and electrophoresis matrix to the manufacturer of the electronic paper screen, and then the The manufacturer of electronic paper screen integrates the protection board, substrate and driver and then provides it to customers; if the waveform file does not correspond to the screen, it is likely that the display cannot be displayed or the display effect is unsatisfactory. Generally, the waveform file has OTP built into the driver IC of the ink screen when leaving the factory, and some programs we provide also call external waveform files to drive the e-ink screen.

{{{3}}}
{{{4}}}

{{{5}}}


Others

 Answer:
with film.
{{{3}}}
{{{4}}}

{{{5}}}


 Answer:
0.5mm pitch, 8Pin.
{{{3}}}
{{{4}}}

{{{5}}}


 Answer:
Cable socket 0.5-8pin rear flip type 2.0H (FPC connector).
{{{3}}}
{{{4}}}

{{{5}}}


 Answer:
The full brush initialization function needs to be added when the ink screen is switched from partial brush to full brush.
{{{3}}}
{{{4}}}

{{{5}}}


 Answer:
It may be a demo based on the BCM2835 library that has run the C language before. At this time, you need to restart the Raspberry Pi and then run the python demo.
{{{3}}}
{{{4}}}

{{{5}}}


Support

If you require technical support, please go to the Support page and open a ticket.