LPMS3 Series Communication Protocol
IMU Data packet
The data output from the sensor depends on the settings in:
transmit data settings: GET_TRANSMIT_DATA (1Fh)
data format (LPBus or ASCII): GET_UART_FORMAT (85h) Default: LPBus
data precision: GET_LPBUS_DATA_PRECISION (88h) Default: 32bit
LP-BUS Protocol
LP-BUS is a communication protocol based on the industry standard MODBUS protocol. It is the default communication format used by LPMS devices.
An LP-BUS communication packet has two basic command types, GET and SET, that are sent from a host (PC, mobile data logging unit etc.) to a client (LPMS device). Later in this manual we will show a description of all supported commands to the sensor, their type and transported data.
GET Commands
Data from the client is read using GET requests. A GET request usually contains no data. The answer from the client to a GET request contains the requested data.
SET Commands
Data registers of the client are written using SET requests. A SET command from the host contains the data to be set. The answer from the client is either ACK (acknowledged) for a successful write, or NACK (not acknowledged) for a failure to set the register occurred.
Packet Format
Each packet sent during the communication is based on the following structure:
Byte # | Name | Description |
0 | Packet start (3Ah) | Data packet start |
1 | Sensor ID byte 1 | Contains the low byte of the Sensor ID of the sensor to be communicated with. The default value of this ID is 1. The host sends out a GET / SET request to a specific LPMS sensor by using this ID, and the client answers to request also with the same ID. This ID can be adjusted by sending a SET command to the sensor firmware. |
2 | Sensor ID byte 2 | High byte of the Sensor ID of the sensor. |
3 | Command # byte 1 | Contains the low byte of the command to be performed by the data transmission. |
4 | Command # byte 2 | High byte of the command number. |
5 | Packet data length byte 1 | Contains the low byte of the packet data length to be transmitted in the packet data field. |
6 | Packet data length byte 2 | High byte of the data length to be transmitted. |
x  | Packet data(n bytes)  | If data length n not equal to zero, x = 6+1, 6+2…6+n. Otherwise x = none. This data field contains the packet data to be transferred with the transmission if the data length not equals to zero, otherwise the data field is empty. |
7+n | LRC byte 1 | The low byte of LRC checksum. To ensure the integrity of the transmitted data the LRC checksum is used. It is calculated in the following way: LRC = Sensor ID byte 1 + Sensor ID byte 2 + Command byte 1+ Command byte 2 + Packet data length byte 1 + Packet data byte 2 + packet data byte no. 1 to no. x The calculated LRC is usually compared with the LRC transmitted from the remote device. If the two LRCs are not equal, and error is reported. |
8+n | LRC byte 2 | High byte of LRC check-sum. |
9+n | Termination byte 1 | 0Dh |
10+n | Termination byte 2 | 0Ah |
Data Format in a Packet Data Field
Generally, data is sent in little-endian format, low order byte first, high order byte last. Data in the data fields of a packet can be encoded in several ways, depending on the type of information to be transmitted. In the following we list the most common data types. Other command-specific data types are explained in the command reference.
Identifier | Description |
UInt32 | 32-bit unsigned integer value |
Int32 | 32-bit signed integer value |
Int16 | 16-bit signed integer value |
Float32 | 32-bit float value |
Vector3f | 3 element 32-bit float vector |
Vector3i16 | 3 element 16-bit signed integer vector |
Vector4f | 4 element 32-bit float vector |
Vector4i16 | 4 element 16-bit signed integer vector |
Matrix3x3f | 3x3 element float value matrix |
Sensor Measurement Data in Streaming Mode
In streaming mode, LP-BUS transports measurement data in the following form, wrapped into the standard LP-BUS protocol. See the following chapter for examples of transmission packets. The order of the sensor data chunks depends on which sensor data is switched on
The following is the data types in 32-bit float transmission mode.
In 32-bit float transmission mode:
Order # | Data type | Sensor data |
---|---|---|
1 | UInt32 | Timestamp counter incremented in 500Hz. multiply by 0.002 to convert to seconds. |
2 | Vector3f | Accelerometer raw output (g) |
3 | Vector3f | Accelerometer calibrated output (g) |
4 | Vector3f | Gyro raw output (dps (default) or rad/s) |
5 | Vector3f | Gyro bias calibrated output (dps (default) or rad/s) |
6 | Vector3f | Gyro alignment and bias calibrated output (dps (default) or rad/s) |
7 | Vector3f | Magnetometer raw output (uT) |
8 | Vector3f | Magnetometer calibrated output (uT) |
9 | Vector3f | Angular velocity output (dps (default) or rad/s) |
10 | Vector4f | Quaternion output |
11 | Vector3f | Euler output (deg (default) or rad) |
12 | Vector3f | Linear acceleration output (g) |
13 | Float32 | Pressure output (kPa) |
14 | Float32 | Altitude output (m) |
15 | Float32 | Temperature output (°C) |
In 16-bit transmission mode values are transmitted to the host with a multiplication factor applied to increase precision:
Order # | Data type | Sensor data | Factor |
1 | UInt32 | Timestamp counter incremented in 500Hz. multiply by 0.002 to convert to seconds. | 500 |
2 | Vector3i16 | Accelerometer raw output (g) | 1000 |
3 | Vector3i16 | Accelerometer calibrated output (g) | 1000 |
4 | Vector3i16 | Gyro raw output (dps (default) or rad/s) | 10 (dps) 100 (rad/s) |
5 | Vector3i16 | Gyro bias calibrated output (dps (default) or rad/s) | 10 (dps) 100 (rad/s) |
6 | Vector3i16 | Gyro alignment and bias calibrated output (dps (default) or rad/s) | 10 (dps) 100 (rad/s) |
7 | Vector3i16 | Magnetometer raw output (uT) | 100 |
8 | Vector3i16 | Magnetometer calibrated output (uT) | 100 |
9 | Vector3i16 | Angular velocity output (dps (default) or rad/s) | 10 (dps) 100 (rad/s) |
10 | Vector4i16 | Quaternion output | 10000 |
11 | Vector3i16 | Euler output (deg (default) or rad) | 100 (deg) 10000 (rad) |
12 | Vector3i16 | Linear acceleration output (g) | 1000 |
13 | Int16 | Pressure output (kPa) | 100 |
14 | Int16 | Altitude output (m) | 10 |
15 | Int16 | Temperature output (°C) | 100 |
ASCII Format Output
In ASCII output mode sensor data is transmitted as plain ASCII numerical text. The output format for each number is generally 16-bit integer, but with a multiplication factor applied to increase precision. The following multiplication factors are used:
Chunk # | Data type | Sensor data | Factor |
1 | UInt32 | Timestamp counter incremented in 500Hz. multiply by 0.002 to convert to seconds. | 500 |
2 | Vector3i16 | Accelerometer raw output (g) | 1000 |
3 | Vector3i16 | Accelerometer calibrated output (g) | 1000 |
4 | Vector3i16 | Gyro raw output (dps (default) or rad/s) | 1000 |
5 | Vector3i16 | Gyro bias calibrated output (dps (default) or rad/s) | 1000 |
6 | Vector3i16 | Gyro alignment and bias calibrated output (dps (default) or rad/s) | 1000 |
7 | Vector3i16 | Magnetometer raw output (uT) | 100 |
8 | Vector3i16 | Magnetometer calibrated output (uT) | 100 |
9 | Vector3i16 | Angular velocity output (dps (default) or rad/s) | 1000 |
10 | Vector4i16 | Quaternion output | 100000 |
11 | Vector3i16 | Euler output (deg (default) or rad) | 100 (deg) 10000 (rad) |
12 | Vector3i16 | Linear acceleration output (g) | 1000 |
13 | Int16 | Pressure output (kPa) | 100 |
14 | Int16 | Altitude output (m) | 10 |
15 | Int16 | Temperature output (°C) | 100 |