Revolutionize robotics with improved motion awareness and control, enabling robots to perform tasks with precision and adaptability in various industries
A
A
Hardware Overview
How does it work?
6DOF IMU 6 Click is based on the ICM-20689, a 6-axis MotionTracking device that combines a 3-axis gyroscope, a 3-axis accelerometer, and a Digital Motion Processor™ (DMP) from TDK InvenSense. It also features a 4 Kbyte FIFO that can lower the traffic on the 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.The ICM-20689, with its 6-axis integration, on-chip DMP, and run-time calibration firmware, enables manufacturers to eliminate the costly and complex selection, qualification, and system level integration of discrete devices, guaranteeing optimal motion performance. The gyroscope has a programmable full-scale of ±250, ±500, ±1000, and
±2000 degrees/sec. The accelerometer has a user-programmable accelerometer full-scale range of ±2g, ±4g, ±8g, and ±16g. Factory-calibrated initial sensitivity of both sensors reduces production-line calibration requirements. Other industry-leading features include on-chip 16-bit ADCs, programmable digital filters, an embedded temperature sensor, and programmable interrupts. The device provides high robustness by supporting 10,000g shock reliability. The device features I2C and SPI serial interfaces, wide operating voltage range (VDD) and separate digital IO supply (VDDIO) from 1.71V to 3.45V. Communication with all registers of the device can be performed using either I2C at 400kHz or SPI at 8MHz. 6DOF IMU 6 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 jumper labeled as ADD SEL is used to set the least significant bit (LSB) of the I2C address. Excellent choices for applications include mobile phones, tablets, drones, handset and portable gaming, motion-based game controllers, wearable sensors for health, fitness and sports and 3D remote controls for internet-connected DTVs and set-top boxes and 3D mice.
Features overview
Development board
EasyPIC v7a is the seventh generation of PIC development boards specially designed for the needs of rapid development of embedded applications. It supports a wide range of 8-bit PIC microcontrollers from Microchip and has a broad set of unique functions, such as the first-ever embedded debugger/programmer over USB-C. The development board is well organized and designed so that the end-user has all the necessary elements in one place, such as switches, buttons, indicators, connectors, and others. With four different connectors for each port, EasyPIC v7a allows you to connect accessory boards, sensors, and custom electronics more efficiently than ever. Each part of the EasyPIC v7a development board
contains the components necessary for the most efficient operation of the same board. In addition to the advanced integrated CODEGRIP programmer/debugger module, which offers many valuable programming/debugging options and seamless integration with the Mikroe software environment, the board also includes a clean and regulated power supply module for the development board. It can use various external power sources, including an external 12V power supply, 7-23V AC or 9-32V DC via DC connector/screw terminals, and a power source via the USB Type-C (USB-C) connector. Communication options such as USB-UART and RS-232 are also included, alongside the well-
established mikroBUS™ standard, three display options (7-segment, graphical, and character-based LCD), and several different DIP sockets. These sockets cover a wide range of 8-bit PIC MCUs, from PIC10F, PIC12F, PIC16F, PIC16Enh, PIC18F, PIC18FJ, and PIC18FK families. EasyPIC v7a is an integral part of the Mikroe ecosystem for rapid development. Natively supported by Mikroe software tools, it covers many aspects of prototyping and development thanks to a considerable number of different Click boards™ (over a thousand boards), the number of which is growing every day.
Microcontroller Overview
MCU Card / MCU
Architecture
PIC
MCU Memory (KB)
24
Silicon Vendor
Microchip
Pin count
28
RAM (Bytes)
2048
Used MCU Pins
mikroBUS™ mapper
Take a closer look
Click board™ Schematic
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 6 Click driver.
Key functions:
c6dofimu6_default_cfg
- This function executes default configuration for 6DOF IMU 6 clickc6dofimu6_angular_rate
- Function is used to calculate angular ratec6dofimu6_acceleration_rate
- Function is used to calculate acceleration rate
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
* \brief 6DofImu6 Click example
*
* # Description
* 6DOF IMU 6 Click features a 6-axis MotionTracking device that combines a 3-axis gyroscope,
* a 3-axis accelerometer, and a Digital Motion Processor.
*
* The demo application is composed of two sections :
*
* ## Application Init
* Initalizes SPI and I2C drivers, performs safety check, applies default
* settings and writes an initial log.
*
* ## Application Task
* Demonstrates the use of 6DOF IMU 6 click board by reading angular rate, acceleration rate
* and displaying data to USB UART.
*
* \author MikroE Team
*
*/
// ------------------------------------------------------------------- INCLUDES
#include "board.h"
#include "log.h"
#include "c6dofimu6.h"
// ------------------------------------------------------------------ VARIABLES
static c6dofimu6_t c6dofimu6;
static log_t logger;
static uint8_t id_val;
static float x_accel;
static float y_accel;
static float z_accel;
static float x_gyro;
static float y_gyro;
static float z_gyro;
// ------------------------------------------------------ APPLICATION FUNCTIONS
void application_init ( void )
{
log_cfg_t log_cfg;
c6dofimu6_cfg_t cfg;
/**
* 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.
c6dofimu6_cfg_setup( &cfg );
C6DOFIMU6_MAP_MIKROBUS( cfg, MIKROBUS_1 );
c6dofimu6_init( &c6dofimu6, &cfg );
Delay_ms( 100 );
c6dofimu6_generic_read ( &c6dofimu6, C6DOFIMU6_WHO_AM_I, &id_val, 1 );
if ( id_val == C6DOFIMU6_WHO_AM_I_VAL )
{
log_printf( &logger, "-------------------------\r\n" );
log_printf( &logger, " 6DOF IMU 6 click \r\n" );
log_printf( &logger, "-------------------------\r\n" );
c6dofimu6_power ( &c6dofimu6, C6DOFIMU6_POWER_ON );
}
else
{
log_printf( &logger, "-------------------------\r\n" );
log_printf( &logger, " FATAL ERROR!!! \r\n" );
log_printf( &logger, "-------------------------\r\n" );
for ( ; ; );
}
c6dofimu6_default_cfg( &c6dofimu6 );
log_printf( &logger, " ---Initialised--- \r\n" );
log_printf( &logger, "-------------------------\r\n" );
Delay_ms( 100 );
}
void application_task ( void )
{
c6dofimu6_angular_rate( &c6dofimu6, &x_gyro, &y_gyro, &z_gyro );
log_printf( &logger, "Gyro \r\n" );
log_printf( &logger, "X-axis: %.2f\r\n", x_gyro );
log_printf( &logger, "Y-axis: %.2f\r\n", y_gyro );
log_printf( &logger, "Z-axis: %.2f\r\n", z_gyro );
log_printf( &logger, "---------------------\r\n" );
c6dofimu6_acceleration_rate( &c6dofimu6, &x_accel, &y_accel, &z_accel );
log_printf( &logger, "Accel \r\n" );
log_printf( &logger, "X-axis: %.2f\r\n", x_accel );
log_printf( &logger, "Y-axis: %.2f\r\n", y_accel );
log_printf( &logger, "Z-axis: %.2f\r\n", z_accel );
log_printf( &logger, "---------------------\r\n\r\n" );
Delay_ms( 1000 );
}
void main ( void )
{
application_init( );
for ( ; ; )
{
application_task( );
}
}
// ------------------------------------------------------------------------ END