A Low-Cost ESP32 TinyML System for On-Device Arrhythmia Screening with Train-Deploy Preprocessing Parity

This paper presents an ultra-low-cost, privacy-preserving edge AI system for continuous arrhythmia screening deployed on an ESP32. The primary contribution is achieving train-deploy preprocessing parity by recreating the exact MIT-BIH dataset format on-device using a custom firmware pipeline and Pan-Tompkins R-peak detection. Additionally, the system features a hardware-specific filter chain optimized for local 50 Hz power grid interference and performs full on-device classification, ensuring that only scalar metrics—and no raw ECG waveforms—are transmitted to the cloud.