background image

SERIAL PROTOCOL 

 

USER’S MANUAL 

SWEEP

 V1.0 

 

Copyright ©2014-2017 Scanse LLC - www.scanse.io 

 

Initiates scanning 

 

Sensor responds with header containing status. 

 

Sensor begins sending constant stream of Data Block receipts, each containing a single sensor readings. This 
stream continues indefinitely until the host sends a DX command.

(HOST -> SENSOR) 

LF 

 

(SENSOR -> HOST) 

Header response 

Status (2 bytes) 

SUM (1 byte) 

LF 

The DS command is not guaranteed to succeed. There are a few conditions where it will fail. In the event of a 
failure, the two status bytes are used to communicate the failure. 
Status Code (2 byte ASCII code): 

 

‘00’: Successfully processed command. Data acquisition effectively initiated

 

 

‘12’: Failed

 to process command. Motor speed has not yet stabilized. Data acquisition NOT initiated. Wait 

until motor speed has stabilized before trying again. 

 

‘13’: Failed to process command. Motor is currently stationary (0Hz). Data acquisition NOT initiated. 

Adjust motor speed before trying again.

 

 
(SENSOR -> HOST) 

Data Block (7 bytes) Data Block 

Sync/Error 
(1 byte) 

Azimuth - degrees(float)  
(2 bytes) 

Distance - cm(int) 
(2 bytes) 

Signal Strength 
(1 byte) 

Checksum 
(1 byte) 

 
Data Block Structure: 
The

 Data Block 

receipt is 7 bytes long and contains all the information about a single sensor reading.

 

 

Sync/Error Byte:

 The sync/error byte is multi-purpose, and encodes information about the rotation of the 

Sweep sensor, as well as any error information. Consider the individuals bits: 

e6 

e5 

e4 

e3 

e2 

e1 

e0 

sync 

o

 

Sync bit

: least significant bit (LSB) which carries the sync value. A value of

 1 

indicates that this 

Data Block is the first acquired sensor reading since the sensor passed the 0 degree mark. Value 
of

 0 

indicates all other measurement packets. 

o

 

Error bits

: 7 most significant bits (e0-6) are reserved for error encoding. The bit

 e0 

indicates a 

communication error with the LiDAR module with the value

 1

. Bits

 e1:6 

are reserved for future 

use. 

 

Azimuth:

 Angle that ranging was recorded at (in degrees). Azimuth is a float value, transmitted as a 16 bit 

int. This needs to be converted from 16bit int to float. Use instructions in the Appendix. Note: the lower 
order byte is received first, higher order byte is received second. 

 

Distance: 

Distance of range measurement (in cm). Distance is a 16 bit integer value. Note: the lower order 

byte is received first, higher order byte is received second. Use instructions in the Appendix. 

 

Signal strength :

 Signal strength of current ranging measurement. Larger is better. 8-bit unsigned int, 

range: 0-255 

 

Checksum:

 Calculated by adding the 6 bytes of data then dividing by 255 and keeping the remainder. 

(Sum of bytes 0-5) % 255 ... Use the instructions in the Appendix. 

 

 

Содержание Sweep V1

Страница 1: ...cal drawings 0 9 12 19 2016 Initial Release Laser Safety 0 Power Safety 0 Specifications 2 Physical 2 Electrical 2 Measurement Performance 2 Field of View 2 Measurement Error Test Data 2 Overview of I...

Страница 2: ...see Theory of Operation Sweep is a single plane scanner This means that as its head rotates counterclockwise it records data in a single plane The beam starts out at approximately 12 7mm in diameter a...

Страница 3: ...e internal pull up Pull down to put device in sleep mode 3 Yellow Sync Device Ready Goes high when first range measurement of new scan is completed then goes low when second range measurement is compl...

Страница 4: ...Sudden rotational shocks can cause the head to either slow down or speed up which can affect angular measurements If Sweep is rotationally jerked hard enough it can cause the motor to lose sync which...

Страница 5: ...e Under normal operation Sweep limits the maximum time per measurement to a value determined by the sample rate set using the LR command see LR packet structure description If not enough light is retu...

Страница 6: ...with ASCII letter command codes HOST SENSOR Command with no parameter Command Symbol 2 bytes Line Feed 1 byte Example DS DX MI IV Line Feed LF or Carriage Return CR or Command with parameter Command...

Страница 7: ...al processing of a command ASCII byte values of 00 or 99 indicate that the sensor received and processed the command normally Value of 11 specifies an invalid parameter was included in the command Any...

Страница 8: ...ation about a single sensor reading Sync Error Byte The sync error byte is multi purpose and encodes information about the rotation of the Sweep sensor as well as any error information Consider the in...

Страница 9: ...e measurements This calibration routine is initiated after powering on the device after receiving any form of Adjust Motor Speed MS command regardless of the size of the adjustment ie even calling MS...

Страница 10: ...z 08 8Hz 09 9Hz 10 10Hz MS command is not guaranteed to succeed There are a few conditions where it will fail In the event of a failure the two status bytes are used to communicate the failure Status...

Страница 11: ...Hz LR command is not guaranteed to succeed There are a few conditions where it will fail In the event of a failure the two status bytes are used to communicate the failure Status Code 2 byte ASCII cod...

Страница 12: ...LF Example IVSWEEP01011100000001 I V SWEEP 01 01 1 00000001 LF Returns details about the device s current state settings Bit Rate Laser State Mode Diagnostic Motor Speed Sample Rate HOST SENSOR I D L...

Страница 13: ...s 0x30 return sum checkSumByteValue Example Consider the common case of 00P decimal 48 48 80 hex 0x30 0x30 0x50 0x30 0x30 0x60 sum of the status bytes 0x60 0x3F 0x20 retrieve only the lower 6 bits 0x2...

Страница 14: ...e sum of 6 other bytes Instead the checksum byte uses the modulo operation and effectively contains the remainder after dividing the sum by 255 this is the same as saying sum 255 Validating the checks...

Отзывы: