
Patek Digital
End-to-end wearable telemetry for analog-watch health tracking
Overview
Patek Digital
End-to-end wearable telemetry for analog-watch health tracking
A replacement watch-band link to add modern health tracking to traditional analog watches. Custom PCB, ESP32 firmware, rechargeable power circuit, SwiftUI iOS app, NimBLE Stack, Supabase
Full telemetry path end to end: sensor acquisition → ring-buffered processing → compact records → staged consolidation → BLE sync → cloud → analytics.
Hardware architecture and telemetry format
Schematic shown to the left. Custom PCB plus ESP32 sensor stack. Each sample packs accelerometer, gyroscope, heart rate, temperature, and timestamp into a 20-byte binary record at an effective 50 Hz. Compact-by-design so buffering, storage, BLE, and on-device analytics all stay practical on a constrained device.
PCB build and bring-up
Time lapse of board assembly. We used a stencil and solder paste. 0402s proved to be a challenge. As this was my first PCB, it took lots of rework before we were able to get all peripherals responsive.
On-device buffering and two-stage consolidation
Two-stage compression on-device. Raw samples push into a 256-slot ring buffer; processing waits for a full 125-sample window. Each window collapses into a 10-byte summary (avg HR, avg temp, step count, timestamp) covering ≈ 2.5 seconds. Six summaries average and sum into a 15-second interval record. Storage and BLE cost drop substantially without losing the health signal.
Heart-rate validation against Apple Watch
Measured HR over time against an Apple Watch reference. One example verification that the full pipeline (sensing → filtering → buffering → BLE sync → app) produces believable physiological telemetry end to end. The app on the phone is a custom ios app showing data from the patek digital device worn on the same wrist as the apple watch for about a 20 minute period of time.
Step counting and derived activity metrics
Step detection runs on raw accelerometer data, tuned for the noisier signal a wrist sees compared to a hip-mounted pedometer.
The three axes collapse into a single magnitude, √(ax² + ay² + az²), then pass through a low-pass filter (α = 0.11) to smooth out high-frequency noise from incidental wrist motion.
Every 2.5 seconds, the algorithm computes a local baseline and sets the step threshold at baseline + 0.03 G. A sample only counts as a step if it clears three filters:
- It's a local peak above its immediate neighbors
- At least 6 samples have passed since the last counted step (debounce)
- It falls inside an active walking streak
A streak opens once 3 qualifying peaks land in sequence and closes after roughly 2 seconds of silence, which keeps gestures like typing or reaching from inflating the count.
On the phone, raw step counts feed distance, calorie, and time-range dashboards.
BLE sync, iOS app, and cloud persistence
Custom BLE sync, not a live stream. Scan ESP32 → restore connection state → sync device time → SEND command → parse start/data/end markers → upload chunked records to Supabase → ERASE device storage only after successful sync. Of course, all of this happens behind the scenes, the user merely opens their app. The SwiftUI app rolls uploaded records into day, week, and month dashboards.
Custom hardware, compact firmware, embedded analytics, BLE protocol, mobile sync, and cloud — one telemetry system end to end.