How does it work?
6DOF IMU 20 Click is based on the BMI323, a versatile 6DoF (six degrees of freedom) sensor module from Bosch Sensortec. This IMU combines precise acceleration and angular rate (gyroscopic) measurement with intelligent integrated features triggered by motion. It also has a 2K-byte FIFO that can lower the traffic on the selected serial bus interface by allowing the system processor to burst read sensor data. The BMI323 provides improved accelerometer performance as well as lower power consumption. In high-performance mode, using both the gyroscope and the accelerometer, the BMI323 shows a significant reduction in power consumption of nearly 15% compared to its predecessor, the BMI160. The BMI323 supports a wide range of use cases allowing customers to design it into various applications like angle and position detection, motion detection, tap recognition, and more.
As mentioned, the BMI323 comprises a 16-bit triaxial gyroscope, a 16-bit triaxial accelerometer, and a 16-bit digital temperature sensor in a single package. The accelerometer measures the direction and magnitude of the force applied to the sensor. In a free fall scenario, an accelerometer will report a vector of zeros. The gyroscope measures the rotational rate and reports vector zeros when the device rests. The gyroscope supports full-scale range settings from ±125dps to ±2000dps, and the accelerometer supports range settings from ±2g to ±16g. In addition, the BMI323 also includes an auxiliary temperature sensor.
This Click board™ allows using both I2C and SPI interfaces at a maximum frequency of 1MHz for I2C and 10MHz for SPI communication. Selection is made by positioning SMD jumpers marked COMM SEL to the appropriate position. All jumpers must be on the same side, or the Click board™ may become unresponsive. When the I2C interface is selected, the BMI323 allows the choice of its I2C slave address, using the ADDR SEL SMD jumper set to an appropriate position marked 1 or 0. In addition to communication pins, this board also possesses two interrupts, IT1 and IT2, routed to, where by default, the AN and INT pins stand on the mikroBUS™ socket, entirely programmed by the user through a serial interface. They signal MCU that a motion event has been sensed.
This Click board™ can only be operated with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. However, the Click board™ comes equipped with a library containing functions and an example code that can be used as a reference for further development.
Specifications
Type
Motion
Applications
Can be used for always-on applications like motion detection, step detector, plug ‘n’ play step counter, orientation and flat detection, single/double/triple tap detection, and more
On-board modules
BMI323 – versatile 6DoF sensor module from Bosch Sensortec
Key Features
Low power consumption, selectable interface, on-chip motion-triggered interrupt features, configurable accel/gyro range, 2KB on-chip FIFO, fast offset error compensation, high sensitivity and performance, and more
Interface
I2C,SPI
Feature
ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on 6DOF IMU 20 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 | ADDR SEL | Left | I2C Address Selection 0/1: Left position 0, Right position 1 |
JP2-JP5 | COMM SEL | Right | Communication Interface Selection SPI/I2C: Left position SPI, Right position I2C |
6DOF IMU 20 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Gyroscope Full-Scale Range | ±125 | – | ±2000 | dps |
Accelerometer Full-Scale Range | ±2 | – | ±16 | g |
Gyroscope Sensitivity | 16.384 | – | 262.144 | LSB/dps |
Accelerometer Sensitivity | 2048 | – | 16384 | LSB/g |
Resolution | – | 16 | – | bit |
Software Support
We provide a library for the 6DOF IMU 20 Click as well as a demo application (example), developed using Mikroe compilers. The demo can run on all the main Mikroe development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for 6DOF IMU 20 Click driver.
Key functions
-
c6dofimu20_get_gyr_data
6DOF IMU 20 gyro data reading function. -
c6dofimu20_get_temperature
6DOF IMU 20 temperature reading function. -
c6dofimu20_sw_reset
6DOF IMU 20 software reset function.
Example Description
This library contains API for 6DOF IMU 20 Click driver. The library initializes and defines the I2C and SPI bus drivers to write and read data from registers, as well as the default configuration for reading gyroscope and accelerator data, and temperature.
void application_task ( void )
{
c6dofimu20_data_t accel_data;
c6dofimu20_data_t gyro_data;
uint16_t data_rdy;
float temperature;
c6dofimu20_get_reg( &c6dofimu20, C6DOFIMU20_STATUS_REG, &data_rdy );
if ( C6DOFIMU20_STATUS_DRDY_ACC_FLAG & data_rdy )
{
c6dofimu20_get_acc_data( &c6dofimu20, &accel_data );
log_printf( &logger, " Accel: X: %d, Y: %d, Z: %d rn", accel_data.data_x, accel_data.data_y, accel_data.data_z );
}
if ( C6DOFIMU20_STATUS_DRDY_GYR_FLAG & data_rdy )
{
c6dofimu20_get_gyr_data( &c6dofimu20, &gyro_data );
log_printf( &logger, " Gyro: X: %d, Y: %d, Z: %d rn", gyro_data.data_x, gyro_data.data_y, gyro_data.data_z );
}
if ( C6DOFIMU20_STATUS_DRDY_TEMP_FLAG & data_rdy )
{
c6dofimu20_get_temperature( &c6dofimu20, &temperature );
log_printf( &logger, " Temperature: %.2f degC rn", temperature );
}
log_printf( &logger, " - - - - - - - - - - - - - - - - - - - - - - - - rn" );
Delay_ms( 500 );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.6DOFIMU20
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. UART terminal is available in all Mikroe compilers.
mikroSDK
This Click board™ is supported with mikroSDK – Mikroe Software Development Kit, that needs to be downloaded from the LibStock and installed for the compiler you are using to ensure proper operation of mikroSDK compliant Click board™ demo applications.
For more information about mikroSDK, visit the official page.