LD2410C Human Presence Sensor

View on Amazon
Overview
About LD2410C Human Presence Sensor
The LD2410C is a compact 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 6 meters. The sensor offers a digital OUT pin for simple presence detection and UART communication for advanced configurations. Unlike the LD2410 and LD2410B, which use 1.27mm pin spacing, the LD2410C features a standard 2.54mm pin spacing for easier breadboard and header integration. This makes it more convenient to prototype with development boards like the ESP32. For more information on the LD2410 series, see LD2410.
Get Your LD2410C
Prices are subject to change. We earn from qualifying purchases as an Amazon Associate.
LD2410C Specifications
Complete technical specification details for LD2410C Human Presence Sensor
📊 Technical Parameters
LD2410C Pinout
The **LD2410C** is a 5-pin 24GHz mmWave radar sensor with breadboard-friendly spacing:
Visual Pinout Diagram

Pin Types
Quick Tips
**Interface**: UART (256000 baud),📡 **Technology**: 24GHz FMCW radar,👤 **Detection**: Both stationary and moving human targets,📏 **Range**: 0.75 to 6 meters
**Field of View**: ±60° detection angle,🎚️ **Gates**: Configurable distance gates (0.75m resolution),⚡ **Power**: 5V-12V DC input range (5V recommended for ESP32)
**Pin Spacing**: 2.54mm (standard breadboard-compatible),💡 **OUT Logic**: 3.3V compatible, safe for ESP32 GPIO,🎯 **Applications**: Smart lighting, occupancy sensing, HVAC control, security systems
Pin Descriptions
| Pin Name | Type | Description | Notes |
|---|---|---|---|
1 VCC | Power | Power input | 5V to 12V DC (5V recommended) |
2 GND | Power | Ground connection | |
3 TX | Communication | UART transmit | Sends data from sensor (connect to ESP32 RX) |
4 RX | Communication | UART receive | Receives commands (connect to ESP32 TX) |
5 OUT | Communication | Digital presence output | 3.3V HIGH when presence detected (optional) |
Wiring LD2410C to ESP32
To interface the **LD2410C** with an **ESP32** for human presence detection via UART:
Visual Wiring Diagram

Connection Status
Protocol
Pin Connections
| LD2410C Pin | Connection | ESP32 Pin | Description |
|---|---|---|---|
1 VCC Required | 5V | Power supply (5V recommended) | |
2 GND Required | GND | Ground | |
3 TX Required | GPIO16 (RX2) | Sensor transmit to ESP32 receive | |
4 RX Required | GPIO17 (TX2) | Sensor receive from ESP32 transmit | |
5 OUT Optional | GPIO18 | Digital presence output (optional) |
**UART2**: Use UART2 on ESP32 (GPIO16/17 are default UART2 pins)
**Baud Rate**: 256000 bps - must match in firmware configuration
**Power**: Accepts 5V-12V, but 5V recommended for ESP32 compatibility
**TX/RX**: Connect sensor TX to ESP32 RX, sensor RX to ESP32 TX
**OUT Pin**: 3.3V logic level, safe for direct ESP32 GPIO connection
**Configuration**: Use HLK Radar Tool or ESPHome for gate sensitivity tuning
**Distance Gates**: 0.75m resolution, configurable for moving/stationary detection
**Breadboard**: 2.54mm pitch allows easy prototyping without adapters
LD2410C Troubleshooting
Common issues and solutions to help you get your sensor working
Common Issues
Issue: The ESP32 receives no data from the sensor.
Ensure correct wiring: swap TX and RX if needed, and confirm baud rate is set to 256000. Verify power is supplied at 5V.
Issue: The sensor does not detect presence even when someone is in range.
Check detection gates and sensitivity settings using the LD2410C configuration tool. Ensure ESPHome configuration matches sensor wiring.
Issue: Sensor intermittently detects presence or fails to maintain detection.
Adjust gate sensitivity or reposition sensor to minimize obstructions. Use the configuration tool for fine-tuning detection zones.
Issue: UART component in ESPHome reports failure to initialize.
Verify UART pins are correct, baud rate is 256000, and no other component is using the same UART bus.
Debugging Tips
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.
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
LD2410C Programming Examples
Ready-to-use code examples for different platforms and frameworks
#if defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_AVR_LEONARDO)
//ARDUINO_SAMD_NANO_33_IOT RX_PIN is D1, TX_PIN is D0
//ARDUINO_AVR_LEONARDO RX_PIN(RXI) is D0, TX_PIN(TXO) is D1
#define sensorSerial Serial1
#elif defined(ARDUINO_XIAO_ESP32C3) || defined(ARDUINO_XIAO_ESP32C6)
//RX_PIN is D7, TX_PIN is D6
#define sensorSerial Serial0
#elif defined(ESP32)
//Other ESP32 device - choose available GPIO pins
#define sensorSerial Serial1
#if defined(ARDUINO_ESP32S3_DEV)
#define RX_PIN 18
#define TX_PIN 17
#else
#define RX_PIN 16
#define TX_PIN 17
#endif
#else
#error "This sketch only works on ESP32, Arduino Nano 33IoT, and Arduino Leonardo (Pro-Micro)"
#endif
// User defines
// #define DEBUG_MODE
#define ENHANCED_MODE
#define SERIAL_BAUD_RATE 115200
//Change the communication baud rate here, if necessary
//#define LD2410_BAUD_RATE 256000
#include "MyLD2410.h"
#ifdef DEBUG_MODE
MyLD2410 sensor(sensorSerial, true);
#else
MyLD2410 sensor(sensorSerial);
#endif
unsigned long nextPrint = 0, printEvery = 1000; // print every second
void printValue(const byte &val) {
Serial.print(' ');
Serial.print(val);
}
void printData() {
Serial.print(sensor.statusString());
if (sensor.presenceDetected()) {
Serial.print(", distance: ");
Serial.print(sensor.detectedDistance());
Serial.print("cm");
}
Serial.println();
if (sensor.movingTargetDetected()) {
Serial.print(" MOVING = ");
Serial.print(sensor.movingTargetSignal());
Serial.print("@");
Serial.print(sensor.movingTargetDistance());
Serial.print("cm ");
if (sensor.inEnhancedMode()) {
Serial.print("
signals->[");
sensor.getMovingSignals().forEach(printValue);
Serial.print(" ] thresholds:[");
sensor.getMovingThresholds().forEach(printValue);
Serial.print(" ]");
}
Serial.println();
}
if (sensor.stationaryTargetDetected()) {
Serial.print(" STATIONARY= ");
Serial.print(sensor.stationaryTargetSignal());
Serial.print("@");
Serial.print(sensor.stationaryTargetDistance());
Serial.print("cm ");
if (sensor.inEnhancedMode()) {
Serial.print("
signals->[");
sensor.getStationarySignals().forEach(printValue);
Serial.print(" ] thresholds:[");
sensor.getStationaryThresholds().forEach(printValue);
Serial.print(" ]");
}
Serial.println();
}
if (sensor.inEnhancedMode() && (sensor.getFirmwareMajor() > 1)) {
Serial.print("Light level: ");
Serial.println(sensor.getLightLevel());
Serial.print("Output level: ");
Serial.println((sensor.getOutLevel()) ? "HIGH" : "LOW");
}
Serial.println();
}
void setup() {
Serial.begin(SERIAL_BAUD_RATE);
#if defined(ARDUINO_XIAO_ESP32C3) || defined(ARDUINO_XIAO_ESP32C6) || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_AVR_LEONARDO)
sensorSerial.begin(LD2410_BAUD_RATE);
#else
sensorSerial.begin(LD2410_BAUD_RATE, SERIAL_8N1, RX_PIN, TX_PIN);
#endif
delay(2000);
Serial.println(__FILE__);
if (!sensor.begin()) {
Serial.println("Failed to communicate with the sensor.");
while (true) {}
}
#ifdef ENHANCED_MODE
sensor.enhancedMode();
#else
sensor.enhancedMode(false);
#endif
delay(nextPrint);
}
void loop() {
if ((sensor.check() == MyLD2410::Response::DATA) && (millis() > nextPrint)) {
nextPrint = millis() + printEvery;
printData();
}
}The LD2410C is fully compatible with the same Arduino code used for the LD2410 sensor. You can refer to the MyLD2410 library and use identical UART wiring and commands. No code changes are required aside from ensuring proper voltage levels and UART configuration. See LD2410 Arduino Example for implementation details.
esphome:
name: ld2410_sensor
platform: ESP32
board: esp32dev
logger:
uart:
id: uart_bus
tx_pin: GPIO17
rx_pin: GPIO16
baud_rate: 256000
ld2410:
uart_id: uart_bus
binary_sensor:
- platform: ld2410
has_target:
name: "Presence Detected"
has_moving_target:
name: "Moving Target Detected"
has_still_target:
name: "Still Target Detected"
sensor:
- platform: ld2410
moving_distance:
name: "Moving Distance"
still_distance:
name: "Still Distance"
moving_energy:
name: "Moving Energy"
still_energy:
name: "Still Energy"
detection_distance:
name: "Detection Distance"
text_sensor:
- platform: ld2410
version:
name: "LD2410 Firmware Version"
mac_address:
name: "LD2410 MAC Address"ESPHome configurations for the LD2410C are identical to those used for the LD2410. You can use the same UART settings, component definitions, and binary/sensor blocks. Refer to the LD2410 ESPHome Integration for YAML examples.
platformio.ini
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
lib_deps =
iavorvel/MyLD2410@^1.0.2
monitor_speed = 115200main.cpp
#include <MyLD2410.h>
MyLD2410 radar;
void setup() {
Serial.begin(115200);
Serial2.begin(256000, SERIAL_8N1, 16, 17); // RX=16, TX=17
if (!radar.begin(&Serial2)) {
Serial.println("Failed to initialize LD2410 sensor");
while (true) {}
}
Serial.println("LD2410 initialized successfully");
}
void loop() {
radar.read();
if (radar.presenceDetected()) {
Serial.println("Presence detected");
Serial.print("Still distance: ");
Serial.println(radar.stillDistance());
Serial.print("Moving distance: ");
Serial.println(radar.movingDistance());
} else {
Serial.println("No presence");
}
delay(1000);
}The LD2410C is fully compatible with the same MyLD2410 PlatformIO library and example code used for the LD2410. You can use identical UART wiring (TX=17, RX=16) and no code changes are necessary to support LD2410C functionality. Refer to the LD2410 PlatformIO Example for a complete implementation using the PlatformIO environment.
from machine import UART
import time
# Initialize UART2: TX=17, RX=16, baud rate 256000
uart = UART(2, baudrate=256000, tx=17, rx=16)
# Function to read and print data from LD2410
def read_ld2410():
while True:
if uart.any():
data = uart.read()
if data:
print(data)
time.sleep(0.1)
read_ld2410()LD2410C supports the same UART communication protocol as the original LD2410, making it fully compatible with existing MicroPython code. You can use the same UART setup (TX=17, RX=16, baudrate=256000) and raw data reading scripts. For the base script and driver link, see the MicroPython section of the LD2410 documentation.
Wrapping Up LD2410C
The ESP32 LD2410C 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.
Best Practices
For optimal performance, ensure proper wiring and follow the recommended configuration for your chosen development platform.
Safety First
Always verify power supply requirements and pin connections before powering up your project to avoid potential damage.
Ready to Start Building?
Now that you have all the information you need, it's time to integrate the LD2410C into your ESP32 project and bring your ideas to life!







