The HLK-LD2410 is the definitive 24GHz sensor radar microwave for ESP32 projects in 2026, outputting target distance in centimeters via a 256000-baud UART serial stream. Unlike older 5.8GHz Doppler modules that only yield a simple HIGH/LOW GPIO pulse, the LD2410 uses Frequency-Modulated Continuous Wave (FMCW) to separate moving and static targets across 8 configurable spatial gates. To interface it, wire the TX/RX pins to your ESP32 hardware serial port, supply 5V to VCC, and parse the 9-byte data frame to extract exact physical distances.

How 24GHz Microwave Radar Sensors Actually Work

Modern 24GHz mmWave sensors rely on Frequency-Modulated Continuous Wave (FMCW) rather than simple Doppler shift. The module continuously transmits a frequency "chirp" that sweeps across a narrow band. When this signal bounces off a target and returns, the module mixes the received echo with the currently transmitting frequency. The difference between these two frequencies (the beat frequency) is directly proportional to the distance of the object, while phase changes in the returning wave map to micro-movements like breathing or typing.

This physics-based separation is why a sensor radar microwave can distinguish between a stationary human sitting on a couch (static target) and a ceiling fan spinning overhead (moving target). By dividing the detection field into discrete "gates" (typically 0.75 meters deep each), the microcontroller can apply different sensitivity thresholds to the foreground versus the background, effectively ignoring a moving curtain while still detecting a sleeping person in bed.

Hardware Specs and Module Comparison

Before wiring, verify you have the right module. The market is flooded with legacy 5.8GHz boards that will cause endless false-trigger headaches in modern smart homes. Here is how the current hardware stacks up.

Table 1: 2026 Sensor Radar Microwave Module Comparison
Model Frequency Interface Max Range Typical Price Best Application
HLK-LD2410 24GHz (FMCW) UART + GPIO 6m moving / 6m static $3.50 - $5.00 Room presence, sleep tracking, smart HVAC
HLK-LD2410C 24GHz (FMCW) UART + GPIO 6m moving / 6m static $2.50 - $3.50 Cost-restricted basic presence (no BT config)
RCWL-0516 5.8GHz (Doppler) GPIO + Analog ~9m (unshielded) $0.80 - $1.50 Outdoor floodlights, simple garage alarms
LD1115H 24GHz (Doppler) UART + GPIO 6m moving only $2.00 - $3.00 Budget moving-target detection (fails on static)
Bench Tip: Always buy the LD2410 over the LD2410C if you are prototyping. The standard LD2410 includes a Bluetooth Low Energy (BLE) radio that lets you configure gate sensitivities using the manufacturer's smartphone app before you write a single line of ESP32 code.

Wiring Pinouts and Output Signal Math

The LD2410 outputs two distinct signal types: a raw digital GPIO pulse for basic integration, and a structured UART serial stream for distance tracking. Do not conflate the two. The OUT pin simply goes HIGH when any target is detected. The TX pin streams the actual physical data.

Table 2: HLK-LD2410 to ESP32 Wiring Matrix
LD2410 Pin Function ESP32 Target Pin Notes & Supply Range
VCC Power Input 5V (VIN) Accepts 5V to 12V. Do not feed 3.3V; the internal LDO will brownout.
GND Ground GND Must share a common ground with the ESP32.
TX UART Transmit GPIO 16 (RX2) Outputs 3.3V logic. Safe for direct ESP32 connection.
RX UART Receive GPIO 17 (TX2) Used only for sending configuration commands to the sensor.
OUT Digital Trigger GPIO 4 (or any) Pull HIGH on target detection. No math required.

Decoding the UART Output: Raw Bytes to Centimeters

The UART output is what makes this sensor radar microwave worth the extra dollar over a PIR sensor. The module streams a continuous frame at 256000 baud. In standard engineering mode, the payload contains a 9-byte data sequence sandwiched between header and footer hex words.

The physical distance is encoded in Little-Endian format across two bytes. Here is the exact bitwise math to convert the raw serial buffer into physical centimeters:

// Assume 'buffer' is your validated 9-byte data payload
// Byte 0: Target State (0=None, 1=Moving, 2=Static, 3=Both)
uint8_t targetState = buffer[0];

// Bytes 1 & 2: Moving Target Distance (Little-Endian)
uint16_t movingDistance_cm = buffer[1] | (buffer[2] << 8);

// Bytes 4 & 5: Static Target Distance (Little-Endian)
uint16_t staticDistance_cm = buffer[4] | (buffer[5] << 8);

// Calculate total distance based on state
uint16_t finalDistance_cm = 0;
if (targetState == 1) finalDistance_cm = movingDistance_cm;
else if (targetState == 2) finalDistance_cm = staticDistance_cm;
else if (targetState == 3) finalDistance_cm = min(movingDistance_cm, staticDistance_cm); // Closest target
Calibration Note: The raw distance values do not require a mathematical scaling factor (like you would with an analog Sharp IR sensor), but they do require spatial calibration. By default, Gate 0 starts at 0 meters. If you mount the sensor on a wall and want to ignore the first 0.75 meters to avoid triggering on wall-hanging art, you must send a UART configuration command to set the "Maximum Detection Gate" and "Gate Sensitivity" registers.

Interference Sources and Mounting Rules

Microwave radar penetrates drywall, wood, and plastic. This is a feature until it becomes a bug. If your ESP32 logs phantom occupancy at 3:00 AM, you are likely dealing with environmental interference or improper mounting.

The 2.4GHz Wi-Fi Harmonic Problem

The most common failure mode for 24GHz sensors in DIY smart home builds is placing the sensor within 1 meter of a 2.4GHz Wi-Fi router or ESP32 antenna. While 24GHz is far from 2.4GHz, cheap router power amplifiers generate broadband noise and higher-order harmonics that can raise the noise floor of the radar's receiver frontend. This causes the static target energy readings to spike, resulting in false "room occupied" states. Fix: Maintain at least 1.5 meters of physical separation between your Wi-Fi access point and the radar module, or use the BLE app to lower the static sensitivity on Gates 0 and 1.

Metal Enclosures and the Faraday Effect

If you shove an RCWL-0516 or LD2410 inside an aluminum project box, you are building a Faraday cage, not a motion sensor. 5.8GHz signals are almost entirely blocked by thin sheet metal. The 24GHz mmWave signal of the LD2410 will also attenuate severely, dropping your effective range from 6 meters to less than 1 meter. Always mount the sensor behind ABS plastic, PLA (3D printed), or wood. If you must use a metal enclosure, you need to mill a window and cover it with a RF-transparent polycarbonate shield.

Moving Interference: HVAC and Fans

Because FMCW radar is sensitive to micro-movements, an HVAC ceiling vent blowing air across a room will cause curtains or indoor plant leaves to sway. The sensor will read this as a "moving target" and calculate a distance. To solve this via software, map the physical distance of the vent/plant (e.g., 3.5 meters) and use your ESP32 code to ignore moving target triggers that originate specifically from Gate 4 or 5, while keeping static human detection active in those same gates.

For authoritative configuration protocols and community-tested ESPHome integrations, refer to the ESPHome LD2410 documentation. If you are writing bare-metal Arduino C++, the ncmreynolds LD2410 Arduino library handles the CRC checks and frame parsing, saving you from writing custom state machines for the serial buffer.