How does it work?
Accel&Qvar Click is based on the LIS2DUXS12, an ultralow-power accelerometer from STMicroelectronics, which is notable for its integration of Qvar technology, artificial intelligence, and an anti-aliasing filter. This component stands out due to its design, which minimizes power consumption while incorporating advanced functionalities. Embedded within the LIS2DUXS12 is a digital, 3-axis accelerometer that merges MEMS and ASIC technologies to feature an array of capabilities, including an always-on anti-aliasing filter, a finite state machine (FSM), and a machine learning core (MLC) equipped with adaptive self-configuration (ASC). Additionally, it houses an analog hub alongside a Qvar sensing channel. Including the FSM and MLC with ASC equips the LIS2DUXS12 with superior edge processing capabilities. Meanwhile, the analog hub and Qvar sensing channel pave the way for unparalleled system optimization.
The LIS2DUXS12 offers adjustable full scales of ±2g, ±4g, ±8g, and ±16g and can accurately measure accelerations with output data rates (ODR) ranging from 1.6Hz to 800Hz. Its built-in engine handles motion and acceleration detections, such as free-fall, wake-up events, and multiple tap recognitions, alongside activity/inactivity monitoring and orientation detection. Operating modes of the LIS2DUXS12 include high-performance, low-power, ultralow-power, and one-shot, ensuring versatility across different applications. Notably, its low-power mode engages a robust anti-aliasing filter, maintaining low energy consumption. These features make it ideal for various applications, including wearable technology, portable healthcare devices, and motion-activated user interfaces.
As mentioned, the LIS2DUXS12 embeds a Qvar sensor that detects electric charge variations in the proximity of the external electrodes connected to the device, in this case, two sets of pads. The upper pair can be used as a radar and is disabled by default. You can enable it by soldering two unpopulated R8 and R15 0 Ohm resistors. Two arrow-like pads are parts of a sensitive touch interface able to detect touch, press, or swipe. Two 3-pin headers allow you to attach external electrodes on the sensor’s Q1 and Q2 Qvar channels. These electrodes can be used for all the mentioned Qvar functionalities.
This Click board™ can communicate with the host MCU by selecting one between the I2C, and SPI interfaces over the COMM SEL jumper, where the I2C is selected by default. All four jumpers must be set into the appropriate position for this Click board™ to work properly. The standard 2-Wire I2C interface supports Fast mode (400kHz) and Fast mode plus (1MHz) clock frequencies. The I2C address can be selected over the ADDR SEL jumper, where 0 is set by default. If your choice is the SPI, this Click board™ supports both 3- and 4-Wire SPI serial interfaces with clock frequencies up to 10MHz.
The device may be configured to generate interrupt signals from an independent inertial wake-up/free-fall event or from the device’s position. The thresholds and timing of this interrupt generator are programmable by the end user in runtime. Automatic programmable sleep-to-wake-up and return-to-sleep functions are also available for enhanced power saving. The device interrupts signal can behave as free-fall (3-axis under-threshold recognition), wake-up (axis recognition), wake-to-sleep (change of state recognition active-sleep also known as activity-inactivity), 6D and 4D orientation detection (change of position recognition), Tap-tap: single, double, triple axis and sign recognition. To use this feature on IT1 and IT2 pins, populate R18 and R19 resistors, which are unpopulated by default.
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.
Specifications
Type
Motion,Acceleration
Applications
Ideal for wearable technology, portable healthcare devices, and motion-activated user interfaces
On-board modules
LIS2DUXS12 – 3-axis accelerometer from STMicroelectronics
Key Features
Ultralow-power consumption, Qvar, AI, anti-aliasing filter for advanced functionality, adjustable measurement range, ODR up to 800Hz, high performance, several operating modes, enhanced user interaction through touch, press, and swipe detection, selectable interface, interrupt, and more
Interface
I2C,SPI
Feature
ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on Accel&Qvar 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 |
JP4-JP7 | COMM SEL | Right | Communication Interface Selection SPI/I2C: Left position SPI, Right position I2C |
JP8 | ADDR SEL | Right | I2C Address Selection 1/0: Left position 1, Right position 0 |
Accel&Qvar Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Measurement Range | ±2 | – | ±16 | g |
Sensitivity | 0.061 | – | 0.488 | mg/digit |
Software Support
We provide a library for the AccelQvar 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 AccelQvar Click driver.
Key functions
-
accelqvar_get_axes_data
This function reads the accelerometer sensor axes data. -
accelqvar_get_qvar_data
This function reads the Qvar electrostatic sensor data output.
Example Description
This library contains API for the AccelQvar Click driver. The library initializes and defines the I2C and SPI drivers to write and read data from registers and the default configuration for reading the accelerator data and Qvar electrostatic sensor measurement.
void application_task ( void )
{
accelqvar_axes_t acc_axis;
if ( ACCELQVAR_OK == accelqvar_get_axes_data( &accelqvar, &acc_axis ) )
{
log_printf( &logger, " Accel X: %.2f mgrn", acc_axis.x );
log_printf( &logger, " Accel Y: %.2f mgrn", acc_axis.y );
log_printf( &logger, " Accel Z: %.2f mgrn", acc_axis.z );
log_printf( &logger, "_________________rn" );
}
float qvar = 0;
if ( ACCELQVAR_OK == accelqvar_get_qvar_data( &accelqvar, &qvar ) )
{
if ( abs( qvar ) > ACCELQVAR_THOLD_DETECT_TOUCH )
{
uint8_t touch_strength = ( uint8_t ) ( abs( qvar ) / ACCELQVAR_THOLD_SENS );
log_printf( &logger, " Touch position: " );
if ( qvar < ACCELQVAR_TOUCH_ZERO )
{
log_printf( &logger, " Leftrn" );
}
else
{
log_printf( &logger, " Rightrn " );
}
log_printf( &logger, " Strength: " );
while ( touch_strength )
{
log_printf( &logger, "|" );
touch_strength--;
}
log_printf( &logger, "rn_________________rn" );
Delay_ms( 100 );
}
}
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.AccelQvar
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.