ESP32 LD2411S Human Presence Sensor

LD2411S Human Presence Sensor image

LD2411S

Protocol: UART

Overview

The LD2411S is a 24GHz mmWave radar sensor for human presence detection, supporting both motion and micro-motion detection. It includes Bluetooth functionality for configuration and firmware updates. Due to its unique UART communication protocol, it is not widely compatible with standard libraries.

About LD2411S Human Presence Sensor

The LD2411S is a 24GHz mmWave radar sensor designed for human presence detection. It features both motion and micro-motion detection capabilities, with a detection range of up to 6 meters. The sensor includes Bluetooth functionality, allowing for configuration and firmware updates via the HLKRadarTool app. However, due to its unique UART communication protocol, it is not widely compatible with standard libraries. For more information on the LD2410 series, see LD2410.

Where to Buy

LD2411S Human Presence Sensor

Starting from

$8 per unit

Amazon com
Amazon.com Ships worldwide
View Price
Amazon de
Amazon.de Ships to EU
View Price
Aliexpress
AliExpress Best value
View Price

Prices are subject to change. We earn from qualifying purchases as an Amazon Associate.

Technical Specifications

Interface UART (115200 baud)
Detection Range 0.3–6 meters
Detection Field ±45°
Power Supply 5V DC
Output UART, GPIO
Resolution ±5cm
Operating Temperature -20°C to +85°C
Dimensions 35mm × 35mm
Pin Spacing 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 LD2411S module is a compact, high-precision 24GHz radar sensor capable of detecting both motion and stationary presence. It includes a UART interface for data communication and configuration, along with a digital output pin for immediate presence indication. The pin layout is as follows:

  • VIN – Power input pin. Connect to a regulated 5V source. Supplying the correct voltage is essential for reliable performance and sensor longevity.
  • GND – Ground connection. This must be tied to the same ground as the ESP32 or host microcontroller to ensure proper UART signaling and power stability.
  • TXD – UART transmit pin. Outputs data from the LD2411S. This pin should be connected to the RX pin (e.g., GPIO16) on the ESP32.
  • RXD – UART receive pin. Receives configuration or control commands from the host. Connect this pin to the TX pin (e.g., GPIO17) of the ESP32.
  • OUT – Optional digital output pin. This line goes HIGH (3.3V logic) when presence is detected. It is useful for triggering external interrupts, LEDs, or simple binary logic systems.

Note: While powered via 5V, the OUT signal operates at 3.3V logic, making it safe to connect directly to ESP32 GPIOs without level shifting.

Wiring with ESP32

The LD2411S can be connected to an ESP32 for UART-based communication and optional presence signaling via the OUT pin. Below is a recommended wiring setup, typically using UART2 on the ESP32:

  • VIN (red wire) → 5V on ESP32. Provides the main supply voltage for the sensor’s radar and MCU circuitry.
  • GND (black wire) → GND on ESP32. This common ground reference is essential for clean UART signals and electrical stability.
  • TXD (green wire) → GPIO16 (RX on ESP32). This connection enables the ESP32 to receive real-time radar data from the LD2411S.
  • RXD (blue wire) → GPIO17 (TX on ESP32). This line allows the ESP32 to send configuration parameters to the sensor module.
  • OUT (yellow wire, optional) → GPIO18 on ESP32 if you want to monitor the presence signal directly using a GPIO interrupt or polling logic.

Important: Set the ESP32 UART baud rate to 115200 to match the LD2411S protocol. Also, ensure that BLE is disabled if using a UART-over-Bluetooth firmware, as some versions may conflict with the serial interface.

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
🛠️

PlatformIO Example

C++
🐍

MicroPython Example

Python

Conclusion

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