ESP32 Ai-Thinker RD-03D mmWave Radar Sensor
Overview
The RD-03D is a versatile 24GHz radar sensor for multi-person detection and tracking. It supports UART data output and is well-suited for automation, smart buildings, and robotics.
About Ai-Thinker RD-03D mmWave Radar Sensor
The Ai-Thinker RD-03D is a 24GHz mmWave radar module designed for multi-human tracking with accurate measurement of distance, speed, and position. It supports real-time tracking of up to five targets simultaneously and communicates over UART with a customizable binary protocol. Ideal for security, automation, and intelligent sensing systems.
Where to Buy
Prices are subject to change. We earn from qualifying purchases as an Amazon Associate.
Technical Specifications
Pinout Configuration
The VCC
pin is used to supply power to the sensor, and it typically requires 3.3V or 5V (refer to the datasheet for specific voltage requirements). The GND
pin is the ground connection and must be connected to the ground of your ESP32.
The RD-03D module includes the following pins:
VCC
– Connect to a regulated 5V supply.GND
– Connect to ESP32 GND.TXD
– UART transmit pin (connect to RX on microcontroller).RXD
– UART receive pin (connect to TX on microcontroller).
The UART interface uses 115200 baud by default. Ensure signal logic is 3.3V compatible when used with ESP32.
Troubleshooting Guide
Common Issues
📶 No Serial Output
Issue: ESP32 doesn't receive any data.
Verify TXD/RXD wiring. Ensure the baud rate is set to 115200. Use a USB-to-Serial adapter to confirm data output manually.
⚠️ Inaccurate or Frozen Data
Issue: Detected target positions or speeds do not change.
Ensure there is line-of-sight movement in the detection area. Check for firmware version compatibility and reset the device if needed.
Debugging Tips
🔍 Serial Monitor
Use the Serial Monitor to check for error messages and verify the sensor's output. Add debug prints in your code to track the sensor's state.
⚡ Voltage Checks
Use a multimeter to verify voltage levels and check for continuity in your connections. Ensure the power supply is stable and within the sensor's requirements.
Additional Resources
Code Examples
Arduino Example
// Basic example for RD-03D UART output
#include <HardwareSerial.h>
HardwareSerial RadarSerial(2);
void setup() {
Serial.begin(115200);
RadarSerial.begin(115200, SERIAL_8N1, 16, 17);
}
void loop() {
while (RadarSerial.available()) {
Serial.write(RadarSerial.read());
}
}
This example connects the RD-03D to ESP32 via UART2 (GPIO16/17) and outputs all received bytes to the Serial Monitor. The data consists of binary frames which must be parsed according to the RD-03D protocol. For real-time tracking and distance/speed parsing, refer to decoding routines at Electronic Clinic.
ESPHome Example
As of now, there is no official ESPHome component for the RD-03D. Integration is possible via a custom UART component or lambda parser for binary frames.
PlatformIO Example
platformio.ini
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
PlatformIO Example Code
#include <HardwareSerial.h>
HardwareSerial RadarSerial(2);
void setup() {
Serial.begin(115200);
RadarSerial.begin(115200, SERIAL_8N1, 16, 17);
}
void loop() {
while (RadarSerial.available()) {
Serial.write(RadarSerial.read());
}
}
This PlatformIO sketch reads raw binary output from the RD-03D sensor using UART2 and relays it to the Serial Monitor. Use a parser to decode target coordinates, speed, and distance.
MicroPython Example
There is currently no official MicroPython driver for the RD-03D. Developers can read binary UART data and decode it using the frame format documented in the datasheet.
Conclusion
The ESP32 Ai-Thinker RD-03D mmWave Radar Sensor is a powerful Human Presence sensor that offers excellent performance and reliability. With support for multiple development platforms including Arduino, ESP-IDF, ESPHome, PlatformIO, and MicroPython, it's a versatile choice for your IoT projects.
For optimal performance, ensure proper wiring and follow the recommended configuration for your chosen development platform.
Always verify power supply requirements and pin connections before powering up your project to avoid potential damage.