BMP280 Pressure Sensor
Measure barometric air pressure and ambient temperature from BMP280 sensor
Since R2022b
Add-On Required: This feature requires the Simulink Support Package for Raspberry Pi Hardware add-on.
Libraries:
Simulink Support Package for Arduino Hardware /
Sensors
Simulink Support Package for Raspberry Pi Hardware /
Sensors /
Environmental Sensors
Description
The BMP280 Pressure Sensor block measures barometric air pressure and ambient temperature using the BMP280 Pressure sensor interfaced with the Raspberry Pi® board.
Ports
Output
Pressure — Barometric air pressure
scalar
The block outputs barometric air pressure in Pascal (Pa).
Dependencies
This output port appears only if you select the Pressure (Pa) parameter.
Data Types: double
Temperature — Ambient temperature
scalar
The block outputs the ambient temperature in ℃.
Dependencies
This output port appears only if you select the Temperature (℃) parameter.
Data Types: double
Status — Status of values read for pressure and temperature
0
| 1
The block outputs the status of barometric air pressure and ambient temperature
measurements. 0
indicates that the data read is new,
1
indicates that the data read is not new.
Dependencies
This output port appears only if you select the Status parameter.
Data Types: uint8
Parameters
I2C Module — Specific module used for I2C communication
1
(default)
Specify the module on the board that you are using for I2C communication.
I2C address — I2C address to communicate with the BMP280 sensor
0x76
(default) | 0x77
The I2C addresses to communicate with the accelerometer peripheral on the BMP280 sensor are decided by the state of the SDO pin on the hardware board. This table provides the I2C addresses corresponding to the pin and their state.
Pin Name | Pin State | I2C address |
---|---|---|
SDO | 0 | 0x76 |
1 | 0x77 |
Pressure (Pa) — Set output port for reading pressure
on
(default) | off
Select this parameter to set Pressure as one of the output ports.
Temperature (℃) — Set output port for reading temperature
on
(default) | off
Select this parameter to set Temperature as one of the output ports.
Status — Set output port for obtaining status of selected outputs
on
(default) | off
Select this parameter to set Status as one of the output ports.
Data type — Output data type for values from BMP280 sensor
double
(default) | single
| uint32
Select the output data type of the sensor from which the block reads the values.
The default data type for Raspberry Pi hardware is double
. Use this parameter to change the
values to double
, or uint32
if required.
Sample time — Time interval to read data
-1
(default) | positive integer
Specify how often this block reads the data from the BMP280 sensor. When you set this parameter to -1, Simulink determines the best sample time for the block based on the block context within the model.
IIR filter settings
Filter coeffiecient — Filter coefficient value
0
(default) | 2
| 4
| 8
| 16
Select the filter coefficient value of the sensor, which helps in reducing the bandwidth of output signals.
The default filter coefficient value for Raspberry Pi hardware is 0
. Use this parameter to change the
values, if required.
When filter is enabled, the sensor uses this formula to get the latest measurement calculation.
dt = (dadc / f) +
dt-1 (1 - 1 / f)
, where
dt
is the current data,
dt-1
is the previous data,
dadc
is the prefiltered data, and
f
is the filter coefficient.
Sensitivity
Pressure sensitivity factor (Pa) — Pressure sensitivity factor
2.62
(default) | 1.31
| 0.66
| 0.33
| 0.16
Select the pressure sensitivity factor, which the sensor uses to read values during changing air pressure.
The default data type for Raspberry Pi hardware is 2.62
. Use this parameter to change the
values, if required.
Temperature sensitivity factor (℃) — Temperature sensitivity factor
0.005
(default) | 0.0025
Select the temperature sensitivity factor, which the sensor uses to read values during changing temperature conditions.
The default data type for Raspberry Pi hardware is 0.005
. Use this parameter to change the
values, if required.
Version History
Introduced in R2022b
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)