How does it work?
The 6DOF IMU 3 Click is based around the FXOS8700CQ, which is a small, low-power, 3-axis, linear accelerometer and 3-axis magnetometer combined into a single package, from NXP. The device features a selectable I2C or point-to-point SPI serial interface with 14-bit accelerometer and 16-bit magnetometer ADC resolution along with smart-embedded functions.The FXOS8700CQ has dynamically selectable acceleration full-scale ranges of ±2 g/±4 g/±8 g and a fixed magnetic measurement range of ±1200 μT. Output data rates (ODR) from 1.563 Hz to 800 Hz are selectable by the user for each sensor. Interleaved magnetic and acceleration data is available at ODR rates of up to 400 Hz.
Sensitivity of the sensor is represented in mg/LSB for the accelerometer and μT/LSB for the magnetometer. The magnetometer sensitivity is fixed at 0.1 μT/LSB. The accelerometer sensitivity changes with the full-scale range selected by the user. Accelerometer sensitivity is 0.244 mg/LSB in 2 g mode, 0.488 mg/LSB in 4 g mode, and 0.976 mg/LSB in 8 g mode, making it ideal for applications such as used for security, like motion detection, door opening, smart home applications, robotics and unmanned aerial vehicles (UAVs) with electronic compass (e-compass) function, in medical purposes, like patient monitoring, fall detection and more.
6DOF IMU 3 Click supports both SPI and I2C communication interfaces, allowing it to be used with a wide range of different MCUs. The communication interface can be selected by moving SMD jumpers grouped under the COM SEL to an appropriate position (SPI or I2C). The slave I2C address can also be configured by an SMD jumper when the Click board™ is operated in the I2C mode. An SMD jumpers labeled as ADDR SEL is used to set the least significant bit (LSB) of the I2C address. The I2C interface is compliantwith fast mode (400 kHz), and normal mode (100 kHz) I2C standards, while the SPI interface is a classical master/slave serial port. The FXOS8700CQ is always considered as the slave and thus is never initiating the communication.
This Click Board™ is designed to be operated only with 3.3V logic level. A proper logic voltage level conversion should be performed before the Click board™ is used with MCUs with logic levels of 5V.
Specifications
Type
Acceleration,Magnetic,Motion
Applications
For security, like motion detection, door opening, smart home applications, robotics, and unmanned aerial vehicles (UAVs) with electronic compass (e-compass) function, medical, like patient monitoring, fall detection, and rehabilitation, augmented reality (AR), gaming, and real-time activity analysis, etc.
On-board modules
FXOS8700CQ is a small, low-power, 3-axis, linear accelerometer and 3-axis, magnetometer combined into a single package
Key Features
The 14-bit accelerometer and 16-bit magnetometer are combined with a high-performance ASIC to enable an eCompass solution capable of a typical orientation resolution of 0.1° and sub-5° compass heading accuracy
Interface
I2C,SPI
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on 6DOF IMU 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 | INT SEL | Left | Interrupt pin selection, left position INT1, right position INT2 |
JP2 | ADDR SEL | Right | I2C adress selection pin SA0, left position 3V3 (H), right position 0V (L) |
JP3 | ADDR SEL | Right | I2C adress selection pin SA1, left position 3V3 (H), right position 0V (L) |
JP4 | COMM SEL | Right | Communication selection, left position SPI CS pin, right position I2C SA1 pin |
JP5 | COMM SEL | Right | Communication selection, left position SPI SCK pin, right position I2C SCL pin |
JP6 | COMM SEL | Right | Communication selection, left position SPI MISO pin, right position I2C SA0 pin |
JP7 | COMM SEL | Right | Communication selection, left position SPI MOSI pin, right position I2C SDA pin |
Software Support
We provide a library for the 6DOF IMU 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 covers all the necessary functions to control 6DOF IMU 3 click board. Library performs a standard I2C and SPI interface communication.
Key functions:
C6DOFIMU3_RETVAL_T c6dofimu3_check_id ( void )
– Check ID function.void c6dofimu3_default_config ( void )
– Set default sensor configuration function.void c6dofimu3_get_data ( c6dofimu3_accel_t *accel_data, c6dofimu3_mag_t *mag_data );
– Read Accel and Magnetometer data function
Examples description
The application is composed of three sections :
- System Initialization – Initializes I2C and start to write log.
- Application Initialization – Initialization driver enables – I2C, check communication by read device ID, initializing the device, set default configuration for accelerometer and magnetometer, also write log.
- Application Task – (code snippet) This is an example which demonstrates the use of 6DOF IMU 3 Click board. Measured and display Accel and Mag data coordinates values for X-axis, Y-axis and Z-axis. Results are being sent to the Usart Terminal where you can track their changes. All data logs write on USB uart changes for every 500 ms.
void application_task( ) { if ( c6dofimu3_check_data_ready( ) ) { c6dofimu3_get_data ( &accel_data, &mag_data ); mikrobus_logWrite( " Accel X :", _LOG_TEXT ); IntToStr( accel_data.x, log_text ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " | ", _LOG_TEXT ); mikrobus_logWrite( " Mag X :", _LOG_TEXT ); IntToStr( mag_data.x, log_text ); mikrobus_logWrite( log_text, _LOG_LINE ); mikrobus_logWrite( " Accel Y :", _LOG_TEXT ); IntToStr( accel_data.y, log_text ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " | ", _LOG_TEXT ); mikrobus_logWrite( " Mag Y :", _LOG_TEXT ); IntToStr( mag_data.y, log_text ); mikrobus_logWrite( log_text, _LOG_LINE ); mikrobus_logWrite( " Accel Z :", _LOG_TEXT ); IntToStr( accel_data.z, log_text ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " | ", _LOG_TEXT ); mikrobus_logWrite( " Mag Z :", _LOG_TEXT ); IntToStr( mag_data.z, log_text ); mikrobus_logWrite( log_text, _LOG_LINE ); mikrobus_logWrite( "-------------------------------------", _LOG_LINE ); Delay_ms( 500 ); } }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C or SPI
- UART
- Conversions
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.