NOTE: This Click board™, alongside FXLS8974CF, also represents a reference design for the FXLS8964AF and FXLS8967AF.
How does it work?
Accel 4 Click as its foundation uses the FXLS8974CF, a highly reliable digital triaxial acceleration from NXP Semiconductors. The FXLS8974CF is highly configurable with a programmable acceleration range of ±2g, ±4g, ±8g, or ±16g, capable of measuring accelerations with selectable output data rates. It supports high-performance and low-power operating modes, allowing maximum flexibility to meet the resolution and power needs for various use cases from automotive (convenience and security) through industrial IoT to some consumer devices.
This sensor includes advanced digital features such as the SDCD block for inertial event detection, auto wake-sleep, and a 32 sample FIFO/LIFO buffer. Besides, it has an embedded temperature sensor with an 8 bits resolution, sensitivity of 1°C/LSB, and measurement range from -40°C up to +105°C. Selectable ODRs (Output Data Rate) of the FXLS8974CF go up to 3200Hz, alongside Flexible Performance mode, allowing custom ODRs with a programmable decimation (resolution) and idle-time settings.
Accel 4 Click allows using both I2C and SPI interfaces with a maximum frequency of 1MHz for I2C and 4MHz 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 FXLS8974CF allows choosing the least significant bit (LSB) of its I2C slave address using the SMD jumper labeled ADDR SEL.
The FXLS8974CF also possesses two interrupts, INT1 and INT2, routed to the INT and AN 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. Also, this Click board™ provides the ability to use the boot mode of the FXLS8974CF by positioning SMD jumpers labeled as BT MODE to an appropriate position. Depending on the selected position, the device can be set in the default operating mode by setting the jumper to position 0 or in Motion Detection Mode to position 1.
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 a wide range of automotive (convenience and security), industrial, and medical IoT applications
On-board modules
FXLS8974CF – highly reliable digital triaxial acceleration from NXP Semiconductors
Key Features
Low power consumption, high performance and resolution, selectable ODRs, flexible sensor data change detection function, 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 4 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-JP4 | COMM SEL | Right | Communication Interface Selection SPI/I2C: Left position SPI, Right position I2C |
JP5 | ADDR SEL | Right | I2C Address Selection 1/0: Left position 1, Right position 0 |
JP6 | BT MODE | Right | Boot Mode Selection 1/0: Left position 1, Right position 0 |
Accel 4 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Acceleration Range | ±2 | – | ±16 | g |
Acceleration Resolution | – | 12 | – | bits |
Sensitivity (±2 ~ ±16) | 128 | – | 1024 | LSB/g |
Operating Temperature Range | -40 | +25 | +105 | °C |
Software Support
We provide a library for the Accel 4 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 4 Click driver.
Key functions:
accel4_get_int1
– Get interrupt 1 pin state.accel4_axes_get_resolution
– Reads current resolution of output data.accel4_get_axes_data
– Accel data reading.
Examples description
This example is a showcase of the ability of the device to read 3 axis data in varity of 3 resolutions, ability to configure 2 interrput pins for user needs etc..
void application_task ( void ) { if ( accel4_get_int1( &accel4 ) ) { accel4_axes_t axes; accel4_get_axes_data( &accel4, &axes ); log_printf( &logger, " > X: %.2frn", axes.x ); log_printf( &logger, " > Y: %.2frn", axes.y ); log_printf( &logger, " > Z: %.2frn", axes.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.Accel4
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.