PaperFlux prints a summary of my GitHub activity on a 58 mm thermal receipt, once a week: total stars, followers, a 7-day commit histogram, top languages, and most-starred repositories. No screen, no notification, no button, a strip of paper comes out on its own, like a bank statement for open-source work.
The project spans four disciplines: a custom electronic board, embedded firmware, a web service in production, and a 3D-printed enclosure.
Repo: github.com/albanpetit/paperflux (MIT, full source: ECAD, firmware, web service, enclosure)
Requirements
- A single plug. Runs off one USB-C charger, no dedicated printer power supply.
- Autonomous. Connects to Wi-Fi, knows the date, prints on schedule with no intervention.
- Reliable. A reboot or power loss must never trigger a reprint; a failure must not waste paper in a loop.
- Simple on the board side. The receipt layout is computed server-side, the board just downloads an image and prints it.
System overview
Two parts talk over HTTPS: a web service that builds the receipt image, and a board that downloads and prints it.
- Power, the board negotiates 9 V (5 V fallback) over USB-C PD, powering both the electronics and the printer.
- Scheduling, firmware syncs over NTP and checks every minute whether a receipt is due (weekly by default).
- Rendering, the board calls the web service, which pulls GitHub stats, lays out an HTML template in headless Chromium, and converts it to a 1-bit PNG exactly as wide as the print head.
- Printing, firmware decodes the PNG on the fly and streams it to the printer line by line.
Choosing the components
The core constraint: one USB-C plug has to power a thermal head, which draws far more than 5 V/500 mA, hence USB Power Delivery.
Built-in Wi-Fi, native USB (flash + console, no USB-serial chip)
Reads charger profiles over I²C, requests voltage, switches output
Back-to-back N-channel MOSFETs
2 A fixed-output buck, few external parts
For the buck converter
MCU at 3.3 V, PD controller's I²C side at 5 V
Protects D+, D−, CC1, CC2
USB 2.0, enough for PD + data
58 mm thermal, TTL interface, 384-dot width
| Component | |
|---|---|
| ESP32-C3-MINI-1 | |
| Diodes AP33772S | |
| 2× DMN3009SFG | |
| Diodes AP63203 | |
| Würth WE-MAPI 3015, 3.9 µH | |
| TI PCA9306 | |
| TI TPD4E02B04 | |
| JAE DX07S016JA1R1500 | |
| DP-EH400/2 |
9 V rather than 5 V roughly halves current for the same power, right when the head draws the most.
Schematic
Power path: the AP33772S negotiates over CC1/CC2, senses current through a 5 mΩ shunt, watches temperature via an NTC, and closes two back-to-back MOSFETs once voltage is set. That switched output (VCC) feeds the printer directly and the 3.3 V buck. Important consequence: the ESP32-C3 is powered through the PD switch, so it dies with the printer if a protection trips.
Logic side: the ESP32-C3's native USB goes straight to the connector (PD, flashing, and console share one port). I²C runs from the MCU through the PCA9306 level shifter to the AP33772S. ESD protection sits right at the connector.
Three status LEDs (VBUS present, PD negotiation status, 3.3 V rail present) give an instant visual diagnostic.
PCB
33.55 × 50.05 mm, 4-layer stack (top routing / GND plane / 3.3 V plane / bottom jumpers), ENIG finish for the AP33772S's 0.5 mm-pitch WQFN-24. Manufactured by AISLER; v0.2 fixed a connector issue and wrong reset-circuit resistor values from v0.1. An interactive BOM (InteractiveHtmlBom) made hand assembly manageable on a dense 0402-heavy board.
Key design details
- Buck regulator: fixed-output AP63203, FB tied straight to the 3.3 V rail (no divider), EN tied to input so it starts as soon as the switch closes. Tight placement and a continuous ground plane keep the switching loop away from the Wi-Fi antenna.
- Power switch: back-to-back MOSFETs block current in both directions when off; the PD controller sits upstream (stays powered) while the ESP32-C3 sits downstream (powers off with the printer). A 100 Ω divider lets firmware...
Alban Petit
Rasmus L.
MagicWolfi
Stefan Wagner
Laine Walker-Avina