ESP32 Ai-Thinker RD-01 24GHz mmWave Radar Sensor
Overview
The Ai-Thinker RD-01 is a high-sensitivity 24GHz radar sensor capable of detecting human presence and motion. It communicates via UART and is ideal for smart home and security applications.
Choose Your Platform
About Ai-Thinker RD-01 24GHz mmWave Radar Sensor
The Ai-Thinker RD-01 is a 24GHz mmWave radar sensor designed for human presence detection. It utilizes FMCW (Frequency Modulated Continuous Wave) technology to detect both moving and stationary human targets within a range of up to 5 meters. The sensor integrates Wi-Fi and BLE capabilities, allowing for wireless configuration and data transmission. It supports UART communication for integration with microcontrollers. For more information, refer to the official datasheet: RD-01 Datasheet.
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-01 is a compact 24GHz mmWave radar sensor developed by Ai-Thinker, capable of detecting both stationary and moving human presence. It integrates radar, MCU, and wireless communication capabilities, and is designed to operate at 3.3V logic levels. The module exposes the following interface pins:
3V3
– Power input. Supply a stable 3.3V DC regulated voltage. Supplying more than 3.6V may damage the internal circuitry.GND
– Ground reference. Must be connected to the system ground of the ESP32 or host MCU for consistent signal logic and power stability.TX
– UART transmit pin. Outputs presence and motion data to a host device. Connect to the ESP32’s RX pin (e.g., GPIO16).RX
– UART receive pin. Accepts configuration or control commands. Connect to the ESP32’s TX pin (e.g., GPIO17).CHIP_EN
– Chip enable. This pin must be pulled HIGH (3.3V) to activate the module. If left floating or LOW, the sensor will remain in a disabled state and won’t respond to UART communication.
Note: The RD-01 is a 3.3V-only device. All GPIOs and power lines must adhere to this voltage level. Connecting it directly to 5V logic may cause permanent damage.
Wiring with ESP32
To connect the RD-01 radar sensor to an ESP32 using UART, follow the wiring instructions below. This configuration uses UART2, commonly assigned to GPIO16 and GPIO17, and includes a required enable line for proper module operation:
3V3
(red wire) → 3.3V on ESP32. Supplies power to the RD-01’s radar and microcontroller unit.GND
(black wire) → GND on ESP32. Provides a common electrical reference for the system.TX
(green wire) → GPIO16 (RX on ESP32). Transmits radar presence data from the RD-01 to the ESP32.RX
(blue wire) → GPIO17 (TX on ESP32). Sends commands from the ESP32 to configure or control the RD-01 module.CHIP_EN
(yellow wire) → 3.3V on ESP32. Required to enable the chip. Tie high during normal operation or control with a GPIO for reset functionality.
Communication Tip: Set the UART baud rate to 115200
, with 8 data bits, no parity, and 1 stop bit. Avoid leaving the CHIP_EN
pin floating—always pull high explicitly to ensure the module is active and responsive.
Troubleshooting Guide
Common Issues
🚫 No Data Received
Issue: The ESP32 receives no data from the sensor.
Ensure correct wiring: verify that TX and RX lines are properly connected, and confirm that the UART baud rate is set to 115200 bps. Also, ensure that the sensor is powered with a stable 3.3V supply and that the CHIP_EN pin is set to high.
❌ Presence Not Detected
Issue: The sensor does not detect presence even when someone is in range.
Check the sensor's field of view and ensure there are no obstructions. Verify that the sensor's configuration parameters are set correctly for the desired detection range and sensitivity.
⚠️ Intermittent Detection
Issue: Sensor intermittently detects presence or fails to maintain detection.
Ensure that the sensor is securely mounted and not subject to vibrations. Check for sources of interference in the environment that may affect radar performance.
🔌 UART Initialization Fails
Issue: UART component in ESPHome reports failure to initialize.
Verify that the UART pins specified in the configuration match the physical connections. Ensure that no other devices are using the same UART bus, and that the baud rate is correctly set to 115200 bps.
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
ESPHome Example
external_components:
- source:
type: git
url: https://github.com/tsunglung/esphome-rd01
refresh: 0s
uart:
id: uart_bus
tx_pin: GPIO17
rx_pin: GPIO16
baud_rate: 115200
rd01:
id: rd01_sensor
binary_sensor:
- platform: rd01
presence:
name: "RD-01 Presence"
sensor:
- platform: rd01
distance:
name: "RD-01 Distance"
motion:
name: "RD-01 Motion"
This ESPHome configuration sets up the RD-01 sensor using a custom component. The UART interface is configured with a baud rate of 115200. The binary_sensor
detects presence, while the sensor
entries provide distance and motion data. Ensure that the UART pins are correctly connected and that the sensor is powered with a stable 3.3V supply.
Conclusion
The ESP32 Ai-Thinker RD-01 24GHz 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.