LSLIDAR CH128X1 User manual

CH128X1
User Manual
V1.0.3
2022.12
LeiShen Intelligent System Co., LTD
http://www.lslidar.com/

Safety Instruction
Before using the product, please read and follow the instructions of this manual
carefully, and refer to relevant national and international safety regulations.
∆Attention
Please do not disassemble or modify the lidar privately. If you need special
instructions, please consult our technical support staff.
∆Laser Safety Level
The laser safety of this product meets the following standards:
● IEC 60825-1:2014
● 21 CFR 1040.10 and 1040.11 standards, except for the deviations (IEC 60825-
1, third edition) stated in the Laser Notice No. 56 issued on May 8, 2019. Please
do not look directly at the transmitting laser through magnifying devices (such
as microscope, head-mounted magnifying glass, or other forms of magnifying
glasses).
Eye Safety
The product design complies with Class 1 human eye safety standards. However,
to maximize self-protection, please avoid looking directly at running products.
∆Safety Warning
In any case, if the product is suspected to have malfunctioned or been damaged,
please stop using it immediately to avoid injury or further product damage.
Housing
The product contains high-speed rotating parts, please do not operate unless
the housing is fastened. Do not use a product with damaged housing in case of
irreparable losses. To avoid product performance degradation, please do not
touch the photomask with your hands.
Operation
This product is composed of metal and plastic, which contains precise circuit
electronic components and optical devices. Improper operations such as high
temperature, drop, puncture or squeeze may cause irreversible damage to the
product.
Power Supply
Please use the connecting cable and matching connectors provided with the
lidar to supply power. Using cables or adapters that are damaged or do not meet

the power supply requirements, or supply power in a humid environment may
cause abnormal operation, fire, personal injury, product damage, or other
property loss.
Light Interference
Some precise optical equipment may be interfered with by the laser emitted by
this product, please pay attention when using it.
Vibration
Please avoid product damage caused by strong vibration. If the product's
mechanical shock and vibration performance parameters are needed, please
contact us for technical support.
Radio Frequency Interference
The design, manufacture and test of this product comply with relevant
regulations on radiofrequency energy radiation, but the radiation from this
product may still cause other electronic equipment to malfunction.
Deflagration and Other Air Conditions
Do not use the product in any area with potentially explosive air, such as areas
where the air contains high concentrations of flammable chemicals, vapours or
particles (like fine grains, dust or metal powder). Do not expose the product to
the environment of high-concentration industrial chemicals, including near
evaporating liquefied gas (like helium), so as not to impair or damage the product
function.
Maintenance
Please do not disassemble the lidar without permission. Disassembly of the
product may cause its waterproof performance to fail or personal injury.

TABLE OF CONTENTS
1. PRODUCT PROFILE .......................................................................................................................... 1
1.1 OVERVIEW ........................................................................................................................................... 1
1.2 MECHANISM ........................................................................................................................................ 1
1.3 SPECIFICATION..................................................................................................................................... 1
1.4 DIMENSIONS........................................................................................................................................ 2
2. ELECTRICAL INTERFACE .................................................................................................................4
2.1 POWER SUPPLY.................................................................................................................................... 4
2.2 ELECTRICAL INTERFACE ....................................................................................................................... 5
3. GET READY ........................................................................................................................................ 8
3.1 LIDAR CONNECTION............................................................................................................................ 8
3.2 SOFTWARE PREPARATION ................................................................................................................... 8
4. USAGE GUIDE ................................................................................................................................... 9
4.1 OPERATION UNDER WINDOWS OS ................................................................................................... 9
4.1.1 Lidar Configuration ............................................................................................................. 9
4.1.2 Windows Client Interface ................................................................................................ 10
4.1.3 Operation Procedure ........................................................................................................ 13
4.1.4 Point Cloud Data Parsing ................................................................................................. 14
4.1.5 Note....................................................................................................................................14
4.2 ROS DRIVER OPERATION UNDER LINUX OS................................................................................... 18
4.2.1 Hardware Connection and Test....................................................................................... 18
4.2.2 Software Operation Example .......................................................................................... 19
5. COMMUNICATION PROTOCOL...................................................................................................20
5.1 MSOP PROTOCOL ............................................................................................................................ 20
5.1.1 Format ................................................................................................................................ 21
5.1.2 Data Package Parameter Description.............................................................................22
5.2 DIFOP PROTOCOL............................................................................................................................ 26
5.3 UCWP PROTOCOL............................................................................................................................ 27
5.3.1 Configuration Parameters and Status Description........................................................ 28

5.3.2 Configuration Package Example...................................................................................... 30
6. TIME SYNCHRONIZATION............................................................................................................30
6.1 GPS SYNCHRONIZATION................................................................................................................... 31
6.2 EXTERNAL SYNCHRONIZATION..........................................................................................................32
6.3 GPTP SYNCHRONIZATION.................................................................................................................33
6.4 LIDAR INTERNAL TIMING ................................................................................................................... 33
7. ANGLE AND COORDINATE CALCULATION...............................................................................34
7.1 VERTICAL ANGLE ............................................................................................................................... 34
7.2 HORIZONTAL ANGLE .........................................................................................................................34
7.3 DISTANCE VALUE AND INTENSITY..................................................................................................... 35
7.4 CARTESIAN COORDINATE REPRESENTATION .................................................................................... 35
8. ACCURATE TIME CALCULATION ................................................................................................. 36
8.1 SINGLE ECHO MODE .........................................................................................................................36
8.1.1 Calculation of Data Packet End Time ............................................................................. 36
8.1.2 Accurate Time Calculation of Channel Data .................................................................. 36
8.2 DUAL ECHO MODE ........................................................................................................................... 37
8.2.1 Calculation of Data Packet End Time .............................................................................37
8.2.2 Accurate Time Calculation of Channel Data .................................................................. 37

1
1. Product Profile
1.1 Overview
CH128X1 is based on the major technological breakthrough made by LeiShen
Intelligent in the miniaturization technology of auto-grade high-wire-beam
hybrid solid-state Lidar. It well meets the requirements of long-range detection
and perception performance in autonomous driving. With a compact size, which
is suitable for embedding in the roof or front protection position, this product is
more in line with the aesthetic needs of passenger vehicles’ exterior design.
1.2 Mechanism
The CH128X1 Hybrid Solid-State Lidar adopts the Time of Flight method. The
Lidar starts timing (t1) when the laser pulses are sent out. And when the laser
encounters the target object and the light returns to the sensor unit, the
receiving end stops timing (t2).
Distance = Speed of Light*(t2 – t1)/2
Figure 1.1 Mechanism of the CH128X1 Lidar
1.3 Specification
Table 1.1 Specifications of CH128X1
Model
CH128X1
Detection Method
ToF
Wavelength
905 nm
Laser Class
Class 1 (eye-safe)
Channels
128
Detection Range
200 m 160 m @10% reflectivity

2
Range Accuracy
±3 cm
Data Point Generated (Single Echo Mode)
760,000 pts/sec
Vertical FOV
25° (-18°~7°)
Horizontal FOV
120°
Vertical Angular Resolution
0.125°@ROI, 0.25°@non-ROI
Horizontal Angular Resolution
5 Hz: 0.1º; 10 Hz: 0.2º; 20 Hz: 0.4º
Scanning Rate
5 Hz, 10 Hz, 20 Hz
Communication Interface
Automotive Ethernet 1000Base-1
Time Source
PPS; gPTP
Operating Voltage
9 V~36 VDC
Operating Temperature
-40℃ ~ +85℃
Storage Temperature
-40℃ ~ +105℃
Power Consumption
15W
Shock Test
500 m/sec², lasting for 11 ms
Vibration Test
5 Hz~2000 Hz, 3G rms
IP Grade
IP6K9K
Functional Safety Level
ISO26262 (ASIL B)
Dimensions
118*90*75 mm
Weight
1 kg
1.4 Dimensions
There are 4 mounting holes and 2 positioning holes at the bottom of CH128X1
Lidar. Four M5*10 (hexagon socket head cap screws) mechanical screws with
spring washers and flat washers are needed for locking and fixing the Lidar. See
the outline dimension drawing shown in Figure 1.2.
Mounting requirements: (1) Mounting screws: M5*10, hexagon socket head cap
screws; (2) Screws: GB70; (3) Spring washers: GB93; (4) Flat washers: GB93.1;
(5) Electric Torque Screwdriver: 5NM.

3
Figure 1.2 CH128X1 Lidar Dimension
The CH128X1 Lidar utilizes mirror rotation and special optical design to scan
120° horizontally, with a dense light distribution of 128 lines. Figure 1.3 shows
the appearance of the CH128X1 Lidar while Figure 1.4 shows the optical center
position, which is also the coordinate origin of the host computer display
software.
Figure 1.3 External View of CH128X1

4
Figure 1.4 The Optical Center of the Lidar
2. Electrical Interface
2.1 Power Supply
The power input range of the CH128X1 Lidar is 9V~36VDC. If other DC power
supply is adopted, the recommended output voltage of the power supply is
12VDC, 19VDC or 24VDC. Please note that DC 9V and 36V are short-term
power supply in extreme environment, which cannot be used as working voltage.
When the voltage output fluctuates, the Lidar may not be able to work normally.
The maximum output current should be ≥2A (the Lidar requires a large
instantaneous current when starting, and a small starting current may cause its
failure to start normally). The output ripple noise should be <120 mVp-p and
output voltage accuracy <5%. It is recommended to use 12V/3A or 24V/2A
power adapter.
The higher the power supply voltage and the stronger the discharge capacity,
the more severe the impact on the Lidar (such as powered by direct vehicle
power supply without adapters and interface boxes). Therefore, it is necessary
to use high-power TVS transient suppression diodes to protect the Lidar to avoid
damage.
The line length of the Lidar power supply is 5~10 m, and the power supply
voltage needs to be over 19V. If the line length is more than 10 m, then it is

5
recommended to use a 220VAC adapter nearby for power supply (DC long-
distance power supply is not recommended).
2.2 Electrical Interface
The cables from the side of the CH128X1 lidar base are a 6-pin power supply
cable and a 2-pin automotive ethernet cable. The cables are as shown in the
figures below.
Note: There are two types of power supply cables (only differ in wire colors) for
random shipments.
Figure 2.1 The 6-PIN Power Supply Cable ①
Table 2.1 Wiring Definition of the 6-PIN Power Supply Cable ①
S/N
Color
Definition (for lidar
with CAN protocol)
Description
Definition (for lidar
with GPS time service)
Description
1
Orange
NC
-
GPS_PPS
GPS Inputting
PPS Signal
2
Red
VCC
Power+
VCC
Power+
3
Black
BATT-
Power-
BATT-
Power-
4
Light
Orange
Wake
Wake-up
Input Signal
Wake
Wake-up
Input Signal
5
Blue
CAN_H
CAN_H
GPS_GND
GPS_GND
6
Light Blue
CAN_L
CAN_L
GPS_TXD
GPS_TXD

6
Figure 2.2 The 6-PIN Power Supply Cable ②
Table 2.2 Wiring Definition of the 6-PIN Power Supply Cable ②
S/N
Color
Definition (for lidar
with CAN protocol)
Description
Definition (for lidar
with GPS time service)
Description
1
White
NC
-
GPS_PPS
GPS Inputting
PPS Signal
2
Red
VCC
Power+
VCC
Power+
3
Black
GND
Power-
GND
Power-
4
Yellow
Wake
Wake-up
Input Signal
Wake
Wake-up
Input Signal
5
Green
CAN_H
CAN_H
GPS_GND
GPS_GND
6
Blue
CAN_L
CAN_L
GPS_TXD
GPS_TXD
Figure 2.3 The 2-PIN Automotive Ethernet Cable
Table 2.3 The 2-PIN Automotive Ethernet Cable Wiring Definition
S/N
Color
Definition
Description
1
White
1000Base-T1_P
Ethernet TX+
2
Green
1000Base-T1_N
Ethernet TX-
An interface box is sent to you with the Lidar, whose function is to facilitate the

7
testing and connection of the Lidar. Please note that the interface box is not a
necessary accessory for Lidar operation.
The interface box of the CH128X1 Lidar includes: an automotive ethernet port,
an automotive power port, a Φ2.1 mm DC socket, an indicator light, a RJ45
network port and a 6-PIN GPS port, as shown in Figure 2.4.
Figure 2.4 Interface Box of CH128X1
The GPS socket of the Interface Box is the SM06B-SRSS-TB presented by the JST
Company, and the recommended plug interface for the external GPS module is
JST's SHR-06V-S-B. The interface definition of the GPS is here below:
Table 2.4 The Interface Definition of the GPS
PIN
Function Definition
I/O
Requirements
1
PPS Sync Signal
I
TTL level range from 3.3V to 12V; its cycle is
1 second, and the recommended pulse
width is more than 5 ms
2
GPS Power Supply 5V
O
No hot plug or unplug
3
GPS_GND
O
Good contact
4
GPS (latitude/longitude,
hour/ minute/second)
I
RS232 level, baud rate 9600 bps
5
GPS_GND
O
Good contact
6
NC
-
-

8
3. Get Ready
3.1 Lidar Connection
To get ready for the Lidar operation, please connect the Lidar, host computer,
GPS module and power supply though the interface box as shown in Figure 3.1.
Figure 3.1 Connecting the Lidar
3.2 Software Preparation
The LeiShen CH128X1 Lidar can be operated under both Windows operating
system and Linux operating system. Software needed is as follows:
Wireshark: to capture the ARP (Address Resolution Protocol) packets.
Note: Wireshark is a third-party software that you need to download by yourself.
LeiShen Intelligent bears no responsibility to any copyright and commercial
disputes caused by the use of this software.
To view the point cloud data generated by the Lidar, you can either use the
Windows Client or the ROS Drive Program.
Windows Client (optional): a host computer software to view point cloud image
under Windows operating system, which is also referred to as “point cloud
display software”.
⚫Software Acquisition
This Windows Client has been pre-stored in the USB flash drive provided along
with the Lidar. It can also be obtained from the sales or technical support
personnel. No installation is required to the client.
⚫Operating Environment
This software can only run under the Windows x64 operating system at present.
The computer configuration requirements for installing the software are: CPU:
Intel(R) Core(TM) i5 or higher; Graphics Card: NVIDIA GeForce GTX750 or

9
higher achieves the best effect, otherwise the display of the point cloud may be
affected. And the computer graphics card must support OpenGL 2 or higher
graphics acceleration to display the point cloud normally.
⚫Supplemental Software
To use the Windows Client, the installation of the WinPcap third-party library is
necessary. This software has also been pre-stored in the USB flash drive
provided with the Lidar.
To install the WinPcap software, please follow the following steps:
Step 1. Insert the USB driver into computer port and open it.
Step 2. Find the WinPcap installation file and double-click it to initiate the
installation.
Step 3. Click “next” to enter the installation path selection interface.
Step 4. Click “next” to enter the installation interface.
Step 5. Click the “install” button, and wait for the installation to be completed.
ROS Drive Program (optional): to view the point cloud data under Linux
operating system. This program has been pre-stored in the USB flash drive
provided with the Lidar. It can also be obtained from the sales or technical
support personnel. No installation is required.
4. Usage Guide
This part states operation instructions of the Windows Client and ROS drive
presented by the LeiShen Intelligent System Co. Ltd.
4.1 Operation Under Windows OS
4.1.1 Lidar Configuration
The default IP address and port number of the Lidar network are as follows:
Table 4.1 Default Lidar Network Configuration
IP Address
UDP Device Package Port
UDP Data Package Port
Lidar
192.168.1.200
2368 (Fixed)
2369 (Fixed)
Computer
192.168.1.102
2369
2368
Note:

10
The Lidar IP (local IP) and the computer IP (destination IP) cannot be set to the
same, otherwise the Lidar will not work normally.
In the multicast mode, no two destination ports should be set to the same port
number.
The lidar IP range are forbidden to be set to
1) Class D IP address (multicast address: i.e. 224.0.0.0~ 239.255.255.255)
2) Class E IP address (reserved address: i.e. 240.0.0.0~ 255.255.255.254)
3) Broadcast addresses (i.e. 255.255.255.255 and xx.x.255 for each network
segment)
4) Special class IP addresses (0.x.xx and 127.xxx)
The lidar destination IP are forbidden to be set to
1) Class E IP address address (i.e. 240.0.0.0 to 255.255.255.254)
2) Special class addresses (0.x.xx and 127.x.x.x)
When connecting to the Lidar, if the computer IP and the Lidar IP are in different
network segments, you need to set the gateway; if they are in the same network
segment, you only need to set different IPs, for example: 192.168.1.x, and the
subnet mask is 255.255.255.0. If you need to find the Ethernet configuration
information of the Lidar, please connect the Lidar to the computer and use
“Wireshark” to capture the ARP packet of the device for analysis. For the feature
identification of the ARP packet, see the figure below.
Figure 4.1 Wireshark captures APR packets
4.1.2 Windows Client Interface
The software interface includes menu area, tool bar area, 3D window area, data

11
table area, etc.
Figure 4.2 Initial Interface
Note: In the point cloud display area (right side), with 20 circles and 40*40 grids,
the radius of each two adjacent circles differs by 10 m. The difference between
each two grids (horizontal or longitudinal) is 10 m. And the radius of the
outermost circle is 200 m.
The grids and circles make it easy to view the position of the point cloud. The
direction of the coordinate axis in the 3D display interface is consistent with the
direction of the X-Y axis in the point cloud reference system.
Note: To view the software version, click “Help->About” in the tool bar.
Point cloud display interface supports the following operations:
1) Zoom in/out the display interface with the mouse wheel; hold the right mouse
button and drag it up/down to zoom in/out.
2) Hold the left mouse button and drag it to adjust the angle of view;
3) Hold the mouse wheel and drag it to pan the display interface; or hold the
shift key on the keyboard and the left mouse button to pan the interface.
Menu button function introduction
⚫Lidar Menu
Button
Description
Click to start receiving display data

12
⚫Offline Menu
Button
Description
Open offline data
Record and save data, valid only when lidar receives data in real time
Skip to the beginning
When paused, view the previous frame;
When playing, rewind (click multiple times to
select 2x, 3x, 1/2x, 1/4x and 1x speed)
Click to start playing after the point cloud file is loaded
When playing, click to pause
When paused, view the next frame;
When playing, fast forward (click multiple times
to select 2x, 3x, 1/2x, 1/4x and 1x speed)
Skip to the end
Drag the progress bar or enter the frame number to skip to the specified
position
⚫Parameter Menu
Button
Description
Open lidar parameter
form
The upper part of the form shows the lidar
configuration. The parameters include local IP,
destination IP, subnet mask, gateway, data port,
device port, and motor speed setting
(5Hz/10Hz/20Hz can be selected under
combobox), whether to obtain the local time, Mac
address information, and device packet sending
interval.
The lower part shows the real-time status
Show/hide measurement grid
Mark the selected points in the point cloud image
Pause point cloud image and data generating
Select point clouds from different angles
Clear screen
Show/hide coordinate
Show/hide the column on the left
Three-view option: set the observation angle from
top, front, and left.

13
information. According to the DIFOP status packet
sent out regularly by the lidar, the current status
information is displayed, including GPS position
information, satellite time information, motor
speed, current lidar IP, and current lidar port
number.
Select laser channel
Vertical Angle column represents the vertical angle
of the corresponding channel data and Channel
column represents the data sequence number
corresponding to the channel.
Save the data in .csv
format
The data includes Points_X, Points_Y, Points_Z,
Laser_id, Azimuth, Distance, Intensity.
Set the mode of echo
Dual echo, strongest echo, second echo
Set the display mode
of the point cloud
Intensity, laser ID, azimuth angle, etc.
Set the horizontal
angle
Set the horizontal angle display range
Note: The computer graphics card must support OpenGL 2 or higher graphics
acceleration to display the point cloud normally.
4.1.3 Operation Procedure
Step 1. Set the data port number (default 2368), device port (or telemetry port
in the picture below) number (default 2369).
Step 2. When the power supply of the Lidar is connected to the network cable,
click to receive the Lidar data in real time.
Step 3. The data table contains PointID, Points_m_XYZ, Azimuth, Distance,
Intensity, Laser_id, timestamp, in which PointID is the point number;
Points_m_XYZ are the coordinates; Azimuth is the azimuth angle; Distance is the
distance value; Intensity is the reflection intensity; Laser_id is the Lidar channel
number and timestamp is the timestamp value.

14
Figure 4.3 Real-Time Lidar Point Cloud Display
4.1.4 Point Cloud Data Parsing
If you need to parse Lidar data, please follow the steps below:
Step 1. Parse the data package to obtain the relative horizontal angle, ranging
information, intensity data and microsecond timestamp information of each laser;
Step 2. Read the device package to obtain information such as the horizontal
correction angle value, UTC time (GPS, NTP or PTP time service) and the current
configuration of the device;
Step 3. Obtain the vertical angle of each line according to the laser beam
distribution;
Step 4. According to the distance measurement value, vertical angle and the
calculated horizontal angle of the point cloud data, the XYZ coordinate values
are obtained;
Step 5. If necessary, calculate the precise time of the point cloud data through
UTC time, microsecond timestamp, light-emitting time of each laser, as well as
single and dual echo modes;
Step 6. Reconfigure information such as Ethernet, PPS synchronization
horizontal angle, motor speed and other information as needed, and pack the
configuration package protocol.
4.1.5 Note
Notice about the Lidar setting and usage:

15
1) It is not possible to use LSCH128X1 Windows Client to receive data in two
processes (open twice at the same time) in the same computer. The port
occupancy of the PC is generally exclusive, so the other software that uses
the same process or the same port number cannot work normally after a
process is bound to a specified port number. When LSCH128X1 Windows
Client detects that the port is occupied, it will prompt that the
communication network port configuration has failed, and automatically
close the software. You need to close the software process that occupied the
port, and reopen the LSCH128X1 Windows Client to use it normally.
2) At the same time, since Qt is adopted in the low-level software development,
please create English paths when naming files and path folders.
3) Since the port number of the LeiShen CH128X1 Lidar can be modified
through user configuration, and the Lidar sends data to the host computer
through the preset destination IP and port. Therefore, when the local laptop
or desktop computer and other devices are receiving data, their IP address
should be the same as the destination IP, and the port bound to the local host
computer program needs to be the same as the destination port number, as
shown in the figure below (these are the data packet parameters captured
and analyzed by Wireshark software). The data in the red boxes indicate the
destination IP and port number of the Lidar.
Figure 4.4 Data Packet Parameters Captured by Wireshark Software
Please set the host computer IP according to the following steps:
Step 1. In the Control Panel -> Network and Internet -> Network Sharing Center,
click the “local connection” button.
Step 2. Click “Properties” in the pop-up status box, and click “TCP/IPv4 protocol”
in the pop-up properties box, as shown in the figure below.
Table of contents