OFF
MIKROE-5737
16 g
Status:
Accel 28 Click is a compact add-on board that contains an acceleration sensor. This board features the LIS2HH12TR, an ultra-low-power high-performance three-axis accelerometer from STMicroelectronics. It allows selectable full-scale acceleration measurements in ranges of ±2g, ±4g, and ±8g in three axes with a configurable host interface that supports both SPI and I2C serial communication. It has an integrated FIFO buffer that allows users to store data to limit the intervention by the host microcontroller. This Click board™ makes the perfect solution for various applications such as motion-activated functions and user interfaces, tap-double-tap recognition, free-fall detection, tracking, and many more.
Accel 28 Click is fully compatible with the mikroBUS™ socket and can be used on any host system supporting the mikroBUS™ standard. It comes with the mikroSDK open-source libraries, offering unparalleled flexibility for evaluation and customization. What sets this Click board™ apart is the groundbreaking ClickID feature, enabling your host system to seamlessly and automatically detect and identify this add-on board.
This product is no longer in stock
Availability date:
Accel 28 Click is based on the LIS2HH12TR, an ultra-low-power high-performance three-axis accelerometer from STMicroelectronics. The sensing element is made of a suspended silicone structure anchored in a few points and free to move toward the sensed acceleration. If there is an acceleration, the proof mass is displaced from its normal position and causes an imbalance in the capacitive half-bridge, which is measured. The whole measurements are on the values of internal capacitors. The values are outputted as 16-bit data. The sensor features extreme robustness with 10000g of high shock survivability. It also has an embedded temperature sensor for temperature compensation and a self-test. The self-test capability allows the user to check the functioning of the sensor in the final application. The sensor is already factory calibrated.
The FIFO buffer of the LIS2HH12TR sensor works in several modes. Bypass mode bypasses the FIFO and is used to reset the FIFO when in FIFO mode. In FIFO mode, the sensor stores data from all three channels in the FIFO buffer. Stream mode provides continuous FIFO updates; the older data is discarded as new data arrives. There are additional modes Stream-to-FIFO, Bypass-to-Stream, Bypass-to-FIFO, Retrieving data from FIFO, and Burst. The Burst mode allows multiple reads to be performed.
Accel 28 Click allows using both I2C and SPI interfaces with a maximum frequency of 400KHz for I2C and 10MHz for SPI communication. The selection can be made by positioning SMD jumpers labeled as COMM SEL in 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 28 also possesses two interrupt pins, both routed to the INT pin on the mikroBUS™ socket over the INT SEL jumper (default INT1). These interrupt pins 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.
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
LIS2HH12TR - ultra-low-power high-performance three-axis accelerometer from STMicroelectronics
Key Features
Low power consumption, high performance and resolution, high reliability, FIFO storage, integrated interrupt features, selectable serial interface, embedded temperature sensor, embedded self-test, and more
Interface
I2C,SPI
Feature
ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V
This table shows how the pinout on Accel 28 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED Indicator |
JP1-JP3 | COMM SEL | Right | Communication Interface Selection SPI/I2C: Left position SPI, Right position I2C |
JP4 | INT SEL | Left | Interrupt Channel Selection 1/2: Left position 1, Right position 2 |
JP5 | ADDR SEL | Left | I2C Address Selection 0/1: Left position 0, Right position 1 |
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | - | 3.3 | - | V |
Acceleration Range | ±2 | - | ±8 | g |
Sensitivity | 0.061 | - | 0.244 | mg/digit |
Resolution | - | 16 | - | bit |
We provide a library for the Accel 28 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 Accel 28 Click driver.
Key functions
accel28_get_data
Accel 28 data reading function.
accel28_write_reg
Accel 28 register data writing function.
accel28_sw_reset
Accel 28 SW reset function.
Example Description
This example demonstrates the use of Accel 28 Click board™ by reading and displaying the accelerometer data (X, Y, and Z axis).
void application_task ( void )
{
err_t error_flag = ACCEL28_OK;
if ( ACCEL28_PIN_STATE_HIGH == accel28_get_int_state( &accel28 ) )
{
uint8_t tmp_data;
error_flag = accel28_read_reg( &accel28, ACCEL28_REG_STATUS, &tmp_data );
if ( ( tmp_data & ACCEL28_STATUS_ZYX_DATA_AVL ) && ( ACCEL28_OK == error_flag ) )
{
error_flag = accel28_get_data( &accel28, &accel_data );
if ( ACCEL28_OK == error_flag )
{
log_printf( &logger, " X-axis %.2f mgrn", accel_data.x_data );
log_printf( &logger, " Y-axis %.2f mgrn", accel_data.y_data );
log_printf( &logger, " Z-axis %.2f mgrn", accel_data.z_data );
log_printf( &logger, " = = = = = = = = = = = = = =rn" );
}
}
}
}
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:
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.
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.
NOTE: Please be advised that any peripheral devices or accessories shown connected to the Click board™ are not included in the package. Check their availability in our shop or in the YMAN section below.