A WiFi-based passive radar system using ESP32-S3 that detects human presence, motion, and position in a room using RSSI and CSI (Channel State Information) - no additional sensors required.
When a person moves through a room, they disturb the WiFi signal paths between the ESP32 and the router. This project measures two types of signal disturbance:
A digital signal processing pipeline extracts motion information:
Raw Signal -> Moving Average Filter -> Variance Calculation -> Integrator -> Detection Level
ESP32S3 Dev ModuleRequired Libraries (install via Arduino Library Manager):
ESPAsyncWebServer by me-no-devAsyncTCP by me-no-devArduinoJson by Benoit BlanchonBuilt-in (no install needed):
LittleFSWiFiesp_wifi (CSI API)wifi-sense/wifi_sense.ino in Arduino IDEWIFI_SSID and WIFI_PASSWORD to your router credentialsESP32S3 Dev Modulewifi-sense/data/ folder to LittleFS:
Place the ESP32-S3 on one side of the room and the router on the other side.
wifi-sense/ # Single-node presence detector
wifi_sense.ino # Main sketch
signal_processor.h/cpp # DSP: moving average, variance, detection
csi_collector.h/cpp # ESP32-S3 CSI data collection
web_server.h/cpp # HTTP server + WebSocket
data/ # Web GUI (upload to LittleFS)
index.html
style.css
app.js
Detection Sensitivity: Adjust via web UI or in code:
motionThreshold (default 15) - higher = less sensitive to motionpresenceThreshold (default 5) - higher = less sensitive to presencescanIntervalMs (default 100) - sampling rate in millisecondsSignal Processor Config (in setup()):
processor.init(
64, // sample buffer size (more = smoother, slower response)
16, // moving average filter size
15, // variance threshold
3 // variance integrator limit (samples to accumulate)
);
For best results:
| Aspect | RSSI | CSI |
|---|---|---|
| Data points per reading | 1 | 52+ subcarriers |
| Sensitivity | Low | High (sub-meter) |
| Breathing detection | No | Possible |
| Computational cost | Minimal | Moderate |
| Works through walls | Limited | Yes |
This project uses both simultaneously. CSI is the primary detection source when available, with RSSI as fallback.
MIT License. Based on concepts from the MotionDetector project.
A WiFi-based passive radar system using ESP32-S3 that detects human presence, motion, and position in a room using RSSI and CSI (Channel State Information) - no additional sensors required.
When a person moves through a room, they disturb the WiFi signal paths between the ESP32 and the router. This project measures two types of signal disturbance:
A digital signal processing pipeline extracts motion information:
Raw Signal -> Moving Average Filter -> Variance Calculation -> Integrator -> Detection Level
ESP32S3 Dev ModuleRequired Libraries (install via Arduino Library Manager):
ESPAsyncWebServer by me-no-devAsyncTCP by me-no-devArduinoJson by Benoit BlanchonBuilt-in (no install needed):
LittleFSWiFiesp_wifi (CSI API)wifi-sense/wifi_sense.ino in Arduino IDEWIFI_SSID and WIFI_PASSWORD to your router credentialsESP32S3 Dev Modulewifi-sense/data/ folder to LittleFS:
Place the ESP32-S3 on one side of the room and the router on the other side.
wifi-sense/ # Single-node presence detector
wifi_sense.ino # Main sketch
signal_processor.h/cpp # DSP: moving average, variance, detection
csi_collector.h/cpp # ESP32-S3 CSI data collection
web_server.h/cpp # HTTP server + WebSocket
data/ # Web GUI (upload to LittleFS)
index.html
style.css
app.js
Detection Sensitivity: Adjust via web UI or in code:
motionThreshold (default 15) - higher = less sensitive to motionpresenceThreshold (default 5) - higher = less sensitive to presencescanIntervalMs (default 100) - sampling rate in millisecondsSignal Processor Config (in setup()):
processor.init(
64, // sample buffer size (more = smoother, slower response)
16, // moving average filter size
15, // variance threshold
3 // variance integrator limit (samples to accumulate)
);
For best results:
| Aspect | RSSI | CSI |
|---|---|---|
| Data points per reading | 1 | 52+ subcarriers |
| Sensitivity | Low | High (sub-meter) |
| Breathing detection | No | Possible |
| Computational cost | Minimal | Moderate |
| Works through walls | Limited | Yes |
This project uses both simultaneously. CSI is the primary detection source when available, with RSSI as fallback.
MIT License. Based on concepts from the MotionDetector project.