Besides the pressure readings, the Pressure 5 click also offers very accurate temperature reading, which is required for the pressure readings compensation. Oversampling up to 32 times combined with the filtering options allows very low noise influence on measurement results. Depending on the application in which the Click board™ is used, different power saving, oversampling, and filtering settings can be implemented, resulting in optimal performance in given conditions. All these features make the Pressure 5 click an ideal solution for the development of portable weather station applications, indoor navigation for flying toys and drones, and similar applications that rely on reliable barometric pressure measurements.
How does it work?
The sensor used on the Pressure 5 click is the BMP388, a digital pressure sensor, from Bosch Sensortech. This sensor consists of a piezo-resistive pressure sensing element and a mixed-signal ASIC which performs A/D conversions and provides the conversion results through a digital interface. This advanced MEMS technology offers a high measurement precision of 0.08hPa, as well as low TOC (thermal coefficient) of only 0.75 Pa/K. The sensor is enclosed in a small metal lid housing and is highly resilient: it can operate in a range of 300 hPa to 1250 hPa but can withstand up to 20,000 hPa before the membrane breaks down.
The BMP388 offers a set of pressure and temperature measurement options. It can be programmed to skip either thermal or pressure measurement, allowing faster measurement of the required property. The low TOC of only 0.75Pa/K allows reading of the pressure with very small drift over temperature. Resolution of 0.08hPa allows calculating of the altitude with the accuracy of about 66 cm, which is ideal for indoor navigation applications (drones, flying toy models, and similar). The IIR filter is especially useful for indoor usage, allowing filtering of some short-term disturbances, such as slamming doors or windows.
FIFO buffer allows for an optimization of the host firmware, reducing the data traffic through the communication interface. It has 512 bytes and it is backed up by an interrupt engine, which can trigger an interrupt event when the buffer is full, or when the watermark level is reached. Also, the behavior of the FIFO buffer can be programmed to either skip new data once it is full or to overwrite the oldest data. The interrupt is available over the INT pin, and can be used to further optimize the host firmware (i.e. to reduce the power consumption by utilizing the INT pin to wake up the host MCU). Besides FIFO events, the INT pin also signals when there is a new data available at the output register (Data Ready event).
This sensor consists of a mixed signal front-end (ASIC) and a piezo-sensitive pressure sensing element. The ASIC contains a low-noise 24-bit A/D converter, along with the digital signal processing section. The measurement data is available either over the I2C or the SPI interface. Pressure 5 click offers a choice between these two interfaces. The selection can be done by positioning SMD jumpers labeled as COMM SEL to an appropriate position. Note that all the jumpers must be placed to the same side, else the Click board™ may become unresponsive. While the I2C interface is selected, the BMP388 allows the choice of the least significant bit (LSB) of its I2C slave address. This can be done by using the SMD jumper labeled as ADDR SEL.
The overall power consumption depends on several factors, such as the oversampling value, measurement rate, power mode, standby duration, and so on. Bosh Sensortech recommends a set of operational parameters for different applications, in the form of a table, in the BMP388 datasheet. In general, this sensor allows several power modes, regardless of the selected measurement parameters:
When the measurement is completed, raw ADC values will be available in the output registers. However, to obtain actual pressure and temperature readings, a compensation algorithm needs to be applied. A set of compensation parameters is available in the non-volatile memory of the BMP388 device. These compensation parameters take into account slight differences between the produced samples and each BMP388 device has its own set of parameters. The BMP388 datasheet offers detailed instructions on how to apply these compensating algorithms properly. However, MikroElektronika provides a library with functions which can be used for a simplified and thus faster application development. The library also contains a demo example, which demonstrates the use of these functions. The demo application can be used as a reference for a custom design.
Specifications
Type | Pressure |
Applications | It can be used for weather stations, indoor flying toys navigation, drones, variometers, and similar applications that rely on reliable barometric pressure measurements. |
On-board modules | BMP388, a digital pressure sensor, from Bosh Sensortech. |
Key Features | Very accurate pressure and temperature readings, on-chip IIR data filtering, it can use either SPI or I2C communication protocol, customizable power consumption in three different power modes, etc. |
Interface | I2C,SPI |
Input Voltage | 3.3V |
Click board size | S (28.6 x 25.4 mm) |
Pinout Diagram
This table shows how the pinout on Pressure 5 click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Pressure 5 Click Electrical Specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Pressure range | 300 | - | 1250 | hPa |
Pressure measurement resolution | -0.08 | - | +0.08 | hPa |
Temperature range | -40 | - | +85 | ˚C |
Temperature measurement resolution | ±0.3 | - | ±0.5 | ˚C |
Onboard Settings And Indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED Indicator |
COMM SEL | COMM SEL | Left | Communication protocol selection: left position SPI, right position I2C |
ADDR SEL | ADDR SEL | Left | I2C Address selection bit: left position 0, right position 1 |
Software Support
We provide a library for the Pressure 5 click on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library initializes and defines the I2C or SPI bus driver and drivers that offer a choice for writing data in register and reads data form register. The library includes function for read Pressure data in mBar and Temperature data in C. The user also has the function for update all calibration coefficients, function for software reset, read Interrupt state and functions for get Pressure and Temperature raw data.
Key functions:
float pressure5_getTemperatureData()
- Temperature data in C.float pressure5_getPressureData()
- Pressure data in mBar.void pressure5_updateCoefficient()
- Update calibration coefficients.Examples description
The application is composed of the three sections :
void applicationTask() { float Temperature; float Pressure; char demoText[ 50 ] = {0}; Temperature = pressure5_getTemperatureData(); FloatToStr(Temperature, demoText); mikrobus_logWrite(" Temperature: ", _LOG_TEXT); mikrobus_logWrite(demoText, _LOG_TEXT); mikrobus_logWrite(" C", _LOG_LINE); Pressure = pressure5_getPressureData(); FloatToStr(Pressure, demoText); mikrobus_logWrite(" Pressure: ", _LOG_TEXT); mikrobus_logWrite(demoText, _LOG_TEXT); mikrobus_logWrite(" mBar ", _LOG_LINE); mikrobus_logWrite("--------------------------", _LOG_LINE); Delay_ms( 1500 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
SPI
UART
I2C
Conversions
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.
Downloads
mikroBUS™ Standard specification