D200 LiDAR Kit

From Waveshare Wiki
Jump to: navigation, search
D200 LiDAR Kit
D200 LiDAR Kit.jpg

UART
Triangular Lidar
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

{{{name6}}}

Overview

Introduction

The LD14P is mainly composed of a laser ranging core, a wireless power transmission unit, a wireless communication unit, an angle measurement unit, a motor drive unit, and a mechanical case. The LD14P ranging core adopts the triangulation technology and is capable of 4,000 distance measurements per second. During each distance measurement, the LD14P emits an infrared laser from a fixed angle, which is reflected back to the receiving unit after encountering the target object. By solving the triangle relationship formed by the laser, target object, and receiving unit, the distance is calculated. After obtaining the distance data, the LD14P combines the angle values measured by the angle measurement unit to form point cloud data, which is then sent to an external interface via wireless communication. At the same time, the motor drive unit drives the motor to the specified speed through PID algorithm closed-loop control.

Feature

  • Based on triangulation measuring technology.
  • Support UART communication.
  • 8cm measuring radius.
  • 4000Hz measuring frequency.
  • 360° scanning range.
  • Laser Safety Meets FDA Class 1 Standards.
  • Compact appearance.
  • The radar can be controlled through serial communication.

Parameters

Measuring Range
0.1 ~ 8.0m
Measuring Average Accuracy*
White Surface
Measuring Distance D
±5mm (0.1≤D≤0.5m)
±10mm (0.5<D≤1m)
±1.0% (1<D≤6m)
±1.5% (6<D≤8m)
Measuring Average Accuracy*

Black Surface
Measuring Distance D

±7mm (0.1≤D≤0.5m)
±12mm (0.5<D≤1m)
±1.2% (1<D≤4m)
±1.5% (4<D≤6m)
NA (6<D≤8m)
Scanning Frequency 6Hz by default, 2 ~ 8Hz external control
Scanning Angle 360°
Measuring Frequency 4000 Hz
Ambient Light Resistance 80000Lux (Sunshine internal testing standards)
Laser Wavelength 775 ~ 800nm (typical 793)
Communication Interface UART @ 230400
Operating Voltage DC 5V±10%
Operating Current ≤300mA
Power Consumption ≤ 1.5 W
Operating Temperature -10℃~50℃
Weight 101g
Service Life 2200h
  • Note:
1. The reflectivity of white material is 80%; the reflectivity of black material is 4.0% (tested by C84-III reflectometer).
2. Raning accuracy: the average value of 30 consecutive data calculations within ±1° from the center of the baffle at each distance point.

Application

  • Education & scientific research
  • Robot obstacle avoidance
  • Measure and detect
  • Smart gesture control
  • 2D gesture recognition
  • Autonomous navigation
  • Map reconstruction
  • Navigation and positioning

How to Use

Communication

D200 uses a 1.25mm 4PIN connector (Horizontal with snap) to connect with an external system for power supply and data. The specific interface definition and parameter requirements are shown in the following figure/table:
Triangulation LiDAR LD1401.jpg

No. Function Type Description Min Typical Max
1 PWR/RX Input External speed control/Radar data input 3V 3.3V 3.6V
2 GND Power supply Negative pole of power supply - 0 -
3 TX Output Radar data output 3V 3.3V 3.6V
4 VCC Power Positive pole of power supply 4.5V 5V 5.5V

The D200's data communication uses a standard asynchronous serial port (UART) for bi-directional passage with the following transmission parameters:

Baud Rate Data Bit Stop Bit Parity Bit Flow Control
230400 8 Bits 1 No No

Coordinate System Definition

D200 uses a left-handed coordinate system, the rotation center is the coordinate origin, the direction of the connection between the rotation center and the center of the driving wheel is zero-degree direction, and the rotation angle increases along the clockwise direction. Specifically as shown in the figure below:
Triangulation LiDAR LD1402.jpg

Optical Window and Mechanical Dimensions

The laser emission and reception in the ranging unit of LD14 requires an optical window, which needs to be exposed in the structure. Partial occlusion of the window by the external system will affect the ranging performance of the LD14 to a certain extent. The figure below shows the optical window size (unit: mm). The external dimension tolerance is +0.3/-0.3mm.
Triangulation LiDAR LD14 01.jpg
The following figure is the dimension (unit: mm):
Triangulation LiDAR LD14 02.jpg

How to Connect

Hardware connection and description:
1) D200 LiDAR, cables, and USB adapter board, as shown below:

D200 LiDAR Kit connect01.jpg

2) Connection diagram as shown below:

D200 LiDAR Kit connection02.jpg

Software Description

D200 LiDAR Kit Software01.jpg
Double-click the "exe" file and install it with prompts.
USB TO RS4825-5.png
After the installation is completed, connect the USB adapter board in the development kit to the computer, you can right-click 【My Computer】, select 【Properties】, under the opened 【System】 interface, select 【Device Manager】 in the left menu to enter the device manager, expand 【Port】, you can see the serial port number corresponding to the recognized CP2102 USB adapter, that is, the driver is successfully installed, the figure below is COM4.
D200 LiDAR Kit Software93.png

LdsPointCloudViewer Use

LdsPointCloudViewer, a point cloud visualization software for real-time scanning, allows developers to visually observe the scanning effect of the product. Before using the software, make sure that the driver of the USB adapter board has been successfully installed and the product is interconnected with the USB port of the Windows PC, then double-click LdsPointCloudViewer.exe, select the corresponding product model (e.g. LD14P) and port number, and click the LdsPointCloudViewer Refresh button, as shown in the figure below.
D200 LiDAR Kit Viewer01.png
D200 LiDAR Kit View02.jpg
In the above figure, Speed is the LIDAR scanning frequency in Hz; Rate is the LIDAR packet resolution rate; Valid is the valid points of one lap measured by LIDAR.

Speed Control Function

Internal Speed Control

Pull the LD14P Rx pin low to connect to the ground, and the LD14P enters the internal speed control mode after powering on. The default scanning frequency is 6Hz.

External Speed Control

There are two ways for LD14P speed control: PWM control and UART control.
1) PWM Control:
Connect the PWM signal to the Rx pin of LD14P, and it can control the start, stop, and speed of the motor through the duty cycle of the PWM signal and trigger the condition of external speed control.

a. Input PWM frequency 500Hz-5KHz, 1KHz is recommended;
b. The duty cycle of the PWM signal is in the range of (45%, 55%) (45% and 55% are not included), and the continuous input time is 100ms at least.

After the external speed control is triggered, it is always in this state, and the internal speed control will be restored only after power failure and restart; at the same time, the PWM duty cycle can be adjusted for speed control.
Due to the individual differences of each motor, the actual speed may vary when the duty cycle is set to a typical value. To precisely control the motor speed, closed-loop control is required based on the speed information in the received data.

  • Note: PWM pin should be connected to the ground when the external speed control is off.

2) UART Control:
The Rx pin of LD14P is connected to the Tx pin of the serial port of the external device, and the relevant control commands can be sent to the external control speed according to the agreed baud rate of the communication interface.
This function is not open to the public at the moment, and the related control protocol commands will be introduced in the "Communication Protocols" section after opening.

Communication Protocol

Start & Stop Control

Start(Mode=0xA0)
When Mode=0xA0, the command is to start the motor, and DataBuffer in the command has no meaning (default =0).
In the Lidar response data, the BataBuffer length is 4Bytes and has no meaning.
Reference sending command: 0x54 A0 04 00 00 00 00 5E
Reference receiving command: 0x54 A1 04 00 00 00 00 4A
Stop(Mode=0xA1)
When Mode=0xA1, the command is to stop the motor, and DataBuffer in the command has no meaning (default =0).
In the Lidar response data, the BataBuffer length is 4Bytes and has no meaning.
Reference sending command: 0x54 A1 04 00 00 00 00 4A
Reference receiving command: 0x54 A1 04 00 00 00 00 4A

Data Packet Format

After the LD14P is powered on and works stably, it starts to send measurement packets without sending any commands. The measurement packet format is shown in the figure below:

Start Character VerLen LiDAR Rotation Speed Start Angle Data End Angle Timestamp CRC Parity
54H 1 Byte LSB MSB LSB MSB …… LSB MSB LSB MSB 1 Byte
  • Start character: 1 Byte in length, with a fixed value of 0x54, indicating the beginning of the packet;
  • VerLen: the length is 1 Byte, the high three bits indicate the frame type, currently fixed at 1, and the low five bits indicate the number of measurement points of a packet, currently fixed at 12, so the value of this byte is fixed at 0x2C;
  • Radar speed: the length is 2 Byte, the unit is a degree per second;
  • Start angle: the length is 2 Byte, the unit is 0.01 degree;
  • Data: the length of a measurement data is 3 bytes, please see the next subsection for detailed analysis;
  • End angle: the length is 2 Byte in 0.01 degrees;
  • Timestamp: the length is 2 Byte, the unit is ms, the maximum is 30000, and reaching 30000 will recount;
  • CRC checksum: checksum of all previous data.

The data structure is shown below:

#define POINT_PER_PACK 12
#define HEADER 0x54
typedef struct __attribute__((packed)) {
   uint16_t distance;
   uint8_t intensity;
} LidarPointStructDef;
typedef struct __attribute__((packed)) {
   uint8_t header;
   uint8_t ver_len;
   uint16_t speed;
   uint16_t start_angle;
   LidarPointStructDef point[POINT_PER_PACK];
   uint16_t end_angle;
   uint16_t timestamp;
   uint8_t crc8;
}LiDARFrameTypeDef;

The CRC checksum is calculated as follows:

static const uint8_t CrcTable[256] ={
0x00, 0x4d, 0x9a, 0xd7, 0x79, 0x34, 0xe3,
0xae, 0xf2, 0xbf, 0x68, 0x25, 0x8b, 0xc6, 0x11, 0x5c, 0xa9, 0xe4, 0x33,
0x7e, 0xd0, 0x9d, 0x4a, 0x07, 0x5b, 0x16, 0xc1, 0x8c, 0x22, 0x6f, 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45, 0x19, 0x54, 0x83, 0xce, 0x60, 0x2d, 0xfa,
0xb7, 0x5d, 0x10, 0xc7, 0x8a, 0x24, 0x69, 0xbe, 0xf3, 0xaf, 0xe2, 0x35,
0x78, 0xd6, 0x9b, 0x4c, 0x01, 0xf4, 0xb9, 0x6e, 0x23, 0x8d, 0xc0, 0x17,
0x5a, 0x06, 0x4b, 0x9c, 0xd1, 0x7f, 0x32, 0xe5, 0xa8
};
uint8_t CalCRC8(uint8_t *p, uint8_t len){
uint8_t crc = 0;
uint16_t i;
for (i = 0; i < len; i++){
crc = CrcTable[(crc ^ *p++) & 0xff];
}
return crc;
}

Measuring Data Analysis

Each measurement data point consists of a distance value of 2 bytes in length and a confidence value of 1 byte in length, as shown in the figure below.

Start Character VerLen LiDAR Rotation Speed Start Angle Data End Angle Timestamp CRC Parity
54H 2CH LSB MSB LSB MSB …… LSB MSB LSB MSB 1 Byte
Measuring Point 1 Measuring Point 2 ... Measuring Point n
Distance Value Signal Strength Distance Value Signal Strength Distance Value Signal Strength
LSB MSB 1 Byte LSB MSB 1 Byte LSB MSB 1 Byte

The signal strength value reflects the light reflection intensity, the higher the intensity, the larger the signal strength value; the lower the intensity, the smaller the signal strength value.
The angle value of each point is obtained by linear interpolation of the starting and ending angles, and the angle is calculated as follows:

step = (end_angle - start_angle)/(len - 1).
angle = start_angle + step*i.
where len is the number of measurement points of a packet and i is in the range [0, len ).

Reference Example

Suppose we receive a piece of data as shown below:
54 2C 68 08 AB 7E E0 00 E4 DC 00 E2 D9 00 E5 D5 00 E3 D3 00 E4 D0 00 E9 CD
00 E4 CA 00 E2 C7 00 E9 C5 00 E5 C2 00 E5 C0 00 E5 BE 82 3A 1A 50
We can parse it as follows:

Start Character VerLen Radar Speed Start Angle Data End Angle Timestamp CRC Checksum
54H 2CH 68H 08H ABH 7EH ...... BEH 82H 3AH 1AH 50H


Measurement Point 1 Measurement Point 2 ... Measurement Point 12
Distance Value Signal Strength Distance Value Signal Strength Distance Value Signal Strength
E0H 00H E4H DCH 00H E2H ... B0H 00H EAH
Field Information Analysis
LiDAR Rotation Speed 0868H = 2152 degree/s;
Start Angle 7EABH = 32427 or 324.27 degree
End Angle 82BEH = 33470 or 334.7 degree
Measuring Point 1 - Distance Value 00E0H = 224mm
Measurement Point 1 - Signal Strength E4H = 228
Measuring Point 2 - Distance Value 00DCH = 200mm
Measuring Point 2 - Distance Value 00E2H = 226
Measuring Point 1 and 2 - Distance Value 00B0H = 176mm
Measuring Point 1 and 2 - Signal Value EAH = 234

Due to the triangulation principle, the above angle values are uncorrected, and the revision process is described in the Transform() function in the SDK source code transform.cpp.

Resource

Document

SDK

Software

STEP Model

Support



Technical Support

If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 PM GMT+8 (Monday to Friday)