Radar-Based Home Security System Using RD-03D and ESP32-C6
by tech_nickk in Circuits > Sensors
354 Views, 5 Favorites, 0 Comments
Radar-Based Home Security System Using RD-03D and ESP32-C6

Introduction
Traditional home security systems have a fatal flaw. PIR (Passive Infrared) sensors, the backbone of most security setups, are notorious for false alarms triggered by pets, moving curtains, temperature changes, or even sunlight shifting through windows. They also struggle with range limitations and can be easily fooled by slow-moving intruders or those wearing heavy clothing that masks body heat.
Enter radar technology, the same principle used in military applications and autonomous vehicles. Unlike PIR sensors that detect heat signatures, radar actively measures motion, distance, and even speed with millimeter precision.
That’s where my system comes in. By combining the precision of the RD-03D mmWave radar sensor with the advanced connectivity and processing power of the Beetle ESP32-C6, I’ve built a compact, battery-powered security solution that delivers real-time intruder detection, smart alerts, and radar visualization through a web dashboard. Unlike off-the-shelf systems, this DIY setup tracks multiple moving targets, analyzes their behavior, and minimizes false alarms with intelligent filtering. It’s designed to be deployed anywhere, indoors or outdoors, with long battery life, weatherproofing, and full integration with Home Assistant for smart automation.
This project demonstrates how to build a sophisticated radar-based security system that rivals commercial solutions at a fraction of the cost.
1 / 2
The PIR Problem
- False Positives: Pets, curtains, temperature fluctuations, and sunlight cause constant false alarms
- Limited Range: Most PIR sensors work effectively only within 3-5 meters
- Narrow Detection: Typical 90° field of view leaves blind spots
- Weather Sensitivity: Temperature changes dramatically affect performance
- Easy to Defeat: Can be bypassed with slow movement or thermal shielding
Key Features
- Radar-based Detection (8m range, 120° field)
- Real-time Alerts (LEDs + Buzzer)
- Web UI (hosted on ESP32)
- Live Radar Visualization
- Battery Powered & Rechargeable(Type-C)
- Threshold Configuration via Web Interface
- Matter, Thread and Zigbee Support
- Home Assistant Compatible (optional MQTT/REST integration)
1 / 2
What inside the Device
- ESP32-C6 Beetle microcontroller
- RD-03D 24GHz mmWave radar sensor
- 3.7V 1500mAh rechargeable lithium battery
- RGB LED indicator
- Slide Switch
- Wires
- 3D printed weatherproof enclosure
RD-03D mmWave Radar: The Smart Sensor Behind the System
The RD-03D is a 24GHz radar module from AI-Thinker designed for motion and presence detection. Unlike PIR sensors, it works in total darkness, through plastic or glass, and can sense very small movements like breathing or subtle shifts in position.
- Detection Range: 0.1m to 8m
- Detection Angle: 120°
- Interface: UART
Features:
- Detects both motion and presence
- Can operate through glass and non-metallic materials
- Works in various lighting and weather conditions
The RD-03D communicates using UART. You can send commands to configure detection distance, presence mode, and sensitivity. Data packets from the radar contain detection information, including the type of motion and distance. The ESP32 parses this data to visualize and trigger alarms accordingly.
How It Works
The RD-03D emits continuous microwave signals and monitors reflected waves to detect changes in distance, phase, and amplitude. It uses Doppler and phase-shift analysis to determine whether something is present, whether it is moving closer or farther, how fast it is moving or how far it is
Multi-Person Tracking ability of the sensor
Microcontroller: Beetle ESP32-C6
This tiny powerhouse runs the whole system while sipping power. I chose the Beetle ESP32-C6 mini because:
- It's compact and breadboard-friendly
- It supports Wi-Fi & BLE 5 (and Thread/Matter if needed)
- It can easily host a web server and handle GPIO interrupts
- Runs great on battery power
Building the Project
Designing the Case in Autodesk Fusion 360
To ensure portability and durability, I designed a compact enclosure in Autodesk Fusion 360. The enclosure includes:
1. The main Body : Download the STL file here
2. The Top Cover: Download the STL file here
The Design has:
- Mounting slots for the RD-03D sensor
- LED hole
- Hole for the Buzzer
- Cutouts for USB-C programming and charging access
- Snap-fit lid
The design is kept minimal and compact to allow wall or ceiling mounting.
3D Printing the Case
Exported the Fusion 360 design to STL. Sliced using Cura for an FDM printer (0.2mm layer height recommended)
Material: PLA or PETGPrinted in under 3 hours
Post-processing: Insert LEDs, mount radar, secure ESP32, and route wires neatly.
Circuit Assembly
Radar Sensor to ESP32-C6
RD-03D TX → ESP32 RX (GPIO 17)
RD-03D RX → ESP32 TX (GPIO 16)
GND → GND
VCC → 5V
LED Indicators
- Red LED anode → GPIO 21
- Green LED anode → GPIO 22
- Blue LED anode → GPIO 23
- Cathodes to GND
PowerSolder the Positive terminal of the LiPo battery to the Battery pin of the Beetle ESP32C6 and the Ground terminal to GND pin
Firmware and Web Interface
I chose to write the firmware for the device using Arduino IDE because of it s Simplicity and wide community support.
Ensure you have the Latest ESP32 Arduino Core with ESP32-C6 support on your Arduino IDE. Before compiling the code make sure you have this RD-03D Library installed. Download it and extract to your Arduino Libraries folder.
Code Overview
Core Components
- WiFi Web Server: Remote control and monitoring interface
- Radar Integration: Reads RD-03D sensor data (distance, angle, speed)
- State Management: Tracks armed/disarmed/alarm states
Main Operation
Loop Process:
- Read Radar: Get target distance and position data
- Check Threat: Compare distance against threshold setting
- Control Hardware: Update LEDs and buzzer based on status
- Handle Web Requests: Process API calls from web interface
LED Status
- Green: Armed & clear
- Red: Target detected (blinks during alarm)
- Blue: Disarmed
- Off: System disabled
Web API
- /api/status - System status and sensor readings
- /api/config - Adjust detection distance/alarm duration
- /api/arm - Arm/disarm system
- /api/radar-data - Live data for web radar display
Smart Logic
Only triggers alarm when system is armed AND valid target detected within range. Includes configurable alarm timeout and remote control via professional web interface with real-time 120° radar visualization.
Accessing the Web Interface
- Turn on the device
- Connect to the ESP32’s Wi-Fi hotspot or local network IP.
- Load the interface in a browser
- Set:Max Detection Distance (e.g., 3m)Alarm Duration (e.g., 5s)Alarm On/Off
- Observe real-time detections on the radar arc.
Power & Battery Life
A 3.7V LiPo cell powers the system, recharged via the built in battery charge management of the Beetle board. Due to the low power consumption of both the RD-03D and the ESP32-C6, the system can run for several days or even weeks on a single charge. Deep sleep mode implementation could extend the battery life for months.
How the Radar Security System Works
The system works by leveraging the RD-03D radar sensor, which emits 24GHz radio waves to scan a 120° field of view and detect movement with high precision, measuring not just presence, but also the speed, angle, and distance of moving objects up to 8 meters away. Unlike traditional PIR sensors that rely on heat signatures, the radar can operate effectively in complete darkness, through walls, fog, or dust, and is immune to common false triggers like pets or sunlight. At the core of the system is the Beetle ESP32-C6, a compact and ultra-efficient microcontroller that processes incoming radar data in real-time. It runs a smart detection engine that filters out non-threatening movements and classifies potential intrusions. Once a threat is detected, the ESP32-C6 triggers visual and audio alerts (LEDs and buzzer), logs the event, and updates a web-based dashboard where users can view a live radar visualization, adjust settings, and remotely arm or disarm the system.
Demo Video
Web Interface and Visualization
The ESP32 hosts a web server. Users can connect over Wi-Fi and:
Set radar detection distance threshold
- Set radar detection distance threshold
- Configure alarm duration (how long the buzzer sounds and LED blinks)
- Toggle the alarm system on/off
- View radar detection visualization as a 120° sweep
- Monitor real-time detection updates
Radar detections are plotted in a JavaScript canvas element, forming an arc-based visual similar to marine radar.
Proper Sensor Mounting Recommendation by Ai Thinker
Use Case Scenarios
- Monitor home entryways for motion through windows or glass
- Detect presence even when an intruder stands still
- Smart energy management (lights turn off when no one is in the room)
- Elderly care systems to detect occupancy without cameras
Home Assistant Integration (Optional)
Use MQTT or REST API endpoints to connect the radar to your Home Assistant dashboard.
- Use MQTT or REST API endpoints to connect the radar to your Home Assistant dashboard.
- Trigger automations like:
- Turning on lights
- Sending alerts
- Activating cameras
Performance Optimization
- Sensor Placement: Mount at optimal height (2-3 meters) for best coverage
- Environmental Factors: Consider weather shielding for outdoor installations
- Network Optimization: Use dedicated IoT network for best performance
Future Enhancements
This project serves as a foundation for advanced security features:
- Custom PCB: For a more robust system
- Drone Integration: Automatic drone deployment for perimeter monitoring
- Professional Monitoring: Cloud-based security service integration
- Mobile App: Dedicated smartphone application for enhanced control
Conclusion: Smarter, Stronger Home Security
This DIY radar security system proves that advanced, reliable protection doesn't have to come with a high price tag. With the RD-03D sensor and ESP32-C6 Beetle, you get precise, weatherproof, and smart motion detection that outperforms traditional PIR setups. It's compact, battery-powered, and fully integrates with your smart home. Whether for a home, workshop, or remote property, this project delivers professional-grade security that adapts to your needs.
Well...
If you like the project, leave a like and let me know what you think about it in the comments, whether it is how you think I can improve or make it better. If you would like to contribute or collaborate don't hesitate to reach out.
Thankyou ;)