| Menu | JAQForum Ver 19.10.27 |
Forum Index : Microcontroller and PC projects : Pico Radar
|
||||||
Nice |
||||||
what they think of next? ![]() |
||||||
Data Structure and Meaning for RD-03D Radar Module The data received from the RD-03D radar module consists of a series of bytes that represent different attributes of detected targets. Here’s a breakdown of the typical data structure to help you understand what each byte represents. Data Frame Structure A typical data frame from the RD-03D contains several fields that provide information about detected objects. Below is a common structure: Header (2 bytes): Identifies the start of the data frame. Length (1 byte): Specifies the total length of the data packet. Target Count (1 byte): Indicates how many targets are detected. Targets Data (n * [Data Fields]): Contains information about each detected target. Checksum (1 byte): Used for data integrity verification. Example Data Frame Breakdown Here’s a conceptual example for parsing a data frame: plaintext Copy Code 0xFD 0xFC | Length | Target Count | Target 1 Data | Target 2 Data | ... | Checksum Target Data Fields Each target's data typically includes the following details: Distance (2 bytes): Represents the distance to the target in centimeters. A value of 0x0001 corresponds to 1 cm. Speed (2 bytes): The speed of the target in centimeters per second (cm/s). A positive value indicates approach, while a negative value indicates retreat. Angle (2 bytes): Angle relative to the radar in degrees multiplied by a scaling factor (e.g., 0.1). For example, a value of 0x01F4 would represent 31.4 degrees. Width (2 bytes): Target's physical width in centimeters. Height (2 bytes): Target's physical height in centimeters. Example of Parsed Data Assuming you receive the following sample data frame: plaintext Copy Code 0xFD 0xFC | 0x06 | 0x02 | 0x00 | 0x64 | 0x00 | 0x1E | 0x00 | 0x0A | 0x00 | 0x0C | 0xB4 Interpretation: Header: 0xFD 0xFC Length: 0x06 bytes Target Count: 0x02 (two targets detected) Target 1: Distance: 0x0064 (100 cm) Speed: 0x0001E (30 cm/s) Angle: 0x000A (1.0 degrees) Width: 0x000C (12 cm) Height: 0x00B4 (180 cm) Checksum: Validates data integrity. Only £7 on Amazon ![]() |
||||||
Paintball marker on rotary table. Servo for elevation. Solenoid for trigger. Wonder if I can get access to Backshed from jail? 😂 🤣 |
||||||
Those guys: "We have created a library" WTF! How are people supposed to learn when everything is pre-packaged. This is another reason why MMBasic should be the standard for education. |
||||||
Those who want to learn will read the code. Those who just want to use the device will likely use the library and have no wish to spend time reading its implementing code. Overall, so much better than closed source. John |
||||||
You raise a good point about learning. I recently said to an associate that I liked mmbasic because it was easy to learn (actually a lot of 80’s recall) and that I just could not get my head around C++ and understand it’s different way of programming, hence why I parked my Arduino and R Pi and jumped at the CMM2. “Not a problem” says he “just use ChatGPT to write your code”. So who needs to learn anything now, just ask AI and use pre made libraries. I agree with your “WTF!” |
||||||
If everybody it learning one day from AI, from whom will AI be learning? ;) A pretty good project! Edited 2025-11-16 02:04 by v.lenzer |
||||||
I am very interested in that detailed MMbasic-Code, because I wish to modfify it only for monitoring of a single person. Greets Wolfgang Edited 2025-11-16 03:30 by Wolfgang |
||||||
Wolfgang, attached you can find some basic code I've written for a LD2450LD radar module which should be the same as the module mentioned in this thread. The code is not optimized for runtime or stability but for readability and simplicity. I could not find any datasheet for the RD-03D module describing the serial protocol but some blog entries which did use the same record layout as I do. So I assume they are identical, at least they do look identically. The program assumes only one target and uses the factory default settings. LD2450LD.zip Gerald |
||||||
G'day all, Au$17.25 is pretty amazing. Will it detect/differentiate cats? (the neighbour has seven!) Cheers, Andrew Edited 2025-11-16 17:49 by Andrew_G |
||||||
@ville56 Thank you very much for this Pico programme. It is very impressive for me and thank you for your efforts in creating it. I can take a lot from it. The comments will help me to put the LD2450 into operation. I have this version: ![]() |
||||||
Wolfgang, the radar on the photo is not a RD-03D or an requivalent like my device as mentioned in the thread. So this uses a different protocol. Have to look it up, but the principle should be the same. Have you more Information about the type of your radar so I can make modification to the code accordingly? |
||||||
@ville56 I found the Serial Protocol pdf again as a *.pdf file here. I didn't want to post my pdf here because of its length. I hope the link is still valid. https://naylampmechatronics.com/img/cms/001080/Protocolo_comunicacion_serial_LD2410C.pdf Thank you in advance for your effort and support. I really appreciate it. Greets Wolfgang |
||||||
Wolfgang, the link works. The LD2410C is a different class of device, the protocol is a bit more complex and the documentation is as bad as it can be ... partially unclear and inconsistent. So I had to order one to dissect the protocol on a live part. Should arrive here end of next week. For the beginning, the serial interface should run on 256000 Bd, a default frame should be 23 bytes long if I'm not wrong, and the header should be F4 F3 F2 F1. The rest of the data sent is, for me, more or less understandably described in the manual. But I didn't read every detail ... The biggest difference to the LD2540 seems to be that there is is no coordinate information available from the LD2410 but distance only. Anyway, will have some experiments as soon as the part is here ... and I will tell you what I found out ![]() |
||||||
I think it's an HLK-LD2420 that I have here. Does it use the same protocol? Actually, I only need one switch output—but that's exactly what this module isn't supposed to do... Frank |
||||||
I think that the manual for the LD2450 is the closest match to the RD-03D LD2450_Serial_Communication_Protocol_V1.02_EN.pdf This may also be of some use rd-03d_multi-target_trajectory_tracking_user_manual.pdf A Google search for both will find them. It will be 2 weeks before I can test one. Jim |
||||||
| The Back Shed's forum code is written, and hosted, in Australia. |