Close

Inception

A project log for Macchiato DX: Practical video badge with RP2040

USB-uploaded MPEG-1, 240×240 colour @ 30 FPS in a compact form factor

ayuAyu 11/27/2025 at 09:160 Comments

This started as a birthday gift for a close friend. My envisioned outcome would be a circular little trinket that could play video — similar to a button badge or a bag charm — self-contained, battery-powered, and rechargeable over USB. It should at least support video lasting a few minutes (enough for a music video or a short animation), ideally uploadable through USB at a reasonable speed.

It seems that someone must have done this before. Indeed, this has been implemented multiple times with ESP32-series microcontrollers (including a kit on Adafruit) as well as the more lightweight RP2040 (Ben's 2023 Supercon badge hack and a follow-up revision). However, ESP32 does not excel in power-efficient sustained-load operation, while Ben's MPEG-1 approach had to make compromises in appearance (either go greyscale or use smaller screens). RP2040's official Popcorn demo plays QVGA smoothly, but compression is rudimentary at ~20 Mbps (~40% compression ratio compared to raw 24-bit RGB). Similar commercial products are listed online with a decent battery life of 10+ hours, but only supports seconds-long animations and are priced at CNY 100 (USD 14) or more.

None of the existing solutions quite matched what I wanted: several minutes of smooth, colourized video, running for hours on a small battery. How greedy I am >_< And I am atoning for it by suffering my own prophecy, confining myself onto the workbench trying to coalesce with the almighty numen of computation, enmeshed in endless rises and falls of the aetheric force...


After another round of search for microcontrollers, I decided to retrace the path of RP2040. A fast system clock combined with its versatile PIO block makes a perfect fit for smooth video playback, standing out in its range of complexity, power, and price.

I already have RP2040 development boards and a spare 1.28" 240×240 display at hand. Audio is less of a concern; an I2S-interfaced MAX98357 block covers all needs.

A round LCD display in a little plastic box.

Given practice from previous projects, this setup is more of a comfort zone. Still, unknowns remain — how smooth can we reach? The only way to figure out would be to forge a manifestation.

Discussions