WT901BLECL Attitude Angle Sensor
SPECIFICATION
Model :WT901BLECL
Description: 10-axis Bluetooth 4.0 attitude angle sensor with battery
Production Standard
Enterprise quality system standard: ISO9001:2016
Tilt switch production standard:GB/T191SJ 20873-2016
Criterion of detection:GB/T191SJ 20873-2016
Revision date:2018.06.20
Version            Update content     Author             Date
V1.0               Release            Sharlene           20180620
                                                                  Catalog
1 Description....................................................................................................................................... 3
2 Product Size...................................................................................................................................... 3
3 Features............................................................................................................................................ 4
4 Axial Diron........................................................................................................................................ 4
5 Method............................................................................................................................................. 4
     5.1 Connect App.......................................................................................................................... 4
     5.2Module Calibration.................................................................................................................5
           5.2.1Accelerometer Calibration.......................................................................................... 5
           5.2.2 Magnetic Calibration..................................................................................................7
           5.2.3 Calibration by Instruction...........................................................................................7
     5.3 Restore Factory Setting......................................................................................................... 8
     5.4 Sleep/ Wake up..................................................................................................................... 8
6 Communication Protocol..................................................................................................................8
     6.1 Module to APP.......................................................................................................................9
           6.1.1 Acceleration, Angular velocity, Angle, Data pack(default)........................................ 9
           6.1.2 Single Return Register Data Packet..........................................................................10
     6.2 APP to Module.....................................................................................................................12
           6.2.1 Read register value...................................................................................................12
           6.2.2 Accelerometer Calibration and Magnetic Calibration............................................. 12
           6.2.3 Save Settings............................................................................................................ 13
           6.2.4 Set Return Rate........................................................................................................ 13
           6.2.5 Set Port D0............................................................................................................... 13
           6.2.6 Set Port D1............................................................................................................... 13
           6.2.7 Set Port D2............................................................................................................... 14
           6.2.8 Set Port D3............................................................................................................... 14
     6.3 Register address.................................................................................................................. 14
7 Application Area............................................................................................................................. 16
1 Description
             Module integrates high-precision gyroscopes, accelerometer, mpu9250
   geomagnetic sensor, high-performance microprocessors and advanced dynamics solves
   dynamic Kalman filter algorithm to quickly solve the current real-time movement of the
   module attitude .
         The use of advanced digital filtering technology, can effectively reduce the
   measurement noise and improve measurement accuracy.
         Integrates gesture solver, with dynamic Kalman filter algorithm, can get the
   accurate attitude in dynamic environment, attitude measurement precision is up to 0.05
   degrees with high stability, performance is even better than some professional Inclinometer!
         Integrate voltage stabilization circuit, working voltage is 3.3v ~ 5v, pin level
   compatible 3.3V and 5V embedded system .
         High-performance cortex-M0 core processor runs at up to 48MHz, taking into
   account low power consumption and high performance.
         BLE4.0 wireless transmission, transmission stability, distance greater than 10
   meters.
         Low power consumption, long standby time, self-contained battery.
2 Product Size
3 Features
1、Voltage:3.3V~5V
2、Consumption current:<16mA ( normal)            Standby current:<0.1mA
3、Volume:51.3mm X 36mm X 15mm
4、Measuring dimensions:
   Acceleration: X Y Z
   Angular velocity: X Y Z
   Attitude angle:X Y Z
   Magnetic field:X Y Z
   Atmospheric pressure:YES
6、Range: Acceleration: ± 16g, Angular velocity: ± 2000 ° / s,Angle:X Z ±180° Y ±90°
7、Stability: Acceleration: 0.01g, Angular speed 0.05° / s.
8、Attitude measurement stable:X Y        0.05°   Z :1°
9、Data output: Acceleration, Angular velocity, Angle,Magnetic field, Pressure,Height, Port status
10、 The data output frequency: 0.1Hz ~50Hz (10Hz default)
11、Data Interface: UART(TTL , Baud rate 115200)
12、Expansion port function: Analog input(0~VCC, Digital input, Digital output)
13、Bluetooth transmission distance:>10m
14、BLE4.0:Support Android /IOS
4 Axial Diron
As shown in the figure above, the coordinates of the module are indicated, and the upper is the
X-axis, the left is Y axis, the Z axis is perpendicular to the surface of the paper to yourself. The
direction of rotation is defined by the right hand rule. that is, the thumb of the right hand is pointed
to the axial direction, and the four is the direction of the bending of the right hand.
5 Method
5.1 Connect App
1.Connect USB-micro data line (Ignore when the battery is powered)
2、Turn on the phone APP, click “scan” and then search the Bluetooth which is called
WT901BLE.
3、Click the Bluetooth and then you can get the data.
5.2Module Calibration
   The module need to be calibrated before the module is used. The calibration of
WT901BLECL includes accelerometer calibration and magnetic calibration.
5.2.1Accelerometer Calibration
     The accelerometer calibration is used to remove the zero bias of the accelerometer. When the
sensor is out of the factory, there will be different degrees of bias error. After manual calibration,
the measurement will be accurate.
      1、Methods as below: Firstly keep the module horizontally stationary, click “Acceleration”,
after 1~2s the acceleration X Y Z value will at 0 0 1. X Y angle: 0°. After calibration the value
will be accurate.
2、Accelerometer Calibration L, Accelerometer Calibration R
In the case that the surface is not very flat, and the data is still in error after the calibration, the
calibration L and R can be used for re-calibration. Methods as below:
The module is still at left, click on the calibration L, 2S after and then put the module to the right
and click on the calibration R, so that the X Y-axis angle is accurate when used after two
calibrations.
             Accelerometer Calibration L                     Accelerometer Calibration R
5.2.2 Magnetic Calibration
      Magnetic field calibration is used to remove the magnetic field sensor's zero offset. Usually,
the magnetic field sensor will have a large zero error when it is manufactured. If it is not calibrated,
it will bring about a large measurement error and affect the accuracy of the Z-axis angle
measurement of the heading angle.
      Calibration methods as follow:
      1. When calibrating, first connect the module and the computer, and place the module in a
place far away from the disturbing magnetic field (ie, more than 20 CM away from magnets and
iron, etc.), and then open the upper computer software.
      2. Click the “Magnetic Field Calibration”and rotate 360° around the X axis of the module
( you can rotate around the Y axis or the Z axis first). Rotate a few turns, then turn 360° around
the Y axis. Then turn 360° around the Z axis, then turn a few turns at random, then click the
“Finish” to complete the calibration.
Note: The data displayed on the APP will not change when the calibration is completed. After the
calibration is completed, the data will continue to be transmitted back. When the calibration is
added, the module should be stationary. When the magnetic field is calibrated and used, it must be
kept away from the magnetic field interference.
5.2.3 Calibration by Instruction
1.Instruct Accelerometer Calibration:
First keep the module horizontal and still, send the instruction:     FF    AA    01    01    00, after
1~2s the acceleration X Y Z value will at 0 0 1. X Y angle: 0°. After calibration the value will be
accurate.
2. Accelerometer Calibration L/R:
Keep the module is still at left, send the instruction L: FF AA 01 05 00
After 2s, turn the module to the right side and send the instruction R: FF AA 01 06 00
Calibrate two times the data will be accurate.
3. Instruct Magnetic Calibration:
When calibrating, place the module in a place far away from the disturbing magnetic field (ie,
more than 20 CM away from magnets and iron, etc.). Send the instruction: FF AA 01 07 00
Rotate 360° around the X axis of the module ( you can rotate around the Y axis or the Z axis first).
Rotate a few turns, then turn 360° around the Y axis. Then turn 360° around the Z axis, then turn a
few turns at random, then click the “Finish” to complete the calibration.
Send the instruction: FF AA 01       00   00   to finish the calibration.
Send the instruction: FF AA 00       00   00   to save the Configuration.
5.3 Restore Factory Setting
Method: After connecting the WT901BLECL                 and   APP     via   Bluetooth,   click   the
“Resume” .Reconnect the module after recovery.
5.4 Sleep/ Wake up
Enter the sleep mode right two methods. One is to disconnect the Bluetooth connection directly,
and the module will go directly to sleep mode. The other is to send a serial port command, the
instruction content is 5 hexadecimal data: 0xff 0xaa 0x67 0x01 0x00
There are two ways to wake up the module. One is to directly search for and connect to Bluetooth.
The module will wake up automatically and start working. The other is wake-up from the serial
port. Any serial port command can be sent to wake up the module.
6 Communication Protocol
6.1 Module to APP
Module upload Flag=0x61 (Angle,Angular velocity, Acceleration) data default.
Flag=0x71(Magnetic field, Air pressure and altitude, Port status) need to send the corresponding
register instruction.
Bluetooth upload data: Bluetooth uploads up to 20 bytes per data.
6.1.1 Acceleration, Angular velocity, Angle, Data pack(default)
      Packet        Flag    bit   axL      axH         …….        YawL            YawH
      header        1Byte
      1Byte
      0x55          Flag          0xNN     0xNN        …….        0xNN            0xNN
Note: 0xNN is a accurate value you received. Data return sequence: Acceleration X Y Z Angular
velocity X Y Z Angle X Y Z , low byte first, high byte last.
Flag = 0x61 Data content: 18Byte is Acceleration, Angular velocity, Angle.
    0x55                                         Packet header
    0x61                                         Flag bit
    axL                                          X Acceleration low 8 byte
    axH                                          X Acceleration high 8 byte
    ayL                                          Y Acceleration low 8 byte
    ayH                                          Y Acceleration high 8 byte
    azL                                          Z Acceleration low 8 byte
    azH                                          Z Acceleration high 8 byte
    wxL                                          X Angular velocity low 8 byte
    wxH                                          X Angular velocity high 8 byte
    wyL                                          Y Angular velocity low 8 byte
    wyH                                          Y Angular velocity high 8 byte
    wzL                                          Z Angular velocity low 8 byte
    wzH                                          Z Angular velocity high 8 byte
    RollL                                        X Angle low 8 byte
    RollH                                        X Angle high 8 byte
    PitchL                                       Y Angle low 8 byte
    PitchH                                       Y Angle high 8 byte
    YawL                                         Z Angle low 8 byte
    YawH                                         Z Angle high 8 byte
Acceleration calculation method: Unit: g
    ax=((axH<<8)|axL)/32768*16g(g is Gravity acceleration, 9.8m/s2)
    ay=((ayH<<8)|ayL)/32768*16g(g is Gravity acceleration, 9.8m/s2)
    az=((azH<<8)|azL)/32768*16g(g is Gravity acceleration, 9.8m/s2)
 Calculation method: Unit: °/s
    wx=((wxH<<8)|wxL)/32768*2000(°/s)
    wy=((wyH<<8)|wyL)/32768*2000(°/s)
     wz=((wzH<<8)|wzL)/32768*2000(°/s)
Calculation method: Unit: °
     Roll(x axis)Roll=((RollH<<8)|RollL)/32768*180(°)
     Pitch(y axis)Pitch=((PitchH<<8)|PitchL)/32768*180(°)
     Yaw angle(z axis)Yaw=((YawH<<8)|YawL)/32768*180(°)
Note:
     1. Attitude angle use the coordinate system for the Northeast sky coordinate system, the X
         axis is East,the Y axis is North, Z axis toward sky. Euler coordinate system rotation
         sequence defined attitude is z-y-x, first rotates around the Z axis. Then, around the Y axis,
         and then around the X axis.
     2. In fact, the rotation sequence is Z-Y-X, the range of pitch angle (Y axis) is only ±90
         degrees, when the pitch angle (Y axis) is bigger than 90 degrees and the pitch angle (Y
         axis) will become less than 90 degrees. At the same time, the Roll Angle(X axis) will
         become larger than 180 degree. Please search on Google about more information of
         Euler angle and attitude information.
     3. Since the three axis are coupled, the angle will be independent only when the angle is
         small. It will be dependent of the three angle when the angle is large when the attitude
         angle change, such as when the X axis close to 90 degrees, even if the attitude angle
         around the X axis, Y axis angle will have a big change, which is the inherent
         characteristics of the Euler angle.
Explanation:
1. The data is sent in hexadecimal format, not ASCII code.
2. Each data is transmitted in descending order of high byte and high byte, and the two are
combined into one signed short type of data.
X axis acceleration data Ax: AxL is low byte, AxH is high byte, conversion method as below:
Presume Data is a real data, DataH is high byte, DataL is low byte, so:
Data=((short)DataH<<8)|DataL. Please note that DataH need to transform a signed short type of
data and then shift. The Data type has a signed short type, so that it display negative number.
6.1.2 Single Return Register Data Packet
Single Return Data Packet need to send register instruction first:
                          FF AA 27        XX    00
--XX is register number. The register number please refer to 7.3. Example as below:
Function                                             Instruction
Read magnetic field                                  FF AA 27        3A 00
Read air pressure and altitude                       FF AA 27        45   00
Read port status                                     FF AA 27        41   00
Read quaternion                                      FF AA 27        51   00
Read temperature                                     FF AA 27        40   00
After send instruction, the module turn back a data packet 0x55 0x71. There are register address
and 7 registers data (Fixed upload 8 registers). Return data format as below:
Start register(2 byte) + register data(16 byte, 8 registers)
                  Start          Start       Start(No.1)    Start(No.1)   ....   No.8              No.8
Packet    Sign    register       register    register       register      ..     register          register
header            low            high        data     low   data high            data     low      data high
                  byte           byte        byte           byte                 byte              byte
0x55      0x71    RegL           RegH              0xNN          0xNN     ....         0xNN        0xNN
                                                                          ..
Note: 0xNN is a accurate value, low byte first, high byte last.
1. Magnetic field output
0x71      0x3A     0x00      HxL            HxH     HyL      HyH     HzL         HzH      ......
Calculated formular:Unit: mG
     Magnetic field(x axis)Hx=(( HxH<<8)| HxL)
     Magnetic field(y axis)Hy=(( HyH <<8)| HyL)
     Magnetic field(z axis)Hz =(( HzH<<8)| HzL)
     EX: Send instruction to read magnetic field in APP: FF AA 27 3A 00 (Please refer
to 7.2.8) The module return data to APP: 55 71 3A 00 68 01 69 00 7A 00 00 00 00 00 00 00 00
00 00 00 Total: 20 bytes.
     Calculate the no.5 to no.10 bytes as described above, magnetic field x=360,y=105,z=122
2. Air pressure and altitude output
0x55     0x71    0x45     0x00     P0        P1     P2      P3     H0       H1       H2         H3     ......
Calculated formular:
     Air pressure P = (( P3<<24)| ( P2<<16)| ( P1<<8)| P0 (Pa)
     Atitude output H = (( H3<<24)| ( H2<<16)| ( H1<<8)| H0 (cm)
     EX: Send instruction to read Air pressure and altitude data in APP: FF AA 27 45 00
(Please refer to 7.2.8) The module return data to APP: 55 71 45 00 E2 88 01 00 56 18 00 00 00
00 00 00 00 00 00 00 Total: 20 bytes.
     Calculate the no.5 to no.12 bytes as described above, p=100578 pa,H=6230 cm
3. Port status data output
0x55     0x71    0x41    0x00      D0L       D0H    D1L     D1H    D2L      D2H     D3L       D3H      ......
Calculated formular:
      D0 = (D0H<<8)| D0L
      D1 = (D1H<<8)| D1L
      D2 = (D2H<<8)| D2L
      D3 = (D3H<<8)| D3L
Explanation:
When the port mode is set to analog input, the port status data represents the analog voltage. The
actual voltage is calculated according to the following formula:
      U=DxStatus/1024*Uvcc
  Uvcc is chip supply voltage, there is LDO in it, If the module supply voltage > 3.5V, Uvcc is 3.3V.
If the module supply voltage <3.5V, Uvcc=voltage-0.2V.
When the port mode is set to digital input, the port status data indicates the digital level status of
the port, with a high level of 1 and a low level of 0.
The port status data is 1 when the port mode is set to high output mode.
The port status data bit is 0 when the port mode is set to low output mode.
4, Quaternion output
0x55   0x71    0x51    0x00    Q0L     Q0H     Q1L    Q1H      Q2L       Q2H   Q3L   Q3H      ......
Calculated formular:
    Q0=((Q0H<<8)|Q0L)/32768
    Q1=((Q1H<<8)|Q1L)/32768
    Q2=((Q2H<<8)|Q2L)/32768
    Q3=((Q3H<<8)|Q3L)/32768
    Checksum:
    Sum=0x55+0x59+Q0L+Q0H+Q1L +Q1H +Q2L+Q2H+Q3L+Q3H
4. Temperature output
0x55          0x71            0x40         0x00           TL              TH         ......
Calculated formular:
    T=((TH<<8)|TL) /100 ℃
6.2 APP to Module
Send instruction:
6.2.1 Read register value
FF AA 27        XX    00                           Read register value
--XX is register.
EX: Read magnetic field:FF AA 27 3A 00
     Read air pressure and altitude:FF AA 27 45 00
     Read port status:FF AA 27 41 00
     Read quaternion:FF AA 27 51 00
     Read temperature:FF AA 27 40 00
After send instruction, the module turn back a data packet 0x55 0x71. There are register address
and 7 registers data (Fixed upload 8 registers). Return data format please refer to 7.1.2.
6.2.2 Accelerometer Calibration and Magnetic Calibration
FF AA 01        01    00                           Accelerometer Calibration
FF AA 01        05    00                           Accelerometer Calibration L
FF AA 01        06    00                           Accelerometer Calibration R
FF AA 01        07    00                           Magnetic Calibration
FF AA 01        00    00                           Magnetic Calibration Finish
 6.2.3 Save Settings
FF AA 00     SAVE    00                     Save Settings
   SAVE:Set
      0:Save current configuration
      1:Restore default configuration and save
6.2.4 Set Return Rate
   FF AA 03      RATE 00                    Set return rate
   RATE:return rate
      0x01:0.1Hz
      0x02:0.5Hz
      0x03:1Hz
      0x04:2Hz
      0x05:5Hz
      0x06:10Hz(default)
      0x07:20Hz
      0x08:50Hz
      0x09:100Hz
6.2.5 Set Port D0
   FF AA 0E       D0MODE     00                  Set port D0
   D0MODE:D0
      0x00:Analog input(default)
      0x01:Digital input
      0x02:Output digital high level
      0x03:Output digital low level
6.2.6 Set Port D1
   FF AA 0F      D1MODE      00                  Set port D1
   D1MODE:D1
      0x00:Analog input(default)
      0x01:Digital input
      0x02:Output digital high level
      0x03:Output digital low level
6.2.7 Set Port D2
    FF AA 10        D2MODE      00                   Set port D2
    D2MODE:D2
       0x00:Analog input(default)
       0x01:Digital input
       0x02:Output digital high level
       0x03:Output digital low level
6.2.8 Set Port D3
    FF AA 11 D3MODE             00                   Set port D3
    D3MODE:D3
          0x00:Analog input(default)
          0x01:Digital input
          0x02:Output digital high level
          0x03:Output digital low level
Note: After the above settings are completed, you must send a save command to save.
6.3 Register address
        Address                Symbol                  Mean
        0x00                   SAVE                    Save current configuration
        0x01                   CALSW                   Calibration
        0x02                   KEEP
        0x03                   RATE                    Return rate
        0x04                   BAUD                    UART Baud rate
        0x05                   AXOFFSET                X Acceleration zero offset
        0x06                   AYOFFSET                Y Acceleration zero offset
        0x07                   AZOFFSET                Z Acceleration zero offset
        0x08                   GXOFFSET                X Angular velocity zero offset
        0x09                   GYOFFSET                Y Angular velocity zero offset
        0x0a                   GZOFFSET                Z Angular velocity zero offset
        0x0b                   HXOFFSET                X Magnetic field zero offset
        0x0c                   HYOFFSET                Y Magnetic field zero offset
        0x0d                   HZOFFSET                Z Magnetic field zero offset
        0x0e                   D0MODE                  D0
        0x0f                   D1MODE                  D1
        0x10                   D2MODE                  D2
        0x11                   D3MODE                  D3
        0x12                   KEEP
0x13     KEEP
0x14     KEEP
0x15     KEEP
0x16     KEEP
0x17     KEEP
0x18     KEEP
0x19     KEEP
0x1a     KEEP
0x1b     KEEP
......   ......      ......
0x30     YYMM        Year, Month
0x31     DDHH        Date, Hour
0x32     MMSS        Minute, Second
0x33     MS          Millisecond
0x34     AX          X Acceleration
0x35     AY          Y Acceleration
0x36     AZ          Z Acceleration
0x37     GX          X Angular velocity
0x38     GY          Y Angular velocity
0x39     GZ          Z Angular velocity
0x3a     HX          X Magnetic field
0x3b     HY          Y Magnetic field
0x3c     HZ          Z Magnetic field
0x3d     Roll        X Angle
0x3e     Pitch       Y Angle
0x3f     Yaw         Z Angle
0x40     TEMP        Module temperature
0x41     D0Status             D0 Status
0x42     D1Status             D1 Status
0x43     D2Status             D2 Status
0x44     D3Status             D3 Status
0x45     PressureL   Pressure low byte
0x46     PressureH   Pressure high byte
0x47     HeightL     Height low byte
0x48     HeightH     Height high byte
0x49     KEEP
0x4a     KEEP
0x4b     KEEP
0x4c     KEEP
0x4d     KEEP
0x4e     KEEP
0x4f     KEEP
0x50     KEEP
      0x51                   Q0   Quaternion Q0
      0x52                   Q1   Quaternion Q1
      0x53                   Q2   Quaternion Q2
      0x54                   Q3   Quaternion Q3
7 Application Area
    Agricultural machinery                 Internet of things
       Solar energy                          Power monitoring
    Medical instruments                   Construction machinery
      Geological monitoring
          深圳维特智能科技有限公司
                     WitMotion ShenZhen Co., Ltd
              WT901BLECL Attitude Angle Sensor
TEL       :  (+86) 755-33185882
E-mail    : wit@wit-motion.com
Website : www.wit-motion.com
Aliexpress :  https://witmotion.aliexpress.com
Alibaba : https://witmotion.en.alibaba.com
Wit-wiki : https://wiki.wit-motion.com/english
Address : Honghai building 1306 Songgang town Baoan District Shenzhen
            Guangdong Province China