0% found this document useful (0 votes)
115 views51 pages

6013 - P20 002 - Communication Protocol NEON Vibration Sensor - E

The document details the communication protocol for a NEON vibration sensor. It describes the various message schemes used for device activation, status updates, sensor data and events. Binary encodings for uplink and downlink messages are also specified.

Uploaded by

thijs.buuron
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
115 views51 pages

6013 - P20 002 - Communication Protocol NEON Vibration Sensor - E

The document details the communication protocol for a NEON vibration sensor. It describes the various message schemes used for device activation, status updates, sensor data and events. Binary encodings for uplink and downlink messages are also specified.

Uploaded by

thijs.buuron
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

NEON Vibration Sensor

Communication Protocol

Version E
10-05-2021
6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E By: ML, TB, WK, ZZ
Contents

1 General 3

2 Message Schemes 3
2.1 Activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Device Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.3 Sensor Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.4 Sensor Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.5 Button press . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.6 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.7 Deactivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3 Message overview 10

4 Decoding/encoding 11

5 Message Header 12
5.1 JSON Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
5.2 Binary Encoding and Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

6 Uplink Messages 13
6.1 Boot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6.1.1 JSON Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6.1.2 Binary Encoding and Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6.2 Device Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
6.2.1 JSON Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
6.2.2 Binary Encoding and Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
6.3 Activated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
6.3.1 JSON Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
6.3.2 Binary Encoding and Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
6.4 Deactivated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.4.1 JSON Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.4.2 Binary Encoding and Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.5 Sensor Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
6.5.1 JSON Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
6.5.2 Binary Encoding and Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6.6 Sensor Data (FFT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
6.6.1 JSON Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
6.6.2 Binary Encoding and Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

7 Downlink Messages 30
7.1 Base Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7.1.1 JSON Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7.1.2 Binary Encoding and Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
7.2 Sensor Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
7.2.1 JSON Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
7.2.2 Binary Encoding and Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
7.2.3 Event Condition Configuration Binary Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
7.3 Sensor Data Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
7.3.1 JSON Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
7.3.2 Binary Encoding and Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
7.3.3 Trigger Threshold Configuration Binary Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 1 of 50
CONTENTS

8 Examples 46
8.1 Example FFT configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
8.1.1 Example 1: Velocity FFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
8.1.2 Example 2: Acceleration FFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 2 of 50
2 MESSAGE SCHEMES

1 General
• All variables are little endian.
• All application messages are sent through port 15.

2 Message Schemes
2.1 Activation
Activation of the Vibration sensor is initiated by the operator. After activation an Activation Message is sent. The full
sequence is depicted below.

Environment Sensor Node Network server

Install sensor node

Long press
send Boot
LED indicate ongoing LoRa transmission
Confirmation message

Test LoRa
communication
activate

Activation
send Activated

LED indicate successful activation Confirmation message

Figure 1: Activation sequence

In case of an error during activation, the procedure is aborted. The error situations can be as followed:

1. No LoRa confirmation message from network server is received: no LoRa coverage


2. Failure in one of the activation actions.

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 3 of 50
2 MESSAGE SCHEMES

2.2 Device Status


Periodically a Device status message is sent. Timing is independent from the vibration measure timer. The message
contains information related to the device.

Sensor Node Network server

...

...

device status period

self test and status update

send Device Status

Confirmation message

Figure 2: Device status sequence

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 4 of 50
2 MESSAGE SCHEMES

2.3 Sensor Event


The vibration is measured periodically. When a condition change is detected a Sensor Event message is sent.

Environment Sensor Node Network server

condition changed
trigger periodic measurement

periodic measurement
Environment change

periodic measurement

change above threshold

New sensor event


send Sensor Event

confirmation message

timer trigger
periodic measurement

periodic measurement

periodic sensor event message

send Sensor Event

confirmation message

Figure 3: Sensor event sequence

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 5 of 50
2 MESSAGE SCHEMES

2.4 Sensor Data


The vibration is measured periodically. When a condition change is detected a Sensor Data message sequence is
started.

Sensor Node Network server

measure and update data

measure and update data

trigger sensor data ready

Prepare sensor data frames

send Sensor Data #1

Confirmation message

trigger to send next


sensor data frame

send Sensor Data #N

Confirmation message

Figure 4: Sensor event sequence

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 6 of 50
2 MESSAGE SCHEMES

2.5 Button press


The user can trigger an device uplink message by pressing the button while the device is active. By default the device
will send both device status and sensor event messages; and if calculation_trigger.on_button_press the flag of
sensor data configuration is enabled it will also send sensor data frames.

Sensor Node Network server

Button press

LED indicate sensor status self test and status update

send Device Status


LED indicate ongoing LoRa transmission
Confirmation message
LED indicate LoRa transmission status

measure and update data

send Sensor Event

confirmation message

calculation_trigger.on_button_press
of sensor data configuration is enabled

trigger sensor data ready

prepare sensor data frames

send Sensor Data #1

Confirmation message

trigger to send next


sensor data frame

send Sensor Data #N

Confirmation message

Figure 5: Button press sequence

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 7 of 50
2 MESSAGE SCHEMES

2.6 Configuration
The device can be configured with an configuration downlink.

Sensor Node Network server

Queue new configuration

Any event which trigger the


sensor to transmit a message
send a message

schedule downlink
send configuration

[on valid configuration]


store configuration and Reset sensor

self test and load all configuration

send Boot, with new config CRC

Confirmed downlink

Figure 6: Deactivation sequence

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 8 of 50
2 MESSAGE SCHEMES

2.7 Deactivation
The user can deactivate by a long press of the button. This will result in a Deactivation Message.

Sensor Node Network server

Perform deactivation procedure


Remove activation

LED indicate deactivated send Deactivated

Confirmed message

Figure 7: Deactivation sequence

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 9 of 50
3 MESSAGE OVERVIEW

3 Message overview

ID Name Up/Down Purpose


0 Boot up Informs on device boot.
1 Activated up Indicates that a device is activated by
the button and operational.
2 Deactivated up Indicates that a device is deactivated
by the button.
3 Sensor event up Informs on the Vibration. It is sent on
event detection, or on a timer.
4 Device status up Informs on device health, battery info,
counter for statistics and others. It is
sent periodically.
5 Base configuration down Configures the device with radio
setting.
6 Sensor configuration down Configures the sensor specific
settings.
7 Sensor data down Configures the sensor data settings.
configuration
8 Sensor data up Informs sensor specific raw data.

Table 1: Message Overview

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 10 of 50
4 DECODING/ENCODING

4 Decoding/encoding
The messages are sent over LoRa in a binary bytestring. A LoRa network server can decode raw bytestrings coming
from the LoRa devices into JSON objects. It can also encode JSON objects back into bytestrings that form the payload
of downlink messages.

LoRa messages with


bytestring payload

LoRa NS

Decoder.js JSON object to backend


Device
Encoder.js JSON object from backend

Figure 8: Decoding/encoding

Below each message is described and how it is encoded in the bytestring. A example decoder / encoder is provided
with this document. If using this Decoder / Encoder the bytestring information below can be ignored.

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 11 of 50
5 MESSAGE HEADER

5 Message Header
The header is at the head of all messages. It indicates the protocol version and message type.

5.1 JSON Structure

{
"header": {
"message_type": <json string>,
"protocol_version": <json number>
}
}
Listing 1: Header JSON structure

5.2 Binary Encoding and Description

Description Binary encoding Byte


index
message_type uint8 0
Type of message:
bits [3..0]
message_id
• boot (0)
• activated (1) bits [7..4]
• deactivated (2) protocol version number
• sensor_event (3)
• device_status (4)
• base_configuration (5)
• sensor_configuration (6)
• sensor_data_configuration(7)
• sensor_data (8)

protocol_version
The version of the protocol:

• For this protocol version the value is 2

Table 2: Message header description

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 12 of 50
6 UPLINK MESSAGES

6 Uplink Messages
6.1 Boot
The boot message is sent when the device is used for the first time or when a reboot occurs. Reboots might occur
intended in case of activating a newly received configuration. Or the device might reboot due to a system error as a
matter to recovery (e.g. continuous communication failures, unforeseen situations, and others). The boot message
contains information about why it has (re)booted. Typically this information can be ignored and is only used for solving
problems in the field. During normal operation and with sufficient network quality reboots seldomly occur, other than
activating a newly received configuration.

6.1.1 JSON Structure

{
"boot": {
"base": {
"device_type": <json string>,
"version_hash": <json string>,
"config_crc": <json string>,
"reset_flags": <json string>,
"reboot_counter": <json number>,
"reboot_info": <json string>,
"bist": <json string>
},
"sensor": {
"device_type": <json string>,
"device_id": <json string>,
"version_hash": <json string>,
"config_crc": <json string>,
"data_config_crc": <json string>,
"reset_flags": <json string>,
"reboot_counter": <json number>,
"reboot_info": <json string>,
"bist": <json string>
}
}
}
Listing 2: Boot JSON structure

6.1.2 Binary Encoding and Description

Description Binary encoding Byte


index
Header as described in Binary Encoding and uint8 0
Description.
base.device_type uint8 1
The device type as known in the NEON family. For this
device the value is:

• "ld" (5)

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 13 of 50
6 UPLINK MESSAGES

Description Binary encoding Byte


index
base.version_hash uint32 2..5
Version hash of the currently running firmware,
represented as a hexadecimal string.

Range: 0x00000000 .. 0xFFFFFFFF


base.config_crc uint16 6..7
CRC of the currently loaded protocol configuration,
represented as a hexadecimal string. This can be
used to verify if the corrected configuration is loaded.

Range: 0x0000 .. 0xFFFF


base.reset_flags uint8 8
A bitmask field from the microcontroller that indicateds
the physical reason for the reset that caused the
reboot. This can be used for analysis when a device is
not working properly.

• bit 0 - Firewall
• bit 1 - Option Byte Loader
• bit 2 - Pin
• bit 3 - Brown Out
• bit 4 - Software
• bit 5 - IWDG
• bit 6 - WWDG
• bit 7 - Low Power

base.reboot_counter uint8 9
Counter of the number of reboots. Each time a reboot
occurs the counter is increased. The counter is 8bit
and will wrap after 255 to 0. This can be used for
detecting abnormal rebooting behavior.

Range: 0 .. 255
base.reboot_info uint8[9] 10..18
Informational string with information on the reboot. byte [0]

reboot type
byte [1..8]
• "swdog (ABCD)" reboot type
• "assert (caller: 0x01020304; value: -1234)" specific payload
• "application (0xAABBCCDD)"
• "system (error: 0xAABBCCDD; caller:
0xFEEDC0DE)"

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 14 of 50
6 UPLINK MESSAGES

Description Binary encoding Byte


index
base.bist uint8 19
A bitmask with the result of the build in self test.
At boot the device performs a self test in order to
verify the working of essential components. This can
be used for analysis when a device is not working
properly.

byte value:

• 0x7F (127) : Self-tests of base are OK, it is


activated and the paired sensor is connected
• 0x5F (95) : A not paired sensor is connected
• 0x4F (79) : No sensor is connected
• 0x47 (71) : Base is deactivated
• Other values : Base self test failed

bit value:

• 0: test failed
• 1: test succeeded

bit 0: battery measurement


bit 1: lora module
bit 2: configuration
bit 3: activation
bit 4: sensor connection
bit 5: sensor paired
bit 6: internal temperature sensor
bit 7: reserved (default value: 0)

sensor.device_type uint8 20
The device type as known in the NEON family. For this
device the value is:

• "vb" (6)

sensor.device_id uint8[5] 21..25


The unique device ID of the sensor, in the format:
byte [0]
• "[prefix]-[10 digit serial]" prefix
• "0-0000000000"
byte [1..4]
serial (uint32)
sensor.version_hash uint32 26..29
Version hash of the currently running firmware,
represented as a hexadecimal string.

Range: 0x00000000 .. 0xFFFFFFFF

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 15 of 50
6 UPLINK MESSAGES

Description Binary encoding Byte


index
sensor.config_crc uint16 30..31
CRC of the currently loaded protocol configuration,
represented as a hexadecimal string. This can be
used to verify if the corrected configuration is loaded.

Range: 0x0000 .. 0xFFFF


sensor.data_config_crc uint16 32..33
CRC of the currently loaded data configuration,
represented as a hexadecimal string. This can be
used to verify if the corrected configuration is loaded.

Range: 0x0000 .. 0xFFFF


sensor.reset_flags uint8 34
A bitmask field from the microcontroller that indicateds
the physical reason for the reset that caused the
reboot. This can be used for analysis when a device is
not working properly.
bit 0 - Firewall
bit 1 - Option Byte Loader
bit 2 - Pin
bit 3 - Power On
bit 4 - Software
bit 5 - IWDG
bit 6 - WWDG
bit 7 - Low Power
Range: 0x00 .. 0xFF
sensor.reboot_counter uint8 35
Counter of the number of reboots. Each time a reboot
occurs the counter is increased. The counter is 8 bit
and will wrap after 255 to 0. This can be used for
detecting abnormal rebooting behavior.

Range: 0 .. 255
sensor.reboot_info uint8[9] 36..44
Informational string with information on the reboot.
byte [0]
Example values: reboot type

• "swdog (ABCD)" byte [1..8]


• "assert (caller: 0x01020304; value: -1234)" reboot type
• "application (0xAABBCCDD)" specific payload
• "system (error: 0xAABBCCDD; caller:
0xFEEDC0DE)"

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 16 of 50
6 UPLINK MESSAGES

Description Binary encoding Byte


index
sensor.bist uint8 45
A bitmask with the result of the build in self test.
At boot the device performs a self test in order to
verify the working of essential components. This can
be used for analysis when a device is not working
properly.

• 0x0F (15) : bist OK


• Other values: bist failed

bit value:

• 0: test failed
• 1: test succeeded

bit 0: sensor module


bit 1: configuration
bit 2: activation
bit 3: temperature sensor
bit 4 to 7: reserved (default value: 0)

Table 3: Boot message description

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 17 of 50
6 UPLINK MESSAGES

6.2 Device Status


This message contains information for maintenance, device health and other analysis. It is sent periodically.

6.2.1 JSON Structure

{
"device_status": {
"base": {
"config_crc": <json string>,
"battery_voltage": {
"low": <json number>,
"high": <json number>,
"settle": <json number>
},
"temperature": { "min": <json number>, "max": <json number>, "avg": <json number> },
"lvds_error_counter": <json number>,
"lora_tx_counter": <json number>,
"avg_rssi": <json number>,
"avg_snr": <json number>,
"bist": <json string>
},
"sensor": {
"device_type": <json string>,
"config_crc": <json string>,
"data_config_crc": <json string>,
"event_counter": <json number>,
"bist": <json string>
}
}
}
Listing 3: Device Status JSON structure

6.2.2 Binary Encoding and Description

Description Binary encoding Byte


index
uint8 0
Header as described in Binary Encoding and
Description.
base.config_crc uint16 1..2
CRC of the currently loaded protocol configuration,
represented as a hexadecimal string. This can be
used to verify if the correct configuration is loaded.

This configuration is applied in the base device.

Range: 0x0000 .. 0xFFFF

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 18 of 50
6 UPLINK MESSAGES

Description Binary encoding Byte


index
base.battery_voltage uint16[3] 3..8
Voltage measurement in Volt, meant as input for
battery charge estimation in the backend. 0.001 V per LSB

Note that a single voltage level on itself is not suitable


for battery charge determination because of the type
of battery.

feed the model on the backend with accurate data of


the voltage measured on different moments. During
low[0] load, high[1] load and after a settle[2] time after
high load.

Range: 0.000 V .. 4.000 V


base.temperature int8[3] 9..11
Base temperature in units of 1 °C. It is reported in the
min[0], max[1] and avg[2] temperature since the last 1 °C per LSB
device status message. The number of temperature
measurements can be configured.

Range: −50 °C.. 125 °C


base.lvds_error_counter uint8 12
Number of failed lvds errors since the last device
status message.

It is reset after the device status message is sent.


If the number of lvds_error_counter becomes bigger
than 255 this field is set to 255.

base.lora_tx_counter uint8 13
Number of LoRa transmissions since the last device
status message.

It is reset after the device status message is sent. If the


number of LoRa transmissions becomes greater than
255 this field is set to 255.

base.avg_rssi uint8 14
The average RSSI of received messages since the
last device status message. The value is in units of −1 dBm per LSB
1 dBm.

This configuration is applied in the base device

Range: −255 dBm .. 0 dBm


base.avg_snr int8 15
The average SNR of received messages since the last
device status message.

Range: −20 dB .. 127 dB

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 19 of 50
6 UPLINK MESSAGES

Description Binary encoding Byte


index
base.bist uint8 16
A bitmask with the result of the build in self test. At
boot the device performs a self test in order to verify
the working of essential components. This can be
used for analysis when device is not working properly.

byte value:

• 0x7F (127) : Self-tests of base are OK, it is


activated and the paired sensor is connected
• 0x5F (95) : A not paired sensor is connected
• 0x4F (79) : No sensor is connected
• 0x47 (71) : Base is deactivated
• Other values : Base self test failed

bit value:

• 0: test failed
• 1: test succeeded

bit 0: battery measurement


bit 1: lora module
bit 2: configuration
bit 3: activation
bit 4: sensor connection
bit 5: sensor paired
bit 6: internal temperature sensor
bit 7: reserved (default value: 0)

sensor.device_type uint8 17
The device type as known in the NEON family. For this
device the value is:

• "vb" (6)

sensor.config_crc uint16 18..19


CRC of the currently loaded sensor configuration,
represented as a hexadecimal string. This can be
used to verify if the correct configuration is loaded.

This configuration is applied in the sensor device.

Range: 0x0000 .. 0xFFFF


sensor_data.config_crc uint16 20..21
CRC of the currently loaded sensor data configuration,
represented as a hexadecimal string. This can be
used to verify if the correct configuration is loaded.

This configuration is applied in the sensor device.

Range: 0x0000 .. 0xFFFF

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 20 of 50
6 UPLINK MESSAGES

Description Binary encoding Byte


index
sensor.event_counter uint8 22
Counter for number of events. Every time an event
message is sent this counter is increased.

This can be used to detect missed event messages.

Range: 00 .. 255

After 255 it will wrap to 1. Zero value is reserved for


after boot only.
sensor.bist uint8 23

A bitmask with the result of the build in self test. At


boot the device performs a self test in order to verify
the working of essential components. This can be
used for analysis when device is not working properly.

• 15: bist OK
• Other values: bist failed

bit value:

• 0: test failed
• 1: test succeeded

bit 0: sensor module


bit 1: configuration
bit 2: activation
bit 3 to 7: reserved (default value: 0)

Table 4: Device Status message description

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 21 of 50
6 UPLINK MESSAGES

6.3 Activated
6.3.1 JSON Structure

{
"activated": {
"sensor": {
"device_type": <json string>,
"device_id": <json string>
}
}
}
Listing 4: Activated JSON structure

6.3.2 Binary Encoding and Description

Description Binary encoding Byte


index
Header as described in Binary Encoding and uint8 0
Description.
sensor.device_type uint8 1
The device type as known in the NEON family. For this
device the value is:

• "vb" (6)

sensor.device_id uint8[5] 2..6


The unique device ID of the sensor, in the format:
byte [0]
• "[prefix]-[10 digit serial]" prefix
• "0-0000000000"
byte [1..4]
serial (uint32)

Table 5: Activated message description

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 22 of 50
6 UPLINK MESSAGES

6.4 Deactivated
6.4.1 JSON Structure

{
"deactivated": {
"reason": <json string>
}
}
Listing 5: Deactivated JSON structure

6.4.2 Binary Encoding and Description

Description Binary encoding Byte


index
Header as described in Binary Encoding and uint8 0
Description.
reason uint8 1
The reason why the sensor is deactivated. String with
the possible values:

• "user_triggered" (0)
A user performed the deactivation process
• reserved (1)
• "activation_sensor_comm_fail" (2)
Failed to communicate with the sensor during
activation process
• reserved (3 .. 255)

reserved uint8 2
Allways 0 for VB.

Table 6: Deactivated message description

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 23 of 50
6 UPLINK MESSAGES

6.5 Sensor Event


6.5.1 JSON Structure

{
"sensor_event": {
"trigger": <json string>,
"rms_velocity": {
"x": { "min": <json number>, "max": <json number>, "avg": <json number> },
"y": { "min": <json number>, "max": <json number>, "avg": <json number> },
"z": { "min": <json number>, "max": <json number>, "avg": <json number> }
},
"acceleration": {
"x": { "min": <json number>, "max": <json number>, "avg": <json number> },
"y": { "min": <json number>, "max": <json number>, "avg": <json number> },
"z": { "min": <json number>, "max": <json number>, "avg": <json number> }
},
"temperature": { "min": <json number>, "max": <json number>, "avg": <json number> },
"condition_0": <json number>,
"condition_1": <json number>,
"condition_2": <json number>,
"condition_3": <json number>,
"condition_4": <json number>,
"condition_5": <json number>
}
}
Listing 6: Sensor Event JSON structure

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 24 of 50
6 UPLINK MESSAGES

6.5.2 Binary Encoding and Description

Description Binary encoding Byte


index
uint8 0
Header as described in Binary Encoding and
Description.
trigger uint8 1
Source of trigger for the sensor event message. String
with the possible values:

• "timer" (0)
On the periodic timer
• "button" (1)
On a button presss
• "condition_0" (2)
• "condition_1" (3)
• "condition_2" (4)
• "condition_3" (5)
• "condition_4" (6)
• "condition_5" (7)

rms_velocity.x uint16[3] 2..7


The rms velocity in units of 0.01 mm/s. It is reported
in the min[0], max[1] and avg[2] rms velocity since the
last sensor event message.

Range: 0 mm/s .. 200 mm/s


rms_velocity.y uint16[3] 8..13
The rms velocity in units of 0.01 mm/s. It is reported
in the min[0], max[1] and avg[2] rms velocity since the
last sensor event message.

Range: 0 mm/s .. 200 mm/s


rms_velocity.z uint16[3] 14..19
The rms velocity in units of 0.01 mm/s. It is reported
in the min[0], max[1] and avg[2] rms velocity since the
last sensor event message.

Range: 0 mm/s .. 200 mm/s


acceleration.x int16[3] 20..25
The acceleration in units of 0.01 m/s2 . It is reported in
the min[0], max[1] and avg[2] acceleration since the
last sensor event message.

Range: −150 m/s2 ..150 m/s2


acceleration.y int16[3] 26..31
The acceleration in units of 0.01 m/s2 . It is reported in
the min[0], max[1] and avg[2] acceleration since the
last sensor event message.

Range: −150 m/s2 .. 150 m/s2

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 25 of 50
6 UPLINK MESSAGES

Description Binary encoding Byte


index
acceleration.z int16[3] 32..37
The acceleration in units of 0.01 m/s2 . It is reported in
the min[0], max[1] and avg[2] acceleration since the
last sensor event message.

Range: −150 m/s2 .. 150 m/s2


temperature int16[3] 38..43
The sensor temperature in units of 0.01 °C. It is
reported in the min[0], max[1] and avg[2] temperature
since the last sensor event message.

Range: −50.00 °C .. 150.00 °C


condition_n uint8 44
The current state of each condition.

• True condition is represented by 1 bit0 = condition_0


• False condition is represented by 0 bit1 = condition_1
bit2 = condition_2
bit3 = condition_3
bit4 = condition_4
bit5 = condition_5
bit6 = not_used
bit7 = not_used

Table 7: Sensor Event message description

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 26 of 50
6 UPLINK MESSAGES

6.6 Sensor Data (FFT)


6.6.1 JSON Structure

{
"sensor_data": {
"config": {
"frame_number": <json number>,
"sequence_number": <json number>,
"axis": <json string>,
"unit": <json string>,
"scale": <json number>,
"start_frequency": <json number>,
"spectral_line_frequency": <json number>
},
"raw": [
<json number>, <json number>, <json number>,...

],
"frequency": [
<json number>, <json number>, <json number>,...
],
"magnitude": [
<json number>, <json number>, <json number>,...
]
}
}
Listing 7: Sensor Data JSON structure

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 27 of 50
6 UPLINK MESSAGES

6.6.2 Binary Encoding and Description

Description Binary encoding Byte


index
uint8 0
Header as described in Binary Encoding and
Description.
config uint32 1..4
Basic FFT configuration values:.

config.frame_number bits[0..7]
Frame number used for sequential data.

Range: 0 .. 255

config.sequence_number bits[8..9]
Sequence number of current data set.

Range: 0 .. 3

config.axis: bits[10..11] axis


“x” = 0
• x=0 “y” = 1
• y=1 “z” = 2
• z=2

config.unit: bit[12] unit

• velocity = 0 velocity = 0
• acceleration = 1 acceleration = 1

config.scale.coefficient: bits [13..16]


Scaling factor coefficient as configured in sensor data
configuration.

Range: 1 .. 15

config.scale.power: bits [17..18]


Scaling factor power as configured in sensor data
configuration.

• 0: 0.01
• 1: 0.1
• 2: 1 bits[19..31]
• 3: 10

config.frequency_start:
Starting FFT bin of the FFT.

Range: 0 .. 8191

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 28 of 50
6 UPLINK MESSAGES

Description Binary encoding Byte


index
config.spectral_line_frequency uint8 5
FFT bins for each line of the received FFT.

Range: 1 .. 255

data uint8[40] 6..45


As configured in the sensor configuration.

Range: 0 .. 255

Table 8: Sensor Data message description

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 29 of 50
7 DOWNLINK MESSAGES

7 Downlink Messages
7.1 Base Configuration
In the device configuration the non sensor related behavior can be configured. Changing these parameters will have an
effect on battery life and quality of service.

7.1.1 JSON Structure

{
"base_configuration": {
"switch_mask": {
"enable_confirmed_event_message": <json bool>,
"enable_confirmed_data_message": <json bool>,
"allow_deactivation": <json bool>
},
"communication_max_retries": <json number>,
"unconfirmed_repeat": <json number>,
"periodic_message_random_delay_seconds": <json number>,
"status_message_interval_seconds": <json number>,
"status_message_confirmed_interval": <json number>,
"lora_failure_holdoff_count": <json number>,
"lora_system_recover_count": <json number>,
"lorawan_fsb_mask": [<json string>, <json string>, <json string>,
<json string>, <json string>]
}
}
Listing 8: Base Configuration JSON structure

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 30 of 50
7 DOWNLINK MESSAGES

7.1.2 Binary Encoding and Description

Description Default value Binary encoding Byte


index
Header as described in Binary Encoding and uint8 0
Description.
switch_mask uint8 (bitmask:) 1
Booleans to turn features on or off.

enable_confirmed_event_message true bit[0]


Enable confirmed sensor event message

reserved false bit[1]


Default value: 0

enable_confirmed_data_message false bit[2]


Enable confirmed data message

allow_deactivation true
Allow local deactivation procedure to be executed for bit[3]
either disabling the sensor or replacing it with a new Binary (hex):
sensor. 0x09

reserved bit[4..7] unused


Default value: 0
communication_max_retries 3 uint8 2
The maximum number of retries on failing confirmed
messages. Binary (hex):
0x03
Range: 1 .. 255
unconfirmed_repeat 1 uint8 3
The total number of unconfirmed messages. To
disable repeated messages, set unconfirmed_repeat Binary (hex):
to one. 0x01

Range: 1 .. 5
periodic_message_random_delay_seconds 60 uint8 4
To avoid clustering and collisions of uplink
transmissions of multiple devices a random delay is Binary (hex):
added to periodic messages (device status message 0x3C
and timer triggered event message).

Range: 0 s .. 255 s
status_message_interval_seconds 86400 (once uint16 5..6
Interval in seconds at which periodic device status per day)
messages are sent. 60 s
Binary (hex): per LSB
Range: 60 s .. 604 800 s (= 7 days) 0xA0
0x05

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 31 of 50
7 DOWNLINK MESSAGES

Description Default value Binary encoding Byte


index
status_message_confirmed_interval 1 uint8 7
Confirm every n messages, the messages in between
are sent unconfirmed. Default is 1, such that all Binary (hex):
periodic messages are confirmed. 0x01

The number can be increased to require less


downlinks (for reasons of gateway RF duty cycle or
network server costs), but will degrade the quality of
service.

Range: 0 .. 255

DISCLAIMER: Although it is possible to make status


messages always unconfirmed (by setting the value to
0) it is highly recommended to not to use this to avoid
problems when join sessions are invalidated by the
network server (due to network server problems).
lora_failure_holdoff_count 2 uint8 8
In case of persistent network problems (not receiving
acknowledgements on confirmed messages) the Binary (hex):
device tries to recover by a device reboot. 0x02

This parameter configures the number of consecutive


failed confirmed messages needed before it reboots.

Range: 1 .. 255
lora_system_recover_count 1 uint8 9
The number of attempts the LoRa handler is trying to
recover from a system failure (not responsive radio). Binary (hex):
0x01
Range: 1 .. 255

DISCLAIMER: This value should not be changed


for normal use.

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 32 of 50
7 DOWNLINK MESSAGES

Description Default value Binary encoding Byte


index
lorawan_fsb_mask uint16[5] 10..19
Frequency sub-band (FSB) mask for upstream US915 Hybrid:
“0x00FF”,
[Only for US915] “0x0000”,
“0x0000”,
DISCLAIMER: Not certified for FCC “0x0000”,
“0x0000”

Binary (hex):
0xFF
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00

EU868:
“0x0000”,
“0x0000”,
“0x0000”,
“0x0000”,
“0x0000”

Binary (hex):
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
config_crc Refer to uint16 20..21
CRC of the configuration values above. It is calculated TWTG GitHub
by the Encoder. repository for
examples.

Table 9: Base Configuration message description

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 33 of 50
7 DOWNLINK MESSAGES

7.2 Sensor Configuration


7.2.1 JSON Structure

{
"sensor_configuration": {
"device_type": <json string>,
"measurement_interval_seconds": <json number>,
"periodic_event_message_interval": <json number>,
"frequency_range": {
"rms_velocity": <json string>,
"peak_acceleration": <json string>
},
"events":
[
{ "mode": <json string>, "mode_value": <json number> },
{ "mode": <json string>, "mode_value": <json number> },
{ "mode": <json string>, "mode_value": <json number> },
{ "mode": <json string>, "mode_value": <json number> },
{ "mode": <json string>, "mode_value": <json number> },
{ "mode": <json string>, "mode_value": <json number> }
]
}
}
Listing 9: Sensor Configuration JSON structure

7.2.2 Binary Encoding and Description

Description Default value Binary encoding Byte


index
uint8 0
Header as described in Binary Encoding and
Description.
device_type "vb" uint8 1
The device type as known in the NEON family. For this
device the value is: "vb" (6) Binary (hex): "vb" = 6
0x06
measurement_interval_seconds 900 uint16 2..3
Interval in seconds, at which the vibration sensor is (15 minutes)
read.
Binary (hex):
this value has an effect on responsiveness and battery 0x84
life. 0x03
Range: 60 s .. 28 800 s (8 hours)

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 34 of 50
7 DOWNLINK MESSAGES

Description Default value Binary encoding Byte


index
periodic_event_message_interval 16 uint16 4..5
Interval in the number of measurements at which the
sensor event messages are periodically sent. The Binary (hex): 1 measurement per LSB
periodic counter is reset on every event message. The 0x10
periodic counter is reset on every event message. 0x00

Range: 0 .. 10080 measurements

Example setups of periodic event message interval:

• once per 4 hours (default):


set this parameter to 16 (default) and
measurement_interval_seconds to 900 s
(15 minutes)
• once per 8 hours: set this parameter to 32
and measurement_interval_seconds to 900 s
(15 minutes)
• Setting periodic_event_message_interval
to zero disables the periodic sensor event
message.

frequency_range.rms_velocity “range_2” uint8 (bitmask:) 6

• 0: range_1: 5 Hz .. 1000 Hz bit[0]


• 1: range_2: 5 Hz .. 6666 Hz
“range_2”
frequency_range.peak_acceleration
bit[1]
• 0: range_1: 5 Hz .. 1000 Hz
• 1: range_2: 5 Hz .. 6666 Hz
Binary (hex):
frequency_range.reserved 0x02 bit[2..7]
Default value: 0

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 35 of 50
7 DOWNLINK MESSAGES

Description Default value Binary encoding Byte


index
event_conditions event[6] 7..24
Configuration of six independent events. [
"mode":"off",
See Binary encoding and description event config. "mode":"off",
"mode":"off",
"mode":"off",
"mode":"off",
"mode":"off",
]

Binary (hex):
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00

config_crc Refer to uint16 25..26


CRC of the configuration values above. It is calculated TWTG GitHub
by the Encoder. repository for
examples.

Table 10: Sensor Configuration message description

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 36 of 50
7 DOWNLINK MESSAGES

7.2.3 Event Condition Configuration Binary Encoding

Description Default value Binary encoding Byte


index
mode “off” uint8 0
The operational mode of this event:
Binary (hex): “off” = 0
• “off” 0x00 “rms_velocity_x” = 1
• “rms velocity trigger_x” “peak_acceleration_x” = 2
• “peak acceleration trigger_x” “rms_velocity_y” = 3
• “rms velocity trigger_y” “peak_acceleration_y” = 4
• “peak acceleration trigger_y” “rms_velocity_z” = 5
• “rms velocity trigger_z” “peak_acceleration_z” = 6
• “peak acceleration trigger_z”

off mode:
Disables all condition detection triggers.

rms_velocity_trigger_axis mode:
triggers when the rms velocity crosses the mode_value
threshold.

Unit: 0.01 mm/s per LSB


Range: 0 mm/s .. 200 mm/s

peak_acceleration_trigger_axis mode:
triggers when the acceleration crosses the
mode_value threshold.

Unit: 0.01 m/s2 per LSB


Range: 0 m/s2 .. 150 m/s2
mode_value 0 int16 1..2
Unit depends on mode
Binary (hex): 0.01
0x00 per LSB
0x00

Table 11: Event Condition Configuration section description

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 37 of 50
7 DOWNLINK MESSAGES

7.3 Sensor Data Configuration


7.3.1 JSON Structure

{
"sensor_data_configuration": {
"device_type": <json string>,
"calculation_trigger": {
"on_event": <json bool>,
"on_threshold": <json bool>,
"on_button press": <json bool>
},
"calculation_interval": <json number>,
"fragment_message_interval": <json number>,
"threshold_window": <json number>,
"trigger_thresholds": [
{ "unit": <json string>, "frequency": <json number>, "magnitude": <json number> },
{ "unit": <json string>, "frequency": <json number>, "magnitude": <json number> },
{ "unit": <json string>, "frequency": <json number>, "magnitude": <json number> },
{ "unit": <json string>, "frequency": <json number>, "magnitude": <json number> },
{ "unit": <json string>, "frequency": <json number>, "magnitude": <json number> }
],
"selection": {
"axis": <json string>,
"resolution":<json string>,
"enable_hanning_window":<json bool>,
},
"frequency": {
"span": {
"velocity": { "start": <json number>, "stop": <json number> },
"acceleration": { "start": <json number>, "stop": <json number> }
},
"resolution": { "velocity": <json number>, "acceleration": <json number> }
},
"scale": { "velocity": <json number>, "acceleration": <json number> }
}
}
Listing 10: Sensor Data Configuration JSON structure

7.3.2 Binary Encoding and Description

Description Default value Binary encoding Byte


index
Header as described in Binary Encoding and uint8 0
Description.
device_type "vb" uint8 1
The device type as known in the NEON family. For this
device the value is:"vb" (6) Binary (hex): "vb" = 6
0x06

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 38 of 50
7 DOWNLINK MESSAGES

Description Default value Binary encoding Byte


index
calculation_trigger uint8 (bitmask:) 2
Bitmask of triggers to start the FFT calculation.
on_event false bit[0]
Starts an FFT on a event.

on_threshold false bit[1]


Starts an FFT when a treshold is crossed.

on_button_press false bit[3]


Starts an FFT when the button is pressed.
Binary (hex):
reserved 0x00 bit[3..7] unused
Default value: 0

calculation_interval 0 uint16 3..4


Interval in measurements, at which the FFT is
calculated. Timer will restart after all FFT frames are Binary (hex): 1 measurement
sent. 0x00 per LSB
0x00
Setting this value to zero disables the periodic
FFT.

Changing this value has an effect on responsiveness


and battery life.

Range: 0 .. 65535 measurements


fragment_message_interval 14 400 s uint16 5..6
Time between FFT messages. (4 hours)

Range: 0 s .. 28 800 s (8 hours) Binary (hex):


0x40
DISCLAIMER: Although it is possible to not add 0x38
time between FFT messages (by setting the value to
0) it is highly recommended to not to use this to avoid
network problems.

threshold_window 10 uint8 7
(only used if calculation_trigger.on_threshold is
enabled) Binary (hex): 2 FFT bins
0x05 per LSB
Window around centre frequency selected in:
thresholds.frequency.

Range: Range: 2 .. 510 FFT bins

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 39 of 50
7 DOWNLINK MESSAGES

Description Default value Binary encoding Byte


index
trigger_thresholds 0 triggers[5] 8..27
(only used if calculation_trigger.on_threshold is
enabled) Binary (hex):
0x00
0x00
Configuration of five independent triggers. See FFT 0x00
Trigger Threshold Configuration section description. 0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
selection.axis Z uint8 28
bits [0..1] axis
• "x" (0) “x” = 0
• "y" (1) “y” = 1
• "z" (2) “z” = 2

selection.resolution low_res bit[2] resolution


"low_res" = 0
• "low_res" (0) = 1.6276 Hz/FFT bin "high_res" = 1
• "high_res" (1) = 0.8138 Hz/FFT bin

The switch from low to high resolution will reduce


the sample speed from 26 666 Hz to 13 333 Hz. This
will half the width of the FFT bin from 1.6276 Hz to
0.8138 Hz.

selection.enable_hanning_window true bit[3]


Enables the hanning window on the FFT.
Binary (hex): bits[4..7]
0x0A reserved
frequency_span.velocity.start 3 uint16 29..30
The starting FFT bin of the velocity FFT.
Binary (hex): 1 FFT bin
Range: 0 .. 8191 FFT bin 0x03 per LSB
0x00

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 40 of 50
7 DOWNLINK MESSAGES

Description Default value Binary encoding Byte


index
frequency_span.velocity.stop 126 Hz uint16 31..32
The stop FFT bin of the velocity FFT.
Binary (hex): 1 FFT bin
Range: 0 .. 8191 FFT bin 0x7E per LSB
0x00
frequency_span.acceleration.start 61 FFT bin uint16 33..34
The start FFT bin of the acceleration FFT.
Binary (hex): 1 FFT bin
Range: 0 .. 8191 FFT bin 0x3D per LSB
0x00

frequency_span.acceleration.stop 4096 FFT bin uint16 35..36


The stop FFT bin of the acceleration FFT.
Binary (hex): 1 FFT bin
Range: 0 .. 8191 FFT bin 0x00 per LSB
0x10

frequency_resolution.velocity 1 uint8 37
FFT bins for each line of the transmitted velocity FFT
Binary (hex):
Range: 1 .. 255 FFT bin 0x01
frequency_resolution.acceleration 2 uint8 38
FFT bins for each line of the transmitted acceleration
FFT Binary (hex):
0x02
Range: 1 .. 255 FFT bin

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 41 of 50
7 DOWNLINK MESSAGES

Description Default value Binary encoding Byte


index
scale.velocity 1 mm/s uint8 40
A scaling factor in scientific notation to scale the FFT
to the expected maximum amplitude. Binary (hex):
Definition scientific notation: 0x21

scale.velocity = coef f icient · 10power

Range: 0.01 mm/s .. 150 mm/s

scale.velocity.coefficient bits[0..3]
Coefficient of the scaling factor.
Range: 1 .. 15

scale.velocity.power bits[4..5]
Power of 10 of the scaling factor.

Note: scale.velocity.power uses a 2-bit unsigned


integer to represent the power offset from -2 till 1:

• 0: 0.01
• 1: 0.1
• 2: 1
• 3: 10

Example:
Desired power is -1
add 2 to convert from signed to unsigned

Result: scale.velocity.power = 1

scale.velocity.reserved
Default value: 0 bits[6..7]

Example: Expected max amplitude is 0.9 mm/s, Set


scale.velocity higher than the expected amplitude,
in this case the first option is 1 mm/s. 1 mm/s in
scientific notation is:

1 · 100 = 1

Resulting in:
scale.velocity.coefficient = 1
scale.velocity.power = 2
Resulting amplitude resolution:

1 ∗ 102−2
= 0.003 92 mm/s
255

Note: All values above scale.velocity mm/s


will be reported as scale.velocity mm/s

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 42 of 50
7 DOWNLINK MESSAGES

Description Default value Binary encoding Byte


index
scale.acceleration 40 m/s2 uint8 40
A scaling factor in scientific notation to scale the FFT
to the expected maximum amplitude. Binary (hex):
Definition scientific notation: 0x34

scale.acceleration = coef f icient · 10power

Range: 0.01 m/s2 .. 150 m/s2

scale.acceleration.coefficient bits[0..3]
Coefficient of the scaling factor.
Range: 1 .. 15

scale.acceleration.power bits[4..5]
Power of 10 of the scaling factor.

Note: scale.velocity.power uses a 2-bit unsigned


integer to represent the power offset from -2 till 1:

• 0: 0.01
• 1: 0.1
• 2: 1
• 3: 10

scale.acceleration.reserved
Default value: 0

Example: Expected max amplitude is 32 m/s2 ,


Set scale.acceleration higher than the expected
amplitude, in this case the first option is 40 m/s2 .
40 m/s2 in scientific notation is:
bits[6..7]
1
4 · 10 = 40

Resulting in:
scale.acceleration.coefficient = 4
scale.acceleration.power = 3
Resulting amplitude resolution:

4 ∗ 103−2
= 0.157 m/s2
255

Note: All values above scale.acceleration m/s2


will be reported as scale.acceleration m/s2

config_crc Refer to uint16 41..42


CRC of the configuration values above. It is calculated TWTG GitHub
by the Encoder. repository for
examples.

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 43 of 50
7 DOWNLINK MESSAGES

Description Default value Binary encoding Byte


index

Table 12: Sensor Data Configuration message description

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 44 of 50
7 DOWNLINK MESSAGES

7.3.3 Trigger Threshold Configuration Binary Encoding

Description Default value Binary encoding Byte


index
trigger_config uint32 0..3
Configuration values for the trigger.

trigger_config.unit "velocity" bit [0] unit


Selection bit to switch between the velocity and "velocity" = 0
acceleration FFT. "acceleration" = 1

• velocity = 0
• acceleration = 1

trigger_config.frequency 0 bits [1..15]


Frequencies for thresholds_magnitude 1 FFT bin per lsb
Set trigger_config.frequency to zero to disable the
trigger.
0 bits[16..31]
Range: 0 .. 8191 FFT bin 0.01 per lsb

trigger_config.magnitude Binary (hex):


Magnitude thresholds for the selected frequencies in: 0x00
tresholds_frequency 0x00

Range: 0.00 .. 200.00

Table 13: FFT Trigger Threshold Configuration section description

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 45 of 50
8 EXAMPLES

8 Examples
8.1 Example FFT configuration
The FFT function of the vibration sensor combines a velocity FFT and an acceleration FFT on a single dataset.

8.1.1 Example 1: Velocity FFT

This example explains the settings for a velocity FFT from 5 Hz .. 205 Hz with a frequency resolution of 1 FFT bin.

The first step is to select the required range and resolution for the following variables:

• frequency_span.velocity.start = 5 Hz
• frequency_span.velocity.stop = 165 Hz
• frequency_resoltuion.velocity = 1 FFT bin
• frequency_scale.velocity = 4 mm/s
• selection.resolution = "low_res"

The next step is to convert the frequencies to FFT bins, with the following formula:

f requency
=5
F F T binres

whereby:

• "high_res": FFT bin resolution = 0.8138 Hz;


• "low_res": FFT bin resolution = 1.6276 Hz;

The chosen values will result in the velocity spectrum as shown in figure: 9.
The spectrum divides into:
V elocity.stop
− V Felocity.start
F F T binres F T binres
d e = number of messages
resolution.V elocity ∗ length(data)

165
− 5
d 0.8138 0.8138 e = 5
1 ∗ 40

The time it will take to receive the complete velocity spectrum is:

5 ∗ f ragment_message_interval = time_to_complete_F F T

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 46 of 50
8 EXAMPLES

Velocity spectrum (5-205 Hz)


250

200

150
|A(f)|

100

50

0
0 50 100 150 200 250
f (Hz)

frame_num 1 frame_num 2 frame_num 3 frame_num ... frame_num 5


250 250 250 250 250

200 200 200 200 200

150 150 150 150 150


|A(f)|

|A(f)|

|A(f)|

|A(f)|

|A(f)|
100 100 100 100 100

50 50 50 50 50

0 0 0 0 0
10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200
f (Hz) f (Hz) f (Hz) f (Hz) f (Hz)

Figure 9: Example velocity FFT

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 47 of 50
8 EXAMPLES

8.1.2 Example 2: Acceleration FFT

This example explains the settings for an Acceleration FFT from 205 Hz .. 6666 Hz with a frequency resolution of 6 FFT
bins.

The first step is to pick to required range and resolution for the following variables:

• frequency_span.acceleration.start = 205 Hz
• frequency_span.acceleration.stop = 6666 Hz
• frequency_resolution.acceleration= 6 FFT bin
• frequency_scale.acceleration = 20 m/s2
• selection.resolution = "high_res"

The next step is to convert the frequencies to FFT bins, with the following formula:

f requency
=5
F F T binres

whereby:

• "high_res": FFT bin resolution = 0.8138 Hz;


• "low_res": FFT bin resolution = 1.6276 Hz;

The chosen values will result in the acceleration spectrum as shown in the figure: 10. The spectrum divides into:
acceleration.stop
F F T binres − acceleration.start
F F T binres
d e = number of messages
resolution.acceleration ∗ length(data)

6666 205
1.6276 − 1.6276
= d16.1525e = 17
6 ∗ 40

Note 1: If the answer is not a whole number, it should be rounded up (ceil) to a whole number.
Note 2: The remaining data points in the last message are padded with zeros.

The time it will take to receive the complete acceleration spectrum is:

17 ∗ f ragment_message_interval = time_to_complete_F F T

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 48 of 50
8 EXAMPLES

Acceleration spectrum (5-205 Hz)


250

200

150
|A(f)|

100

50

0
0 1000 2000 3000 4000 5000 6000 7000
f (Hz)

frame_num 1 frame_num 2 frame_num 3 frame_num ... frame_num N


250 250 250 250 250

200 200 200 200 200

150 150 150 150 150


|A(f)|

|A(f)|

|A(f)|

|A(f)|

|A(f)|
100 100 100 100 100

50 50 50 50 50

0 0 0 0 0
220 240 260 280 300 320 340 360 380 400 420 440 3500 3520 3540 3560 6620 6640 6660 6680
f (Hz) f (Hz) f (Hz) f (Hz) f (Hz)

Figure 10: Example acceleration FFT

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 49 of 50
Revision History

Revision Date Author(s) Description


A1 20-08-2020 ZZ Initial version
A2 20-08-2020 TB, ZZ, ML Release
A3 03-11-2020 TB, ZZ, ML, WK - Added examples for FFT
- Added CRC example
- Added HEX and JSON examples
- Included review comments
- Removed unpair message
- Updated figures
- Added frontpage
- Changed format
- Changed Application event to Sensor event
- Changed Application data to Sensor data
B 20-11-2020 TB, ZZ, ML, WK Release B
B1 27-01-2021 ML - Added button as event message trigger source
B2 02-04-2021 TB, ZZ, ML - Added sensor device id
- Changed Hz to FFT bin as unit for the FFT config
- Rearranged boot message
- Changed calculation triggers to a bitmask
- Changed temperature ranges
- Corrected BIST ok value
- Removed examples (Will be added to the Github page)
- Updated figure
- Updated tabel naming
- Updated figure naming
- Format updates
- Updated figures
- Changed FFT triggers to bitmask
C 06-04-2021 TB, ZZ, ML Release C
C1 08-04-2021 ML - Corrected default values Sensor Data Configuration
- Corrected mistakes in default ranges
- Corrected units of trigger
- Added explanation of disabling event
- Added unit of FFT trigger
D 14-04-2021 TB, ZZ, ML Release D
D1 20-04-2021 ML Removed config_crc from config JSON
D2 07-05-2021 TB - Changed velocity scaling factor to scientific notation
- Changed acceleration scaling factor to scientific notation
- Increased protocol verion to 2
E 10-05-2021 ML Release E

6013_P20-002_Communication-Protocol-NEON-Vibration-Sensor_E 50 of 50

You might also like