From Waveshare Wiki
Jump to: navigation, search
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Infobox item|
+
{{#tweekihide:firstHeading|sidebar-left|sidebar-right}}__NOTOC__
|name=2.7inch e-Paper
 
|name2=2.7inch e-Paper HAT
 
|img=[[File:2.7inch-e-Paper-1.jpg|300px|{{Amazon_nolink|default={{#ifeq: {{#urlget:amazon|0}}|{{#urlget:Amazon|0}}| default|}}|url=link=https://www.waveshare.com/2.7inch-e-Paper.htm}}]]
 
|img2=[[File:2.7inch-e-paper-hat-3.jpg|300px|{{Amazon_nolink|default={{#ifeq: {{#urlget:amazon|0}}|{{#urlget:Amazon|0}}| default|}}|url=link=http://www.waveshare.com/2.7inch-e-paper-hat.htm}}]]
 
|caption=264x176, 2.7inch EPD panel
 
|caption2=264x176, 2.7inch EPD HAT for Raspberry Pi, SPI interface
 
|category=[[:Category:OLEDs / LCDs|OLEDs / LCDs]], [[:Category:LCD|LCD]]
 
|brand=Waveshare
 
|{{#ifeq: {{#urlget:amazon|0}}|{{#urlget:Amazon|0}}| default|}}=display
 
|website_cn=[http://www.waveshare.net/shop/2.7inch-e-Paper-HAT.htm 官方中文站点]
 
|website_en=[http://www.waveshare.com/2.7inch-e-paper-hat.htm Waveshare website]
 
|interface1=SPI
 
|related=
 
{{Product List|OLEDs / LCDs/e-Paper}}
 
}}
 
<div class="tabber">
 
<div class="tabbertab" title="Introduction">
 
= Introduction =
 
{{E-Paper Raw Panel}}
 
  
264x176, 2.7inch EPD (Electronic Paper Display) HAT for Raspberry Pi, SPI interface
+
<div style="background-color: #343434;text-align: center;color: white;padding: 20px;margin: 8px;">
 +
=2.7inch e-Paper HAT Manual=
 +
</div>
 +
<p></p>
 +
{{ContentGrid|grid-gap=25px
 +
|content =
  
{{Amazon|{{#ifeq: {{#urlget:amazon|0}}|{{#urlget:Amazon|0}}| default|}}=display
+
{{StudyCard
|More = [http://www.waveshare.com/2.7inch-e-paper-hat.htm More]}}
+
|img=[[File:Start-test1.png|121px|link=https://www.waveshare.com/wiki/2.7inch_e-Paper_HAT_Manual#Introduction]]
==Feature==
+
|heading = Introduction
*Dimension: 2.7inch
+
|content = Parameters, principles, and precautions
*Outline dimension (only screen): 70.42mm x 45.8mm x 0.98mm
+
}}
*Outline dimension (driver board): 85mm x 56mm
 
* Display dimension: 57.288mm x 38.192mm
 
*Communication interfaces: SPI
 
*Dot spacing: 0.217 x 0.217
 
*Resolution: 264 x176
 
*Display color: Black, White
 
*Gray level: 2
 
*Global refresh: 6s
 
*Refresh Power Consumption: 26.4mW(typ.)
 
*Sleep current: <0.01uA(close to 0)
 
*Note: 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==
 
[[File:1.54inch-e-paper-manual-1.png|400px]]
 
  
Since the ink screen only needs to be displayed, the data cable (MISO) sent from the machine and received by the host is hidden here.
+
{{StudyCard
* CS is slave chip select, when CS is low, the chip is enabled.
+
|img=[[File:Tinker Board 2硬件-test1.png|121px|link=https://www.waveshare.com/wiki/2.7inch_e-Paper_HAT_Manual#Arduino]]
* DC is data/command control pin, when DC = 0, write command, when DC = 1, write data.
+
|heading = Starting from the Arduino
* SCLK is the SPI communication clock.
+
|content = Routines developed based on Arduino UNO R3 and their usage instructions
* SDIN is the data line from the master to the slave in SPI communication.
+
}}
* Timing Order: CPHL=0, CPOL=0 (SPI0)
 
Note: If you want to know more about SPI, you can search it online.
 
<big>
 
==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. ('''Note that the e-Paper cannot support updating directly under sunlight''')
 
===Pixel & Byte===
 
We define the pixels in a monochrome picture, 0 is black and 1 is white.<br />
 
White:□: Bit 1<br />
 
Black:■: Bit 0<br />
 
*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<br />
 
*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:<br />
 
[[file:e-paper_hardware_work_1.png]]<br />
 
For computer, the data is saved in MSB format:<br />
 
[[file:e-paper_hardware_work_2.png]]<br />
 
So we can use two bytes for 16 pixels.<br />
 
  
*2.7inch e-paper's 4-level display (black and white 2-level display is still the same as above)<br />
+
{{StudyCard
First of all, we need to understand the 4 grayscale picture, which shows that the brightness change between the brightest and the darkest is divided into 4 parts, from white to black, with 2 more colors in the middle, we can define it as light gray, dark Ash. <br />
+
|img=[[File:Remote-access-test1.png|121px|link=https://www.waveshare.com/wiki/2.7inch_e-Paper_HAT_Manual#Raspberry_Pi]]
Black: 00b<br />
+
|heading = Start with Raspberry Pi
Dark Grey: 01b<br />
+
|content = Using BCM2835, WiringPi, file IO, RPI (Python) library development routines and instructions
Light Gray: 10b<br />
+
}}
White: 11b<br />
 
In order to save storage space in general computers, four grays generally occupy 2 bytes. In the above example, taking 8 pixels as an example, 2 pixels are black, 2 pixels are dark gray, 2 pixels are light gray, and 2 pixels are White: <br />
 
[[file:Pixel.png]]
 
  
The same 4 grayscale picture can be regarded as the superposition of 2 pictures. The same pixel of different pictures is superimposed to form a pixel. There are 4 combinations of this point, that is, 4 grayscales:<br />
+
{{StudyCard
{|border=1; style="width:700px;"
+
|img=[[File:Linux-test1.png|121px|link=https://www.waveshare.com/wiki/2.7inch_e-Paper_HAT_Manual#Jetson_Nano_Developer_Kit]]
|-style="background:#0000ff; color:white;" align="center"
+
|heading = Start with the Jetson Nano
|Register||White||Light Gray||Dark Gray||Black
+
|content = Use C language, Python developed routines and instructions
|-align="center"
+
}}
|0x10||0x01||0x01||0x00||0x00
 
|-align="center"
 
|0x13||0x01||0x00||0x01||0x00
 
|}
 
The relationship between the 4 grayscales and the memory has been known above, and it is known that the color of the ink screen is inconsistent with different combinations, so the above data needs to be converted:
 
[[File:E-paper hardware work 9.png]]
 
==Precautions==
 
#For the screen that supports partial update, please note that you cannot refresh the screen with the partial mode all the time. After several partial updating, you need to fully refresh the screen once. Otherwise, the screen display effect will be abnormal, which cannot be repaired!<br/>
 
#Because of the different batches, some of them have aberrations. Store the e-Paper right side up will reduce it. And if the e-Paper didn't be refreshed for a long time, it will become more and more reddish/yellowish. Please use the demo code to refresh the e-paper several times in this case.<br/>
 
#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 the e-Paper. Otherwise, the screen will remain in a high voltage state for a long time, which will damage the e-Paper and cannot be repaired!<br/>
 
#When using the e-Paper, 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, the ink screen should be brushed and stored. (Refer to the datasheet for specific storage environment requirements)<br/>
 
#After the screen enters sleep mode, the sent image data will be ignored, and it can be refreshed normally only after initializing again.<br/>
 
#Control the 0x3C or 0x50 (refer to the datasheet for details) register to adjust the border color. In the routine, you can adjust the Border Waveform Control register or VCOM AND DATA INTERVAL SETTING to set the border.<br/>
 
#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.<br/>
 
#The working voltage of the e-Paper 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 working environments. The old version can only support 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)<br/>
 
#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 do not bend the cable along the vertical direction of the screen<br/>
 
#The screen of e-Paper is relatively fragile, please try to avoid dropping, bumping, and pressing hard.<br/>
 
#We recommend that customers use the sample program provided by us to test with the corresponding development board after they get the screen.<br/>
 
</big>
 
<div class="tabbertab" title="Hardware/Software setup">
 
{{Hardware/Software setting for SPI e-paper}}
 
</div>
 
<div class="tabbertab" title="Codes description">
 
{{e-Paper Codes Description}}
 
</div>
 
<!--
 
=== Display a Frame (DisplayFrame) ===
 
DisplayFrame is used to send a frame to module, and the screen will refresh and display it.
 
  
Process: resolution setting -> VCM DC setting -> VCOM and data interval setting -> Send command data start transmission 1 -> Send data of an white image (send 0xFF 5808 times) -> Send command data start transmission 2 -> Send data of an image to display -> Refresh the screen.
+
{{StudyCard
 +
|img=[[File:Config-test1.png|121px|link=https://www.waveshare.com/wiki/2.7inch_e-Paper_HAT_Manual#User_Guides_of_STM32]]
 +
|heading = Starting from the STM32
 +
|content = Use STM32CubeMX to develop routines based on STM32F103ZET6 and their usage instructions
 +
}}
  
Note:
+
{{StudyCard
* You have to send a white frame before the frame to display.
+
|img=[[File:Linux-test1.png|121px|link=https://www.waveshare.com/wiki/2.7inch_e-Paper_HAT_Manual#Resources]]
* 1 byte = 8 pixels, doesn’t support Gray scale (Can only display black and white). A bit set stands for a white pixel, otherwise a bit reset stands for black.
+
|heading = Resources
 +
|content = Documentation, procedures and data sheets, etc
 +
}}
  
For example:
+
{{StudyCard
<pre>
+
|img=[[File:显示屏-test1.png|121px|link=https://www.waveshare.com/wiki/2.7inch_e-Paper_HAT_Manual#FAQ]]
0xC3:8 pixels □□■■■■□□
+
|heading = FAQ
0x00:8 pixels ■■■■■■■■
+
|content = e-Paper frequently asked questions
0xFF:8 pixels □□□□□□□□
+
}}
0x66:8 pixels ■□□■■□□■
 
</pre>
 
* This module doesn’t support partial refresh.
 
* The refresh rate of this module is slow, and it will flicker for several times during refreshing (about 6s). Please be patient.
 
-->
 
<div class="tabbertab" title="Resources">
 
=Resources=
 
  
==Documentation==
+
{{StudyCard
*[https://www.waveshare.com/w/upload/3/31/2.7inch_e-paper_hat_user_manual_en.pdf User Manual]
+
|img=[[File:数据表-test1.png|121px|link=https://www.waveshare.com/wiki/2.7inch_e-Paper_HAT_Manual#Support]]
{{Commom Instruction of SPI e-paper}}
+
|heading = Support
* [[:File:2.7inch_e-Paper_HAT_Schematic.pdf|Schematic]]
+
|content = Technical support
 +
}}
  
==Demo code==
+
}}
*[https://github.com/waveshare/e-Paper Github]
 
 
 
= Datasheets =
 
* [[:File:2.7inch-e-paper-Specification.pdf|Datasheets]]
 
==Related Resources==
 
This is a post in Arduino Form about our SPI e-Paper thanks to ZinggJM, maybe you want to refer to.
 
*[https://forum.arduino.cc/index.php?topic=487007.0 Waveshare e-Paper display with SPI]
 
Thanks to Rane Wallin, who make this Tutorial and share to us.
 
*[https://dev.to/ranewallin/getting-started-with-the-waveshare-2-7-epaper-hat-on-raspberry-pi-41m8 Getting started with the 2.7inch e-Paper HAT on Raspeberry Pi]
 
</div>
 
<div class="tabbertab" title="FAQ">
 
 
 
= FAQ =
 
<!--{{e-Paper FAQ}}-->
 
{{e-Paper FAQ}}
 
</div>
 
</div>
 
=Support=
 
{{Service00}}
 

Latest revision as of 09:56, 21 July 2022


2.7inch e-Paper HAT Manual

Start-test1.png

Introduction

Parameters, principles, and precautions
Tinker Board 2硬件-test1.png

Starting from the Arduino

Routines developed based on Arduino UNO R3 and their usage instructions
Remote-access-test1.png

Start with Raspberry Pi

Using BCM2835, WiringPi, file IO, RPI (Python) library development routines and instructions
Linux-test1.png

Start with the Jetson Nano

Use C language, Python developed routines and instructions
Config-test1.png

Starting from the STM32

Use STM32CubeMX to develop routines based on STM32F103ZET6 and their usage instructions
Linux-test1.png

Resources

Documentation, procedures and data sheets, etc
显示屏-test1.png

FAQ

e-Paper frequently asked questions
数据表-test1.png

Support

Technical support