Arduino UNO and LD2410C sensor

Hey Arduino Community,

I'm currently working on a project that involves interfacing an LD2410 device with my Arduino Uno board, and I could really use some assistance with the serial communication setup.

Hardware Setup:

  • I have the LD2410 connected to the Arduino Uno using the following pins:
    • LD2410 5V to Arduino 5V
    • LD2410 GND to Arduino GND
    • LD2410 TX to Arduino pin 10 (RX)
    • LD2410 RX to Arduino pin 11 (TX)

Problem: I'm having trouble establishing reliable serial communication between the LD2410 and Arduino Uno. I've tried several approaches, but I'm not getting the expected data, instead I get only question marks as the output for example "⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮"

Code Attempt: Here's the basic code I've tried so far:

#include <SoftwareSerial.h>

// Define the SoftwareSerial pins for RX and TX
SoftwareSerial ld2410Serial(10, 11); // RX, TX

void setup() {
  // Start the hardware serial communication at a baud rate of 9600:
  Serial.begin(9600);
  // Try different software serial baud rates:
  ld2410Serial.begin(19200); // Try other values like 4800, 19200, 57600, 115200
}

void loop() {
  // Check if data is available from the LD2410C:
  if (ld2410Serial.available()) {
    // Read the incoming data:
    String data = "";
    while (ld2410Serial.available()) {
      char c = ld2410Serial.read();
      data += c;
    }
    // Print the data to the Serial Monitor:
    Serial.println(data);
  }
}

Request for Help: I'm reaching out to the community for any advice, suggestions, or sample code that could help me establish successful serial communication between the LD2410 and Arduino Uno. If anyone has experience with this setup or similar devices, your insights would be greatly appreciated.

Additional Info:

  • I've verified the hardware connections multiple times to ensure they are correct.
  • Try different software serial baud rates

Thank you in advance for any assistance you can provide!

Best regards, Matan

Use a baud rate of 9600 because SoftwareSerial is not good at high baud rates. Don't put the received data into a String but test the serial link by just printing every character received

Report the results

Use of hardware UART pins is highly recommended, in order to support the out-of-the-box 256000 baud rate of the LD2410 sensor.

Source: LD2410 Sensor — ESPHome

Other sources say the same.

Add:

The default baud rate of the serial port is 256000, 1 stop bit, and no parity bit.

1 Like

Thanks,
I try to use this manual but failed to get a reasonable output.

Initializing LD2410...
Sent enable configuration command:
FD FC FB FA 04 00 FF 00 01 00 04 03 02 01
Received response: fefcfd0c00000000c08040000230a0c0
Configuration mode enabled.
Sent set maximum distance gate command:
FD FC FB FA 14 00 60 00 00 00 03 00 00 00 01 00 03 00 00 00 02 00 05 00 00 00 04 03 02 01
Received response: fefc7f020060000000020102c0
Maximum distance gate set to 3 meters.
Sent end configuration command:
FD FC FB FA 02 00 FE 00 04 03 02 01
Received response: fefcfd0280ff0000000220a0e0f2f1f2fe838001a52006721f00620000d580fcf3f6fef23fbf7e418040ee9806721f00620000d480f3f6fe
Configuration mode ended.
LD2410 configured for 3 meters detection.
Data received:
faf1f2fe838001ad3006721f006280d680f3f6fe
Invalid frame

Data received:
faf1f2fe838001ad3006721f006200005200fcf3f6fe
Invalid frame

Data received:
f2f1f2fe838001a52006721f00620000d580fcf3f6fe
Invalid frame

I have the same sensor, which I manage with an app on my iPhone. It works pretty well.

You pick on me when you wrote you want to manage it through Arduino. Since then, I want to do so.

As I have communication problem with an other Hi-Link product (HLK-LD8001B) , I've contact help desk - which is ... let see! -

LD2410C's user manual says « a PC configuration tool is provided » but I can not find any software for PC. I asked about that. The online helper said that there is kind of festival in China for now, she will contact me later.

For now, you may like to use the phone app to see your installed devices, look for "HLKradarTool"

how did you acheive to get into configuration mode and set a end to this mode ?

Hello everyone,

I received some documents from HiLink representative.
Then, I created a GitHub repository for the device. I guess, we will have to work together to make it work properly under Arduino.

Here is the GitHub repository

The document says « If you wand C or Python example code, write to us » so I did and wait for reply.

1 Like

Have you tried
https://www.waveshare.com/wiki/HMMD_mmWave_Sensor ?

For me and m,y HLK-LD8001D, doesn't work but it did open some doors. ... follow the discussion on this arduino forum

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.