,

2.9″ E-paper display from WeAct

Posted by

Today we will get to know the 2.9″ E-paper display from WeAct, a neat little e-paper that can be used with Arduino. Today specifically I will be programming it with the Raspberry Pi Pico, in Arduino code.

An e-paper is a display that basically does not emit light, like the ones found on Amazon Kindle for example. Other e-readers also use this technology.

An e-paper e-reader
An e-paper e-reader

The main advantage of these displays is that they do not consume energy when not “in use” or not changing its image. You can set an image and turn it off, no energy will be consumed and the image will still be there.

We will be using a specific model for our tests, a 2.9″ WeAct one from Aliexpress (buy it here). It uses SPI communication and works with 3.3V.

epaper weact 2.9"
WeAct e-paper display

Environment/pinouts

First thing you have to do is install the Adafruit EPD library from the Arduino IDE or from here. Or on the Arduino IDE go to “Sketch > Include library > Manage libraries” and type “Adafuirt EPD”. There is also a official WeAct library, that did not compile for me.

On the Arduino IDE, open the EPDtest sketch (File > Examples > Adafruit EPD > EPDtest) and change it accordingly to your pinout. I did as below:

#define EPD_DC 10
#define EPD_CS 15
#define EPD_BUSY 7 // can set to -1 to not use a pin (will wait a fixed delay)
#define SRAM_CS -1
#define EPD_RESET 8  // can set to -1 and share with microcontroller Reset!
#define EPD_SPI &SPI // primary SPI

Configuring SPI pins for the Raspberry Pi Pico as below, that worked for me:

  • Display SCL -> GPIO 18 SPI0 SCK
  • Display SDA -> GPIO 19 SPI0 TX

Below you can see the pinout diagram and physical assembly of the prototype:

Schematic diagram of epaper 2.9" and Raspberry Pi Pico 2
Schematic diagram of epaper 2.9″ and Raspberry Pi Pico 2
Epaper WeAct with Raspberry Pi Pico 2
Epaper WeAct with Raspberry Pi Pico 2

Selecting the right chip

In the EPDtest sketch I had still to select a controller chip, so I uncommented the lines below (completely by change, until I got it right):

// Uncomment the following line if you are using 2.9" EPD with SSD1680
Adafruit_SSD1680 display(296, 128, EPD_DC, EPD_RESET, EPD_CS, SRAM_CS,
EPD_BUSY, EPD_SPI);

I then created my own initial test sketch, as seen below (picture below as well):

/***************************************************
  Adafruit invests time and resources providing this open source code,
  please support Adafruit and open-source hardware by purchasing
  products from Adafruit!

  Written by Limor Fried/Ladyada for Adafruit Industries.
  MIT license, all text above must be included in any redistribution
 ****************************************************/

#include "Adafruit_EPD.h"
#include <Adafruit_GFX.h> // Core graphics library

#ifdef ARDUINO_ADAFRUIT_FEATHER_RP2040_THINKINK // detects if compiling for
                                                // Feather RP2040 ThinkInk
#define EPD_DC PIN_EPD_DC       // ThinkInk 24-pin connector DC
#define EPD_CS PIN_EPD_CS       // ThinkInk 24-pin connector CS
#define EPD_BUSY PIN_EPD_BUSY   // ThinkInk 24-pin connector Busy
#define SRAM_CS -1              // use onboard RAM
#define EPD_RESET PIN_EPD_RESET // ThinkInk 24-pin connector Reset
#define EPD_SPI &SPI1           // secondary SPI for ThinkInk
#else
#define EPD_DC 10
#define EPD_CS 15
#define EPD_BUSY 7 // can set to -1 to not use a pin (will wait a fixed delay)
#define SRAM_CS -1
#define EPD_RESET 8  // can set to -1 and share with microcontroller Reset!
#define EPD_SPI &SPI // primary SPI
#endif

/* Uncomment the following line if you are using 1.54" tricolor EPD */
// Adafruit_IL0373 display(152, 152, EPD_DC, EPD_RESET, EPD_CS, SRAM_CS,
// EPD_BUSY, EPD_SPI);

/* Uncomment the following line if you are using 1.54" monochrome EPD */
// Adafruit_SSD1608 display(200, 200, EPD_DC, EPD_RESET, EPD_CS, SRAM_CS,
// EPD_BUSY, EPD_SPI);

/* Uncomment the following line if you are using 2.13" tricolor EPD */
//Adafruit_IL0373 display(212, 104, EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY,
//                        EPD_SPI);
//#define FLEXIBLE_213

/* Uncomment the following line if you are using 2.13" monochrome 250*122 EPD */
// Adafruit_SSD1675 display(250, 122, EPD_DC, EPD_RESET, EPD_CS, SRAM_CS,
// EPD_BUSY, EPD_SPI);

/* Uncomment the following line if you are using 2.7" tricolor or grayscale EPD
 */
// Adafruit_IL91874 display(264, 176, EPD_DC, EPD_RESET, EPD_CS, SRAM_CS,
// EPD_BUSY, EPD_SPI);

/* Uncomment the following line if you are using 2.9" EPD */
// Adafruit_IL0373 display(296, 128, EPD_DC, EPD_RESET, EPD_CS, SRAM_CS,
// EPD_BUSY, EPD_SPI); #define FLEXIBLE_290

/* Uncomment the following line if you are using 4.2" tricolor EPD */
// Adafruit_IL0398 display(300, 400, EPD_DC, EPD_RESET, EPD_CS, SRAM_CS,
// EPD_BUSY, EPD_SPI);

// Uncomment the following line if you are using 2.9" EPD with SSD1680
Adafruit_SSD1680 display(296, 128, EPD_DC, EPD_RESET, EPD_CS, SRAM_CS,
EPD_BUSY, EPD_SPI);

void setup() {
  // put your setup code here, to run once:
  display.begin();
  display.clearBuffer();
}

void loop() {
  // put your main code here, to run repeatedly:
  display.clearBuffer();
  display.setCursor(5, 5);
  //display.fillScreen(EPD_WHITE);
  display.setTextColor(EPD_BLACK);
  display.setTextSize(3);
  display.println("FritzenLab.net");
  display.setTextSize(1);
  //display.setTextColor(EPD_RED);
  display.setCursor(5, 40); //(x, y)/?
  //display.println(" ");
  //display.print(8675309, HEX); // print 8,675,309 out in HEX!
  //display.println(" Print HEX!");
  display.println(" ");
  //display.setTextColor(EPD_BLACK);
  display.print("Sketch has been running for: ");
  display.print(millis() / 1000);
  //display.setTextColor(EPD_BLACK);
  display.print(" seconds.");
  display.display();
  delay(5000);
}

Uploading the code from the IDE to the Raspberry Pi Pico resulted in the image below being shown in the e-paper display. There is a live time counter in seconds, for the time it has been running since startup.

epaper weact 2.9"
Epaper WeAct 2.9″ showing text

Final Words

Using this Adafruit library allows me to speed up testing and coding. It is even capable of drawing graphics (rectangles, triangles, etc). The refresh rate of the display is super slow and produces a lot of “visual garbage”, but I guess that is just what e-paper displays are.

Want to know more about displays? check this article about OLED. Want to buy an e-paper? use my sponsored link here.

One response

Leave a Reply

Your email address will not be published. Required fields are marked *