How does it work?
Accel 20 Click as its foundation uses the KX134-1211, a highly reliable digital triaxial acceleration sensor with a feature set optimized for machine condition monitoring from Rohm Semiconductor. The KX134-1211 is highly configurable with a programmable acceleration range of ±8/±16/±32/±64g providing signal conditioning and intelligent user-programmable application algorithms with improved linearity over the entire temperature range. It also has an Advanced Data Path (ADP) technology which allows noise filtering and sensor signal processing, usually carried out by the MCU, to be performed by the accelerometer. They contribute to reducing MCU load and power consumption together with improved application performance.
Acceleration sensing is based on the principle of a differential capacitance arising from the acceleration-induced motion of the sensing element, which is hermetically sealed at the wafer level by bonding a second silicon lid wafer to the device wafer, further utilizing a standard mode cancellation to decrease errors from process variation, temperature, and environmental stress.
The KX134-1211 also features an advanced Wake-Up and Back-to-Sleep detection with a high-resolution threshold capability configurable down to 15.6mg, 512-byte buffer that continues to record data even when being read, as well as embedded engines for orientation, directional/double-tap, and free-fall detection.
Accel 20 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 KX134-1211 allows choosing the least significant bit (LSB) of its I2C slave address using the SMD jumper labeled ADDR SEL. The Accel 20 also possesses two interrupts, I1 and I2, routed to the INT and AN pins on the mikroBUS™ used to signal MCU that an event has been sensed, and one trigger pin labeled as TRG, routed to the PWM pins on the mikroBUS™ socket, used for FIFO buffer control.
This Click board™ can be operated only with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before use with 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 vibration and condition monitoring, test and measurements, predictive maintenance, and more
On-board modules
KX134-1211 – highly reliable digital triaxial acceleration sensor with a feature set optimized for machine condition monitoring from Rohm Semiconductor
Key Features
Low power consumption, high performance and resolution, high reliability, user-configurable 3-stage Advanced Data Path (ADP), integrated interrupt features, Excellent temperature performance with high shock survivability, 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 20 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-JP3 | COMM SEL | Left | Communication Interface Selection SPI/I2C: Left position SPI, Right position I2C |
JP4 | ADDR SEL | Left | I2C Address Selection 1/0: Left position 1, Right position 0 |
Accel 20 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Acceleration Range | ±8 | – | ±64 | g |
Sensitivity | – | 4096 | – | counts/g |
Resolution | – | 16 | – | bit |
Operating Temperature Range | -40 | +25 | +105 | °C |
Software Support
We provide a library for the Accel 20 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 20 Click driver.
Key functions
-
accel20_get_axis_data
Accel 20 get accelerometer axis function. -
accel20_set_output_data_rate
Accel 20 set output data rate function. -
accel20_set_accel_range
Accel 20 set accel range function.
Example Description
This library contains API for Accel 20 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 accel20_axis_t axis;
if ( accel20_get_int_1( &accel20 ) == ACCEL20_INT1_DATA_READY )
{
accel20_get_axis_data( &accel20, &axis );
log_printf( &logger, "tX : %5d rntY : %5d rntZ : %5d rn", axis.x, axis.y, 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 way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.Accel20
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.