E-Ink Display driven by Arduino

Recently I discovered an 4,3 “ E-Ink display (Waveshare 4,3″inch e-Paper 800×600) that can be used with an Arduino. E-Ink displays (or E-Paper) are low-energy displays that keep what was printed even when the power is turned off. This feature makes E-Ink displays not only perfect for E-Readers, but also interesting for IoT projects. Such a display could show information that does not require animations (E-Ink displays take their time to update).
For IoT projects I can immediately think of examples such as displaying weather data (and the time), daily appointments from an electronic calendar, cooking recipes… .

Hardware

Waveshare 4,3″inch e-Paper 800×600
Arduino (Uno)
some cables

Wiring

e-Ink Display Arduino
VCC 5V
GND GND
DOUT RX
DIN TX
WAKE_UP D2
RST A3

Software

In this post I discovered the epd library for usage in Arduino sketches. Originally this library was found here and repackaged. This library can be directly imported into the Arduino IDE.

Arduino Sketch

This sketch is based on the example from here. It was immediateley working with little changes only.
To upload the sketch the RX/TX lines have to be removed from the Arduino. If the RX/TX lines are put back the Arduino can be reset to refresh the display.

#include <epd.h>

void fillPage(void) {
  char buff[] = {'G', 'B', 'K', '3', '2', ':', ' ', 0xc4, 0xe3, 0xba, 0xc3, 0xca, 0xc0, 0xbd, 0xe7, 0};

  epd_set_color(BLACK, WHITE);  // text=black, background=white
 
  epd_clear();

  // setting the font type and size
  epd_set_ch_font(GBK32);
  epd_set_en_font(ASCII32);

  epd_disp_string(buff, 0, 0);
  epd_disp_string("Test of the length of characters that can be printed in a line #1", 0, 0);
  epd_disp_string("Test of the length of characters that can be printed in a line #2", 0, 50);
  epd_disp_string("Test of the length of characters that can be printed in a line #3", 0, 100);
  
  // increasing the font type and size
  epd_set_ch_font(GBK48);
  epd_set_en_font(ASCII48);

  buff[3] = '4';
  buff[4] = '8';

  // print larger text
  epd_disp_string(buff, -10, -10);
  epd_disp_string("thisisyetanotherblog.wordpress.com", 25, 200);

  epd_set_ch_font(GBK64);
  epd_set_en_font(ASCII64);

  buff[3] = '6';
  buff[4] = '4';

  // drawing some forms
  epd_draw_circle(80, 350, 55);
  epd_draw_triangle(100, 450, 170, 400, 250, 450);
  epd_fill_rect(400, 500, 335, 470);
  epd_draw_line(100, 550, 700, 550);
 
  // update the display
  epd_udpate();
}

void setup(void) {
 // initialize the display
 epd_init();
 epd_wakeup();
 epd_set_memory(MEM_NAND);
}

void loop(void) {
 fillPage(); // fill the display once
 while (1) {} // do nothing more in the loop
}

Result

This is a base to start from with the next IoT project… Hopefully E-Ink displays become more affordable sooner than later!

e-ink display test, powered off

Sources

http://www.waveshare.com/4.3inch-e-paper.htm
http://www.waveshare.com/wiki/4.3inch_e-Paper

http://www.jarzebski.pl/arduino/komponenty/e-papier-waveshare-4-3.html
http://www.zoobab.com/waveshare-e-paper-and-arduino
http://zoobab.wdfiles.com/local–files/waveshare-e-paper-and-arduino/ArduinoEpd.zip

Advertisements

3 Gedanken zu “E-Ink Display driven by Arduino

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit Deinem WordPress.com-Konto. Abmelden / Ändern )

Twitter-Bild

Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )

Facebook-Foto

Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s