My obsession with e-ink displays continues

Some time ago, my friend George linked me to TRMNL, a new battery-powered e-ink display with an associated service that generates the images that the display will actually show. It looks really well-made, and I have an irrational attraction to e-ink displays, so naturally I had to pre-order one.

Their website is a bit confusing, and doesn’t entirely tell you what the things you’re buying are, which made the purchasing experience somewhat more painful than it needed to be. For example, along with the device, they sell a $20 “developer edition” license which “unlocks their API”. I expected this upgrade to give me API access so I could retrieve the image that’s displayed of my device, but that’s not actually the case, and you need a $50 “virtual device” license for that. Anyway, I did manage to preorder the thing, but it will take a few months to arrive, and if there’s one thing I’m not known for, it’s my patience.

Impatience

A TRMNL. It's smaller than it looks.

Having seen quite a few AliExpress listings in my time, I knew that the screen that TRMNL are using goes for under $50, and that I can get an ESP32 driver board for around $20. I would post links to these components on AliExpress, but they would probably go stale before the ink on your screen is dry, so I’ll post links to the Waveshare website:

The display is a Waveshare 800x480 7.5” e-ink (get the black and white version, more colors are much slower) and the driver is a Waveshare ESP32 driver board.

With those components, a LiPo battery, a charging board, a bit of designing, and some 3D printing, I could have my own TRMNL for under $80, or, if you factor in my time, around $5,000, which is a bargain. Plus, these would arrive much more quickly than the actual TRMNL, which is still months away, so I ordered and waited.

Making the display work

This isn’t my first time working with e-ink displays, as I’ve made things like the Timeframe, the Weatherframe (which I never wrote about), and Calumny (which I also never wrote about), so I knew more or less what to expect.

You see, the issue with most e-ink projects these days is that they mostly do one of two things:

  1. They use an ESP32 to drive the display, which is cheap and convenient, but they generate their own graphics on the ESP32 itself, making the project very ad-hoc.
  2. They use a Raspberry Pi (usually a Zero W), making the project pretty generic, as you can show advanced graphics or fetch files from remote servers, but that’s not very convenient because you now need to maintain a whole Linux device on your network.

Basically the only projects I’m aware of that fetch an image from a server and display it on the e-Ink display using an ESP32 are the Timeframe (my project that I linked above), and the TRMNL, so I wanted to use what they built.

My hardware

The Waveshare driver connected to the display.

My hardware setup was pretty simple, I just used the display and the driver. I don’t need a battery or a charger for this particular use case, so I just omitted those and connected my device to USB directly.

This also means that I don’t need the display to sleep for a long time (because it doesn’t need to conserve battery), so I can have it refresh itself pretty often. In the future, I might connect a LiPo battery and a charging circuit to the driver, at which point I’ll figure out how to read the voltage so the former can report the latter to the server, but for now that won’t be necessary.

TRMNL’s solution

TRMNL have open-sourced one part of their stack: The firmware that runs their custom ESP32 board. This firmware is pretty nice, it fetches a bog-standard PNG from a server and displays it onto the e-ink display, which is a really nice way to draw stuff onto the display. It also takes care of sleeping between updates (for consuming very little energy), reporting the device’s battery, etc, which is very nice to have. The only problem is that the firmware is pretty custom for their own board, and didn’t run on the generic Waveshare ESP32 driver I had.

I thought, however, that if I could get the firmware to run on the generic, $20 Waveshare driver, that would be a great addition to the ecosystem, and it would make TRMNL more money, since you have to buy their $50 BYOD license to connect custom devices to their servers, so it’s a win-win. To clarify, using their firmware on your own hardware, you can create an e-ink device that works with TRMNL’s online service (the one that generates the screens to show), you just need to pay TRMNL $50 to use their service forever (“forever” is startup-speak for “an average of three years until our VCs force us to extract more money from you in the form of a subscription”).

Adapting the firmware

It works! So excited.

I immediately set out programming and debugging, by which I mean “I pasted the error messages into Aider and let Gemini figure out what the hell was wrong”. The AI very quickly fixed all the stuff that was wrong, and the display sprang to life, showing the TRMNL logo! Isn’t the future amazing?

Really, TRMNL’s firmware required minimal changes to work with the Waveshare driver. Most of the changes were just changing the pin numbers from one board’s to the others, as well as adapting for the fact that the Waveshare board doesn’t have a button or a battery, and uses an ESP32 instead of an ESP32-C3.

If you want to use the official firmware with the Waveshare driver, the changes I’ve made are in my TRMNL firmware repo fork:

https://github.com/skorokithakis/trmnl-firmware

Turning this into a TRMNL

The calendar view that I configured purely online.

Using TRMNL’s online service is very easy once the firmware is running on the hardware. All you need to do is buy the BYOD license, and claim the device by entering the ESP32 driver’s MAC address. Then your HACKRMNL will talk to the server, provision an API key for itself, and go to work!

I 3D-printed a holder for the Waveshare display, but I saw a really nice project that uses the same display on a wooden base that I think I’ll copy instead.

I’m really pleased with the final result, and I think the TRMNL itself will be even better, as it won’t have the annoying cable and will come with a better-looking case.

Epilogue

That’s all for this build, I was really happy that I managed to get the official firmware working with generic components, and I wanted to share it with you in the hopes that it would help you with your own builds.

As always, you can Tweet or BlueSky at me, or email me directly.