← Projects

Basecamp

PythonRaspberry PiReactFlaskMachine Learning

Problem

Most sleep tracking either requires wearing something to bed or relies on a single signal, like motion, that misses most of what is actually happening physiologically overnight. I wanted something that could infer sleep stage and recovery from the room itself, with no wearable, and that was honest about what it could and could not measure.

What I built

Two ESP32-S3 nodes capture WiFi channel state information to detect breathing and micro-movement, paired with a 24GHz mmWave radar for coarser motion. Environmental sensors track CO2, VOC, temperature, humidity, and light throughout the night, all running on a Raspberry Pi 4. The ML pipeline does 3-class sleep staging (Wake, Deep, Light and REM combined), flags anomalies, and produces a morning recovery score with SHAP explanations showing which signals actually drove it. Transfer learning from the MESA dataset bootstrapped the model before I had collected any real overnight data of my own, and the full software stack was validated against simulated data before any hardware was ordered.

Hardest part

Getting a usable breathing signal out of WiFi CSI without a wearable reference to calibrate against. The raw signal is noisy and the breathing component is small relative to everything else moving in a room overnight. I spent most of the build on signal processing rather than the model itself.