How does it work?
Inclinometer 4 Click is based on the FXLS8971CF, a compact 3-axis low-g MEMS accelerometer from NXP Semiconductor. The FXLS8971CF offers both high-performance and low-power operating modes, with user-selectable full-scale measurement ranges of ±2/4/8/16g, providing flexibility to match different applications’ specific resolution and power needs. Key features include selectable output data rates with programmable resolution and idle-time settings, a flexible sensor data-change detection function for detecting motion or no motion, and the ability to detect high-g/low-g events, freefall, and other inertial activities. It also includes a 144-byte output data buffer (FIFO/LIFO), which helps minimize system power consumption and streamline data collection for the host system. This Click board™ measures angles of slope or elevation of an object with respect to gravity’s direction, suitable for a wide array of industrial and medical IoT applications, including asset tracking, equipment monitoring, smart metering, tamper detection, orientation detection, and many more.
Inclinometer 4 Click is designed in a unique format supporting the newly introduced MIKROE feature called “Click Snap.” Unlike the standardized version of Click boards, this feature allows the main sensor area to become movable by breaking the PCB, opening up many new possibilities for implementation. Thanks to the Snap feature, the FXLS8971CF can operate autonomously by accessing its signals directly on the pins marked 1-8. Additionally, the Snap part includes a specified and fixed screw hole position, enabling users to secure the Snap board in their desired location.
This Click board™ allows for flexible communication options, supporting both I2C and SPI interfaces. These interfaces enable communication speeds up to 1MHz for I2C and 4MHz for SPI. Users can select their preferred communication protocol by adjusting the SMD jumpers in the COMM SEL section. These jumpers, as well as the COMM 1 jumper in the Snap section, must be aligned on the same side to avoid potential issues. Aside from additional interface signals configuration, an additional SMD jumper in the Snap section labeled COMM 2 also adjusts the I2C address.
Besides the interface selection jumpers, this Click board™ features an additional jumper in the Snap section of the Click board named BOOT. This jumper allows for device boot mode selection between the default operating mode (by placing the jumper in the GND position) and enabling motion detection mode (by placing it in the VCC position). Like standard Click board™, all signals from the main sensor, in this case, the FXLS8971CF, are available on the mikroBUS™ pins.
In addition to standard communication pins, the FXLS8971CF utilizes two interrupt pins, IT1 and IT2, which are particularly useful when using the Motion Detection mode. When this mode is active, the IT1 pin sets the motion detection threshold, and the IT2 pin signals that the device boot process has been completed. If this mode is inactive, both pins function as standard programmable interrupt output pins.
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. Also, it comes equipped with a library containing functions and an example code that can be used as a reference for further development.
Click Snap
Click Snap is an innovative feature of our standardized Click add-on boards, introducing a new level of flexibility and ease of use. This feature allows for easy detachment of the main sensor area by simply snapping the PCB along designated lines, enabling various implementation possibilities. For detailed information about Click Snap, please visit the official page dedicated to this feature.
Specifications
Type
Motion
Applications
Ideal for industrial and medical IoT applications, including asset tracking, equipment monitoring, smart metering, and orientation detection
On-board modules
FXLS8971CF – 3-axis low-g MEMS accelerometer from NXP Semiconductor
Key Features
High-performance, low-power modes with user-selectable full-scale ranges, selectable output data rates with programmable resolution and idle-time settings, flexible sensor data-change detection for motion/no motion, ability to detect high-g/low-g events, freefall, and other inertial activities, 144-byte output data buffer (FIFO/LIFO) for efficient data collection, both I2C and SPI interfaces, Click Snap design for enhanced implementation flexibility, and more
Interface
I2C,SPI
Feature
Click Snap,ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on Inclinometer 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 | BOOT | Right | Boot Mode Selection VCC/GND: Left position VCC, Right position GND |
JP2 | COMM 1 | Right | Snap Communication Selection SPI/I2C: Left position SPI, Right position I2C |
JP3 | COMM 2 | Right | Communication / I2C Address Selection 0/1/2: Left position 1, Right position 0, Lower position 2 |
JP5-JP6 | COMM SEL | Right | mikroBUS™ Communication Selection SPI/I2C: Left position SPI, Right position I2C |
Inclinometer 4 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Full-Scale Measurement Range | ±2 | – | ±16 | g |
Sensitivity | 128 | – | 1024 | LSB/g |
Software Support
We provide a library for the Inclinometer 4 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 Inclinometer 4 Click driver.
Key functions
-
inclinometer4_get_int2_pin
This function returns the interrupt 2 (INT2) pin logic state. -
inclinometer4_get_data
This function reads accel X, Y, and Z axis data in g and temperature in degrees Celsius. -
inclinometer4_set_mode
This function sets the device operating mode to standby or active.
Example Description
This example demonstrates the use of Inclinometer 4 Click board™ by reading and displaying accel data (X, Y, and Z axis) as well as temperature measurements on the USB UART.
void application_task ( void )
{
inclinometer4_data_t accel_data;
// Wait for a data ready interrupt
while ( inclinometer4_get_int2_pin ( &inclinometer4 ) );
if ( INCLINOMETER4_OK == inclinometer4_get_data ( &inclinometer4, &accel_data ) )
{
log_printf( &logger, " X: %.3f grn", accel_data.x );
log_printf( &logger, " Y: %.3f grn", accel_data.y );
log_printf( &logger, " Z: %.3f grn", accel_data.z );
log_printf( &logger, " Temperature: %d degCrnn", ( int16_t ) accel_data.temperature );
}
}
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:
- MikroSDK.Board
- MikroSDK.Log
- Click.Inclinometer4
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.
mikroSDK
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.