In the RUN mode device will send raw acceleration data according to user defined settings.
A Sample packet will look like this
7E 00 C9 90 00 13 A2 00 41 8E A5 D6 FF FE C1 7F 01 00 03 FF DE 00 65 01 01 0A 07 13 0B 00 00 77 01 01 DE FF 7A 3F 8B 01 E1 FF 83 3F BB 01 E0 FF 92 3F D4 01 D4 FF 8F 3F B5 01 D0 FF A6 3F B5 01 D3 FF CB 3F B5 01 D5 FF DD 3F C4 01 D5 FF EB 3F C1 01 D8 FF D3 3F AE 01 DB FF BB 3F 9E 01 EE FF AA 3F A5 02 0C FF A0 3F CA 02 11 FF 9E 40 0D 01 FD FF 88 40 45 01 E6 FF 91 40 4C 01 DA FF 8B 40 8E 01 D2 FF 7E 40 CC 01 DC FF AD 40 DD 01 F2 FF C6 40 F6 01 E6 FF B5 40 E8 01 D4 FF A4 40 CA 01 D4 FF 7D 40 A0 01 E3 FF 55 40 67 01 F2 FF 62 40 4A 01 EB FF 70 40 2B 01 EB FF 6D 40 0A 01 ED FF 75 3F F9 01 E8 FF 65 3F E2 01 E9 FF 81
This packet can be broken down in two Section
Complete API mainly contains Device MAC address, and Device Specific Data.
In The above complete API packet the Device specific data is
7F 01 00 03 FF DE 00 65 01 01 0A 07 13 0B 00 00 77 01 01 DE FF 7A 3F 8B 01 E1 FF 83 3F BB 01 E0 FF 92 3F D4 01 D4 FF 8F 3F B5 01 D0 FF A6 3F B5 01 D3 FF CB 3F B5 01 D5 FF DD 3F C4 01 D5 FF EB 3F C1 01 D8 FF D3 3F AE 01 DB FF BB 3F 9E 01 EE FF AA 3F A5 02 0C FF A0 3F CA 02 11 FF 9E 40 0D 01 FD FF 88 40 45 01 E6 FF 91 40 4C 01 DA FF 8B 40 8E 01 D2 FF 7E 40 CC 01 DC FF AD 40 DD 01 F2 FF C6 40 F6 01 E6 FF B5 40 E8 01 D4 FF A4 40 CA 01 D4 FF 7D 40 A0 01 E3 FF 55 40 67 01 F2 FF 62 40 4A 01 EB FF 70 40 2B 01 EB FF 6D 40 0A 01 ED FF 75 3F F9 01 E8 FF 65 3F E2 01 E9 FF
Device Specific Data can be broken down into two Section
Value | Info |
---|---|
7F | Metadata Header |
01 | Node ID ( Every Device Must have Unique Node ID) |
00 | Firmware Version |
03,FF | Battery Voltage , battery % = raw_adc * 0.537 – 449.3 |
DE | Wireless Packet Counter |
00,65 | Device Type |
01 | Reserve Byte |
Field | Description |
---|---|
01 | Mode Of Operation |
0A | ODR |
07 | Enabled Axis |
13 | Hour |
0B | Minute |
00,00 | Device Temperature |
00,00 | External Temperature |
77 | Total Number of RF Packets |
01 | Current Packet Count value |
01 DE | X-Axis RAW ACC Data |
FF 7A | Y-Axis RAW ACC Data |
3F 8B | Y-Axis RAW ACC Data |
Number of Total Packet and length of packet can change based on user configuration.
Sensor Type — 0x66
Field | Description |
---|---|
0A | ODR |
13 | Hour |
0B | Minute |
00,00 | Device Temperature |
00,00 | External Temperature |
77 | Total Number of RF Packets |
01 | Current Packet Count value |
01 DE | RAW ADC Data |
Number of Total Packet and length of packet can change based on user configuration.
In this mode user can change device parameters. This device supports all the existing ncd sensor configuration parameters like Network ID, Node ID, Destination Address, ENY Key, Retries, RF Power etc. Detailed info can be found here
NCD Wireless Sensor Configuration Commands
COMMAND | COMMAND | SUB COMMAND | COMMAND CODE | ARGUMENT |
---|---|---|---|---|
SET OUTPUT DATA RATE | F4 | 4F | 0x00 | ODR 50 Hz 0x06 ODR 100 Hz 0x07 ODR 200 Hz 0x08 ODR 400 Hz 0x09 ODR 800 Hz 0x0A ODR 1600 Hz 0x0B |
GET OUTPUT DATA RATE | F4 | 4F | 0x01 | ODR 50 Hz 0x06 ODR 100 Hz 0x07 ODR 200 Hz 0x08 ODR 400 Hz 0x09 ODR 800 Hz 0x0A ODR 1600 Hz 0x0B |
SET SAMPLING DURATION | F4 | 4F | 0x02 | Period of samples in seconds must be > 0 |
GET SAMPLING DURATION | F4 | 4F | 0x03 | |
SET AXES ENABLE | F4 | 4F | 0x04 | Bit 0 —> X-axis Bit 1 —> Y-axis Bit 2 —> Z-axis Bit Set – Axis enabled Bit Cleared – Axis disabled |
GET AXES ENABLE | F4 | 4F | 0x05 | |
SET SAMPLING INTERVAL | F4 | 4F | 0x06 | Every 5 minutes 0x0 Every 10 minutes 0x01 Every 15 minutes 0x02 Every 20 minutes 0x03 Every 30 minutes 0x04 |
GET SAMPLING INTERVAL | F4 | 4F | 0x07 | |
SET RTC | F4 | 4F | 0x08 | Byte 1 : Hours Byte 2 : Minutes Byte 3 : Seconds |
SET FULL-SCALE RANGE | F4 | 4F | 0x0B | +/- 2g 0x00 +/- 4g 0x01 +/- 8g 0x02 +/- 16g 0x03 |
GET FULL-SCALE RANGE | F4 | 4F | 0x0C | +/- 2g 0x00 +/- 4g 0x01 +/- 8g 0x02 +/- 16g 0x03 |
NOTE– MAX number of samples are limited to 20KB.
Sample Duration is inversely proportional to the ODR.
The Total number of samples is 3400 when all 3 Axis are enabled. If only one axis is enabled then total number of samples will be 10,200.
For the calculation we will set the ODR to 800Hz. which means device will take 800 samples per second.
we are also assuming that all 3 Axis are enabled.
In this case the total time will be 3400/800 = 4. 25sec.
The interval is always set in integer seconds, so in this case the max data sample time will be 4 sec.
If The ODR is increased to 1600Hz, the total sample duration will reduce to 2sec.
If The ODR is decreased to 400Hz , The total sample duration will increase to 8sec.
Example 1: Set ODR to 100 Hz (Node ID is 0)
Command packet should be F4 4F 00 00 65 00 07
00 Command Type (Set ODR)
07 Parameter Setting (100 Hz)
Example 2: Set sampling duration to 5 seconds (Node ID is 0)
Command packet should be F4 4F 00 00 65 02 05
02 Command Type (Set Sampling Duration)
05 Parameter Setting (5 seconds)
Example 3: Get ODR (Node ID is 0)
Command packet should be F4 4F 00 00 65 01
01 Command Type (Get ODR)
Example 4: Set sampling interval to “Every 5 minutes” (Node ID is 0)
Command packet should be F4 4F 00 00 65 06 00
06 Command Type (Set Sampling Interval)
00 Parameter Setting (Every 5 minutes)
Example 5: Set enabled axes (X & Z enabled , Y disabled)(Node ID is 0)
Command packet should be F4 4F 00 00 65 04 05
04 Command Type (Set Enabled Axes)
05 Parameter Setting (0000 0101 –→ X enabled , Y disabled , Z enabled)
Example 6: Set Real-time clock to 10:22:32 (Node ID is 0)
Command packet should be F4 4F 00 00 65 08 0A 16 20
08 Command Type (Set RTC)
0A 16 20 Parameter Setting (Hours = 10 , Minutes = 22 , Seconds = 32)