How does it work?
Barometer Click is based on the LPS25HB, a high-resolution, digital output pressure sensor from STMicroelectronics. The LPS25HB includes a sensing element based on a piezoresistive Wheatstone bridge approach. When pressure is applied, the membrane deflection induces an imbalance in the Wheatstone bridge piezoresistance, whose output signal is converted into a 24-bit digital value by the selectable digital interface. The LPS25HB’s interface is factory calibrated at three temperatures and two pressures for sensitivity and accuracy.
The LPS25HB delivers low-pressure noise with low power consumption and operates over an extended temperature range from -30°C to +105°C. It has a selectable absolute pressure range, from 260 up to 1260hPa, with typical absolute pressure and temperature accuracy of ±0.2hPa and ±2°C, ideally suited for various pressure-based applications.
Barometer Click 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 in an appropriate position marked as I2C or SPI. 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 LPS25HB allows choosing the least significant bit (LSB) of its I2C slave address using the SMD jumper labeled I2C ADR. This Click board™ also possesses an additional interrupt pin, routed to the INT pin on the mikroBUS™ socket labeled as RDY, indicating when a new measured pressure data is available, simplifying data synchronization in digital systems or optimizing system power consumption.
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
Pressure
Applications
Can be used for various pressure-based applications, altitude tracking, industrial, consumer, weather stations, and more
On-board modules
LPS25HB – digital output pressure sensor from STMicroelectronics
Key Features
Low power consumption, high resolution mode, 24-bit pressure data output, selectable interface, interrupt/data ready signal, high-performance, embedded temperature compensation, extended temperature range, 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 BAROMETER 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 | – | Left | Communication Interface Selection I2C/SPI: Left position I2C, Right position SPI |
JP5 | I2C ADR | Left | I2C Address Selection 1/0: Left position 1, Right position 0 |
BAROMETER Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Operating Pressure Range | 260 | – | 1260 | hPa |
Accuracy | – | ±0.2 | – | hPa |
Resolution | – | 24 | – | bits |
Operating Temperature Range | -30 | +25 | +105 | °C |
Software Support
We provide a library for the Barometer 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 Barometer Click driver.
Key functions
-
Read temperature in degrees Celsius function
-
Read pressure in milibars function
-
Check sensor status function
Example Description
This application measures temperature and pressure data.
void application_task ( void )
{
float temperature_c;
float pressure;
temperature_c = barometer_get_temperature_c( &barometer );
Delay_100ms( );
pressure = barometer_get_pressure( &barometer );
Delay_100ms( );
log_printf( &logger, " Temperature : %.2frn", temperature_c );
log_printf( &logger, " Pressure : %.2frn", pressure );
log_printf( &logger, "-------------------------------- rn" );
Delay_1sec( );
}
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.Barometer
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.