How does it work?
Accel 19 Click as its foundation uses the LIS2DTW12, a highly reliable digital triaxial acceleration and temperature sensor from STMicroelectronics. The LIS2DTW12 is highly configurable with a programmable acceleration range of ±2g, ±4g, ±8g, or ±16g capable of measuring accelerations with output data rates from 1.6 to 1600Hz. Multiple operating modes with various bandwidths, low noise, very stable sensitivity, together with the capability of working over a wide temperature range, makes this device particularly suitable for vibration monitoring in industrial applications.
The LIS2DTW12 has an embedded temperature sensor with a typical accuracy of 0.8°C, ODRs ranging from 50 to 1.6Hz, and 8 to 12 bits resolution. Besides, it has an integrated 32-level first-in, first-out (FIFO) buffer allowing the user to store data to limit intervention by the host processor. Alongside these features, the LIS2DTW12 has a dedicated internal engine to process motion and acceleration detection, including free-fall, wakeup, highly configurable single/double-tap recognition, activity/inactivity, stationary/motion detection, portrait/landscape detection, and 6D/4D orientation.
Accel 19 Click allows using both I2C and SPI interfaces with a maximum frequency of 3.4MHz for I2C and 10MHz for SPI communication. The selection can be made by positioning SMD jumpers labeled as COMM SEL to an appropriate position. Note that all the jumpers’ positions must be on the same side, or the Click board™ may become unresponsive. While the I2C interface is selected, the LIS2DTW12 allows choosing the least significant bit (LSB) of its I2C slave address using the SMD jumper labeled ADDR SEL. The Accel 19 also possesses two interrupts, IN1 and IN2, routed to the INT and PWM pins on the mikroBUS™ socket used to signal MCU that an event has been sensed entirely programmed by the user through the I2C/SPI interface.
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
Motion
Applications
Can be used for various applications such as motion-activated functions and user interfaces, tap-double-tap recognition, free-fall detection, tracking, and many more
On-board modules
LIS2DTW12 – highly reliable digital triaxial acceleration and temperature sensor from STMicroelectronics
Key Features
Low power consumption, high performance and resolution, high reliability, dedicated internal engine to process motion and acceleration detection, integrated interrupt features, selectable serial interface, 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 Accel 19 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 | ADDR SEL | Right | I2C Address Selection 0/1: Left position 0, Right position 1 |
JP2-JP5 | COMM SEL | Right | Communication Interface Selection SPI/I2C: Left position SPI, Right position I2C |
Accel 19 click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Acceleration Range | ±2 | – | ±16 | g |
Sensitivity | 4098 | – | 512 | LSB/g |
Bandwidth | 0.8 | – | 800 | Hz |
Resolution | – | 16 | – | bit |
Operating Temperature Range | -40 | +25 | +85 | °C |
Software Support
We provide a library for the Accel 19 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for Accel 19 Click driver.
Key functions
-
accel19_get_axis_data
Accel 19 get accelerometer axis function. -
accel19_data_ready
Accel 19 data ready function. -
accel19_set_control
Accel 19 set control function.
Example Description
This library contains API for Accel 19 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 X-axis, Y-axis, and Z-axis data.
void application_task ( void )
{
static accel19_axis_t axis;
if ( ACCEL19_STATUS_DRDY == accel19_data_ready( &accel19 ) )
{
accel19_get_axis_data( &accel19, &axis );
log_printf( &logger, "tX : %5d rntY : %5d rntZ : %5d rn", axis.x, axis.y, axis.z );
log_printf( &logger, "-------------------------rn" );
Delay_ms( 1000 );
}
Delay_ms( 1 );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.Accel19
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 MikroElektronika compilers.
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.