In this project, we present a highly versatile and innovative Zone Presence Detection System built using the HLK-LD2450 24GHz Radar Sensor. The system integrates advanced mmWave radar technology with a real-time web interface powered by ESP32 and React. Whether for smart home automation, security systems, or occupancy monitoring, this solution demonstrates how modern technology can redefine presence detection
Key Features1. Radar Capabilities
- Detects up to 3 targets simultaneously in real-time.
- Coverage of up to 6 meters with millimeter-level accuracy.
- Differentiates between static presence (e.g., breathing) and dynamic motion.
2. Web Interface
- Real-time Visualization: Displays live target positions.
- Zone Editor: Drag-and-drop interface for defining and configuring up to three custom zones.
- Responsive Design: Accessible from both desktop and mobile devices.
3. Communication
- RESTful API for flexible zone configuration.
- WebSocket-based real-time updates for seamless interactivity.
4. Smart Zone Management
- Define detection zones with precision.
- Real-time zone validation and coordinate mapping.
The project comprises two main layers: Hardware and Software.
Hardware Layer
- HLK-LD2450 24GHz Radar Sensor: Handles all motion and presence detection.
- ESP32 Microcontroller: Acts as the bridge between the sensor and the web interface, providing WebSocket and REST API services.
Software Layer
- ESP32 Firmware: Written using FreeRTOS for efficient task handling and JSON-based data communication.
- React Web Application: A modern front-end that provides real-time monitoring and zone editing capabilities.
Hardware Setup:
- HLK-LD2450 Radar Sensor
- ESP32 Development Board
- USB-C Power Supply
- Jumper Wires
- Optional: 3D-Printed Enclosure:For Example the: Multisensor Case to house an HLK-LD2450 Sensor + Light, Temp, humidity Sensor from F-Square. Link(printables.com)
Wiring Diagram:
Mounting Guidelines:
- Mount at a height of 1.2-1.5 meters.
- Ensure clear line of sight and avoid metallic obstructions.
ESP32 Setup:
1. Install Visual Studio Code and the PlatformIO Extension.
2. Clone the repository:
git clone https://github.com/nick28s/IoTProject-ZonePresenceDetection-LD2450/
3. Configure WiFi credentials in WiFiCredentials.h
:
#define WIFI_SSID "your_ssid"
#define WIFI_PASSWORD "your_password"
4. Upload the firmware to the ESP32 via PlatformIO.
Web Application Setup:Use Docker:
docker pull ghcr.io/nick28s/iotproject-zonepresencedetection-ld2450:latest
docker run -p 3000:3000 --name zoneapp ghcr.io/nick28s/iotproject-zonepresencedetection-ld2450:latest
or
Install manually:
1. Install Node.js (v16 or higher).
2. Navigate to the web app directory:
cd ReactJSApp/zonepresencedetectionapp
3. Install dependencies:
npm install
4. Start the development server:
npm run dev
5. Configure ESP32 IP in the UI (read IP from Serial Monitor of the ESP32)
Real-Time Zone Monitoring- Access the web interface at
http://localhost:3000
. - Enable Edit Mode to create and configure zones.
- Visualize live target movements and zone occupancy in real-time.
Smart Homes
- Automate lighting and HVAC systems based on zone occupancy.
Security Systems
- Enhance intruder detection with precise zone mapping.
Healthcare
- Monitor patient presence and activity levels without intrusive cameras.
We welcome feedback and contributions to improve the system.
Repository: GitHub Link
Comments
Please log in or sign up to comment.