A BLE-connected e-paper display badge: a custom nRF52 board that receives a bitmap image over Bluetooth Low Energy and renders it on a 152x152 e-paper panel.
This repo holds the original work only — hardware design, the e-paper driver, the BLE service, and the image-conversion tooling — not the vendored Nordic nRF5 SDK the firmware builds against. See Building the firmware below for how to combine the two.
This is the core of the project: a from-scratch driver supporting two different e-paper panel command protocols (epd_protocol_a/epd_protocol_b, covering Good Display and DKE/Dalian panel families — GDEW/GDEP/GDEQ and DEPG part numbers), a bit-level SPI transport (epd_spi, epd_spi_port_nrf51822), run-length encoding for the panel's compressed update path (rle), and partial-refresh scan-back handling (scanback) so only changed regions of the display need a full refresh cycle.
- Hardware (
Hardware/): KiCad/Gerber fabrication output (TF38-UDM_Rev.A_231124) — Gerbers, drill files, BOM, pick-and-place CSV, and a STEP model for the board. - BLE service (
Software/components/ble/ble_services/ble_tf38_udm/): a custom GATT service (Nordic UART Service pattern) that receives image data and commands over BLE and hands them off to the display driver. - Board definition (
Software/components/boards/TF38_UDM.h): pin mapping and peripheral config for the custom board, in the shape the nRF5 SDK's board-support layer expects. - Firmware app (
Software/examples/ble_peripheral/ble_app_epd/): the application that ties it together — derived from Nordic'sble_app_uartexample, extended to validate aDZ38image header (signature, width, height, data size) over BLE and drive the display. Includes prebuilt project files for theTF38_UDMboard (GCC/Makefile, Keil, IAR, SEGGER Embedded Studio) across s113/s140 SoftDevice variants. - Image tools (
Online/): Python scripts (ImgToDZ38.py,DZ38toPNG.py,ImgToXZ38.py,XZ38toPNG.py,dithering_converter.py) that convert images to/from the device's packed 1-bitDZ38/XZ38formats using Floyd-Steinberg dithering, plus a UDPserver.py/client.pypair for fragmenting and transferring files to a conversion service.
The firmware is an nRF5 SDK example project and needs the SDK itself, which isn't vendored in this repo:
- Download nRF5 SDK v17.1.0 from Nordic Semiconductor.
- Copy this repo's
Software/components/andSoftware/examples/contents into the matching paths under the SDK root (i.e.<SDK_ROOT>/components/...,<SDK_ROOT>/examples/...). - Build the
TF38_UDMboard target (not thepca10040/pca10056/pca10100Nordic dev-kit targets, which are Nordic's own and not included here) underexamples/ble_peripheral/ble_app_epd/TF38_UDM/<s113|s140>/, with GCC (armgcc/Makefile), Keil (arm5_no_packs/*.uvprojx), IAR, or SEGGER Embedded Studio.
- Nordic nRF52 SoftDevice BLE stack (nRF5 SDK v17.1.0)
- C firmware, multiple toolchains (GCC/ARM, Keil MDK, IAR, SES)
- Python 3 (Pillow) for image tooling
- KiCad-generated Gerbers for PCB fabrication
MIT — see LICENSE. Software/examples/ble_peripheral/ble_app_epd/main.c additionally carries Nordic Semiconductor's own copyright/license terms for the unmodified portions of that file (see the file header and LICENSE for details).