How does it work?
Smart DOF 2 Click is based on the LSM6DSV16XTR, a high-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, and OIS/EIS paths from STMicroelectronics. It features a 3-axis digital accelerometer (±2/±4/±8/±16 g full scale) and a 3-axis digital gyroscope (±125/±250/±500/±1000/±2000/±4000 dps full scale) with a triple core for processing acceleration and angular rate data on three separate channels (user interface, OIS, and EIS) with dedicated configuration, processing, and filtering. It also enables processes in edge computing, thus allowing advanced features, such as FSM and MLC, as AI features for IoT applications. The list continues with embedded temperature sensors, advanced pedometers, step detection, and tilt detection, thus making this sensor a truly smart device.
The LSM6DSV16XTR operates in several modes. Accelerometer power modes consist of five different modes that affect the unit’s performance. Accelerometer dual-channel mode can work with two different scales simultaneously. Gyroscope power modes consist of five modes too, which lets you choose between high performance, high accuracy, and sleep. The list continues with ODR-triggered mode, analog hub functionality, Qvar functionality, enhanced EIS, OIS, and more. The unit also is equipped with embedded 1.5KB of data in FIFO, with up to 4.5KB with the compression feature enabled. The FIFO allows you to store data about the gyroscope, accelerometer, external sensors, sleep counter, temperature, and more.
Smart DOF 2 Click allows selection between I2C or SPI interface at a maximum frequency of 1MHz for I2C and 10MHz for SPI communication. Selection is made by positioning the three SMD jumpers labeled COMM SEL to the appropriate position, with I2C selected by default. The I2C address can be selected via the ADDR SEL jumper, with the jumper positioned on 0 by default. The INT pin on the mikroBUS™ socket is a programmable interrupt pin that generates an interrupt on status events, such as free fall, wake-up, 6D orientation, click or double-click, motion, and more.
The LSM6DSV16XTR also offers flexible connection pins with three modes of functionality. Using two three-position jumpers, you can choose between Qvar, Master I2C, and Aux SPI functionalities. The unit has an interface for two Qvar (electrostatic sensor) electrodes for user interface functions, such as tap, double tap, triple tap, long press, swipe, and more. Those two electrodes can be attached to Q1 and Q2 headers, positioned at the top of the board. On the left from the three-position jumpers is an AUX SPI header allowing accelerometer and gyroscope data to be available for OIS applications (camera module, for example). On the right side of the board, there is an M I2C header for connecting external sensors (up to 4), with an additional interrupt INT2 pin, besides standard 2-Wire interface lines SCL, SDA, and GND.
This Click board™ can only be operated 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,Motion
Applications
Can be used for the development of motion tracking, and gesture detection, augmented reality, indoor navigation, IoT devices, EIS, and OIS for camera applications, and more
On-board modules
LSM6DSV16XTR – high-performance 6-axis IMU from STMicroelectronics
Key Features
Triple core for UI, EIS, and OIS data processing, power consumption for both accelerometer and gyroscope, smart FIFO up to 4.5KB, selectable interface, auxiliary SPI for OIS data output for gyroscope and accelerometer, machine learning core with exportable features and filters for AI applications, embedded sensor fusion, ASC, MLC, Qvar, OIS/EIS paths, and more
Interface
I2C,SPI
Feature
ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on Smart DOF 2 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, JP2 | M I2C/Q1,Q2/AUX SPI | Right | M I2C/Qvar/AUX SPI Functionality Selection: Left position M I2C, Right position Qvar, Upper position AUX SPI |
COMM SEL 1-3 | COMM SEL | Right | Communication Interface Selection SPI/I2C: Left position SPI, Right position I2C |
JP3 | ADDR SEL | Left | I2C Address Selection 1/0: Left position 1, Right position 0 |
Smart DOF 2 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Acceleration Range | ±2 | – | ±16 | g |
Angular Rate | ±125 | – | ±4000 | dps |
Acceleration Sensitivity | 0.061 | – | 0.488 | mg/LSB |
Angular Sensitivity | 4.375 | – | 140 | mdps/LSB |
Qvar Gain | – | 75 | – | LSB/mV |
Software Support
We provide a library for the Smart DOF 2 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 Smart DOF 2 Click driver.
Key functions
-
smartdof2_get_acc_axis
Smart DOF 2 get accel sensor axes function. -
smartdof2_get_gyro_axis
Smart DOF 2 get gyro sensor axes function. -
smartdof2_get_temperature
Smart DOF 2 get temperature function.
Example Description
This library contains API for Smart DOF 2 Click driver. The library initializes and defines the I2C or SPI bus drivers to write and read data from registers. The library also includes a function for reading accelerometer and gyroscope X-axis, Y-axis, and Z-axis data and the temperature in degrees Celsius.
void application_task ( void )
{
static smartdof2_axis_t acc_axis, gyro_axis;
if ( SMARTDOF2_OK == smartdof2_get_acc_axis( &smartdof2, &acc_axis ) )
{
if ( SMARTDOF2_OK == smartdof2_get_gyro_axis( &smartdof2, &gyro_axis ) )
{
log_printf( &logger, " Accel X: %.2f mg | Gyro X: %.2f mdpsrn", acc_axis.x, gyro_axis.x );
log_printf( &logger, " Accel Y: %.2f mg | Gyro Y: %.2f mdpsrn", acc_axis.y, gyro_axis.y );
log_printf( &logger, " Accel Z: %.2f mg | Gyro Z: %.2f mdpsrn", acc_axis.z, gyro_axis.z );
log_printf( &logger, "--------------------------------------rn" );
}
}
Delay_ms( 1000 );
}
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.SmartDOF2
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.