0% found this document useful (0 votes)
83 views14 pages

LD2450 Serial Port Communication Protocol V1.03

The document outlines the communication protocol for the HLK-LD2450 Motion Target Detection and Tracking Module by Shenzhen Hi-Link Electronic Co., Ltd. It details the pin definitions, configuration commands, and various commands for tracking modes, baud rate settings, and Bluetooth control. Additionally, it provides information on the data output format and includes a revision history and technical support contact information.

Uploaded by

Jamie Wardly
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
83 views14 pages

LD2450 Serial Port Communication Protocol V1.03

The document outlines the communication protocol for the HLK-LD2450 Motion Target Detection and Tracking Module by Shenzhen Hi-Link Electronic Co., Ltd. It details the pin definitions, configuration commands, and various commands for tracking modes, baud rate settings, and Bluetooth control. Additionally, it provides information on the data output format and includes a revision history and technical support contact information.

Uploaded by

Jamie Wardly
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Shenzhen Hi-Link Electronic Co.

,Ltd

HLK-LD2450
Motion Target Detection and Tracking Module

Serial Communication Protocol

Version:V1.03 Revise date:2023-10-17 All rights reserved © Shenzhen Hi-link Electronic..co Ltd
Shenzhen Hi-Link Electronic Co.,Ltd
LD2450

Content
1 Communication Interface Introduction .......................................................................................... 4
1.1 Pin definitions ............................................................................................................................. 4
1.2 Use and configuration ................................................................................................................ 4
1.2.1 Typical application circuit .................................................................................................. 4
1.2.2 Visualization upper tool description .................................................................................. 4
2 Communications Protocol ................................................................................................................ 6
2.1 Protocol format ...........................................................................................................................6
2.1.1 Protocol data format ........................................................................................................... 6
2.1.2 Command protocol frame format ...................................................................................... 6
2.2 Send command with ACK ......................................................................................................... 7
2.2.1 Enable configuration commands ........................................................................................7
2.2.2 End configuration commands .............................................................................................7
2.2.3 Single target tracking .......................................................................................................... 7
2.2.4 Multi target tracking ........................................................................................................... 8
2.2.5 Query target tracking mode ............................................................................................... 8
2.2.6 Read firmware version command ...................................................................................... 8
2.2.7 Setting the serial port baud rate .........................................................................................9
2.2.8 Restore factory setting .........................................................................................................9
2.2.9 Restart module ...................................................................................................................10
2.2.10 Bluetooth setup ................................................................................................................ 10
2.2.11 Get mac address ...............................................................................................................10
2.2.12 Query the current zone filtering configuration .............................................................11
2.2.13 Setting up regional filtering configurations ...................................................................12
2.3 Radar data output protocol ..................................................................................................... 12
2.4 Radar command configuration method ..................................................................................13
3 Revision History .............................................................................................................................. 14
4 Technical Support and Contact ..................................................................................................... 14

Page 2 / 14
Shenzhen Hi-Link Electronic Co.,Ltd
LD2450

Chart Index
Table 1 Pin definition ........................................................................................................................4
Table 2 Send command protocol frame format ............................................................................. 6
Table 3 Transmit in-frame data format ..........................................................................................6
Table 4 ACK command protocol frame format .............................................................................6
Table 5 ACK intra-frame data format ............................................................................................6
Table 6 Serial baud rate selection ....................................................................................................9
Table 7 Factory default configuration values .................................................................................9
Table 8 Regional filtering configuration value format ................................................................11
Table 9 Reported data frame format ............................................................................................ 12
Table 10 In-frame data format ...................................................................................................... 12

Figure 1 Module pin definition diagram .........................................................................................4


Figure 3 Illustration of the effect of zone filtering configuration ...............................................11
Figure 3 Radar command configuration flow .............................................................................. 13

Page 3 / 14
Shenzhen Hi-Link Electronic Co.,Ltd
LD2450

1 Communication Interface Introduction


1.1 Pin definitions

Figure 1 Module Pin Definition Diagram

Pin Function
5V Power supply input 5V
GND Power ground
Tx Serial port Tx pin
Rx Serial port Rx pin

Table 1 Pin Definition

1.2 Use and configuration


1.2.1 Typical application circuit
LD2450 module directly through the serial port in accordance with the prescribed protocol for
the detection of the results of the data output, the serial port output data contains up to three target
position and speed and other information, the user can be flexible according to the specific
application scenarios.
The module supply voltage is 5V and the input power supply capacity is required to be greater
than 200mA.
The module IO output level is 3.3 V. The default baud rate of the serial port is 256000, 1 stop
bit, no parity bit.

1.2.2 Visualization upper tool description


Our company provides the visualization of LD2450 upper computer demonstration software,
which is convenient for users to intuitively experience the positioning and tracking effect of the radar

Page 4 / 14
Shenzhen Hi-Link Electronic Co.,Ltd
LD2450
module on the target.
How to use the upper tool:
1. Use the USB to Serial tool to connect the module serial port correctly, please refer to Table 1
Pin Definition Table for the module pin description;
2. Open ICLM_MTT.exe PC tool software, click the Detect Device button, the PC software
automatically searches for the LD2410 module through the serial port; after the module is detected,
the PC software will have a prompt as follows.

3. Then click the start button, the upper computer software will receive the detection data reported
by the LD2450 module and display it on the software surface in real time.

The display includes the real-time positions of up to three targets on a sector map, with distance,
angle and speed information for each target.

Page 5 / 14
Shenzhen Hi-Link Electronic Co.,Ltd
LD2450

2 Communications Protocol
This communication protocol is mainly for users who need to do secondary development away
from the visualization tool. the LD2450 communicates with the outside world through a serial port
(TTL level). Radar data output and parameter configuration commands are carried out under this
protocol. The default baud rate of the radar serial port is 256000, 1 stop bit, no parity bit.

2.1 Protocol format


2.1.1 Protocol data format
The LD2450's serial data communication uses the little-end format, and all data in the following
tables are in hexadecimal.

2.1.2 Command protocol frame format


The protocol-defined radar configuration commands and ACK command formats are shown in
Tables 1 through 4.
Table 2 Send command protocol frame format
Header In-frame data length In-frame data End of frame
FD FC FB FA 2 bytes See Table 3 04 03 02 01

Table 3 Transmit in-frame data format


Command word (2 bytes) Command value (N bytes)

Table 4 ACK command protocol frame format


Header In-frame data length In-frame data End of frame
FD FC FB FA 2 bytes See Table 5 04 03 02 01

Table 5 ACK intra-frame data format


Send Command Word | 0x0100 (2 bytes) Return value (N bytes)

Page 6 / 14
Shenzhen Hi-Link Electronic Co.,Ltd
LD2450

2.2 Send Command with ACK


2.2.1 Enable configuration commands
Any other orders issued to the radar must be issued after this order or they are invalid.
Command word: 0x00FF
Command value: 0x0001
Return value: 2 bytes ACK status (0 success, 1 failure) + 2 bytes protocol version (0x0001) + 2 bytes
buffer size (0x0040)
Send data:
FD FC FB FA 04 00 FF 00 01 00 04 03 02 01

Radar ACK(success):
FD FC FB FA 08 00 FF 01 00 00 01 00 40 00 04 03 02 01

2.2.2 End configuration commands


End Configuration command, the radar restores the working mode after execution. If you need to
issue other commands again, you need to send the enable configuration command first.
Command word: 0x00FE
Command value: none
Return Value: 2 byte ACK status (0 success, 1 failure)
Send data:
FD FC FB FA 02 00 FE 00 04 03 02 01

Radar ACK(success):
FD FC FB FA 04 00 FE 01 00 00 04 03 02 01

2.2.3 Single target tracking


Set to single target tracking
Command word: 0x0080
Command value: none
Return value: 2 byte ACK status (0 success, 1 failure)
Send data:
FD FC FB FA 02 00 80 00 04 03 02 01
Radar ACK(success):
FD FC FB FA 04 00 80 01 00 00 04 03 02 01

Page 7 / 14
Shenzhen Hi-Link Electronic Co.,Ltd
LD2450
2.2.4 Multi target tracking
Set to multi-target tracking
Command word: 0x0090
Command value: none
Return value: 2 byte ACK status (0 success, 1 failure)
Send data:
FD FC FB FA 02 00 90 00 04 03 02 01
Radar ACK(success):
FD FC FB FA 04 00 90 01 00 00 04 03 02 01

2.2.5 Query target tracking mode


Queries the current target tracking of the module, the default value is multi-target tracking.
Command word: 0x0091
Command value: none
Return Value: 2 bytes ACK status (0 success, 1 failure) + 2 bytes tracking mode value (0x0001
single target tracking, 0x0002 multi-target tracking)
Send data:
FD FC FB FA 02 00 91 00 04 03 02 01
Radar ACK(success):
FD FC FB FA 06 00 91 01 00 00 01 00 04 03 02 01
The return value 0x0001 means that it is currently in single-target tracking mode.

FD FC FB FA 06 00 91 01 00 00 02 00 04 03 02 01
The return value of 0x0002 means that it is currently in multi-target tracking mode.

2.2.6 Read firmware version command


This command reads the radar firmware version information.
Command word: 0x00A0
Command value: none
Return Value: 2 bytes ACK status (0 success, 1 failure) + 2 bytes firmware type (0x0000) + 2 bytes
major version number + 4 bytes minor version number
Send data:
FD FC FB FA 02 00 A0 00 04 03 02 01
Radar ACK(success):
FD FC FB FA 0C 00 A0 01 00 00 00 00 02 01 16 24 06 22 04 03 02 01
The corresponding version number is V1.02.22062416.

Page 8 / 14
Shenzhen Hi-Link Electronic Co.,Ltd
LD2450
2.2.7 Setting the serial port baud rate
This command is used to set the baud rate of the serial port of the module, the configured value is not
lost when power down, and the configured value takes effect after restarting the module.
Command Word: 0x00A1
Command value: 2-byte baud rate selection index
Return Value: 2 bytes ACK status (0 success, 1 failure)
Table 6 Serial baud rate selection
Baud rate selection index value Baud rate
0x0001 9600
0x0002 19200
0x0003 38400
0x0004 57600
0x0005 115200
0x0006 230400
0x0007 256000
0x0008 460800
The factory default value is 0x0007, which is 256000.
Send data:
FD FC FB FA 04 00 A1 00 07 00 04 03 02 01
Radar ACK(success):
FD FC FB FA 04 00 A1 01 00 00 04 03 02 01

2.2.8 Restore factory setting


This command is used to restore all configuration values to unfactory values, and the configuration
values take effect after rebooting the module.
Command Word: 0x00A2
Command value: none
Return Value: 2 byte ACK status (0 success, 1 failure)
Send data:
FD FC FB FA 02 00 A2 00 04 03 02 01
Radar ACK(success):
FD FC FB FA 04 00 A2 01 00 00 04 03 02 01
The factory default configuration values are as follows:
Table 7 Factory default configuration values
Configuration item Default value
Serial port baud rate 256000
Bluetooth switch Turn on
Tracking mode Multi-target tracking
Area filtering function Turn off

Page 9 / 14
Shenzhen Hi-Link Electronic Co.,Ltd
LD2450
2.2.9 Restart module
The module receives this command and will automatically reboot after the answer is sent.
Command word: 0x00A3
Command value: none
Return Value: 2 bytes ACK status (0 success, 1 failure)
Send data:
FD FC FB FA 02 00 A3 00 04 03 02 01

Radar ACK(success):
FD FC FB FA 04 00 A3 01 00 00 04 03 02 01

2.2.10 Bluetooth setup


This command is used to control the Bluetooth on or off, the Bluetooth function of the module is on
by default. The configured value is not lost when power down, and the configured value takes effect
after restarting the module.
Command word: 0x00A4
Command value: 0x0100 turn on bluetooth 0x0000 turn off bluetooth
Return value: 2-byte ACK status (0 success, 1 failure)
Send data:
FD FC FB FA 04 00 A4 00 01 00 04 03 02 01
Indicates Bluetooth is turned on.

Radar ACK(success):
FD FC FB FA 04 00 A4 01 00 00 04 03 02 01

2.2.11 Get mac address


This command is used to query the MAC address
Command word: 0x00A5
Command value: 0x0001
Return Value: 2 bytes ACK status (0 success, 1 failure) + 1 byte fixed type (0x00) + 3 bytes MAC
address (big end sequence)
Send data:
FD FC FB FA 04 00 A5 00 01 00 04 03 02 01

Radar ACK(success):
FD FC FB FA 0A 00 A5 01 00 00 8F 27 2E B8 0F 65 04 03 02 01
The queried mac address is: 8F 27 2E B8 0F 65

Page 10 / 14
Shenzhen Hi-Link Electronic Co.,Ltd
LD2450
2.2.12 Query the current zone filtering configuration
This command queries the current zone filtering configuration of the module
Command word: 0x00C1
Command value: none
Return: 2 bytes ACK status (0 success, 1 failure) + 2 bytes area filter type + 24 bytes area coordinate
configuration

Regional 2- Regional 3-
Type of regional filtering Regional 1-coordinate setting
coordinate setting coordinate setting

Setting the coordinate values of the


diagonal two vertices of the rectangular
region; The format of the The format of the
signed int16 type
Each vertex is represented by X and Y setting value is the setting value is the
0 Disable region filtering
coordinates, respectively, and the same as the format same as the format
1 Detect only the set region
format of the coordinate values is of of the area 1 of the area 1
2 Do not detect the set area
type signed int 16 in mm; setting. setting.
All coordinate values of 0 means this
area is not used.
Table 8 Regional filtering configuration value format

Send data:
FD FC FB FA 02 00 C1 00 04 03 02 01
Radar ACK(success):
FD FC FB 1E C1 00 01 E803 E803 0000 0000 0000 0000 04 03
FA 00 01 00 00 18FC 8813 0000 0000 0000 0000 02 01
Represents the current configuration: only detect targets in the rectangular area delineated by two
diagonal vertices with coordinates (1000,1000) and (-1000,5000), corresponding to the detection
range of the red box area as follows.

Figure 3 Illustration of the effect of zone filtering configuration

Page 11 / 14
Shenzhen Hi-Link Electronic Co.,Ltd
LD2450
2.2.13 Setting up regional filtering configurations
This command is used to set the region filtering configuration of the module, the configuration value
will not be lost when power down, and it takes effect immediately after setup.
Command word: 0x00C2
Command value: 26 bytes of region filtering configuration value, see Table 8 Region filtering
configuration value format.
Return value: 2-byte ACK status (0 success, 1 failure)
Send data:
FD FC FB 1C C2 02 E803 E803 18FC 0000 0000 0000 0000 0000 04 03 02
FA 00 00 00 8813 0000 0000 0000 01
Represents the setting of not detecting targets in the rectangular area delimited by the coordinates of the two
diagonal vertices (1000,1000) and (-1000,5000).

Radar ACK(success):
FD FC FB FA 04 00 C2 01 00 00 04 03 02 01

2.3 Radar data output protocol


The LD2450 module communicates with the outside world through the serial port and outputs
information about the detected target, including the x-coordinate and y-coordinate in the area, as well
as the velocity value of the target.
The default baud rate of the radar serial port is 256000, 1 stop bit, no parity bit.
The data format reported by the radar is shown in the table below, 10 frames per second.
Header In-frame data End of frame
Goal 1 information Goal 2
AA FF 03 00 55 CC
information Goal 3 information
Table 9 Reported data frame format

The specific information contained in the individual targets is shown in the table below
Target X coordinate Target Y coordinate Target speed Distance resolution

signed int 16 type, the


signed int 16 type, the signed int 16 type, the highest bit 1 corresponds to
highest bit 1 corresponds highest bit 1 corresponds the positive speed, 0 uint16 type,
to positive coordinates, 0 to positive coordinates, 0 corresponds to the negative individual distance
corresponds to negative corresponds to negative speed, and the other 15 bits gate size in mm
coordinates, unit: mm coordinates, unit: mm correspond to the speed in
cm/s.
Table 10 In-frame data format

Example of data:
AA FF 03 00 0E 03 B1 86 10 00 40 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 CC
This set of data indicates that the radar is currently tracking a target i.e. target 1 (blue field in the
example), and target 2 and target 3 (corresponding to the red and black fields in the example
respectively) do not exist, so their corresponding data segment is 0x00. The process of converting the

Page 12 / 14
Shenzhen Hi-Link Electronic Co.,Ltd
LD2450
data of target 1 into relevant information is demonstrated as follows:
Target 1 X coordinate: 0x0E + 0x03 * 256 = 782 0 - 782 = -782 mm
Target 1 Y coordinate: 0xB1 + 0x86 * 256 = 34481 34481 - 2^15 = 1713 mm
Target 1 speed: 0x10 + 0x00 * 256 = 16 0 -16 = -16 cm/s
Target 1 distance resolution: 0x40 +0x01* 256 = 320 mm

2.4 Radar command configuration method


The process of LD2450 radar executing a configuration command consists of two parts: the
upper computer "sends command" and the radar "replies to command ACK". If the radar does not
reply with ACK or fails to reply with ACK, it means that the radar fails to execute the configuration
command.
As mentioned above, before sending any other commands to the radar, the developer needs to
send the "Enable Configuration" command first, and then send the configuration command within
the specified time. After the command configuration is completed, send the "end configuration"
command to inform the radar that the configuration has been completed.
For example, if you want to read the radar configuration parameters, firstly, the host computer
sends the "enable configuration" command; after receiving the radar ACK successfully, it sends the
"read parameters" command; after receiving the radar ACK successfully, it sends the "end
configuration" command at last. After receiving the successful radar ACK, then send the "read
parameters" command; after receiving the successful radar ACK, finally send the "end
configuration" command; after the successful radar ACK, it indicates that the complete action of
reading parameters is finished.
The radar command configuration flow is shown below.

Figure 3 Radar command configuration flow

Page 13 / 14
Shenzhen Hi-Link Electronic Co.,Ltd
LD2450

3 Revision History
Data Version Contents of the modification

2023-8-2 1.01 Initial version

Configuration commands related to


2023-9-7 1.02
adding zone filtering

Add tracking mode query command


2023-10-17 1.03
Optimize default value description

4 Technical Support and Contact

Shenzhen Hi-Link Electronic Co.,Ltd


Add:301, Building 1, 1970 Science and Technology Park, Minzhi Community,
Minzhi Street, Longhua District, Shenzhen
Tel:0755-23152658/83575155
Email: [email protected]
Web:www.hlktech.net

Page 14 / 14

You might also like