Myosuploads3.banggood.com



12.48inch e-Paper Module (B)IntroductionDimension: 12.48inchOutline dimension (raw panel):261.5mm × 211mm × 0.3mmOutline dimension (Acrylic case):280mm x 229.5mmDisplay size:252.98mm × 190.90mmWorking voltage:3.3V/5VInterface:SPIDot pitch:0.194mm × 0.194mmResolution:1304 x 984Display color:Black, white, redGrey level:2Full refresh time :16sRefresh power : 26.4mW(typ.)Standby power :<=0.017mW【Note】: Refresh time:The data provided is experimental data, the actual time may be a little different.It is normal that the e-Paper blink when full updating.Power:The power data is experimental data.SPI timingCS is slave chip select, when CS is low, the chip is enabled.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.SPI communication has data transfer timing, which is combined by CPHA and CPOL.CPOL determines the level of the serial synchronous clock at idle state. When CPOL = 0, the level is Low. However, CPOL has little effect to the transmission.CPHA determines whether data is collected at the first clock edge or at the second clock edge of serial synchronous clock; when CPHL = 0, data is collected at the first clock edge.There are 4 SPI communication modes. SPI0 is commonly used, in which CPHL = 0, CPOL = 0.As you can see from the figure above, data transmission starts at the first falling edge of SCLK, and 8 bits of data are transferred in one clock cycle. Here, SPI0 is in used, and data is transferred by bits, MSB first.How do e-Paper displayAs we know, this display uses the SPI interface, however, there are two FPC cables. In fact, the 12.48inch e-Paper is combined by four small e-Paper, therefore, to control the e-Paper, you should use four chip select pin.Update essenceIt works as below:We name the four areas as S2, M2, M1 and S1 respectively, in demo codes, we will send data to these four area in order.The resolution of S2 and M1 are same 648*492, and the resolution of M2 and S1 are the same 656*bine the four display we get the resolution of 12.48inch e-Paper: 1304*984Control principleThey are four display indeed, therefore, we need to control four SPI salves:Generally, the control pins of e-Paper are MOSI, SCLK, CS and DCAnd power and reset pins: VCC, GND, RSTBecause e-Paper will flash when updating, there is a busy pin:BUSYTo reduce pins, four displays use the same VCC, GND, MOSI and SCK pins. Every two displays use the same DC and RST pins.Therefore, there are total 16 pins for controlling the e-Paper:Codes analysisTo control the e-Paper, you should first reset and initialize registers. And then transmit image data to e-Paper and update.Here we show you how to transmit the image data:We take Black-white or Red-white image as a monochrome bitmap. One byte stands for 8 pixels.S2 and M1: There are 648 pixels per raw, It needs 648/8 = 81 bytes. One display has 492 column,totally have 81 * 492 = 39852 bytes. The same as the M2 and S1: They totally have 40344 per display。Registers 0x13 and 0x10 are used to control Black-white image data and Red image data transmitting, here we take two-color display as exampleColor0x100x13White0xFF0x00Black0x000x00Red0xFF/0x000xFFvoid EPD_12in48_Display(const UBYTE *Image){ int x,y; //S1 part 648*492 EPD_S2_SendCommand(0x13); for(y = 0; y < 492; y++) for(x = 0; x < 81; x++) { EPD_S2_SendData(*(Image + (y*163 + x))); } //M2 part 656*492 EPD_M2_SendCommand(0x13); for(y = 0; y < 492; y++) for(x = 81; x < 163; x++) { EPD_M2_SendData(*(Image+ (y*163) +x)); } //S1 part 656*492 EPD_S1_SendCommand(0x13); for(y = 492; y < 984; y++) for(x = 81; x < 163; x++) { EPD_S1_SendData(*(Image+ (y*163) +x)); } //M1 part 648*492 EPD_M1_SendCommand(0x13); for(y = 492; y < 984; y++) for(x = 0; x < 81; x++) { EPD_M1_SendData(*(Image+ (y*163) +x)); } EPD_12in48_TurnOnDisplay();}We provide demo codes for four popular hardware platforms, Raspberry Pi, Arduino UNO, STM32 and the ESP32. The product you receive may be pre-assembled, you need to remove the back panel and connect your device like Raspberry Pi.Raspberry PiHardware connectionThe pins used can be found on schematic according to codesEnable SPI interfaceOpen terminal and type commandsudo raspi-configChoose Interfacing Options -> SPI -> Yes. Then reboot the Raspberry Pisudo rebootLibraries installationInstall BCM2835wget zxvf bcm2835-1.60.tar.gz cd bcm2835-1.60/sudo ./configuresudo makesudo make checksudo make installInstall wiringPisudo apt-get install wiringpicd /tmpwget dpkg -i wiringpi-latest.debgpio -vInstall python2sudo apt-get updatesudo apt-get install python-pipsudo apt-get install python-pilsudo pip install RPi.GPIOsudo pip install spidevInstall python3sudo apt-get updatesudo apt-get install python3-pipsudo apt-get install python3-pilsudo pip3 install RPi.GPIOsudo pip3 install spidevDownloadOpen terminal and run commands to download codessudo apt-get install p7zip-fullwget x 12.48inch_e-Paper_Module_Code_RPI.7z -r -o./12.48inch_e-Paper_Module_Codesudo chmod 777 -R 12.48inch_e-Paper_Module_Codecd 12.48inch_e-Paper_Module_CodeRun codesC codescd csudo nano examples/onfirm that which kind of 12.48inch e-Paper do you use. If you use the two-color display, modify the file as belowIf you use the tree-color display, modify the file as belowSave then compile and run the codesudo make cleansudo makesudo ./epdPython codesOpen terminal and run the demo codes by commands:cd python/examplesFor two-color versionsudo python epd_12in48_test.pyFor three-color versionsudo python epd_12in48B_test.pyPython codes-Weathercd python/examplesFor two-color displaysudo python Show_EN_Weather.pyFor three-color displaysudo python Show_EN_Weather.py BFor help informationsudo python Show_EN_Weather.py helpArduinoHardware connectionYou can directly insert the Arduino UNO to PCBAbout the pins used:Run codesDownload demo codes from wiki and unzio it.Copy the 12in48 folder to the libraries directory which is under the installation directory of Arduino IDE.(The installation directory generally is C:\Program Files (x86)\Arduino\libraries)Open Ardunin IDE software, choose Tool->Board->Arduino UNO:Click File -> Examples -> EPD12in48 to opem demo codsIf your e-Paper is two-color version, use the epd12in48-demo, otherwise, use the epd12in48b-demoCompile and download the codes to boardSTM32The development board we use is Waveshare Open103Z. The project is developed based on STM32 HAL libraries.Hardware connectionTo assemble the Open32, you should connect it by wires provided.About the pins used, you can refer to e-paper.ioc file.Run codesOpen the project (~\STM32\NUCLEO-F103RB\MDK-ARM\e-paper.uvprojx), compile and download to developmen board. It requires about 10s for the two-color version and 20s for three-color display.ESP32The demo codes for ESP32 are developed with Arduino IDE as well.Software setupTo develop ESP32, you should first set up the environment.Download the newest Arduino IDE from Arduino website:? HYPERLINK "; \t "; ESP32 pack from github:? HYPERLINK "; \t "; ?. Unzip the achieve to [Arduino IDE installation direcotry]/Hardare/espressif/esp32 directory. (If you didn't find the path under the installation directory, please create the folders manually)Enter the tools folder, and run the get.exe file as administrator. After installing, Copy the esp32-epd-12in48 folder of ESP32 demo codes to [Arduino IDE installation directory]/Hardware/espressif/esp32/librariesHardware connectionHere we use Waveshare e-Paper ESP32 Driver Board as an example. Attach it on PCB.About the pins used, you can refer to schematic and codesExamples 1Open Arduino IDE software, and find the examples on File->ExamplesIf you use two-color e-Paper, choose the epd12in48-demo, otherwise, use the epd12in48B-demoWiFi exampleAs we know, ESP32 features WIFI, you can set it as master or slave. Here we provide demo codes that control the e-Paper on the web by WIFI.You need to first modify the wifi connection information. Open the Web_App.cpp file and modify the line 50 and line 51::Open wifi.ino file, compile and download it to your ESP32 board. Open Serial monitor to query the IP addressOpen the Chrome browser, and enter the web with the IP addressSelect the display type, here we take 12.48inch e-Paper (two-color version) as example:Click 12.48 e-Paper, and there are six functions provided. You can use them to draw points, lines and so on. On the top of the webpage, the type of e-Paper and display color are shown.The corresponding coordination of display is as below.Draw pointsClick Draw point then you will get the window as below.Draw linesClick Draw Line, you will get the window as belowDraw RectangleClick Draw Rectangle, you will get the window as belowDraw circleClick Draw Circle, you will get the window as belowDraw StringClick Draw String, you will get the windows as belowDisplay pictureClick Show picture, you will get the window like below. Click upload image to choose a picture.Draw the page to bottom to check the original picture.Select a process algorithm, for two-color display, only the mono methods work.Finally, click the upload image button on left to upload image to e-Paper for displaying.You can open the Serial monitor of IDE to check the debug informationYou can also press F12 button to open the debug console of browserResourcesDocument HYPERLINK "; \t "; SchematicDemo codes HYPERLINK "; \t "; Demo codes (full) HYPERLINK "; \t "; Demo codes (Pi) HYPERLINK "; \t "; GithubDatasheet HYPERLINK "(B)_Datasheet.pdf" \t "; 12.48inch e-Paper datasheetThird-Party examples HYPERLINK "; \t "; A ESP32 project which is shared by MartinIt is a "ESP-IDF component", you can drive the e-Paper with GFX and Fonts.FAQQuestion1:Working requirements of e-Paper?Answer1:Two-color B/W e-paper【Working】Temperature: 0~50°C; Humidity: 35%~65%RH【Storage】Temperature: ≤30°C; Humidity: ≤55%RH; Max storage time: 6 months【Transport】Temperature: -25~70°C; Max transport time: 10 days【Unpack】Temperature: 20°C±5°C; Humidity: 50%RH±5%RH; Max storage time: Should be assembled in 72hThree-Color e-Paper【Working】Temperature: 0~40°C; Humidity: 35%~65%RH【Storage】Temperature: ≤30°C; Humidity: ≤55%RH; Max storage time: 3 months【Transport】Temperature: -25~60°C; Max transport time: 10 days【Unpack】Temperature: 20°C±5°C; Humidity: 50%RH±5%RH; Max storage time: Should be assembled in 72hWhen store three-color e-Paper, please refresh it to white, and keep the screen upward. Note that you need to update it at least every three months.Question2:What do you need to note about e-Paper refreshing?Answer2:Refresh modeFull refresh: e-Paper flicker when full refreshing to remove ghost image for best display.Partial refresh: It don't flicker if you use partial refresh (only some of the two-color e-paper support partial refresh). Note that you cannot use Partial refresh all the time, you should full refresh e-paper regularly, otherwise, ghost problem will get worse even damage.Refresh rateWhen using, you should set the update interval at least 180s.(except Partial supportable types)Please set the e-Paper to sleep mode or power off it directly, otherwise, the e-Paper is damaged because of working in high voltage for long time.You need to update the content of three-color e-Paper at least one time every 24h to avoid from burn-in problem.Working placeWe recommend you to use the e-Paper indoor. If you need to set the e-paper outdoor, Please place the e-paper in shadow and protect it from UV. When you designed you e-paper product, you should take care about the working situation like temperature, humidity, etc.Question3:How much could the flexible e-paper be bendedAnswer3:The IC part of e-Paper cannot be bended, you can bend the display area in degree larger than 60°CQuestion4:Why the e-Paper cant work with Arduino?Answer4:The I/O level of Arduino is 5V, and the e-Paper should be driven with 3V3. If your Arduino cant drive the e-Paper successfully, please try to convert the level to 3.3VYou can also try to connect the Vcc pin to the 5V of Arduino to see whether the e-Paper works, but we recommend you not to use 5V for a long time.Question5:Why does the color of e-Paper look a little black or grey?Answer5:You can try to change the value of Vcom on demo codes.Question6:Three-color e-paper looks more red/yellow than the picture on website?Answer6:Because of different batch, some of them have aberration. Store the e-Paper right side up will reduce it. And if the e-Paper didn't be refreshed for long time, it will become more and more red/yellow. Please use the demo code to refresh the e-paper for several times in this case.Question7:Why my e-paper has ghosting problem after working for some daysAnswer7:Please set the e-paper to sleep mode or disconnect it if you needn't refresh the e-paper but need to power on your development board or Raspberry Pi for long time.Otherwise, the voltage of panel keeps high and it will damage the panelQuestion8:Why the FPC of the e-Paper is broken after using for some times?Answer8:Please make sure you have used it in correct way. ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download