How does it work?
Inclinometer 2 Click as its foundation uses the IIS2ICLX, a high-accuracy (ultra-low noise, high stability, and repeatability) and low-power two-axis linear accelerometer with digital output from STMicroelectronics. The IIS2ICLX has a selectable full scale of ±0.5/±1/±2/±3 g and is capable of providing the measured accelerations to the application over a selectable digital interface. Its high accuracy, stability over temperature, and repeatability make IIS2ICLX particularly suitable for inclination measurement applications.
The IIS2ICLX has an unmatched set of embedded features (programmable FSM, Machine Learning Core, sensor hub, FIFO, event decoding, and interrupts) and delivers high accuracy and performance at low power. The sensing element is manufactured using a dedicated micromachining process developed by STMicroelectronics to produce inertial sensors and actuators on silicon wafers.
This Click board™ 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 IIS2ICLX allows choosing the least significant bit (LSB) of its I2C slave address using the SMD jumper labeled ADDR SEL. This Click board™ also possesses an additional interrupt signal, routed on the INT pin of the mikroBUS™ socket labeled as INT, indicating the status of the measurement process itself.
The hardware flexibility of this Click board™ allows connecting the pins with different mode connections to external sensors to expand functionalities such as adding a sensor hub. When sensor hub mode (Mode 2) is enabled, the I²C master interface for connecting external sensors is available on an onboard header reserved for the Master I2C interface, which is unpopulated by default.
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 suitable for inclination measurement applications such as precision inclinometers, equipment installation/monitoring, robotics, industrial automation, and more
On-board modules
IIS2ICLX – two-axis inclinometer with digital output from STMicroelectronics
Key Features
Low power consumption, selectable full scale, low noise performance, high stability and repeatability, selectable interface, I2C Master interface, high accuracy, and more
Interface
I2C,SPI
Feature
No 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 2 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 | ADDR SEL | Right | I2C Address Selection 0/1: Left position 0, Right position 1 |
JP2-JP5 | COMMSEL | Right | Communication Interface Selection SPI/I2C: Left position SPI, Right position I2C |
J1 | – | Unpopulated | Master I2C Interface Connection Header |
Inclinometer 2 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Measurement Range | ±0.5 | – | ±3.0 | g |
Sensitivity | 0.015 | – | 0.122 | mg/LSB |
Operating Temperature Range | -40 | +25 | +105 | °C |
Software Support
We provide a library for the Inclinometer 2 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 Inclinometer 2 Click driver.
Key functions
-
inclinometer2_get_int_pin
This function returns the INT pin logic state. -
inclinometer2_get_accel
This function checks if the accel data is ready and than reads the accel X and Y axis in mg. -
inclinometer2_get_temperature
This function checks if the temperature data is ready and than reads the temperature in Celsius.
Example Description
This example demonstrates the use of Inclinometer 2 Click board™ by reading and displaying the Accel X and Y axis data (mg) and the temperature (degC) on the USB UART.
void application_task ( void )
{
// Wait for accel data ready indication
while ( !inclinometer2_get_int_pin ( &inclinometer2 ) );
float x_axis, y_axis;
if ( INCLINOMETER2_OK == inclinometer2_get_accel ( &inclinometer2, &x_axis, &y_axis ) )
{
log_printf( &logger, " X: %.2f mgrn", x_axis );
log_printf( &logger, " Y: %.2f mgrn", y_axis );
}
float temperature;
if ( INCLINOMETER2_OK == inclinometer2_get_temperature ( &inclinometer2, &temperature ) )
{
log_printf( &logger, " Temperature: %.2f Crnn", temperature );
}
}
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.Inclinometer2
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.