Empower your projects with 6DOF IMU, the ultimate solution for capturing and controlling motion in three-dimensional space
A
A
Hardware Overview
How does it work?
6DOF IMU 18 Click is based on the ICM-42605, a 6-axis motion tracking device that combines a 3-axis gyroscope and a 3-axis accelerometer from TDK InvenSense. It features a 2K-byte FIFO that can lower the traffic on the selected serial bus interface and reduce power consumption by allowing the system processor to burst read sensor data and then go into a low-power mode. With its 6-axis integration, the ICM-42605 guarantees optimal motion performance for customers. The IICM-42605 supports an extended operating temperature range, allowing customers to design it into various industrial IoT applications, including navigation and stabilizing industrial machinery and robots. The gyroscope supports eight programmable full-scale range settings from ±15.625dps to ±2000dps, and the accelerometer
supports four programmable full-scale range settings from ±2g to ±16g. Other industry-leading features include on-chip 16-bit ADCs, programmable digital filters, an embedded temperature sensor, and programmable interrupts. The ICM-42605 also provides high robustness by supporting 20,000g shock reliability. This Click board™ allows the use of both I2C and SPI interfaces at a maximum frequency of 1MHz for I2C and 24MHz 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 ICM-42605 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 additional interrupt pins, routed to the INT and IT2 pins on the mikroBUS™ socket, to signal MCU that an event, such as specific tap or sample acquisition conditions, has happened. Besides the standard interrupt function, the IT2 pin can also be used as a Frame Synchronization signal for synchronization with an external digital signal. This Click board™ can be operated only with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. Also, it comes equipped with a library containing functions and an example code that can be used as a reference for further development.
Features overview
Development board
Arduino UNO is a versatile microcontroller board built around the ATmega328P chip. It offers extensive connectivity options for various projects, featuring 14 digital input/output pins, six of which are PWM-capable, along with six analog inputs. Its core components include a 16MHz ceramic resonator, a USB connection, a power jack, an
ICSP header, and a reset button, providing everything necessary to power and program the board. The Uno is ready to go, whether connected to a computer via USB or powered by an AC-to-DC adapter or battery. As the first USB Arduino board, it serves as the benchmark for the Arduino platform, with "Uno" symbolizing its status as the
first in a series. This name choice, meaning "one" in Italian, commemorates the launch of Arduino Software (IDE) 1.0. Initially introduced alongside version 1.0 of the Arduino Software (IDE), the Uno has since become the foundational model for subsequent Arduino releases, embodying the platform's evolution.
Microcontroller Overview
MCU Card / MCU
![default](https://dbp-cdn.mikroe.com/catalog/mcus/resources/ATmega328P.jpeg)
Architecture
AVR
MCU Memory (KB)
32
Silicon Vendor
Microchip
Pin count
28
RAM (Bytes)
2048
You complete me!
Accessories
Click Shield for Arduino UNO has two proprietary mikroBUS™ sockets, allowing all the Click board™ devices to be interfaced with the Arduino UNO board without effort. The Arduino Uno, a microcontroller board based on the ATmega328P, provides an affordable and flexible way for users to try out new concepts and build prototypes with the ATmega328P microcontroller from various combinations of performance, power consumption, and features. The Arduino Uno has 14 digital input/output pins (of which six can be used as PWM outputs), six analog inputs, a 16 MHz ceramic resonator (CSTCE16M0V53-R0), a USB connection, a power jack, an ICSP header, and reset button. Most of the ATmega328P microcontroller pins are brought to the IO pins on the left and right edge of the board, which are then connected to two existing mikroBUS™ sockets. This Click Shield also has several switches that perform functions such as selecting the logic levels of analog signals on mikroBUS™ sockets and selecting logic voltage levels of the mikroBUS™ sockets themselves. Besides, the user is offered the possibility of using any Click board™ with the help of existing bidirectional level-shifting voltage translators, regardless of whether the Click board™ operates at a 3.3V or 5V logic voltage level. Once you connect the Arduino UNO board with our Click Shield for Arduino UNO, you can access hundreds of Click boards™, working with 3.3V or 5V logic voltage levels.
Used MCU Pins
mikroBUS™ mapper
Take a closer look
Click board™ Schematic
![6DOF IMU 18 Click Schematic schematic](https://dbp-cdn.mikroe.com/catalog/click-boards/resources/1ee79096-7d78-61fe-ac88-0242ac120009/schematic.webp)
Step by step
Project assembly
Track your results in real time
Application Output
This Click board can be interfaced and monitored in two ways:
Application Output
- Use the "Application Output" window in Debug mode for real-time data monitoring. Set it up properly by following this tutorial.
UART Terminal
- Monitor data via the UART Terminal using a USB to UART converter. For detailed instructions, check out this tutorial.
Software Support
Library Description
This library contains API for 6DOF IMU 18 Click driver.
Key functions:
c6dofimu18_set_reg_bank
- 6DOF IMU 18 set register bank functionc6dofimu18_get_int1_state
- 6DOF IMU 18 read INT1 pin state functionc6dofimu18_get_data_from_register
- 6DOF IMU 18 read data function.
Open Source
Code example
The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.
/*!
* @file main.c
* @brief 6DOF IMU 18 Click example
*
* # Description
* This library contains API for 6DOF IMU 18 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.
*
* The demo application is composed of two sections :
*
* ## Application Init
* Initializes the driver after that resets the device and
* performs default configuration and reads the device id.
*
* ## Application Task
* This example demonstrates the use of the 6DOF IMU 18 Click board by
* measuring and displaying acceleration and gyroscope data for X-axis,
* Y-axis, and Z-axis as well as temperature in degrees Celsius.
*
* @author Stefan Ilic
*
*/
#include "board.h"
#include "log.h"
#include "c6dofimu18.h"
static c6dofimu18_t c6dofimu18;
static log_t logger;
void application_init ( void )
{
log_cfg_t log_cfg; /**< Logger config object. */
c6dofimu18_cfg_t c6dofimu18_cfg; /**< Click config object. */
/**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
* @note If USB_UART_RX and USB_UART_TX
* are defined as HAL_PIN_NC, you will
* need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
c6dofimu18_cfg_setup( &c6dofimu18_cfg );
C6DOFIMU18_MAP_MIKROBUS( c6dofimu18_cfg, MIKROBUS_1 );
err_t init_flag = c6dofimu18_init( &c6dofimu18, &c6dofimu18_cfg );
if ( ( I2C_MASTER_ERROR == init_flag ) || ( SPI_MASTER_ERROR == init_flag ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
Delay_ms( 100 );
uint8_t id = 0;
c6dofimu18_reg_read( &c6dofimu18, C6DOFIMU18_BANK0_SEL, C6DOFIMU18_REG_WHO_AM_I, &id, 1);
log_printf( &logger, " Device ID : 0x%.2X \r\n", ( uint16_t ) id );
if ( C6DOFIMU18_WHO_AM_I_VALUE != id )
{
log_error( &logger, " Communication error." );
for ( ; ; );
}
Delay_ms( 100 );
if ( C6DOFIMU18_OK != c6dofimu18_default_cfg ( &c6dofimu18 ) )
{
log_error( &logger, " Default configuration." );
for ( ; ; );
}
log_info( &logger, " Application Task " );
}
void application_task ( void )
{
if ( c6dofimu18_get_int1_state( &c6dofimu18) )
{
c6dofimu18_data_t accel_data;
c6dofimu18_data_t gyro_data;
float temp_data;
uint32_t tmst_data;
c6dofimu18_get_data_from_register( &c6dofimu18, &temp_data, &accel_data, &gyro_data, &tmst_data );
log_printf( &logger, " TEMP: %.2f \r\n", temp_data );
log_printf( &logger, " GYRO: x:%d y:%d z:%d \r\n", gyro_data.data_x,gyro_data.data_y,gyro_data.data_z );
log_printf( &logger, " ACCEL: x:%d y:%d z:%d \r\n", accel_data.data_x,accel_data.data_y,accel_data.data_z );
log_printf( &logger, "========================== \r\n" );
Delay_ms( 1000 );
}
}
void main ( void )
{
application_init( );
for ( ; ; )
{
application_task( );
}
}
// ------------------------------------------------------------------------ END