How does it work?
XSENS MTi-3 Click is based on the MTi-3, a self-contained Attitude Heading and Reference System (AHRS), Vertical Reference Unit (VRU), and Inertial Measurement Unit (IMU) module from Xsens. The MTi-3 module supports all features of the MTi-1 series, features a 3D accelerometer, a 3D gyroscope, a high-accuracy crystal, a low-power MCU, and it is also a full magnetometer-enhanced AHRS. It can output 3D orientation data, free acceleration, and calibrated sensors data (rate of turn, magnetic field). The MTi-3 is easily configurable for the outputs, depends on the application needs, and can be set to use one of the filter profiles available within the Xsens sensor fusion engine. In this way, the MTi-3 module limits the load and the power consumption on the user application processor.
This Click board™ is equipped with the USB type C connector. It allows the module to be powered and configured by a personal computer (PC) using FT230X, a highly integrated USB to UART bridge solution from FTDI which has been designed to operate efficiently with USB host controllers by using as little bandwidth as possible when compared to the total USB bandwidth available. This module that can also be configured easily by the free downloadable Xsens MT Software Suite as an Inertial Measurement Unit (IMU), Vertical reference Unit (VRU), or even an Attitude & Heading Reference System (AHRS), which is applying Xsens’ powerful Kalman filtering XKF3 Core.
The XSENS MTi-3 Click has 2 power supply pins. The first pin represents the main power supply of the module powered via a low dropout linear regulator AP7331 from Diodes Incorporated that receives a 5V power supply from USB to UART solution and gives 3.3V on its output that is used as the main power supply of the module. The second pin represents the digital supply voltage and is powered by 3.3V directly from the mikroBUS™ socket.
This Click board™ communicates with MCU using the UART interface as its default communication interface but also has the possibility for the user to use other interfaces such as SPI and I2C if he wants to configure the module and write the library by himself. The desired interface selection can be performed through the peripheral selection pins by positioning SMD jumpers labeled as PSEL to an appropriate position. The module reads the state of these pins at Start-Up and configures its peripheral interface. To change the selected interface, the logic levels of those pins must be set first, and then the module needs to be reset.
The selection between UART/I2C and SPI/I2C interfaces can be performed by positioning SMD jumpers labeled as COMM SEL to an appropriate position. The user can also configure the I2C slave address through the ADD0, ADD1, and ADD2 pins by positioning SMD jumpers labeled as ADDR SEL to an appropriate position. Note that all the jumpers must be placed to the same side, or else the Click board™ may become unresponsive.
Additional functionality routed at RST and AN pins of the mikroBUS™ socket give the user the ability to use the reset function and to receive the latest available data message. Also, this Click board™ has two pins INT and PWM pins that can be used in many ways. For example, it can be used as serial UART connections CTS and RTS in UART full-duplex mode or can be used as RX/TX control signals in UART half-duplex mode. Regardless of these functions, the INT pin can also be used as a classic interrupt function.
This Click board™ is designed to be operated only with a 3.3V logic voltage level. A proper logic voltage level conversion should be performed before the Click board™ is used with MCUs with different logic levels.
Specifications
Type
Magnetic,Motion
Applications
Can be used for control and stabilization of any object and navigation like miniature aerial vehicles, robotics, or industrial-grade VR/AR, HMD’s and handheld devices.
On-board modules
XSENS MTi-3 Click is based on the MTi-3, a self-contained Attitude Heading and Reference System (AHRS), Vertical Reference Unit (VRU), and Inertial Measurement Unit (IMU) module from Xsens.
Key Features
Full-featured AHRS module, uniform interface over product lifetime, always best-in-class inertial sensors incorporated, low power consumption, industry-standard communication protocols supported, and more.
Interface
I2C,SPI,UART,USB
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on XSENS MTi-3 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
JP1-JP2 | PSEL | Left | Interface Signal Selection: Left position 0, Right position 1 |
JP3-JP4 | COMM SEL | Left | Communication Interface Selection: Left position UART, Right position I2C |
JP5-JP7 | COMM SEL | Left | Communication Interface Selection: Left position SPI, Right position I2C |
JP8-JP10 | ADDR SEL | Left | I2C Address Selection: Left position 0, Right position 1 |
XSENS MTi-3 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | -0.3 | 3.3 | 4 | V |
UART Baud Rate | – | 921.6 | 4000 | kbps |
Output Rate | 1 | 100 | 800 | Hz |
Gyroscope Range | -2000 | – | +2000 | deg/s |
Accelerometer Range | -16 | – | +16 | g |
Operating Temperature Range | -40 | – | +85 | °C |
Software Support
We provide a library for the XSENS MTi-3 Click on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library contains basic functions for working with click. Of the communications, only UART is supported.
Key functions:
void xsensmti3_parser(uint8_t *rsp_buf, uint8_t start_cnt xsensmti3_parse_t *obj )
– General Parservoid xsensmti3_get_data(xsensmti3_quat_t *quat_obj,xsensmti3_data_t *data_obj)
– Get Roll, Pitch and Yawuint8_t xsensmti3_check_package(uint8_t *package_buf,uint8_t *start_package)
– Checks package
Examples description
The application is composed of three sections :
- System Initialization – Initialize UART module and necessary GPIO pins
- Application Initialization – Initialize driver init and uart interrupt
- Application Task – Reads and parsing data packaga. Shows Roll, Pitch and Yaw data.
void application_task ( ) { uint8_t check_data = 0; uint8_t cnt = 0; // STARTS COLLECTING DATA if ( active_flag == XSENSMTI3_WAIT_FOR_START ) { memset( &parser_current_buf[0], 0 , 110 ); parser_buf_cnt = 0; active_flag = XSENSMTI3_START_PROCESS; xsensmti3_enable_uart_isr( ); } // CHECKS RECEIVED DATA if ( ( parser_buf_cnt > 100 ) && ( active_flag == XSENSMTI3_START_PROCESS ) ) { xsensmti3_disable_uart_isr( ); active_flag = XSENSMTI3_DATA_PROCESSING; } // CHECKS IF THE VALID PACKAGE IS RECEIVED if ( active_flag == XSENSMTI3_DATA_PROCESSING ) { check_data = xsensmti3_check_package( &parser_current_buf[0], &start_rsp ); if ( check_data == 1 ) { active_flag = XSENSMTI3_PARSER_DATA; } else { active_flag = XSENSMTI3_WAIT_FOR_START; } } // PARSING DATA AND DISPLAY if ( active_flag == XSENSMTI3_PARSER_DATA ) { xsensmti3_parser( &parser_current_buf[0], start_rsp, &parse_data_obj ); mikrobus_logWrite( ">> Quaternion data <<", _LOG_LINE ); for ( cnt = 0; cnt < 4; cnt++ ) { mikrobus_logWrite( ">> Q: ", _LOG_TEXT ); FloatToStr( parse_data_obj.quat_obj.quat_data[ cnt ], demo_text ); LTrim( demo_text ); mikrobus_logWrite( demo_text , _LOG_LINE ); } mikrobus_logWrite( "--------------", _LOG_LINE ); xsensmti3_get_data( &parse_data_obj.quat_obj, &data_obj ); mikrobus_logWrite( ">> ROLL: ", _LOG_TEXT ); FloatToStr( data_obj.roll, demo_text ); LTrim( demo_text ); mikrobus_logWrite( demo_text , _LOG_LINE ); mikrobus_logWrite( ">> PITCH: ", _LOG_TEXT ); FloatToStr( data_obj.pitch, demo_text ); LTrim( demo_text ); mikrobus_logWrite( demo_text , _LOG_LINE ); mikrobus_logWrite( ">> YAW: ", _LOG_TEXT ); FloatToStr( data_obj.yaw, demo_text ); LTrim( demo_text ); mikrobus_logWrite( demo_text , _LOG_LINE ); Delay_ms( 1000 ); active_flag = XSENSMTI3_WAIT_FOR_START; mikrobus_logWrite( " rn--------------", _LOG_LINE ); } }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- UART Library
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
mikroSDK
This Click board™ is supported with mikroSDK – MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.