Skip to Content

TRMNL 7.5″ DIY Kit with Arduino IDE and TFT_eSPI

TRMNL 7.5″ DIY Kit with Arduino IDE and TFT_eSPI

The TRMNL 7.5″ DIY Kit by Seeed Studio is a sleek e-paper display designed for makers who want to build their own customizable smart terminal. While the official firmware already offers ready-to-use widgets, you can also program the TRMNL yourself using the Arduino IDE.

In this guide, we’ll show you how to set up the kit with the TFT_eSPI library and write a simple sketch that turns the display into a digital clock. The clock will automatically synchronize with an internet time server (NTP), ensuring accurate time without manual adjustments.

Where to Buy

TRMNL 7.5″ (OG) DIY Kit

Makerguides is a participant in affiliate advertising programs designed to provide a means for sites to earn advertising fees by linking to Amazon, AliExpress, Elecrow, and other sites. As an Affiliate we may earn from qualifying purchases.

The TRMNL 7.5″ DIY Kit

The TRMNL 7.5″ (OG) DIY Kit by Seeed Studio is an open-source e-paper terminal designed for personal dashboards, IoT display projects, and maker experimentation. It combines a 7.5-inch 800×480 monochrome e-ink display, XIAO ESP32-S3 PLUS driver board, 2000 mAh rechargeable battery, and 10cm FPC extension cable.

Parts of the TRMNL 7.5" DIY Kit
Parts of the TRMNL 7.5″ DIY Kit (source)

Note that this kit comes without an enclosure but you can find 3D-printing designs for a Triangular Enclosure or an L-shape Enclosure and others on Printables.

At the core of the driver board is an ESP32 microcontroller module, which provides dual-core processing, integrated Wi-Fi, and Bluetooth. The ESP32 offers enough flash and SRAM to support both custom applications and the official TRMNL firmware.

The controller board is designed to interface with the e-paper panel using an SPI connection and can be programmed over USB-C. A reset and boot button are provided for firmware flashing. There are also three buttons for user-defined functions and a power switch for the battery.

Driver board for TRMNL 7.5"
Driver board for TRMNL 7.5″ (source)

The 7.5-inch display uses e-paper technology, which consumes power only when refreshing and retains content without power. This makes it ideal for always-on information dashboards that remain legible even in direct sunlight.

Programming the TRMNL 7.5″

The TRMNL can be used or programmed in two distinct ways. The first method is to install and run the official TRMNL firmware, which integrates into the TRMNL ecosystem. With this approach, the device can display prebuilt widgets such as a calendar, weather, and digital clock.

However, this method requires a BYO (Bring Your Own) license, which grants access to TRMNL’s hosted services and widget infrastructure. The advantage of this approach is that users get a polished, ready-to-use experience with cloud integration, without needing to write code themselves.

The second method is to program the TRMNL directly with the Arduino IDE. In this case, the e-paper panel can be driven using a forked version of the TFT_eSPI library, which provides drawing functions for displays.

With this approach, developers have complete freedom to design their own applications, whether it is a digital clock, IoT data dashboard, or custom visualization. This method does not require a licence, but it does require familiarity with Arduino programming. While it lacks the plug-and-play ecosystem of the official firmware, it gives makers full control over what is displayed and how the hardware is used. And this is the approach we will take in this tutorial.

Technical Specifications

ComponentSpecification
Display type7.5-inch e-paper (electronic paper display)
Resolution800 × 480 pixels
Display colorsBlack and white (monochrome)
Controller boardESP32-based microcontroller module
MicrocontrollerXIAO ESP32-S3 Plus
Flash memory4 MB (varies with ESP32 module used)
RAM520 KB SRAM (with external PSRAM optional depending on board variant)
ConnectivityWi-Fi 802.11 b/g/n, Bluetooth 4.2 BLE
Interface to displaySPI
USB connectionUSB-C (for programming and power)
Power supply5 V via USB-C or via 2000mAh Li-ion Battery
Additional featuresReset button, boot button
Enclosure3D-printed housing designed for the 7.5-inch panel and ESP32 board
Firmware optionsTRMNL firmware with BYO licence, or custom Arduino firmware with TFT_eSPI
SchematicsSchematic of XIAO ePaper Display Dev Board

In the next sections you will learn how to install the required libraries and how to implement a digital clock that shows the time and date on the TRMNL 7.5″ display.

Install Libraries

Before we can write any code, we need to install the required libraries. Seeed Studio has created a fork (Seeed_GFX Library) of the popular TFT_eSPI Library that supports the TRMNL 7.5″ display. The original TFT_eSPI Library does not work with this display.

First, go the github repo for the Seeed_GFX Library, press the green “<> Code” button and download the library as ZIP file:

Next unzip the library, which should give you a folder named “Seeed_GFX”. We need to copy this folder into the “libraries” folder for the Arduino IDE. Under Windows the “libraries” folder is typically located under:

C:\Users\<username>\OneDrive\Documents\Arduino\libraries

Since this folder already contains installed libraries I recommend you temporarily rename it, e.g. to “_libraries” and create a new folder named “libraries”. This way you avoid conflicts with your already installed libraries and you don’t loose them either. The picture below shows how your “Arduino” folder should look like:

After that copy the “Seeed_GFX” folder into the “libraries” folder:

and that concludes the installation of the required libraries.

Test Code for TRMNL 7.5″ DIY Kit

Next let’s start with some simple test code for the display. Create a new project folder “trmnl” with two files in it: “trmnl.ino” and “driver.h”:

Then open “trmnl.ino” with your Arduino IDE, click on the “driver.h” file tab and copy the following code int the “driver.h” file:

// driver.h
#define BOARD_SCREEN_COMBO 502 // 7.5 inch monochrome ePaper Screen (UC8179)
#define USE_XIAO_EPAPER_DISPLAY_BOARD_EE04

Finally, copy the following code into the “trmnl.ino” file:

#include <SPI.h>
#include <TFT_eSPI.h>

EPaper epd = EPaper();

void setup() {
  epd.begin();
  epd.setRotation(0);
  epd.setTextColor(TFT_BLACK);   
  epd.setTextSize(3);
  epd.fillScreen(TFT_WHITE);     
  epd.drawCentreString("Makerguides", 400, 220, 4);
  epd.update();
}

void loop() {}

To upload the code to the microcontroller on the display driver board select the XIAO_ESP32S3_PLUS board as shown below:

After uploading the code, the display should flicker a few times and then should display the text “Makerguides” in the center of the display:

If this works, congratulations : )

Digital Clock Code for TRMNL 7.5″ DIY Kit

In this next code example you will learn how to use the TRMNL 7.5″ DIY Kit with the Arduino IDE to display a digital clock that automatically syncs its time from the internet. Have a quick look at the complete code below first, and then we will discuss its details:

#include <SPI.h>
#include <TFT_eSPI.h>
#include <WiFi.h>
#include <esp_sntp.h>

const char* SSID     = "SSID";
const char* PWD      = "PWD";
const char* TIMEZONE = "CET-1CEST,M3.5.0/2,M10.5.0/3";
const int W = 800;
const int H = 480;

EPaper epd = EPaper();

void initTime() {
  setenv("TZ", TIMEZONE, 1);
  tzset();
}

void syncTime() {
  WiFi.begin(SSID, PWD);
  while (WiFi.status() != WL_CONNECTED) {
    delay(100);
  }
  configTzTime(TIMEZONE, "pool.ntp.org");
}

void initDisplay() {
  epd.begin();
  epd.setRotation(0);
  epd.fillScreen(TFT_WHITE);
  epd.setTextColor(TFT_BLACK);
  epd.setTextSize(2);
}

void setup() {
  initTime();
  initDisplay();
  syncTime();
}

void loop() {
  static char buff[64];
  static struct tm t;

  if (getLocalTime(&t)) {
    epd.fillRect(200, 100, 400, 300, TFT_WHITE);

    strftime(buff, sizeof(buff), "%H:%M", &t);
    epd.drawCentreString(buff, W / 2, 140, 7);

    strftime(buff, sizeof(buff), "%A", &t);
    epd.drawCentreString(buff, W / 2, 250, 4);

    strftime(buff, sizeof(buff), "%B %d/%m/%Y", &t);
    epd.drawCentreString(buff, W / 2, 320, 2);

    epd.update();
  }

  esp_sleep_enable_timer_wakeup(30 * 1000 * 1000ULL);  // 30 sec
  esp_deep_sleep_start();
}

Imports

We start by including the required libraries: SPI handles communication with the e-paper display, TFT_eSPI provides drawing functions, WiFi manages wireless connectivity, and esp_sntp synchronizes time with network servers.

#include <SPI.h>
#include <TFT_eSPI.h>
#include <WiFi.h>
#include <esp_sntp.h>

Constants

Next, we define a few constants. The SSID and PWD will be used to connect the ESP32 to your Wi-Fi network. You have to replace them with the credentials for your Wi-Fi network.

const char* SSID     = "SSID";
const char* PWD      = "PWD";
const char* TIMEZONE = "CET-1CEST,M3.5.0/2,M10.5.0/3";
const int W = 800;
const int H = 480;

The TIMEZONE constant is for Berlin in Germany. For other time zone definitions have a look at the Posix Timezones Database. Just copy and paste the string you find there and change the TIMEZONE constant accordingly. The clock code pulls the current time from an internet time server and is therefore always accurate but it needs Wi-Fi access.

Finally, we set the width and height of the display, which will help us position our text in the right places.

Objects

Next we create an an EPaper object, which will let us initialize the screen, draw text, and update its content.

EPaper epd = EPaper();

Time Initialization

The initTime function sets the time zone so that when we fetch time from the internet, it is adjusted correctly for the user’s region. This ensures that the device doesn’t simply display UTC but instead shows local time.

void initTime() {
  setenv("TZ", TIMEZONE, 1);
  tzset();
}

Time Synchronization

The syncTime function connects the ESP32 to Wi-Fi and then requests the current time from an NTP server. The call to configTzTime handles both the time synchronization and the time zone adjustments. The loop inside waits until the Wi-Fi connection is established before proceeding.

void syncTime() {
  WiFi.begin(SSID, PWD);
  while (WiFi.status() != WL_CONNECTED) {
    delay(100);
  }
  configTzTime(TIMEZONE, "pool.ntp.org");
}

Display Initialization

Before we can draw anything, we need to prepare the e-paper display. The initDisplay function starts up the hardware, sets its orientation, fills the screen with a white background, and defines the default text color and size.

void initDisplay() {
  epd.begin();
  epd.setRotation(0);
  epd.fillScreen(TFT_WHITE);
  epd.setTextColor(TFT_BLACK);
  epd.setTextSize(2);
}

Setup Function

The setup function ties everything together. It configures the time zone, initializes the display, and then synchronizes the clock with the NTP server. By the time this function finishes, the system is ready to show accurate, network-synced time.

void setup() {
  initTime();
  initDisplay();
  syncTime();
}

Loop Function

The loop is where the display content gets updated. A buffer and a tm structure are created to hold formatted time data. The call to getLocalTime retrieves the current time. If the call succeeds, the display area is first cleared by filling a white rectangle. Then, three different pieces of information are drawn in the center of the screen: the current hour and minute, the day of the week, and the full date with month and year.

if (getLocalTime(&t)) {
  epd.fillRect(200, 100, 400, 300, TFT_WHITE);

  strftime(buff, sizeof(buff), "%H:%M", &t);
  epd.drawCentreString(buff, W / 2, 140, 7);

  strftime(buff, sizeof(buff), "%A", &t);
  epd.drawCentreString(buff, W / 2, 250, 4);

  strftime(buff, sizeof(buff), "%B %d/%m/%Y", &t);
  epd.drawCentreString(buff, W / 2, 320, 2);

  epd.update();
}

The photo below shows how this looks like on the actual E-paper display:

Finally, the ESP32 is placed into deep sleep for 30 seconds. This conserves energy, which is especially useful when running on battery power. After the sleep timer expires, the chip automatically wakes up, reruns the loop, and refreshes the time.

esp_sleep_enable_timer_wakeup(30 * 1000 * 1000ULL);  // 30 sec
esp_deep_sleep_start();

Summary

With this code, your TRMNL 7.5″ DIY Kit becomes a low-power, always-accurate e-paper clock. It connects to Wi-Fi, fetches the current time from an NTP server, and displays it in a clean layout. Thanks to the ESP32’s deep sleep mode and the e-paper screen’s static display properties, it uses less power while keeping the information visible at all times.

Note however, that the code performs a full refresh of the display every 30 seconds. This means that the display flickers every 30 seconds, which can be quite distracting. Unfortunately, the Seeed_GFX Library does not offer functions for a partial redraw.

Conclusions

The TRMNL 7.5″ E-Paper is a large, great looking display. The driver board with extra buttons, a built-in battery charging interface and the 2000mAh Li-ion Battery that comes with the kit makes it easy to build a battery-powered dashboard.

In this tutorial you learned how to build a digital clock with the TRMNL 7.5″ E-Paper. For more information also have a look at the Getting Started with TRMNL on TRMNL 7.5inch(OG) DIY Kit, where you find example on how to read the buttons on the driver board and how to measure battery charge.

A limitation of the TRMNL Display is that it is not supported by the common GxEPD Library, which is specifically designed for E-Paper displays. The current support via the Seeed_GFX Library – a fork of the TFT_eSPI Library – is limited and does provide partial redraws or control of the display refresh after waking up from deep-sleep.

If you don’t want to be distracted by frequent flickering of the display that limits the use cases to situations, where updates to the display content are infrequent, e.g. at least every 15 mins or preferably every few hours. This means Weather Dashboards or Calendars are suitable applications but applications with faster update requirements are probably not. Note that this is not a limitation of the display but of the driver software.

For displaying a monthly calendar have a look at the Monthly Calendar on E-Paper Display tutorial and if you want to learn more about time synchronization see the How to synchronize ESP32 clock with SNTP server and the Automatic Daylight Savings Time Clock tutorials.

Another common extensions for digital clocks is to also display ambient temperature or weather data. Have a look at the Weather Station on e-Paper Display tutorial for more details.

Finally, if you prefer not to implement anything yourself but take advantage of a large selection of already existing dashboards (plugins) for the TRMNL 7.5″ display, read the TRMNL 7.5inch(OG) DIY Kit with TRMNL page.

If you have any questions feel free to leave them in the comment section.

Happy tinkering 😉