High precision sensor CAN protocol
High-precision sensor CAN protocol
Instructions for use:
The serial port sending command must be completed within 10S, otherwise it will be automatically locked. In order to avoid automatic locking, the following steps can be performed first.
1. Enter the unlock command
2. Enter the command that needs to modify or read the data
3. Save the command
Register table
ADDR (Hex) | ADDR (Dec) | REGISTER NAME | FUNCTION | SERIAL I/F | Bit15 | Bit14 | Bit13 | Bit12 | Bit11 | Bit10 | Bit9 | Bit8 | Bit7 | Bit6 | Bit5 | Bit4 | Bit3 | Bit2 | Bit1 | Bit0 |
00 | 00 | SAVE | save/reboot/reset | R/W | SAVE[15:0] | |||||||||||||||
01 | 01 | CALSW | calibration mode | R/W | CALSW[3:0] | |||||||||||||||
04 | 04 | BAUD | serial baud rate | R/W | BAUD[3:0] | |||||||||||||||
05 | 05 | AXOFFSET | Acceleration X Zero Bias | R/W | AXOFFSET[15:0] | |||||||||||||||
06 | 06 | AYOFFSET | Acceleration Y zero Bias | R/W | AYOFFSET[15:0] | |||||||||||||||
07 | 07 | AZOFFSET | Acceleration Z zero Bias | R/W | AZOFFSET[15:0] | |||||||||||||||
08 | 08 | GXOFFSET | Angular velocity X zero bias | R/W | GXOFFSET[15:0] | |||||||||||||||
09 | 09 | GYOFFSET | Angular velocity Y zero bias | R/W | GYOFFSET[15:0] | |||||||||||||||
0A | 10 | GZOFFSET | Angular velocity Z zero bias | R/W | GZOFFSET[15:0] | |||||||||||||||
0B | 11 | HXOFFSET | Magnetic Field X Zero Bias | R/W | HXOFFSET[15:0] | |||||||||||||||
0C | 12 | HYOFFSET | Magnetic Field Y zero bias | R/W | HYOFFSET[15:0] | |||||||||||||||
0D | 13 | HZOFFSET | Magnetic Field Z zero bias | R/W | HZOFFSET[15:0] | |||||||||||||||
0E | 14 | WORKMODE【1】 | Z-axis operation mode | R/W | WORKMODE[15:0] | |||||||||||||||
10 | 16 | GYROPTP【1】 | Z-axis static peak-to-peak | R/W | GYROPTP[15:0] | |||||||||||||||
11 | 17 | GPTPTIME【1】 | Z-axis peak-to-peak acquisition time | R/W | GPTPTIME[15:0] | |||||||||||||||
12 | 18 | GYROBAIS【1】 | Z-axis zero bias value | R/W | GYROBAIS[15:0] | |||||||||||||||
13 | 19 | GBAISTIME【1】 | Z-axis zero bias acquisition time | R/W | GBAISTIME[15:0] | |||||||||||||||
14 | 20 | GSTATICTHRE【1】 | Z-axis static threshold | R/W | GSTATICTHRE[15:0] | |||||||||||||||
15 | 21 | GSTATICTIME【1】 | Z axis stabilization time | R/W | GSTATICTIME[15:0] | |||||||||||||||
16 | 22 | PGSCALE【1】 | Z-axis calibration factor P | R/W | PGSCALE[15:0] | |||||||||||||||
18 | 24 | GSCALERANGE【1】 | Z-axis calibration angle | R/W | GSCALERANGE[15:0] | |||||||||||||||
1A | 26 | IICADDR | Device address | R/W | IICADDR[7:0] | |||||||||||||||
1B | 27 | LEDOFF | Turn off the LED lights | R/W | LEDOFF | |||||||||||||||
1C | 28 | MAGRANGX | Magnetic Field X Calibration Range | R/W | MAGRANGX[15:0] | |||||||||||||||
1D | 29 | MAGRANGY | Magnetic Field Y Calibration Range | R/W | MAGRANGY[15:0] | |||||||||||||||
1E | 30 | MAGRANGZ | Magnetic Field Z Calibration Range | R/W | MAGRANGZ[15:0] | |||||||||||||||
1F | 31 | BANDWIDTH | Bandwidth | R/W | BANDWIDTH[3:0] | |||||||||||||||
20 | 32 | GYRORANGE | Gyroscope range | R/W | GYRORANGE[3:0] | |||||||||||||||
21 | 33 | ACCRANGE | Acceleration range | R/W | ACCRANGE[3:0] | |||||||||||||||
22 | 34 | SLEEP | sleep | R/W | SLEEP | |||||||||||||||
23 | 35 | ORIENT | Installation direction | R/W | ORIENT | |||||||||||||||
24 | 36 | AXIS6 | algorithm | R/W | AXIS6 | |||||||||||||||
25 | 37 | FILTK | Dynamic filtering | R/W | FILTK[15:0] | |||||||||||||||
26 | 38 | GPSBAUD | GPS baud rate | R/W | GPSBAUD[3:0] | |||||||||||||||
27 | 39 | READADDR | read register | R/W | READADDR[7:0] | |||||||||||||||
2A | 42 | ACCFILT | acceleration filter | R/W | ACCFILT[15:0] | |||||||||||||||
2E | 46 | VERSION | version number | R | VERSION[15:0] | |||||||||||||||
30 | 48 | YYMM | year/mouth | R/W | MOUTH[15:8] | YEAR[7:0] | ||||||||||||||
31 | 49 | DDHH | day/hour | R/W | HOUR[15:8] | DAY[7:0] | ||||||||||||||
32 | 50 | MMSS | minute/second | R/W | SECONDS[15:8] | MINUTE[7:0] | ||||||||||||||
33 | 51 | MS | millisecond | R/W | MS[15:0] | |||||||||||||||
34 | 52 | AX | Acceleration X | R | AX[15:0] | |||||||||||||||
35 | 53 | AY | Acceleration Y | R | AY[15:0] | |||||||||||||||
36 | 54 | AZ | Acceleration Z | R | AZ[15:0] | |||||||||||||||
37 | 55 | GX | Angular velocity X | R | GX[15:0] | |||||||||||||||
38 | 56 | GY | Angular velocity Y | R | GY[15:0] | |||||||||||||||
39 | 57 | GZ | Angular velocity Z | R | GZ[15:0] | |||||||||||||||
3A | 58 | HX | Magnetic field X | R | HX[15:0] | |||||||||||||||
3B | 59 | HY | Magnetic field Y | R | HY[15:0] | |||||||||||||||
3C | 60 | HZ | Magnetic field Z | R | HZ[15:0] | |||||||||||||||
3D | 61 | LRoll | X-axis angle low | R | LRoll[15:0] | |||||||||||||||
3E | 62 | HRoll | X-axis angle high | R | HRoll[15:0] | |||||||||||||||
3F | 63 | LPitch | Y-axis angle low | R | LPitch[15:0] | |||||||||||||||
40 | 64 | HPitch | Y-axis angle high | R | HPitch[15:0] | |||||||||||||||
41 | 65 | LYaw | Z-axis angle low | R | LYaw[15:0] | |||||||||||||||
42 | 66 | HYaw | Z-axis angle high | R | HYaw[15:0] | |||||||||||||||
43 | 67 | TEMP | Module temperature | R | TEMP[15:0] | |||||||||||||||
61 | 97 | GYROCALITHR | Gyro Calibration Threshold | R/W | GYROCALITHR[15:0] | |||||||||||||||
63 | 99 | GYROCALTIME | Gyro calibration time | R/W | GYROCALTIME[15:0] | |||||||||||||||
69 | 105 | KEY | unlock | R/W | KEY[15:0] | |||||||||||||||
6A | 105 | WERROR | Gyroscope change value | R/W | WERROR[15:0] | |||||||||||||||
6E | 110 | WZTIME | Z-axis still time threshold | R/W | WZTIME[15:0] | |||||||||||||||
6F | 111 | WZSTATIC | Z-axis static threshold | R/W | WZSTATIC[15:0] | |||||||||||||||
74 | 116 | MODDELAY | 485 data response delay | R/W | MODDELAY[15:0] | |||||||||||||||
7F | 127 | NUMBERID1 | Device No. 1-2 | R | ID2[15:8] | ID1[7:0] | ||||||||||||||
80 | 128 | NUMBERID2 | Device No. 3-4 | R | ID4[15:8] | ID3[7:0] | ||||||||||||||
81 | 129 | NUMBERID3 | Device No. 5-6 | R | ID6[15:8] | ID5[7:0] | ||||||||||||||
82 | 130 | NUMBERID4 | Device No. 7-8 | R | ID8[15:8] | ID7[7:0] | ||||||||||||||
83 | 131 | NUMBERID5 | Device No. 9-10 | R | ID10[15:8] | ID9[7:0] | ||||||||||||||
84 | 132 | NUMBERID6 | Device No. 11-12 | R | ID12[15:8] | ID11[7:0] | ||||||||||||||
95 | 149 | LREFROLL | ROLL angle zero is low bit | R/W | LREFROLL[15:0] | |||||||||||||||
96 | 150 | HREFROLL | ROLL angle zero bias high bit | R/W | HREFROLL[15:0] | |||||||||||||||
97 | 151 | LREFPITCH | PITCH angle zero bias low bit | R/W | LREFPITCH[15:0] | |||||||||||||||
98 | 152 | HREFPITCH | PITCH angle zero bias high bit | R/W | HREFPITCH[15:0] |
explanation:
Callout registers are only available for HWTX073.
Protocol format
Active output format
Data is sent in hexadecimal, not ASCII.
Each data is transmitted in sequence by low byte and high byte, and the two are combined into a signed short type of data. For example, for data DATA1, DATA1L is the low byte and DATA1H is the high byte. The conversion method is as follows: Suppose DATA1 is the actual data, DATA1H is its high-byte part, DATA1L is its low-byte part,Then: DATA1=(short)((short)DATA1H<<8|DATA1L). It must be noted here that DATA1H needs to be coerced into a signed short type of data before shifting, and the data type of DATA1 is also a signed short type, so that it can represent negative numbers.
protocol head | Data content | Data lower 8 bits | Data high 8 bits | Data lower 8 bits | Data high 8 bits | Data lower 8 bits | Data high 8 bits |
0x55 | TYPE【1】 | DATA1L[7:0] | DATA1H[15:8] | DATA2L[7:0] | DATA2H[15:8] | DATA3L[7:0] | DATA3H[15:8] |
【1】TYPE(Data content):
TYPE | Remark |
0x50 | Time |
0x51 | Acceleration |
0x52 | Angular velocity |
0x53 | Angle |
0x54 | Magnetic field |
0x5F | Read |
Time output
0x55 | 0x50 | YY | MM | DD | HH | MN | SS |
Name | Description | Remark | |||||
YY | year | ||||||
MM | mouth | ||||||
DD | day | ||||||
HH | hour | ||||||
MN | minute | ||||||
SS | second |
Acceleration output
0x55 | 0x51 | AxL | AxH | AyL | AyH | AzL | AzH |
Name | Description | Remark | |||||
AxL | Acceleration X low 8 bits | acceleration X=((AxH<<8)|AxL)/32768*16g (g is the gravitational acceleration, preferably 9.8m/s2) | |||||
AxH | Acceleration X high 8 bits | ||||||
AyL | Acceleration Y low 8 bits | acceleration Y=((AyH<<8)|AyL)/32768*16g (g is the gravitational acceleration, preferably 9.8m/s2) | |||||
AyH | Acceleration Y high 8 bits | ||||||
AzL | Acceleration Z low 8 bits | acceleration Z=((AzH<<8)|AzL)/32768*16g (g is the gravitational acceleration, preferably 9.8m/s2) | |||||
AzH | Acceleration Z high 8 bits |
Angular velocity
0x55 | 0x52 | WxL | WxH | WyL | WyH | WzL | WzH |
Name | Description | Remark | |||||
WxL | Angular velocity X low 8 bits | Angular velocity X=((WxH<<8)|WxL)/32768*2000°/s | |||||
WxH | Angular velocity X high 8 bits | ||||||
WyL | Angular velocity Y low 8 bits | Angular velocity Y=((WyH<<8)|WyL)/32768*2000°/s | |||||
WyH | Angular velocity Y high 8 bits | ||||||
WzL | Angular velocity Z low 8 bits | Angular velocity Z=((WzH<<8)|WzL)/32768*2000°/s | |||||
WzH | Angular velocity Z high 8 bits |
Angle output(Roll)
0x55 | 0x53 | 0x01 | 0x00 | LRollL | LRollH | HRollL | HRollH |
Name | Description | Remark | |||||
0x01 | Roll angle X mark | Indicates that this packet is roll angle data | |||||
0x00 | Retain | Retain | |||||
LRollL | roll angle X[8:0] | roll angle(x-axis) Roll = (float)(((int)HRollH<<24)| ((int)HRollL<<16)| ((int)LRollH<<8)| (int)LRollL)/1000.0 | |||||
LRollH | roll angle X[15:9] | ||||||
HRollL | roll angle X[23:16] | ||||||
HRollH | roll angle X[31:24] |
Angle output (Pitch)
0x55 | 0x53 | 0x02 | 0x00 | LPtichL | LPtichH | HPtichL | HPtichH |
Name | Description | Remark | |||||
0x01 | Pitch angle Y mark | Indicates that this packet is pitch angle data | |||||
0x00 | retain | retain | |||||
LRollL | Pitch Y[8:0] | Pitch angle(y-asix) | |||||
LRollH | Pitch Y[15:9] | ||||||
HRollL | Pitch Y[23:16] | ||||||
HRollH | Pitch Y[31:24] |
Angle output(Yaw)
0x55 | 0x53 | 0x03 | 0x00 | LYawH | LYawH | HYawL | HYawH |
Name | Description | Remark | |||||
0x01 | Yaw angle Z mark | Indicates that this data packet is yaw angle data | |||||
0x00 | retain | retain | |||||
LRollL | yaw angleZ[8:0] | yaw angle(z-axis) | |||||
LRollH | yaw angleZ[15:9] | ||||||
HRollL | yaw angleZ[23:16] | ||||||
HRollH | yaw angleZ[31:24] |
Magnetic field
0x55 | 0x54 | HxL | HxH | HyL | HyH | HzL | HzH |
Name | Description | Remark | |||||
HxL | Magnetic field X lower 8 bits | Magnetic field X=((HxH<<8)|HxL) | |||||
HxH | Magnetic field X high 8 bits | ||||||
HyL | Magnetic field Y lower 8 bits | Magnetic fieldY=((HyH <<8)|HyL) | |||||
HyH | Magnetic field Y high 8 bits | ||||||
HzL | Magnetic field Z lower 8 bits | Magnetic fieldZ=((HzH<<8)|HzL) | |||||
HzH | Magnetic field Z high 8 bits |
Read register format
Data is sent in hexadecimal, not ASCII.
Each register address, the number of read registers, and the read data are represented by two bytes. The high and low bits of the register address are represented by ADDRH and ADDRL, the high and low bits of the number of registers to be read are represented by LENH and LENL, and the high and low bits of the read data are represented by DATA1H and DATA1L.
command send
protocol header | protocol header | register | data lower 8 bits | Data high 8 bits |
0xFF | 0xAA | ADDR | DATAL[7:0] | DATAH[15:8] |
Data return
0x55 | 0x5F | REG1L | REG1H | REG2L | REG2H | REG3L | REG3H |
Name | Description | Remark | |||||
REG1L | Register 1 lower 8 bits | REG1[15:0]=((REG1H<<8)|REG1L) | |||||
REG1H | Register 1 high 8 bits | ||||||
REG2L | Register 2 lower 8 bits | REG2[15:0]=((REG2H<<8)|REG2L) | |||||
REG2H | Register 2 high 8 bits | ||||||
REG3L | Register 3 lower 8 bits | REG3[15:0]=((REG3H<<8)|REG3L) | |||||
REG3H | Register 3 high 8 bits |
Write register format
Data is sent in hexadecimal, not ASCII.
All settings need to operate the unlock register (KEY) first
For each register address, the write data is represented by two bytes. The high and low bits of the register address are represented by ADDRH and ADDRL, and the high and low bits of the written data are represented by DATAH and DATAL.
protocol header | protocol header | register | data lower 8 bits | data high 8 bits |
0xFF | 0xAA | ADDR | DATAL[7:0] | DATAH[15:8] |
Register Description
SAVE(save/reboot/reset)
Register Name: SAVE Register Address: 0 (0x00) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | SAVE[15:0] | save: 0x0000 reboot: 0x00FF reset: 0x0001 |
example:FF AA 00 FF 00(reboot) |
CALSW(calibration mode)
Register Name: CALSW Register Address: 1 (0x01) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:4 | ||
3:0 | CAL[3:0] | Set calibration mode: 0000(0x00): normal working mode 0001(0x01): Auto calibration 0011(0x03): height reset 0100(0x04): Set the heading angle to zero 0111(0x07): Magnetic Field Calibration (Spherical Fitting) 1000(0x08): set angle reference 1001(0x09): Magnetic Field Calibration (Dual Plane Mode) |
example:FF AA 01 04 00(Heading angle set to zero) |
RSW(output content)
Register Name: RSW Register Address: 2 (0x02) Read and write direction: R/W Default: 0x001E | ||
Bit | NAME | FUNCTION |
15:11 | ||
10 | GSA (0x5A) | 0: turn off 1: turn on |
9 | QUATER (0x59) | 0: turn off 1: turn on |
8 | VELOCITY (0x58) | 0: turn off 1: turn on |
7 | GPS (0x57) | 0: turn off 1: turn on |
6 | PRESS (0x56) | 0: turn off 1: turn on |
5 | PORT (0x55) | 0: turn off 1: turn on |
4 | MAG (0x54) | 0: turn off 1: turn on |
3 | ANGLE (0x53) | 0: turn off 1: turn on |
2 | GYRO (0x52) | 0: turn off 1: turn on |
1 | ACC (0x51) | 0: turn off 1: turn on |
0 | TIME (0x50) | 0: turn off 1: turn on |
example:FF AA 02 3E 00(Set to output only acceleration, angular velocity, angle, magnetic field, port status) |
RRATE(output rate)
Register Name: RRATE Register Address: 3 (0x03) Read and write direction: R/W Default: 0x0006 | ||
Bit | NAME | FUNCTION |
15:4 | ||
3:0 | RRATE[3:0] | Set the output rate: 0001(0x01): 0.2Hz 0010(0x02): 0.5Hz 0011(0x03): 1Hz 0100(0x04): 2Hz 0101(0x05): 5Hz 0110(0x06): 10Hz 0111(0x07): 20Hz 1000(0x08): 50Hz 1001(0x09): 100Hz 1011(0x0B): 200Hz 1011(0x0C): single postback 1100(0x0D): don't post back |
Example: FF AA 03 03 00 (set 1Hz output) |
BAUD(Serial port baud rate)
Register Name: BAUD Register Address: 4 (0x04) Read and write direction: R/W Default: 0x0002 | ||
Bit | NAME | FUNCTION |
15:4 | ||
3:0 | BAUD[3:0] | Set the serial port baud rate: 0000(0x00): 1000000bps 0001(0x01): 800000bps 0010(0x02): 500000bps 0011(0x03): 400000bps 0100(0x04): 250000bps 0101(0x05): 200000bps 0110(0x06): 125000bps 0111(0x07): 100000bps 1000(0x08): 80000bps 1001(0x09): 50000bps 1010(0x0A): 40000bps 1011(0x0B): 20000bps 1100(0x0C): 10000bps 1101(0x0D): 5000bps 1110(0x0E): 3000bps |
Example: FF AA 04 02 00 (set serial port baud rate 500000) |
AXOFFSET~HZOFFSET(Zero bias setting)
Register Name: AXOFFSET~HZOFFSET Register Address: 5~13 (0x05~0x0D) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | AXOFFSET[15:0] | Acceleration X-axis bias, actual acceleration bias=AXOFFSET[15:0]/10000(g) |
15:0 | AYOFFSET[15:0] | Acceleration Y-axis bias, actual acceleration bias=AYOFFSET[15:0]/10000(g) |
15:0 | AZOFFSET[15:0] | Acceleration Z-axis bias, actual acceleration bias=AZOFFSET[15:0]/10000(g) |
15:0 | GXOFFSET[15:0] | Angular velocity X-axis bias, actual angular velocity bias=GXOFFSET[15:0]/10000(°/s) |
15:0 | GYOFFSET[15:0] | Angular velocity Y-axis offset, actual angular velocity offset=GYOFFSET[15:0]/10000(°/s) |
15:0 | GZOFFSET[15:0] | Angular velocity Z-axis offset, actual angular velocity offset=GZOFFSET[15:0]/10000(°/s) |
15:0 | HXOFFSET[15:0] | Magnetic field X-axis zero bias |
15:0 | HYOFFSET[15:0] | Magnetic field Y axis zero bias |
15:0 | HZOFFSET[15:0] | Magnetic field Z axis zero bias |
Example:FF AA 05 E8 03(Set acceleration X-axis zero bias 0.1g),0x03E8=1000,1000/10000=0.1(g) |
WORKMODE(Z-axis operation mode)
Register Name: WORKMODE Register address: 14(0x0E) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:4 | ||
3:0 | WORKMODE[3:0] | Set the Z-axis operation mode: 0000(0x00): normal data mode 0001(0x01): peak-to-peak mode 0010(0x02): seek zero offset mode 0011 (0x03): find scale factor mode |
Example: Send: FF AA 14 01 00 (Automatically obtain zero offset) |
GYROPTP(Z-axis static peak-to-peak)
Register Name: GYROPTP Register address: 16(0x10) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | GYROPTP[15:0] | Parameters used in calculating zero offset, no need to set for sensor automatic acquisition |
Write 0x01 to the "WORKMODE" register to enter the "peak-to-peak mode", in this mode the sensor automatically calculates the maximum and minimum values of the Z-axis angular velocity within the time set by "GPTPTIME" and records them in "GYROPTP". In "Zero Offset Mode", this data will be used to calculate and filter the zero offset. Z-axis static peak-to-peak value = GYROPTP/1000 (°/s) Example: Send: FF AA 27 10 00 (read Z-axis static peak-to-peak value) Return: 55 5F 64 00 XX XX XX XX XX XX SUM 0x0064=100, Z-axis static peak-to-peak value = 100/1000=0.1 (°/s) |
GPTPTIME(Z-axis peak-to-peak acquisition time)
Register Name: GPTPTIME Register address: 17(0x11) Read and write direction: R/W Default: 0x000A | ||
Bit | NAME | FUNCTION |
15:0 | GPTPTIME[15:0] | Calculate the peak-to-peak time, the default is 10S |
Example: Send: FF AA 11 0A 00 (set the Z-axis peak-to-peak acquisition time to 10S) After entering the "Peak-to-Peak Mode", obtain the difference between the maximum value and the minimum value of the Z-axis angular velocity within the "GPTPTIME" time, store it in "GYROPTP", and use this data for zero bias in the "Zero Bias Mode". calculation filter. |
GYROBAIS(Z axis zero bias value)
Register Name: GYROBAIS Register address: 18(0x12) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | GYROBAIS[15:0] | The zero bias value of the horizontal gyroscope, which can be obtained through the "Zero Bias Mode" |
The Z-axis horizontal gyroscope has a certain zero bias value under static placement, and the angular velocity at rest can be eliminated by this zero bias value. The zero offset value can be automatically calculated by automatically obtaining the zero bias. Enter the "Zero bias Mode" to automatically calculate the zero bias value according to the peak-to-peak value of "GYROPTP" and the "GBAISTIME" zero bias acquisition time. Z-axis zero bias =GYROBAIS/1000(°/s) Example: Send:FF AA 27 12 00(Read Z-axis static peak-to-peak value) Return:55 5F 64 00 XX XX XX XX XX XX SUM 0x0064=100,Z-axis static peak-to-peak= 100/1000=0.1(°/s) |
GBAISTIME(Z axis zero bias acquisition time)
Register Name: GBAISTIME Register Address: 19(0x13) Read and write direction: R/W Default: 0x000A | ||
Bit | NAME | FUNCTION |
15:0 | GBAISTIME[15:0] | Time required to calculate the zero bias value of the horizontal gyroscope |
Example: Send:FF AA 13 0A 00(Set the Z axis zero bias acquisition time to 10S) The time required to obtain the Z-axis zero bias, and the zero bias value is obtained according to this time when the zero bias is obtained.。 |
GSTATICTHRE(Z-axis static threshold)
Register Name: GSTATICTHRE Register address: 20(0x14) Read and write direction: R/W Default: 0x0032 | ||
Bit | NAME | FUNCTION |
15:0 | GSTATICTHRE[15:0] | The larger the GSTATICTHRE[15:0], the weaker the seismic performance and the smaller the error The smaller the GSTATICTHRE[15:0], the better the seismic performance and the larger the error. Default value 50 |
The Z-axis horizontal gyroscope has slight data jitter when it is placed at rest. This parameter can filter out these slight jitters. When the angular velocity is less than the "GSTATICTHRE" setting value and lasts for the time set by "GSTATICTIME", it is regarded as stationary, and the Z-axis angular velocity is zero. This parameter can be appropriately increased when it is used in scenes with jitter and the Z-axis is accumulated due to jitter, and this parameter can be appropriately decreased in scenes with very slow and uniform rotation. Z-axis zero bias value=GSTATICTHRE/1000(°/s) Example: Send:FF AA 14 64 00((Set the Z-axis static threshold to 0.1g),0x0064=100,100/10000=0.1(°)) |
GSTATICTIME(Z axis stabilization time)
Register Name: GSTATICTIME Register address: 21(0x15) Read and write direction: R/W Default: 0x0064 | ||
Bit | NAME | FUNCTION |
15:0 | GSTATICTIME[15:0] | Z-axis judges the still time |
Z-axis static judgment time threshold. It is considered stationary when the angular velocity is less than the value set by "GSTATICTHRE" for the time set by "GSTATICTIME". If the stabilization time is required to be higher, this parameter can be adjusted appropriately. Lowering this parameter can speed up settling time but may also increase error. Z-axis stabilization time = GSTATICTIME/1000 (s) Example: Send:FF AA 15 32 00 ((Set the Z axis stabilization time0.05s),0x0032=50,50/10000=0.05(°)) |
PGSCALE(Z-axis calibration factor P)
Register Name: PGSCALE Register address: 22(0x16) Read and write direction: R/W Default: 0x2710 | ||
Bit | NAME | FUNCTION |
15:0 | PGSCALE[15:0] | Range:0~20000 This parameter is written in the factory using a high-precision turntable, please do not modify it |
There is an error in the measurement of the Z-axis gyroscope, and a high-precision turntable will be used to measure this error when leaving the factory, and this parameter will be written into the sensor. Do not modify this parameter unless necessary. This parameter can be automatically calculated in the "scale factor mode". After entering the "scale factor mode", rotate the sensor by the angle set by "GSCALERANGE" to calculate the calibration factor. Z-axis calibration factorP=PGSCALE/10000.0 Example: Send:FF AA 27 16 00(Read Z-axis calibration factorP) Return:55 5F 74 27 XX XX XX XX XX XX SUM 0x2774 = 10100,Read Z-axis calibration factorP = 10100/10000=1.01 |
GSCALERANGE(Z-axis calibration angle)
Register Name: GSCALERANGE Register address: 24(0x18) Read and write direction: R/W Default: 0x02D0 | ||
Bit | NAME | FUNCTION |
15:0 | GSCALERANGE[15:0] | When calibrating the factor, it needs to be calibrated according to this parameter |
Example: Send:FF AA 18 68 01((Set the Z-axis calibration angle360),0x0168=360) The required rotation angle of the Z axis in the "scale factor mode" is generally set to an integer multiple of 360°. |
IICADDR(Device address)
Register Name: IICADDR Register Address: 26 (0x1A) Read and write direction: R/W Default: 0x0050 | ||
Bit | NAME | FUNCTION |
15:8 | ||
7:0 | IICADDR[7:0] | Set the device address for I2C and Modbus communication 0x01~0x7F |
示例:FF AA 1A 02 00(设置设备地址为0x02) |
LEDOFF(turn off LED light)
Register Name: LEDOFF Register Address: 27 (0x1B) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:1 | ||
0 | LEDOFF | 1: turn off LED light 0: turn on LED light |
Example:FF AA 1B 01 00(turn off LED light) |
MAGRANGX~MAGRANGZ(Magnetic Field Calibration Range)
Register Name: MAGRANGX~MAGRANGZ Register Address: 28~30 (0x1C~0x1E) Read and write direction: R/W Default: 0x01F4 | ||
Bit | NAME | FUNCTION |
15:0 | MAGRANGX[15:0] | Magnetic field calibration X-axis range |
15:0 | MAGRANGY[15:0] | Magnetic Field Calibration Y-axis Range |
15:0 | MAGRANGZ[15:0] | Magnetic field calibration Z-axis range |
Example:FF AA 1C F4 01(Set the magnetic field calibration X-axis range to 500) |
BANDWIDTH
Register Name: BANDWIDTH Register Address: 31 (0x1F) Read and write direction: R/W Default: 0x0004 | ||
Bit | NAME | FUNCTION |
15:4 | ||
3:0 | BANDWIDTH[3:0] | set bandwidth 0000(0x00): 256Hz 0001(0x01): 188Hz 0010(0x02): 98Hz 0011(0x03): 42Hz 0100(0x04): 20Hz 0101(0x05): 10Hz 0110(0x06): 5Hz |
Example:FF AA 1F 01 00(set bandwidth to188Hz) |
GYRORANGE
Register Name: GYRORANGE Register Address: 32 (0x20) Read and write direction: R/W Default: 0x0003 | ||
Bit | NAME | FUNCTION |
15:4 | ||
3:0 | GYRORANGE[3:0] | Set the gyro range 0011(0x03): 2000°/s The default is 2000°/s, fixed and cannot be set |
Example:FF AA 20 03 00(Set the gyro range 2000°/s) |
ACCRANGE(Accelerometer range)
Register Name: ACCRANGE Register Address: 33 (0x21) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:4 | ||
3:0 | ACCRANGE[3:0] | set accelerometer range 0000(0x00): ±2g 0011(0x03): ±16g This parameter cannot be set. The internal adaptive acceleration range of the product will automatically switch to 16g when the acceleration exceeds 2g. |
Example:FF AA 21 00 00(Set the accelerometer range16g) |
SLEEP
Register Name: SLEEP Register Address: 34 (0x22) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:1 | ||
0 | SLEEP | set sleep 1(0x01): sleep Any serial port data, can wake up |
Example:FF AA 22 01 00(go to sleep) |
ORIENT
Register Name: ORIENT Register Address: 35 (0x23) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:1 | ||
0 | ORIENT | Set the installation direction 0 (0x00): horizontal installation 1(0x01): vertical installation (the Y-axis arrow of the coordinate axis must be upward) |
Example:FF AA 23 01 00(Set up vertical installation) |
AXIS6
Register Name: AXIS6 Register Address: 36 (0x24) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:1 | ||
0 | AXIS6 | set algorithm 0(0x00): 9-axis algorithm (magnetic field solution navigation angle, absolute heading angle) 1(0x01): 6-axis algorithm (integral solution navigation angle, relative heading angle) |
Example: FF AA 24 01 00 (set 6-axis algorithm mode) |
FILTK
Register Name: FILTK Register Address: 37 (0x25) Read and write direction: R/W Default: 0x001E | ||
Bit | NAME | FUNCTION |
15:0 | FILTK[15:0] | range:1~10000,The default is 30 (it is not recommended to modify, once modified, if the angle does not meet the requirements for use, please modify it to 30) The smaller the FILTK[15:0], the stronger the seismic performance and the weaker the real-time performance. The larger the FILTK[15:0], the weaker the seismic performance and the stronger the real-time performance. |
Example:FF AA 25 1E 00(Set the K value filter to 30) |
READADDR(read register)
Register Name: READADDR Register Address: 39 (0x27) Read and write direction: R/W Default: 0x00FF | ||
Bit | NAME | FUNCTION |
15:8 | ||
7:0 | READADDR[7:0] | Read register range: Please refer to "Register Table" |
Example: Send: FF AA 27 34 00 (read acceleration X axis 0x34) Return: 55 5F AXL AXH AYL AYH AZL AZH GXL GXH SUM For details, please refer to "Read Register Return Value" in the "Read Format" chapter |
ACCFILT(acceleration filter)
Register Name: ACCFILT Register Address: 42 (0x2A) Read and write direction: R/W Default: 0x01F4 | ||
Bit | NAME | FUNCTION |
15:0 | ACCFILT[15:0] | Range: 1~10000, the default is 500 (it is not recommended to modify, once modified, if the angle does not meet the requirements for use, please modify it to 500) The smaller the ACCFILT[15:0], the stronger the seismic performance and the weaker the real-time performance. The larger the ACCFILT[15:0], the weaker the seismic performance and the stronger the real-time performance. This parameter is an empirical value, which needs to be debugged according to different environments. In the tractor environment, ACCFILT[15:0] can be adjusted to 100, because the vibration of the tractor is serious and the anti-vibration performance needs to be improved |
Example: Send: FF AA 2A F4 01 (set acceleration filter 500) |
POWONSEND
Register Name: POWONSEND Register Address: 45 (0x2D) Read and write direction: R/W Default: 0x0001 | ||
Bit | NAME | FUNCTION |
15:4 | ||
3:0 | POWONSEND[3:0] | Set the command to start: 0000(0x00): Turn off power-on data output 0001(0x01): Turn on power-on data output |
Example: Send: FF AA 2D 00 00 (turn on power-on data output) |
VERSION
Register Name: VERSION Register Address: 46 (0x2E) Read and write direction: R Default: none | ||
Bit | NAME | FUNCTION |
15:0 | VERSION[15:0] | Different products, different version numbers |
Example: FF AA 27 2E 00 (read version number, 0x27 means read, 0x2E is version number register) Return: 55 5F VL VH XX XX XX XX XX XX SUM VERSION[15:0]=(short)(((short)VH<<8)|VL) |
YYMM~MS(on-chip time)
Register Name: YYMM~MS Register address: 48~51 (0x30~0x33) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:8 | YYMM[15:8] | mouth |
7:0 | YYMM[7:0] | year |
15:8 | DDHH[15:8] | hour |
7:0 | DDHH[7:0] | day |
15:8 | MMSS[15:8] | second |
7:0 | MMSS[7:0] | minute |
15:0 | MS[15:0] | millisecond |
Example: FF AA 30 16 03(Set year and month22-03) FF AA 31 0C 09(set day and hour12-09) FF AA 32 1E 3A(set minute and second30:58) FF AA 33 F4 01(set millisecond 500) Example: Send:FF AA 27 30 00(Read date, 0x27 means read, 0x30 is year month register) Return:55 5F YYMM[7:0] YYMM[15:8] DDHH[7:0] DDHH[15:8] MMSS[7:0] MMSS[15:8] MS[7:0] MS[15:8] SUM | ||
AX~AZ(acceleration)
Register Name: AX~AZ Register address: 52~54 (0x34~0x36) Read and write direction: R Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | AX[15:0] | Acceleration X=AX[15:0]/32768*16g (g is the acceleration of gravity, preferably 9.8m/s2) |
15:0 | AY[15:0] | Acceleration Y=AY[15:0]/32768*16g (g is the acceleration of gravity, preferably 9.8m/s2) |
15:0 | AZ[15:0] | Acceleration Z=AZ[15:0]/32768*16g (g is the acceleration of gravity, preferably 9.8m/s2) |
GX~GZ(Angular velocity)
Register Name: GX~GZ Register address: 55~57 (0x37~0x39) Read and write direction: R Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | GX[15:0] | Angular velocity X=GX[15:0]/32768*2000°/s |
15:0 | GY[15:0] | Angular velocity Y=GY[15:0]/32768*2000°/s |
15:0 | GZ[15:0] | Angular velocity Z=GZ[15:0]/32768*2000°/s |
HX~HZ(Magnetic field)
Register name: HX~HZ Register Address: 58~60 (0x3A~0x3C) Read and write direction: R Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | HX[15:0] | Magnetic field X=HX[15:0] (unit: LSB) |
15:0 | HY[15:0] | Magnetic field Y=HY[15:0] (unit: LSB) |
15:0 | HZ[15:0] | Magnetic field Z=HZ[15:0] (unit: LSB) |
Roll(Angle)
Register Name: Roll Register address: 61~62 (0x3D~0x3E) Read and write direction: R Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | LRoll[15:0] | Roll Angle X Low |
15:0 | HRoll[15:0] | Roll angle X high position, roll angle X=(((int)HRoll<<16)| LRoll)/1000° |
Pitch(Angle)
Register Name: Pitch Register address: 63~64 (0x3F~0x40) Read and write direction: R Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | LPitch[15:0] | Pitch angle Y low |
15:0 | HPitch[15:0] | Pitch angle Y high position, pitch angle X=(((int)HPitch<<16)| LPitch)/1000° |
Yaw(Angle)
Register Name: Yaw Register address: 65~66 (0x41~0x42) Read and write direction: R Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | LYaw[15:0] | Heading Angle Z Low |
15:0 | HYaw[15:0] | Heading angle Z high position, heading angle Z=(((int)HYaw<<16)| LYaw)/1000° |
TEMP(Angle)
Register Name: TEMP Register Address: 67 (0x43) Read and write direction: R Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | TEMP[15:0] | temperature=TEMP[15:0]/100℃ |
PressureL~HeightH(barometric altitude)
Register Name: PressureL~HeightH Register address: 69~72 (0x45~0x48) Read and write direction: R Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | PressureL[15:0] | barometric =((int)PressureH[15:0]<<16)|PressureL[15:0](Pa) |
15:0 | PressureH[15:0] | |
15:0 | HeightL[15:0] | altitude=((int)HeightH[15:0]<<16)|HeightL[15:0](cm) |
15:0 | HeightH[15:0] |
q0~q3(Quaternion)
Register name: q0~q3 Register address: 81~84 (0x51~0x54) Read and write direction: R Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | q0[15:0] | quaternion0=q0[15:0]/32768 |
15:0 | q1[15:0] | quaternion1=q1[15:0]/32768 |
15:0 | q2[15:0] | quaternion2=q2[15:0]/32768 |
15:0 | q3[15:0] | quaternion3=q3[15:0]/32768 |
GYROCALITHR(Gyro Still Threshold)
Register Name: GYROCALITHR Register Address: 97 (0x61) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | GYROCALITHR[15:0] | Set the gyroscope inactivity threshold: Gyro gyroscope static threshold=GYROCALITHR[15:0]/1000(°/s) |
Example: FF AA 61 32 00 (set the gyro static threshold to 0.05°/s, 0x0032=50, 50/1000=0.05(°/s)) When the angular velocity change is less than 0.05°/s and lasts for the time of "GYROCALTIME", the sensor recognizes it as stationary and automatically resets the angular velocity less than 0.05°/s to zero The setting rule of the static threshold of the gyroscope can be determined by reading the value of the "WERROR" register. The general setting rule is: GYROCALITHR=WERROR*1.2, unit: °/s This register needs to be used in conjunction with the GYROCALTIME register |
GYROCALTIME(Gyro auto calibration time)
Register Name: GYROCALTIME Register Address: 99 (0x63) Read and write direction: R/W Default: 0x03E8 | ||
Bit | NAME | FUNCTION |
15:0 | GYROCALTIME[15:0] | Set gyroscope auto-calibration time |
Example: Set gyroscope auto-calibration time to 500ms FF AA 63 F4 01 (set gyroscope automatic calibration time 500ms, 0x01F4=500(ms)) When the angular velocity change is less than "GYROCALITHR" and lasts for 500ms, the sensor recognizes that it is stationary and automatically resets the angular velocity less than 0.05°/s to zero This register needs to be used in conjunction with the GYROCALITHR register |
KEY(unlock)
Register Name: KEY Register Address: 105 (0x69) Read and write direction: R/W Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | KEY[15:0] | Unlock register: When performing a write operation, you need to set this register first |
Example: Unlock, write 0xB588 to this register (other values are invalid) Send: FF AA 69 88 B5 |
WERROR(Gyroscope change value)
Register Name: WERROR Register Address: 106 (0x6A) Read and write direction: R Default: 0x0000 | ||
Bit | NAME | FUNCTION |
15:0 | WERROR[15:0] | Gyroscope change value=WERROR[15:0]/1000*180/3.1415926(°/s) When the sensor is stationary, the "GYROCALITHR" register can be set by changing this register |
WZTIME(Angular velocity continuous rest time)
Register Name: WZTIME Register Address: 110 (0x6E) Read and write direction: R/W Default: 0x01F4 | ||
Bit | NAME | FUNCTION |
15:0 | WZTIME[15:0] | Angular velocity continuous rest time |
Example: FF AA 6E F4 01(Set the angular velocity continuous still time500ms,0x01F4=500(ms)) When the angular velocity is less than "WZSTATIC" and lasts for 500ms, the angular velocity output is 0, and the Z-axis heading angle is not integrated This register needs to be used in conjunction with the "WZSTATIC" register |
WZSTATIC(Angular velocity integral threshold)
Register Name: WZSTATIC Register Address: 111 (0x6F) Read and write direction: R/W Default: 0x012C | ||
Bit | NAME | FUNCTION |
15:0 | WZSTATIC[15:0] | Angular velocity integral threshold=WZSTATIC[15:0]/1000(°/s) |
Example: FF AA 6F F4 01 (set the angular velocity integral threshold to 0.5°/s, 0x01F4=500, 500/1000=0.5(°/s)) When the angular velocity is greater than 0.5°/s, the Z-axis heading angle starts to integrate the acceleration When the angular velocity is less than 0.5°/s, and the duration set by the register "WZTIME", the angular velocity output is 0, and the Z-axis heading angle is not integrated This register needs to be used in conjunction with the "WZTIME" register |
NUMBERID1~NUMBERID6(Device number)
Register Name: NUMBERID1~NUMBERID6 Register address: 127~132 (0x7F~0x84) Read and write direction: R Default: none | ||
Bit | NAME | FUNCTION |
15:0 | NUMBERID1[15:0] | |
15:0 | NUMBERID2[15:0] | |
15:0 | NUMBERID3[15:0] | |
15:0 | NUMBERID4[15:0] | |
15:0 | NUMBERID5[15:0] | |
15:0 | NUMBERID6[15:0] | |
Device number:WT4200000001 |
XREFROLL~YREFPITCH(Angle zero reference value)
Register Name: NUMBERID1~NUMBERID6 Register address: 127~132 (0x7F~0x84) Read and write direction: R/W Default: none | ||
Bit | NAME | FUNCTION |
15:0 | LREFROLL[15:0] | Roll angle zero reference value low |
15:0 | HREFROLL[15:0] | Roll angle zero reference value high, roll angle zero reference= (((int)HREFROLL<<16)| LREFROLL)/1000(°) |
15:0 | LREFPITCH[15:0] | Pitch angle zero reference value low |
15:0 | HREFPITCH[15:0] | Pitch angle zero reference value= (((int)HREFPITCH<<16)| LREFPITCH)/1000(°) |
Example: The current roll angle is 2°, set the roll angle zero, subtract 2°, then REFROLL[31:0]=2*1000=2000=0x07D0 LREFROLL[15:0]=0x07D0, HREFROLL[15:0]=0; FF AA 95 D0 07 (set "LREFROLL") FF AA 96 00 00 (set "HREFROLL") |
Last updated