Waveshare 4.2inch e-Paper Module User Manual

Hide thumbs Also See for 4.2inch e-Paper Module:

Advertisement

4.2inch e-Paper Module User Manual
Version
V1.0
V2.0
【Notes】
Please read this manual before you use the e-Paper. Damage caused by wrong
operations is not within the scope of the warranty
This manual shows you how to use the e-paper with the demo codes we provide.
The e-paper described in this manual is Module/HAT version. (Raw panel should
work with driver board)
All specification supplied herein are subject to change without notice at any time.
V2.0
4.2inch e-Paper Module
Data
2017.05.17
2018.12.05
User Manual
Description
Factory
Notes
1 / 25

Advertisement

Table of Contents
loading

Summary of Contents for Waveshare 4.2inch e-Paper Module

  • Page 1 4.2inch e-Paper Module User Manual 4.2inch e-Paper Module User Manual Version Data Description V1.0 2017.05.17 Factory V2.0 2018.12.05 Notes 【Notes】 Please read this manual before you use the e-Paper. Damage caused by wrong ⚫ operations is not within the scope of the warranty This manual shows you how to use the e-paper with the demo codes we provide.
  • Page 2: Table Of Contents

    4.2inch e-Paper Module User Manual CONTENT Type Description ............................4 Notes ................................5 Overview ................................7 Specification ............................7 Interfaces ..............................8 Working Principle ............................9 4-wire SPI ..............................9 Demo codes .............................. 11 Download ............................11 Raspberry Pi ............................12 Hardware connection ......................12 Copy examples to Raspberry Pi ..................12 Libraries Installation ......................
  • Page 3 4.2inch e-Paper Module User Manual Running example ........................19 Expected result ........................19 Codes Description .......................... 20 Version ............................20 C codes ............................20 Python codes ........................... 23 Image Data Array ............................ 25 V2.0 3 / 25...
  • Page 4: Type Description

    Module/HAT version. Raw panel should work with driver board, if you are the first time to use Waveshare e-Paper, we recommend you the Module/HAT version or purchase a driver board separately. Module/HAT version has PCB which integrates driver circuit. You can connect 8Pin connector to MCU directly.
  • Page 5: Notes

    4.2inch e-Paper Module User Manual NOTES 1. For those e-Paper which support partial refresh, you cannot use partial refresh all the time. A full refresh should be done to clear screen after several times(partial refresh), otherwise, e-Paper will be damaged and cannot fixed.
  • Page 6 4.2inch e-Paper Module User Manual 8. The e-Paper cannot refresh directly under sunlight . The refresh steps should be done indoor 9. For raw panel, its working voltage is 3.3V, note that when you designed you own driver board, level convert circuit is required if the working voltage of your board is 5V.
  • Page 7: Overview

    4.2inch e-Paper Module User Manual OVERVIEW This is an E-Ink display module, 4.2inch, 400x300 resolution, with embedded ⚫ controller, communicating via SPI interface. Due to the advantages like ultra-low power consumption, wide viewing angle, ⚫ clear display without electricity, it is an ideal choice for applications such as shelf label, industrial instrument, and so on.
  • Page 8: Interfaces

    4.2inch e-Paper Module User Manual Consumption ⚫ Refresh consumption: 26.4mW(typ.) ◼ Standby consumption: <0.017mW ◼ Viewing angle: >170° ⚫ INTERFACES :3.3V/5V :GND :SPI MOSI pin :SPI SCK pin :SPI chip selection, low active :Data/Command Selection(High: Data; Low: Command) :Reset(Low active)...
  • Page 9: Working Principle

    4.2inch e-Paper Module User Manual 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 suspending in the transparent oil and would move depending on the electronic charge.
  • Page 10 4.2inch e-Paper Module User Manual DC is data/command control pin, when DC = 0, write command, when DC = 1, ⚫ write data. SCLK is the SPI communication clock. ⚫ SDIN is the data line from the master to the slave in SPI communication.
  • Page 11: Demo Codes

    4.2inch e-Paper Module User Manual DEMO CODES DOWNLOAD Please visit Waveshare Wiki, search with key words “1.54inch e-Paper module. Download the demo code from wiki, Extract it and you can get these folders: Arduino : Demo code for Arduino UNO;...
  • Page 12: Raspberry Pi

    4.2inch e-Paper Module User Manual RASPBERRY PI There are four examples for Raspberry Pi, bcm2835, wiringPi, python2 and python3. HARDWARE CONNECTION Raspberry Pi e-Paper BCM2835 No. Board No. 3.3V 3.3V 3.3V MOSI SCLK BUSY COPY EXAMPLES TO RASP BERRY PI 1.
  • Page 13: Libraries Installation

    4.2inch e-Paper Module User Manual 2. Copy RaspberryPi extracted to root directory (BOOT) of SD card 3. Power on your Raspberry Pi and open Terminal, you can find that the examples is listed in boot directory 4. Copy the RaspberryPi folder to /home/pi and change its execute permission.
  • Page 14 4.2inch e-Paper Module User Manual sudo tar zxvf bcm2835-1.xx.tar.gz cd bcm2835-1.xx sudo ./configure make sudo make check sudo make install Note: xx is version of the library you download. For example, if the version is bcm2835-1.52, you should complete the command to: sudo tar zxvf bcm2835- 1.52.tar.gz...
  • Page 15: Running Demo Codes

    4.2inch e-Paper Module User Manual sudo pip install RPi.GPIO PYTHON3 LIBRARY Open Terminal and install library with commands: sudo apt-get install python3-pip sudo apt-get install python-imaging sudo pip3 install spidev sudo pip3 install RPi.GPIO sudo pip3 install Pillow If you get the error while installing Pillow: ImportError: libopenjp2.so.7: cannot open shared object file: No such file or directory.
  • Page 16: Expected Result

    4.2inch e-Paper Module User Manual Running python2 example: cd ~/RaspberryPi/python2 #enter example directory sudo python main.py #running Running python3 example: cd ~/RaspberryPi/python3 #enter example directory sudo python3 main.py #running EXPECTED RESULT After running example: 1) The screen is refresh to white...
  • Page 17: Arduino

    4.2inch e-Paper Module User Manual ARDUINO Note: If the driver board you bought is e-Paper shield, you can use the demo codes provided for e-Paper shield separately which can be downloaded in corresponding wiki. HARDWARE CONNECTION If you use other Arduino board instead of Arduino UNO, you should check if its interfaces are compatible with UNO.
  • Page 18: Expected Result

    4.2inch e-Paper Module User Manual EXPECTED RESULT 1) e-Paper is refreshed to white 2) Draw circles and lines, text is displayed V2.0 18 / 25...
  • Page 19: Stm32

    4.2inch e-Paper Module User Manual STM32 The development board used is Open103z, project is based on HAL library. HARDWARE CONNECTION e-Paper Open103Z 3.3V BUSY RUNNING EXAMPLE 1. Open STM32 project with keil V5 2. Compile and download the demo code to STM32 board...
  • Page 20: Codes Description

    4.2inch e-Paper Module User Manual CODES DESCRIPTION VERSION The newest deme codes are V2.0 version, updated functions: 1) read pictures 2) python3 examples 3) update display function 4) fix bug that e-Paper cannot enter sleep mode C CODES Take bcm2835 codes as example: 1.
  • Page 21 4.2inch e-Paper Module User Manual parameter 2 and 3 is width and height of image, parameter 4 is color if image Paint_SelectImage: Select image 4. Read image and display Paint_SelectImage: Select image; Paint_Clear(WHITE): Set image color to white GUI_ReadBmp: read bmp for certain path. Parameter 1: the address of BMP picture locates, Parameter 2 and 3 is the display position x and y of BCM display.
  • Page 22 4.2inch e-Paper Module User Manual Paint_DrawBitBmp: send image data to e-paper. Because STM32 and Arduino cannot read picture directly, we need to first convert picture to data on PC 6. Drawing point, lines, rectangles, circles and characters Paint_DrawPoint: Drawing points, parameter 1 and 2 are position of the point,...
  • Page 23: Python Codes

    4.2inch e-Paper Module User Manual parameter 3 is radius of circle, parameter 4 and 5 are style Paint_DrawString_EN: Display English characters, parameter 1 and 2 are position, parameter 3 is string, parameter 4 is font size, parameter 5 and 6 are background...
  • Page 24 4.2inch e-Paper Module User Manual 3. Drawing with python imageDraw library 4. Read picture and display 5. Sleep mode sleep mode is recommended to add after refreshing V2.0 24 / 25...
  • Page 25: Image Data Array

    4.2inch e-Paper Module User Manual IMAGE DATA ARRAY 1.54inch e-paper can only display black and white color. 1) Open a picture and set it as monochrome picture with Paint software of Windows 2) Resize the picture to supported resolution (according to e-paper) 3) Use Image2Lcd.exe software to convert picture to C array (.c file)

Table of Contents