Druck 4 Klickbrett
Druck 4 Klickbrett
Das Pressure 4 Click Board™ ist eine Platine zur Messung des absoluten Luftdrucks, die über einen hochpräzisen Luftdrucksensor mit geringem Stromverbrauch verfügt. Das Pressure 4 Click Board™ kann sowohl SPI- als auch I2C-Kommunikationsprotokolle verwenden und lässt sich mit einer Vielzahl verschiedener Mikrocontrollereinheiten (MCUs) verbinden. Der auf diesem Click Board™ verwendete Sensor verfügt über integrierte Verarbeitungsfunktionen wie die IIR-Filterung, mit der abrupte Druckänderungen herausgefiltert werden.
Durch den geringen Stromverbrauch kann das Pressure 4 Click Board™ in vielen tragbaren, batteriebetriebenen Anwendungen eingesetzt werden. Neben dem Druck kann es auch die Umgebungstemperatur messen, die für Kompensationsberechnungen verwendet werden kann.
The Pressure 4 Click Board™ is an absolute barometric pressure measurement Click board™, which features a low power consumption, high precision barometric pressure sensor. Capable of using both SPI and I2C communication protocols, the Pressure 4 Click Board™ allows being interfaced with a broad range of various microcontroller units (MCUs). The sensor used on this Click board™ features onboard processing capabilities, such as the IIR filtering, used to filter out abrupt changes of pressure. Low power consumption allows the Pressure 4 Click Board™ to be used in many portable, battery-powered applications. Besides the pressure, it can also measure the ambient temperature, which can be used for the compensation calculations.
Besides the pressure readings, the Pressure 4 Click Board™ also offers very accurate temperature reading, which is required for the pressure readings compensation. Oversampling up to 16 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 an optimal performance in given conditions. All these features make the Pressure 4 Click Board™ an ideal solution for weather stations, indoor flying toys navigation, drones, variometers, and similar applications that rely on reliable barometric pressure measurements.
How Does The Pressure 4 Click Board™ Work?
The sensor used on the Pressure 4 Click Board™ is the BMP280, a digital pressure sensor, from Bosch Sensortech. This sensor is produced using the Bosch proprietary APSM manufacturing technology. APSM is an abbreviation for the Advanced Porous Silicon Membrane, which is CMOS compatible technology, used to hermetically seal the sensor cavity, in an all-silicon process. This advanced MEMS technology offers a high measurement precision of only 0.12 hPa, as well as low TOC (thermal coefficient) of only 1.5 Pa/K. The sensor is enclosed in a small metal lid housing and is very resilient: it can operate in a range of 300 hPa to 1100 hPa but can withstand up to 20,000 hPa before the membrane breaks down.
The BMP280 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 1.5K/Pa allows reading of the pressure with very small drift over temperature. Resolution of 0.12 hPa allows calculating of the altitude with the accuracy of 1m, which is ideal for indoor navigation applications (drones, flying toy models, and similar). Since this device is aimed at low power applications, it is powered by the mikroBUS™ 3.3V rail and does not allow voltages up to 5V. Therefore the Pressure 4 Click Board™ supports only 3.3V MCUs and it is not intended to be connected or controlled via the 5V MCU without a proper level shifting circuitry.
This sensor is comprised of a mixed signal front end (ASIC) and the piezo-sensitive pressure sensing element. The ASIC section provides analog to digital conversion of the measurement as well as the signal processing, in the form of the IIR filtering. The measurement readings and the compensation parameters are available at I2C or SPI bus pins of the BMP280 routed to the mikroBUS™ standard SPI and I2C pins. Pressure 4 click offers a selection between the two, by switching SMD jumpers labeled as I2C SPI to an appropriate position. Note that all the jumpers have to be placed to the same side, as mixed SPI and I2C positions will render the Click board™ unresponsive. Additionally, selection of the I2C communication protocol allows the least significant bit (LSB) of the I2C slave address of the device to be set. This can be done with the SMD jumper, labeled as I2C ADDR.
The overall power consumption depends on several factors, such as the oversampling value, measurement rate, power mode, standby duration, and so on. Bosch Sensortech recommends a set of operational parameters for different applications, in a form of a table, in the BMP280 datasheet. In general, this sensor allows several power modes, regardless of the selected measurement parameters:
- Sleep mode : keeps only the logic section of the sensor IC powered. It is possible to read the device ID and compensation parameters. The power consumption is minimal in this mode.
- Forced mode : when the Forced mode command is received, the device is awakened from the sleep mode; a single measurement is performed, according to previously programmed conversion parameters. After that, the device reverts to the Sleep mode, waiting to be triggered once more by repeated selection of the Force mode. The conversion results can be read from the registers since the Sleep mode keeps the logic section powered up.
- Normal mode : in this mode, conversions are cyclically repeated, with programmable standby periods after each measurement. The power consumption in this mode varies with the standby period duration. Once selected, the cycle repeats, so there is no need to repeat the Normal mode command.
When the measurement is completed, the 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 to these raw values. A set of compensation parameters is available in the non-volatile memory of each sensor device. These compensation parameters take into account slight differences between the produced sensors and each BMP280 sensor device has its own set of compensation parameters. The BMP280 datasheet offers detailed instructions on how to apply these compensating algorithms properly. However, MikroElektronika provides a library that contains functions, which can be used for the simplified operation of the Pressure 4 Click Board™k. The library also contains an example application, which demonstrates their use. This example application can be used as a reference for custom designs.
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 | BMP280, a digital pressure sensor, from Bosch Sensortech |
Key Features | Very accurate pressure and temperature readings, on-chip IIR filtering of the abrupt changes in pressure, it can use either SPI or I2C communication protocol, sensor IC is produced by using the Bosch proprietary APSM manufacturing technology. |
Interface | I2C,SPI |
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 the Pressure 4 Click Board™ corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes | Pin | Pin | Notes | ||||
---|---|---|---|---|---|---|---|
NC | 1 | AN | PWM | 16 | NC | ||
NC | 2 | RST | INT | 15 | NC | ||
SPI Chip Select | CS | 3 | CS | RX | 14 | NC | |
SPI Clock | SCK | 4 | SCK | TX | 13 | NC | |
SPI Data OUT | SDO | 5 | MISO | SCL | 12 | SCL | I2C Clock |
SPI Data IN | SDI | 6 | MOSI | SDA | 11 | SDA | I2C Data |
Power supply | +3.3V | 7 | 3.3V | 5V | 10 | NC | |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
PRESSURE 4 CLICK ELECTRICAL SPECIFICATIONS
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Pressure range | 300 | - | 1000 | hPa |
Pressure measurement resolution | -0.12 | - | 0.12 | hPa |
Temperature range | -40 | - | +85 | ˚C |
Temperature measurement resolution | ±0.5 | - | ±1 | ˚C |
ONBOARD SETTINGS AND INDICATORS
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED indicator |
I2C ADDR | I2C ADDR | Left | I2C Address selection bit: left position 0, right position 1 |
I2C/SPI | I2C/SPI | Left | Communication protocol selection: left position I2C, right position SPI |
Software Support
We provide a library for the Pressure 4 Click Board™ on our Libstock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo application can run on all the main MikroElektronika development boards.
Library Description
This library will allow a user to read the pressure and temperature values.
Key functions:
void pressure4_init();
- Generic initialization function.double pressure4_getTemperature();
- Returns the value of the measured temperature.double pressure4_getPressure();
- Returns the value of the measured pressure.
Example Description
- System Initialization - Initializes GPIO, I2C and log structures.
- Application Initialization - Configures the microcontroller for communication
and initializes the Click board™. - Application Task - The pressure and temperature data is read from the sensor
and it is printed to the UART.
void applicationTask() { double tmp; char text[10]; mikrobus_logWrite("Temperature : ",_LOG_TEXT); tmp = pressure4_getTemperature(); FloatToStr(tmp,&text[0]); mikrobus_logWrite(&text[0],_LOG_TEXT); mikrobus_logWrite(" �C", _LOG_LINE); mikrobus_logWrite("Pressure : ",_LOG_TEXT); tmp = pressure4_getPressure(); FloatToStr(tmp,&text[0]); mikrobus_logWrite(&text[0],_LOG_TEXT); mikrobus_logWrite(" hPa", _LOG_LINE); mikrobus_logWrite("========================",_LOG_LINE); Delay_ms(500); }
The full application code, and ready to use projects can be found on our Libstock page.
mikroE Libraries used in the example:
- I2C Library
- SPI Library
- Conversions Library
- C_String Library
- UART Library
Additional Notes and Information
Depending on the development board you are using, you may need a 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
The Pressure 4 Click Board™ is supported by mikroSDK - MikroElektronika Software Development Kit. To ensure a proper operation of mikroSDK compliant Click board™ demo applications, the mikroSDK package should be downloaded from the LibStock and installed for the compiler you are using.
Software Support
We provide a library for the Pressure 4 Click Board™ on our Libstock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo application can run on all the main MikroElektronika development boards.
Library Description
This library will allow a user to read the pressure and temperature values.
Key functions:
void pressure4_init();
- Generic initialization function.double pressure4_getTemperature();
- Returns the value of the measured temperature.double pressure4_getPressure();
- Returns the value of the measured pressure.
Example Description
- System Initialization - Initializes GPIO, I2C and log structures.
- Application Initialization - Configures the microcontroller for communication
and initializes the Click board™. - Application Task - The pressure and temperature data is read from the sensor
and it is printed to the UART.
void applicationTask() { double tmp; char text[10]; mikrobus_logWrite("Temperature : ",_LOG_TEXT); tmp = pressure4_getTemperature(); FloatToStr(tmp,&text[0]); mikrobus_logWrite(&text[0],_LOG_TEXT); mikrobus_logWrite(" �C", _LOG_LINE); mikrobus_logWrite("Pressure : ",_LOG_TEXT); tmp = pressure4_getPressure(); FloatToStr(tmp,&text[0]); mikrobus_logWrite(&text[0],_LOG_TEXT); mikrobus_logWrite(" hPa", _LOG_LINE); mikrobus_logWrite("========================",_LOG_LINE); Delay_ms(500); }
The full application code, and ready to use projects can be found on our Libstock page.
mikroE Libraries used in the example:
- I2C Library
- SPI Library
- Conversions Library
- C_String Library
- UART Library
Additional Notes and Information
Depending on the development board you are using, you may need a 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
The Pressure 4 Click Board™ is supported by mikroSDK - MikroElektronika Software Development Kit. To ensure a proper operation of mikroSDK compliant Click board™ demo applications, the mikroSDK package should be downloaded from the LibStock and installed for the compiler you are using.
Druck 4 Klickbrett
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.