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!
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
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"
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.