How does it work?
9DOF Click is based on the LSM9DS1, a motion-sensing system-in-a-chip from STMicroelectronics consisting of a 3-axis accelerometer, 3-axis gyroscope, and 3-axis magnetometer. The LSM9DS1 can measure key properties of movement such as angular velocity, acceleration, and heading in three dimensions, producing nine pieces of data – acceleration in x/y/z, angular rotation in x/y/z, and magnetic force in x/y/z. It has a highly configurable linear acceleration full scale of ±2g/±4g/±8/±16g, a magnetic field full scale of ±4/±8/±12/±16G, and an angular rate of ±245/±500/±2000dps. With its 9-axis integration, this Click board™ guarantees customers’ optimal motion performance, allowing them to implement it into a wide range of consumer applications.
This Click board™ communicates with MCU using the standard I2C 2-Wire interface to read data and configure settings, supporting a Fast Mode operation up to 400kHz. Also, the LSM9DS1 allows choosing its I2C slave address using the SMD jumper labeled I2C ADDR. The internal parts of the LSM9DS1 have software-configurable modes of operation. The accelerometer and gyroscope have two operating modes: when only the accelerometer is active while the gyroscope is in power-down mode or both accelerometer and gyroscope sensors are active at the same ODR. The magnetic sensor has three operating modes: power-down (default), continuous, and single conversion.
Apart from the pins for establishing communication, this board uses two more pins of the mikroBUS™ socket, such as EN and INT pins. The INT pin represents a selectable interrupt based on the configuration achieved by populating the jumper marked with INT SEL to the appropriate position. With the chosen configuration, the LSM9DS1 forwards information to the INT pin, such as accelerometer and gyroscope alert on over/under thresholds, data ready, or FIFO overruns, as well as a magnetometer alert. On the other hand, with the EN pin, it is possible to perform an external trigger synchronization/stamp using three different modes such as level, impulse, or edge-sensitive trigger.
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. 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
Acceleration,Gyroscope,Magnetic,Motion
Applications
Can be used for applications like smart user interfaces, indoor navigation and orientation, gesture recognition, robotics, and many more
On-board modules
LSM9DS1 – inertial measurement module from STMicroelectronics
Key Features
Three acceleration, angular rate, and magnetic field channels, configurable full-scale range, high resolution, I2C interface, programmable interrupt, various motion patterns, several operational modes, and more
Interface
I2C
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 9 DOF 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 |
J1-J2 | I2C ADDR | Left | I2C Address Selection 0/1: Left position 0, Right position 1 |
J3-J6 | INT SEL | J6 | Interrupt Selection |
9DOF Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Accelerometer Range | ±2 | – | ±16 | g |
Gyroscope Range | ±245 | – | ±2000 | dps |
Magnetometer Range | ±4 | – | ±16 | G |
Accelerometer Sensitivity | 0.061 | – | 0.732 | mg/LSB |
Gyroscope Sensitivity | 8.75 | – | 70 | mdps/LSB |
Magnetometer Sensitivity | 0.14 | – | 0.58 | mG/LSB |
Software Support
We provide a library for the 9 DOF 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 9 DOF Click driver.
Key functions
-
Generic accelerometer read function.
-
Get gyroscope data function.
-
Get magnetometer data function.
Example Description
This application shows accelerometer, gyroscope and magnetometer axes values.
void application_task ( void )
{
c9dof_read_accel( &c9dof, &accel_data );
Delay_ms( 10 );
c9dof_read_gyro( &c9dof, &gyro_data );
Delay_ms( 10 );
c9dof_read_mag( &c9dof, &mag_data );
Delay_ms( 10 );
log_printf( &logger, " Accel | Gyro | Magrn" );
log_printf( &logger, "--------------------------------------rn" );
log_printf( &logger, " X = %6d | X = %6d | X = %6drn", accel_data.x, gyro_data.x, mag_data.x );
log_printf( &logger, " Y = %6d | Y = %6d | Y = %6drn", accel_data.y, gyro_data.y, mag_data.y );
log_printf( &logger, " Z = %6d | Z = %6d | Z = %6drn", accel_data.z, gyro_data.z, mag_data.z );
log_printf( &logger, "--------------------------------------rn" );
Delay_ms( 2000 );
}
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.9Dof
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. 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.