← Articles · IoT & Embedded Systems · 2026-11-14 · 6 min read

Camera-Free Motion Sensing: Real-Time Wi-Fi CSI DSP on ESP32

Lessons from Hareket-Radar: processing 12 LLTF subcarriers in bounded static ring buffers with 15s room calibration and Z-score hysteresis.

  • ESP32
  • Wi-Fi CSI
  • Embedded DSP
  • Privacy-First IoT

# Beyond Optical Cameras and Line-of-Sight PIR Sensors

Optical cameras introduce unacceptable visual privacy concerns in indoor environments, while passive infrared (PIR) sensors miss subtle or occluded movement behind furniture.

Wi-Fi Channel State Information (CSI) monitors how wireless subcarriers shift in phase and amplitude as humans move through multipath reflections—achieving room-scale sensing without cameras.

# Deterministic Memory & Z-Score Hysteresis Filtering

Avoiding dynamic heap allocation on long-running microcontrollers prevents fragmentation crashes. Hareket-Radar samples 12 fixed LLTF subcarriers at ~100 pkt/s into a static 256-slot C++ ring buffer.

  • A 15-second startup baseline learns the quiet room RF noise mean and variance automatically.
  • Consecutive 4-hit activation and 8-window cooldown hysteresis filter transient RF bursts cleanly.
  • Live Z-score thresholds tune directly over an isolated ESP32 LittleFS telemetry web UI.
TERMINAL / CODE
// Minimum inter-packet spacing and consecutive hit hysteresis
if ((now_us - last_pkt_us) < MIN_GAP_US) return;
if (z_score > sens && ++on_hits >= ON_HITS) state = MOTION_ACTIVE;