ESP Wi-Fi Motion Sense Project

Wiring Schematic

View full-size circuit ↗
LT

YOUR PROJECT LEARNING PATH

Build it with confidence.

Progress saves on this device
01

Project overview

Know what you’re building before you start wiring.

Build WiFi Motion Sense using ESP32 and ESP8266 development boards to experiment with camera-free motion and presence estimates from changes in Wi-Fi signal strength. Sensor readings are filtered before submission to a local Python server.

A Flask dashboard combines both sensors' reported motion scores, calibration states, RSSI metrics, event counts, and a virtual room visualization. Results are heuristic estimates, not accurate radar-based localization.

Before you power up

Use only authorized lab spaces, inform affected people, and treat all presence results as experimental estimates rather than reliable tracking.

PROJECT ROADMAP3 project stages
✓
Prepare your kitConfirm the components and tools
⌁
Assemble the circuitFollow the build steps in order
⌘
Upload and testCheck the output and resolve issues
Start the build
02

Components required

Gather these parts before you begin.

ESP32 Development BoardReports router RSSI and sends filtered sensor metrics to the Flask server.× 1
ESP8266 Development BoardProvides the second sensing node for comparison and combined motion analysis.× 1
Wi-Fi Router or Access PointProvides a shared wireless network for both sensor boards and computer.× 1
ComputerRuns the local Flask server and opens the dashboard in a browser.× 1
USB Data CablesConnect each development board to the computer for firmware upload and power.× 1
03

Build the project

Work through one focused step at a time. You can revisit any step whenever you need.

STEP 010 / 5 complete
BUILD STAGE 0120% of guide

Prepare the Hardware and Network

Place both development boards and the router in a stable authorized test area. Connect each board to the computer with a data-capable USB cable, then keep the router and sensors stationary during calibration.

No separate motion sensors, cameras, or GPIO wiring are required; the boards use their Wi-Fi connection to measure router RSSI.

1 of 5
04

Software & tools

Install these before uploading the firmware.

Arduino IDEEdits, compiles, and uploads firmware to both development boards.
ESP32 Board PackageAdds board definitions and networking APIs to Arduino IDE for ESP32.
ESP8266 Board PackageAdds board definitions and networking APIs to Arduino IDE for ESP8266.
Python 3Runs the local server and installs the project's Python dependencies.
FlaskReceives sensor JSON, performs heuristic fusion, and serves dashboard endpoints.
Flask-CORSListed dependency in requirements.txt, but currently unused by app.py.
Modern Web BrowserDisplays the dashboard served by Flask and refreshes data every 500 milliseconds.
05

Expected output

Compare your build with the result described here.

FINAL CHECKPOINT

After both boards connect and calibrate, Serial Monitor shows each sensor's RSSI, filtered signal, baseline, motion score, presence, calibration status, and HTTP response code. The Flask dashboard is available at the computer's local address on port 5000.

The dashboard combines reports into motion and presence indicators, confidence percentage, heuristic direction labels, event counts, and X/Y coordinates on an eight-by-six-metre virtual room. These coordinates are estimates, not physical tracking measurements.

06

Troubleshooting & fixes

Choose the issue that best matches what you’re seeing.

01ESP32 sensor remains offline
Try these checks

Change the ESP32 URL to /api/esp, since app.py registers /api/esp rather than /api/esp32. Verify server IP, Wi-Fi credentials, HTTP response codes, and firewall access on port 5000.

02ESP8266 sensor remains offline
Try these checks

Check SSID, password, and the computer's IPv4 address in its serverURL. Confirm the ESP8266 uses /api/esp8266, both devices share the network, and Flask is listening on port 5000.

03Motion detection is unstable or inaccurate
Try these checks

Keep router and sensors stationary during calibration, then test controlled movements. RSSI varies with people, walls, traffic, and interference. Change sample arrays and addSample() parameters to float to preserve filtered RSSI decimals.