Add movement and rotation detection to your projects for unparalleled precision.
A
A
Hardware Overview
How does it work?
6DOF IMU 11 Click is based on the KMX63, a tri-axis accelerometer, tri-axis magnetometer, and temperature sensor on a single-chip combo solution from Kionix. The Accelerometer and Magnetometer data can be accumulated in an internal 384-byte FIFO buffer and transmitted to the application processor. Acceleration sensing is based on the principle of a differential capacitance arising from acceleration induced motion of the sense element, which utilizes common mode cancellation to decrease errors from process variation, temperature, and environmental stress. Capacitance changes are amplified and converted into digital signals which are processed by a dedicated digital signal processing unit. The digital signal processor applies filtering, bias, and sensitivity adjustments, as well as temperature compensation. Magnetic sensing is based on the principle of magnetic impedance. The magnetic
sensor detects very small magnetic fields by passing an electric pulse through a special electron spin aligned amorphous wire. Due to the high Curie temperature of the wire, the sensor’s thermal performance shows excellent stability. Noise performance is excellent with bias stability over temperature. Bias errors resulting from assembly can be trimmed digitally by the user. These sensors can accept supply voltages between 1.7V and 3.6V, and digital communication voltages from the MCU between 1.2V and 3.6V. The Kionix KMX63 digital sensor can communicate on the I2C digital serial interface bus. This flexibility allows for easy system integration by eliminating analog-to-digital converter requirements and by providing direct communication with system processors. The I2C interface is compliant with high-speed mode, fast mode, and standard mode I2C protocols. With 6DOF IMU 6 click you may
communicate by using I2C serial interface. The I2C is primarily used for serial communication between a Master device and one or more Slave devices. The KMX63 always operates as a Slave device during standard Master-Slave I2C operation. Given all of the possibilities its features offer, the 6DOF IMU 11 click can be used for applications which require movement and orientation features, such as screen orientation, navigation, game playing, machine/vibration analysis, and more. 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
Curiosity PIC32 MZ EF development board is a fully integrated 32-bit development platform featuring the high-performance PIC32MZ EF Series (PIC32MZ2048EFM) that has a 2MB Flash, 512KB RAM, integrated FPU, Crypto accelerator, and excellent connectivity options. It includes an integrated programmer and debugger, requiring no additional hardware. Users can expand
functionality through MIKROE mikroBUS™ Click™ adapter boards, add Ethernet connectivity with the Microchip PHY daughter board, add WiFi connectivity capability using the Microchip expansions boards, and add audio input and output capability with Microchip audio daughter boards. These boards are fully integrated into PIC32’s powerful software framework, MPLAB Harmony,
which provides a flexible and modular interface to application development a rich set of inter-operable software stacks (TCP-IP, USB), and easy-to-use features. The Curiosity PIC32 MZ EF development board offers expansion capabilities making it an excellent choice for a rapid prototyping board in Connectivity, IOT, and general-purpose applications.
Microcontroller Overview
MCU Card / MCU
Architecture
PIC32
MCU Memory (KB)
2048
Silicon Vendor
Microchip
Pin count
100
RAM (Bytes)
524288
Used MCU Pins
mikroBUS™ mapper
Take a closer look
Schematic
Step by step
Project assembly
Track your results in real time
Application Output
1. Once the code example is loaded, pressing the "DEBUG" button initiates the build process, programs it on the created setup, and enters Debug mode.
2. After the programming is completed, a header with buttons for various actions within the IDE becomes visible. Clicking the green "PLAY" button starts reading the results achieved with the Click board™. The achieved results are displayed in the Application Output tab.
Software Support
Library Description
This library contains API for 6DOF IMU 11 Click driver.
Key functions:
c6dofimu11_config_accel
- Configuration Accel functionc6dofimu11_config_mag
- Configuration Magnetometer functionc6dofimu11_get_axis
- Get axis data functionc6dofimu11_get_accel_data
- Read Accel X-axis, Y-axis and Z-axis functionc6dofimu11_get_mag_data
- Read Magnetometer X-axis, Y-axis and Z-axis functionc6dofimu11_read_accel
- Get Accel range X, Y and Z value ( g ) functionc6dofimu11_read_mag
- Get Magnetometer magnetic field strength X, Y and Z value ( nT ) function
Open Source
Code example
This example can be found in NECTO Studio. Feel free to download the code, or you can copy the code below.
/*!
* \file
* \brief 6DofImu11 Click example
*
* # Description
* Designed to strike a balance between current consumption and noise performance with excellent bias stability over temperature
*
* The demo application is composed of two sections :
*
* ## Application Init
* Initialization driver enables - I2C, check device ID, sets default configuration, also write log.
*
* ## Application Task
* This is an example which demonstrates the use of 6DOF IMU 11 Click board.
* Measured and display Accel and Magnetometer magnetic field
* strength values for X-axis, Y-axis and Z-axis.
* Results are being sent to the Uart Terminal where
* you can track their changes.
* All data logs write on USB uart changes for every 2 sec.
*
* \author MikroE Team
*
*/
// ------------------------------------------------------------------- INCLUDES
#include "board.h"
#include "log.h"
#include "c6dofimu11.h"
// ------------------------------------------------------------------ VARIABLES
static c6dofimu11_t c6dofimu11;
static log_t logger;
void application_init ( void )
{
log_cfg_t log_cfg;
c6dofimu11_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.
c6dofimu11_cfg_setup( &cfg );
C6DOFIMU11_MAP_MIKROBUS( cfg, MIKROBUS_1 );
c6dofimu11_init( &c6dofimu11, &cfg );
if ( c6dofimu11_check_id( &c6dofimu11 ) == C6DOFIMU11_CHECK_ID_SUCCESS )
{
log_printf( &logger, " SUCCESS \r\n" );
log_printf( &logger, "--------------------------\r\n" );
}
else
{
log_printf( &logger, " ERROR \r\n" );
log_printf( &logger, " Reset the device \r\n" );
log_printf( &logger, "--------------------------\r\n" );
for ( ; ; );
}
c6dofimu11_default_cfg( &c6dofimu11 );
log_printf( &logger, " Set default config \r\n" );
log_printf( &logger, "--------------------------\r\n" );
Delay_ms( 100 );
}
void application_task ( void )
{
c6dofimu11_mag_t mag_data;
c6dofimu11_accel_t accel_data;
c6dofimu11_read_accel ( &c6dofimu11, &accel_data );
Delay_ms( 10 );
c6dofimu11_read_mag ( &c6dofimu11, &mag_data );
Delay_ms( 10 );
log_printf( &logger, " Accel X : %.2f g\r\n", accel_data.x );
log_printf( &logger, " Accel Y : %.2f g\r\n", accel_data.y );
log_printf( &logger, " Accel Z : %.2f g\r\n", accel_data.z );
log_printf( &logger, "\r\n" );
log_printf( &logger, " Mag X : %.2f uT\r\n", mag_data.x );
log_printf( &logger, " Mag Y : %.2f uT\r\n", mag_data.y );
log_printf( &logger, " Mag Z : %.2f uT\r\n", mag_data.z );
log_printf( &logger, "--------------------------\r\n" );
Delay_ms( 2000 );
}
void main ( void )
{
application_init( );
for ( ; ; )
{
application_task( );
}
}
// ------------------------------------------------------------------------ END