summaryrefslogtreecommitdiffstats
path: root/_projects
diff options
context:
space:
mode:
authorSadeep Madurange <sadeep@asciimx.com>2025-12-10 21:25:04 +0800
committerSadeep Madurange <sadeep@asciimx.com>2025-12-10 21:25:04 +0800
commitfa2d2df753da5320a9334ba7398f32609bd19a15 (patch)
tree893dc7fba5df4e8ad05b489dda9319e656e7442a /_projects
parent7950119c458c6a18cd382c8fa7863071766deea7 (diff)
downloadwww-fa2d2df753da5320a9334ba7398f32609bd19a15.tar.gz
Improve e-reader write up.
Diffstat (limited to '_projects')
-rw-r--r--_projects/e-reader.md48
1 files changed, 26 insertions, 22 deletions
diff --git a/_projects/e-reader.md b/_projects/e-reader.md
index 1a0892e..dcafca0 100644
--- a/_projects/e-reader.md
+++ b/_projects/e-reader.md
@@ -1,14 +1,14 @@
---
-title: Prototype e-reader
+title: Experimental e-reader
date: 2023-10-24
thumbnail: thumb.png
layout: post
---
-This project features a prototype e-reader powered by an ESP-WROOM-32
-development board and a 7.5-inch <a href="https://www.waveshare.com/"
-class="external" target="_blank" rel="noopener noreferrer">Waveshare</a>
-e-paper display.
+This project features a minimal e-reader powered by an ESP-WROOM-32 development
+board and a 7.5-inch <a href="https://www.waveshare.com/" class="external"
+target="_blank" rel="noopener noreferrer">Waveshare</a> e-paper display built
+with the intention of learning about e-paper displays.
<video style="max-width:100%;" controls="" poster="thumb.png">
<source src="ereader.mp4" type="video/mp4">
@@ -57,20 +57,20 @@ PDF documents to EBM files.
## How does it work?
-As the e-reader has no storage, it can't store books locally. Instead, I first
-have to upload the EBM file I want to read to a web server. The `EBM_ARCH_URL`
-setting in the Kconfig.projbuild file points to the URL of the file. To read a
-different book, I create an EBM file with the same name and upload it to the
-original location. That way, I don't have to modify the `EBM_ARCH_URL` value,
-which requires recompiling the embedded software.
+As the e-reader has no storage, it can't store books locally. Instead, it
+downloads pages of the EBM file over HTTP from the location pointed to by the
+`EBM_ARCH_URL` setting in the Kconfig.projbuild file on demand. To read a
+different book, we have to replace the old file with the new one or change the
+`EBM_ARCH_URL` value. The latter requires us to recompile the embedded
+software.
Upon powering up, the e-reader checks the reading progress stored in the RTC
memory. It then downloads three pages (current, previous, and next) to a
-circular buffer in DMA-capable memory. When the user turns a page, one of the
-microprocessor's two cores transfers it from the buffer to the display over a
-Serial Peripheral Interface (SPI). The other downloads a new page in the
-background. I use the ESP-IDF task API to distribute the two tasks between the
-available cores for maximum parallelism.
+circular buffer in DMA-capable memory. When the user turns a page by pressing a
+button, one of the microprocessor's two cores transfers it from the buffer to
+the display over a Serial Peripheral Interface (SPI). The other downloads a new
+page in the background. I used the ESP-IDF's task API to distribute the two
+tasks between the available cores to make the reader more responsive.
I designed the EBM format with HTTP streaming in mind. Since the pages are laid
out in the EBM file along predictable boundaries, the e-reader can request
@@ -80,11 +80,15 @@ web server will process this request without custom logic.
## Reflections
It's been six years since the car park and the displays. I began this project
-hoping to learn the low-level workings of e-paper displays. As a bonus, it led
-me to explore some of ESP32's most fascinating features: sleep modes, multicore
-processing, DMA, and RTC memory. Embedded systems are magical things: invisible
-particles swirl into form as the programmer whispers C.
-
-
+hoping to learn more about e-paper displays, and I got that and more. By
+working within the constraints of the ESP32, I forced myself to explore some of
+its advanced features: sleep modes, multicore task scheduling, DMA transfers,
+and RTC memory.
+
+As for the prototype, while it's no match for a commercial e-reader with
+features like an offline library of books and touch screens, there's something
+to be said about reading on hardware you built yourself. You are no longer the
+powerless Muggle watching others perform magic. You are the wizard who makes
+the invisible particles swirl into form by whispering C to it.
Files: [source.tar.gz](source.tar.gz)