How does it work?
Accel&Pressure Click is based on the FXLS8974CF, a 3-axis low-g accelerometer, and the MPL3115A2, a precision pressure sensor with altimetry, both from NXP Semiconductor. The accelerometer has a ±2/4/8/16 g user-selectable, full-scale measurement range with a 12-bit acceleration data output. It can work in several modes, such as active, hibernate, standby, and more. The integrated FIFO/LIFO buffer of 144 bytes can store 32 12-bit X/Y/Z/ data triplets. The sensor also has flexible data change detection, such as motion, freefall, and other inertial events. The pressure sensor has an absolute operating range of 20kPa to 110kPa in 20-bit measurements. Besides the pressure, the MPL3115A2 can also measure the altitude in a range of -698 up to 11775 meters in a 20-bit resolution. It also comes with an embedded FIFO (32 samples) and up to 12 days of data logging using the FIFO. Both sensors have an integrated temperature sensor and are temperature-compensated.
Accel&Pressure Click uses a standard 2-wire I2C interface to allow the host MCU to communicate with both sensors. If the motion is detected, the FXLS8974CF uses a motion MOT pin to interrupt the host MCU. Depending on your application, you can choose one of the available pins (PWM, AN, CS) by soldering one of the jumpers (R8, R9, R10) to control the hibernation mode wake-up function of the FXLS8974CF. In addition, there are LP Cut jumpers at the bottom of the Accel&Pressure Click board™, with which a low power consumption feature can be achieved.
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.
Specifications
Type
Motion,Pressure
Applications
Can be used for the development of vertical velocity applications and similar devices
On-board modules
FXLS8974CF – 3-axis low-g accelerometer from NXP Semiconductor
MPL3115A2 – pressure sensor with altimetry from NXP Semiconductor
Key Features
User-selectable full-scale measurement ranges, high precision, FIFO buffers, flexible sensor data change detection function, wide absolute pressure operating range, altitude measurements, temperature compensation, and more
Interface
I2C
Feature
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&Pressure 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-JP2 | LP Cut | – | Low Power Consumption |
Accel&Pressure Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Acceleration Measurement Range | ±2 | – | ±16 | g |
Absolute Pressure Measurement Range | 20 | – | 110 | kPa |
Altitude Measurement Range | -698 | – | 11775 | m |
Software Support
We provide a library for the AccelPressure 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 AccelPressure Click driver.
Key functions
-
accelpressure_get_axes_data
This function reads the accelerometer sensor axes data. -
accelpressure_get_pressure
This function reads the sensor pressure data conversion in mbar. -
accelpressure_get_temperature
This function reads the conversion of sensor pressure data in degrees Celsius.
Example Description
This library contains API for the AccelPressure Click driver. The library initializes and defines the I2C drivers to write and read data from registers, as well as the default configuration for the reading accelerator, pressure, and temperature data.
void application_task ( void )
{
accelpressure_axes_t acc_axis;
float pressure = 0, temperature = 0;
if ( ACCELPRESSURE_OK == accelpressure_get_axes_data( &accelpressure, &acc_axis ) )
{
log_printf( &logger, " Accel X: %.2f mgrn", acc_axis.x );
log_printf( &logger, " Accel Y: %.2f mgrn", acc_axis.y );
log_printf( &logger, " Accel Z: %.2f mgrn", acc_axis.z );
}
log_printf( &logger, "_________________rn" );
Delay_ms( 100 );
if ( ACCELPRESSURE_OK == accelpressure_get_pressure( &accelpressure, &pressure ) )
{
log_printf( &logger, " Pressure: %.2f mbarrn", pressure );
}
Delay_ms( 100 );
if ( ACCELPRESSURE_OK == accelpressure_get_temperature( &accelpressure, &temperature ) )
{
log_printf( &logger, " Temperature: %.2f mbarrn", temperature );
}
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), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.AccelPressure
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.