How does it work?
6DOF IMU 15 Click is based on the ASM330LHH, a system-in-package featuring a high-performance 3-axis digital accelerometer and 3-axis digital gyroscope from STMicroelectronics. It features a 3 kB 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. It also features embedded compensation for high stability over temperature (up to +105 °C). The ASM330LHH has a configurable full-scale acceleration range of up to ±16 g and a wide angular rate range, from ±125 dps up to ±4000 dps, that enables its usage in a broad range of applications.
The ASM330LHH has a programmable interrupt system that can generate an interrupt signal two available pins. One of these two interrupt pins can be selected using the INT SEL jumper (JP4), which is routed to the INT pin of the mikroBUS™ socket. The event-detection smart programmable interrupts enable efficient and reliable motion-activated functions, implementing hardware recognition of free-fall events, 6D orientation, activity or inactivity, and wakeup events.
6DOF IMU 15 Click provides the possibility of using both I2C and SPI interfaces with a maximum frequency of 400kHz for I2C and 10MHz for SPI communication. The selection can be done by positioning SMD jumpers labeled as COMM SEL to an appropriate position. Note that all the jumpers must be placed to the same side, or else the Click board™ may become unresponsive. While the I2C interface is selected, the ASM330LHH allows the choice of the least significant bit (LSB) of its I2C slave address. This can be done by using the SMD jumper labeled as ADDR SEL.
A FIFO buffer helps to further reduce the processing load, offering temporary storage for the output data. The ASM330LHH contains a FIFO of size 3 kbytes that is accessible via the serial interface. The FIFO configuration register determines which data is written into the FIFO. Possible choices include gyro data, accelerometer data, Timestamp, and temperature readings.
This Click Board™ is designed to be operated only with a 3.3V logic level. A proper logic voltage level conversion should be performed before the Click board™ is used with MCUs with different logic levels.
Specifications
Type
Acceleration,Gyroscope,Motion
Applications
Gesture recognition, activity classification, dead reckoning, pedometers, Telematics, eTolling, anti-theft systems, and more.
On-board modules
6DOF IMU 15 Click is based on the ASM330LHH, a system-in-package featuring a high-performance 3-axis digital accelerometer and 3-axis digital gyroscope from STMicroelectronics
Key Features
Both I2C and SPI serial communication, features a 3 kB FIFO and a programmable interrupt with ultra low-power event-detection support to minimize system power consumption power consumption, and more.
Interface
I2C,SPI
Feature
No 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 15 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-JP3 | COMM SEL | Right | Communication interface selection: left position SPI, right position I2C |
JP4 | INT SEL | Right | Interrupt pin selection: left position INT 1, right position INT 2 |
JP5 | ADDR SEL | Right | I2C Address Selection: Left position 0, Right position 1 |
6DOF IMU 15 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 2.0 | 3.3 | 3.6 | V |
I2C Clock Frequency | – | – | 400 | kHz |
SPI Clock Frequency | – | – | 10 | kHz |
Linear acceleration measurement range | ±2 | – | ±16 | g |
Angular rate measurement range | ±125 | – | ±400030 | dps |
Operating Temperature Range | -40 | – | +105 | °C |
Software Support
We provide a library for the 6DOF IMU 15 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 that enables the usage of the 6DOF IMU 15 Click board. It initializes and defines the I2C bus driver and drivers that offer a plethora of settings. The library also offers functions that allow reading of accelerometer, gyroscope and temperature, as well as generic read and write function that offer reading( and writing) of different lenghts of data.
Key functions:
void c6dofimu15_acceleration_rate ( float *x_acel_rte, float *y_acel_rte, float *z_acel_rte );
– Function is used to calculate acceleration rate in milligravities.void c6dofimu15_angular_rate ( float *x_ang_rte, float *y_ang_rte, float *z_ang_rte );
– Function is used to calculate angular rate in milidegrees per second.float c6dofimu15_read_temp_out ( );
– Function is used to read temperture in degree Centigrade.
Examples description
The application is composed of three sections :
- System Initialization – Initializes SPI and I2C modules, LOG and GPIO structures, sets INT pin as input.
- Application Initialization – Initalizes SPI and I2C drivers, performs safety check, applies default setup and writes an log.
- Application Task – Demonstrates use of 6DOF IMU 6 click board by reading angular rate in milidegrees per second, and linear acceleration rate in milligravities and displaying data via USART terminal.
void application_task ( ) { c6dofimu15_angular_rate( &x_gyro, &y_gyro, &z_gyro ); mikrobus_logWrite( "Angular rate: ", _LOG_LINE ); FloatToStr( x_gyro, log_txt ); mikrobus_logWrite( "X-axis: ", _LOG_TEXT ); Ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_TEXT ); mikrobus_logWrite( "mdps", _LOG_LINE ); FloatToStr( y_gyro, log_txt ); mikrobus_logWrite( "Y-axis: ", _LOG_TEXT ); Ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_TEXT ); mikrobus_logWrite( "mdps", _LOG_LINE ); FloatToStr( z_gyro, log_txt ); mikrobus_logWrite( "Z-axis: ", _LOG_TEXT ); Ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_TEXT ); mikrobus_logWrite( "mdps", _LOG_LINE ); mikrobus_logWrite( "----------------------", _LOG_LINE ); c6dofimu15_acceleration_rate( &x_accel, &y_accel, &z_accel ); mikrobus_logWrite( "Acceleration rate: ", _LOG_LINE ); FloatToStr( x_accel, log_txt ); mikrobus_logWrite( "X-axis: ", _LOG_TEXT ); Ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_TEXT ); mikrobus_logWrite( "mg", _LOG_LINE ); FloatToStr( y_accel, log_txt ); mikrobus_logWrite( "Y-axis: ", _LOG_TEXT ); Ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_TEXT ); mikrobus_logWrite( "mg", _LOG_LINE ); FloatToStr( z_accel, log_txt ); mikrobus_logWrite( "Z-axis: ", _LOG_TEXT ); Ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_TEXT ); mikrobus_logWrite( "mg", _LOG_LINE ); mikrobus_logWrite( "----------------------", _LOG_LINE ); Delay_ms( 1000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C
- 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.