Li DAR Scanner Protocol Guide
User Manual:
Open the PDF directly: View PDF .
Page Count: 5
Download | ![]() |
Open PDF In Browser | View PDF |
Delta2B 360˚ 2D LiDAR Scanner - Protocol Guide 1. Protocol Guide The LiDAR Scanner uses UART (3.3V TTL @ Baud Rate: 230400) to communicate with external devices. The communication is unidirectional from the LiDAR to the external device. The host device does not need to acknowledge transmissions. All data is transmitted in Hex. The guide will explain how to extract distance measurement data and device health information from the received data. 2. Frame Structure Each transmission follows this frame structure: Start Byte Frame Size Protocol Version Frame Type Payload Type Payload Size Payload Checksum Index Notes Start Byte 0 1 byte, Fixed to 0xAA Frame Size 1-2 2 bytes, Size of the frame in bytes from the Start Byte to the end of the Payload. Does not include Checksum. MSB first Protocol Version 3 1 byte, Fixed to 0x00 Frame Type 4 1 byte, Fixed to 0x61 Payload Type 5 1 byte, To differentiate between different payload types. See table below Payload Size 6-7 2 bytes, Size of the frame payload MSB first Version 1.0 Payload 8-n n bytes, Frame payload Checksum n+1 n+2 2 bytes, MSB first 2.1. Payload Types Payload Type Payload Identifier Payload Length Note Distance Measurement 0xAD (3N+5) bytes where N is number of samples Device Error 0xAE 1 unsigned byte Payload represents rotation speed with 0.05r/s resolution 2.1.1 Distance Measurement Transmission of distance measurement data from scanner. Payload Identifier: 0xAD Payload Length: (3N+5) bytes where N is number of samples Payload Scheme: Byte Description Byte 0 1 byte, unsigned - Rotation speed - resolution 0.05r/s Bytes 1 - 2 2 bytes, signed - MSB first - Angle offset - resolution 0.01˚ Bytes 3 - 4 2 bytes, unsigned - MSB first - Starting angle for the frame - resolution 0.01˚ Byte 5 1 byte, unsigned - Sample ID - Can be discarded Byte 6 - 7 2 bytes, unsigned - MSB First - Distance value for first sample Byte 8 1 byte, unsigned - Sample ID - Can be discarded Byte 9 - 10 2 bytes, unsigned - MSB First - Distance value for second sample ... Repeat for N samples Version 1.0 2.1.1.1 Calculating the Angle for Nth Distance Measurement Angle for nth sample = Starting angle + 22.5˚(n-1)/N Where: N = Number of distance samples = (length of payload - 5)/3 Each frame carries the distance measurements for a 22.5˚ sweep. 2.1.2 Device Error Indicates a device error - rotation speed is too low to perform measurements Payload Identifier: 0xAE Payload Length: 1 byte Payload: Unsigned byte - Rotation speed with 0.05r/s resolution 3. Checksum Calculation The checksum is a 16-bit number, created by adding up all of the bytes from the frame. The checksum calculation is a standard CRC-16 checksum. The following is an demonstration of the checksum calculation in C: u16 CRC16(u8 *Start_Byte,u16 Num_Bytes) { u16 Checksum = 0; while (Num_Bytes--) { // CRC Checksum += *Start_Byte++; } return Checksum; } Version 1.0 4. Example 4.1 Example 1 - Distance Measurement Frame: AA 35 06 DF 00 05 2B 30 4F AD 2E 05 00 35 06 C6 61 05 40 DC AD 00 47 79 00 40 72 42 3C 05 6D 37 05 8A 3A 05 93 34 05 9C B8 35 05 C6 35 05 D5 34 05 E5 36 05 F2 31 06 07 2D 06 16 2E 36 06 52 35 06 67 32 06 61 2D 06 45 2B 06 22 2B 06 03 31 05 27 Breakdown: AA : 00 4F: 00 : 61 : AD: 00 47: 79 : 00 40: 72 42: 3C: 05 6D: 37: 05 8A: ........ 30: 05 C6: DC 27: Start Byte Frame Size = 0x004F = 79 bytes (not including the CRC) Protocol Version Frame Type Payload Type Payload Size = 0x0047 = 71 bytes Rotation Speed = (0x79 => 121) x 0.05r/s = 6.05r/s Angle Offset = (0x40 => 64) * 0.01° = 0.64° Starting Angle = (0x7242 => 29250) * 0.01° = 292.5° Sample ID #1 Distance Measurement #1 = (0x056D => 1389) * 0.25mm = 347.25mm Sample ID #2 Distance Measurement #2 = (0x058A => 1418) *0.25mm = 354.5mm Sample ID #22 Distance Measurement #22 = (0x05C6 => 1478) * 0.25mm = 369.5mm CRC 0xDC27 4.2 Example 2 - Device Error Frame: AA 00 09 00 61 AE 00 01 69 02 2C Version 1.0 Breakdown: AA: 00 09: 00: 61: AE: 00 01: C9: 02 2C: Start Byte Frame Size = 0x0009 = 9 Bytes (not including the CRC) Protocol Version Frame Type Payload Type Payload Size = 0x0001 = 1 byte Payload: Rotation Speed = (0xC9 = 201) * 0.05r/s = 10.05r/s CRC 0x022c Version 1.0
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.5 Linearized : Yes Producer : Skia/PDF m74 Page Count : 5EXIF Metadata provided by EXIF.tools