ESP32 MR24HPB1 Human Presence Radar Sensor

MR24HPB1 Human Presence Radar Sensor image

MR24HPB1

Protocol: UART

Overview

The MR24HPB1 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.

About MR24HPB1 Human Presence Radar Sensor

The MR24HPB1 is a 24GHz mmWave radar sensor designed for human presence detection. Utilizing FMCW (Frequency Modulated Continuous Wave) technology, it can detect both moving and stationary human targets within a range of up to 6 meters. The sensor provides real-time data on motion speed, distance, and presence intensity, making it suitable for applications such as smart lighting, security systems, and occupancy monitoring. For more information, refer to the official datasheet: MR24HPB1 Datasheet.

Technical Specifications

Interface UART (115200 baud)
Detection Range Up to 6 meters
Detection Field ±45° horizontal, ±25° vertical
Power Supply 5V DC
Output UART
Operating Temperature -20°C to +85°C
Dimensions 35mm × 30mm × 9mm
Pin Width 2.54mm

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 MR24HPB1 is a 24GHz FMCW radar sensor from Seeed Studio, designed for accurate human presence and motion detection. It features a simple UART communication interface and operates at 5V. The available pins are:

  • 5V – Power input. Connect to a stable 5V DC source. This powers the internal radar and processing circuits. Ensure the power source can handle current spikes during radar bursts.
  • GND – Ground connection. Connect this pin to the ground of your ESP32 or power supply. This establishes the common reference needed for both power and UART signal integrity.
  • TX – UART transmit pin. Sends sensor data (such as presence status, motion intensity, distance) from the MR24HPB1 to a host microcontroller. Connect this to the ESP32's RX pin (e.g., GPIO16).
  • RX – UART receive pin. Receives configuration commands or query requests from the ESP32. Connect this to the ESP32’s TX pin (e.g., GPIO17).

Note: Although MR24HPB1 operates at 5V, the UART logic levels are often 3.3V tolerant. Confirm with the datasheet or test using a logic analyzer if unsure. If needed, use a logic level shifter between ESP32 and the sensor.

Wiring with ESP32

To connect the MR24HPB1 radar sensor to an ESP32 using UART for serial communication, follow the wiring plan below. This allows you to receive detailed movement and presence data in real-time:

  • 5V (red wire) → 5V pin on ESP32 or external 5V regulated supply. Ensures consistent operation of the radar module.
  • GND (black wire) → GND on ESP32. Provides a shared ground reference, critical for UART and power stability.
  • TX (green wire) → GPIO16 on ESP32 (UART RX). This line transmits sensor output to the ESP32 for processing or display.
  • RX (blue wire) → GPIO17 on ESP32 (UART TX). This allows the ESP32 to send configuration commands to the MR24HPB1 if needed.

Configuration Tip: Set the UART interface to 115200 baud, 8 data bits, no parity, and 1 stop bit (8N1). Confirm that no other peripherals (e.g., sensors, debug logs) are sharing UART2 (GPIO16/17), unless multiplexed intentionally.

Troubleshooting Guide

Common Issues

🚫 No Data Received

❌ Presence Not Detected

⚠️ Intermittent Detection

🔌 UART Initialization Fails

Debugging Tips

🔍 Serial Monitor

⚡ Voltage Checks

Code Examples

Arduino Example

C++
🏠

ESPHome Example

YAML

Conclusion

The ESP32 MR24HPB1 Human Presence 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.