How does it work?
Accel 18 Click as its foundation uses the MC3419, a highly reliable 16-bit digital triaxial acceleration sensor with a feature set optimized for consumer product motion sensing from MEMSIC. The MC3419 is highly configurable with a programmable acceleration range of ±2/±4/±8/±16g and a dedicated motion block that implements the latest algorithms to detect any motion, shake, tilt/flip, and tilt 35 positions. It is optimized for high-performance applications by supporting full 16-bit resolution at Output Data Rates (ODR) up to 1KHz. In addition to all these features, it also has excellent temperature stability and low power consumption/low active current.
The MC3419 has two operational states: STANDBY (following a Power-Up sequence) and WAKE state. Operative states are software-controllable, with no automatic power control. In the WAKE state, acceleration data for the X, Y, and Z axes are sampled at a rate between 0.5 and 1000 samples/second. Changing from the STANDBY to WAKE state takes one sample period (less than 10 μs). Also, digital offset and gain calibration can be performed on the Accel board, if necessary, to reduce the effects of post-assembly influences and stresses, which may cause the sensor readings to be offset from their factory values.
Accel 18 Click allows using both I2C and SPI interfaces with a maximum frequency of 1MHz 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 MC3419 allows choosing the least significant bit (LSB) of its I2C slave address using the SMD jumper labeled as ADDR SEL. The Accel 18 also possesses two interrupts, I1 and I2, routed to the AN and INT pins on the mikroBUS™ used to signal MCU that an event has been sensed.
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
MC3419 – 16-bit digital triaxial acceleration sensor with a feature set optimized for consumer product motion sensing from MEMSIC
Key Features
Low power consumption, high performance, high reliability, 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 18 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 0/1: Left position 0, Right position 1 |
Accel 18 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Acceleration Range | ±2 | ±16 | g | |
Sensitivity | 16384 | – | 2048 | LSB/g |
Output Data Rate | 0.5 | – | 1000 | Hz |
Operating Temperature Range | -40 | +25 | +85 | °C |
Software Support
We provide a library for the Accel 18 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 18 Click driver.
Key functions:
accel18_cfg_setup
– Config Object Initialization function.accel18_init
– Initialization function.accel18_default_cfg
– Click Default Configuration function.
Example description
This example application showcases ability of the device to read axes values on detected interrupt, and check detected motion.
void application_task ( void ) { if ( !accel18_get_interrupt_1( &accel18 ) ) { //Interrupt detected check uint8_t int_flag = 0; uint8_t interrupt_state = 0; accel18_byte_read( &accel18, ACCEL18_REG_INTERRUPT_STATUS, &interrupt_state ); if ( interrupt_state & ACCEL18_INT_TILT_EN ) { int_flag++; log_printf( &logger, ">TiltFlipShake X[g]: %.2frn", axes_data.x ); log_printf( &logger, " > Y[g]: %.2frn", axes_data.y ); log_printf( &logger, " > Z[g]: %.2frn", axes_data.z ); log_printf( &logger, "**************************rn" ); Delay_ms( 300 ); } }
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.Accel18
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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
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.