The BME280 is a combined digital humidity, pressure and temperature sensor based on proven sensing principles.
The humidity sensor data is expressed as a percentage (10% - 90% at 0°C-65°C).
The pressure sensor data is in hPa (300hPa - 1100hPa at 0°C-65°C).
The temperature sensor data is in °C (-40°C - 85°C).
The function bme280_get_sensor_data in the API is used to get the sensor data.
The accuracy represents how accurate the sensor can be under certain condition.
Table 1 lists the accuracy of humidity sensor, pressure sensor, and temperature sensor.
The pressure sensor drift represents the error in the measured value. Basically, there are two drifts on the pressure part in the BME280, i.e. solder drift and long-term drift.
The TCO (offset temperature coefficient) is the change in the pressure signal caused by a change in the temperature.
For the pressure sensor, the TCO is ±1.5 Pa/K, equivalent to ±12.6 cm at 1 °C temperature change, which means the pressure sensor data changes within ±1.5 Pa, with 1 °C temperature change at constant pressure.
The BME280 can be operated in three working modes: sleep mode, normal mode, and force mode, which can be selected using the mode [1:0] setting (in register 0xF4 [1:0], sleep mode -> b11, force mode -> b10 and b01, normal mode -> b11). The function bme280_set_sensor_mode in the API can also used to set power mode.
During the measurement cycle, the BME280 measures temperature, pressure and humidity, with optional oversampling.
After the measurement cycle, the pressure and temperature data can be passed through an optional IIR filter, which removes short-term fluctuations in pressure (e.g. caused by slamming a door). For humidity, such a filter is not needed and has not been implemented.
Oversampling can be enabled during the measurement, which can reduce noise but also consumes more power. Different sensors have different OSRs (oversampling rate).
The osrs_h<2:0> settings are explained as follows:
b101, and other settings -> oversamplingx16
The osrs_p<4:2> settings are explained as follows:
The osrs_t<7:5> settings are explained as follows:
The function bme280_set_sensor_settings in the API can also be used to set the OSR for any sensor. See below for the example.
... int8_t rslt; uint8_t settings_sel; dev->settings.osr_h = BME280_OVERSAMPLING_1X; dev->settings.osr_p = BME280_OVERSAMPLING_16X; dev->settings.osr_t = BME280_OVERSAMPLING_2X; ... settings_sel = BME280_OSR_PRESS_SEL | BME280_OSR_TEMP_SEL | BME280_OSR_HUM_SEL | BME280_FILTER_SEL; rslt = bme280_set_sensor_settings(settings_sel, dev); .... return rslt; ...
The environmental pressure is subject to many short-term changes caused by, for example, door or window slamming, wind blowing into the sensor, etc. The BME280 features an internal IIR filter which can suppress these disturbances in the output data without causing additional interface traffic and processor workload. By setting the filter coefficient (c), the bandwidth of the temperature and pressure output signals can be effectively reduced and the resolution of the pressure and temperature output data can be increased to 20 bits. The output of the next measurement step is filtered using the following formula:
Where, data_filter_old is the data coming from the current filter memory. data_ADC is the data coming from current ADC acquisition. data_filtered is the new value of filter memory and the value that will be sent to the output registers.
The filter<4:2> settings are explained as follows:
The function bme280_set_sensor_settings in the API can also be used to set filter. See below for the example.
... int8_t rslt; uint8_t settings_sel; ... dev->settings.filter = BME280_FILTER_COEFF_16; ... settings_sel = BME280_OSR_PRESS_SEL | BME280_OSR_TEMP_SEL | BME280_OSR_HUM_SEL | BME280_FILTER_SEL; ... rslt = bme280_set_sensor_settings(settings_sel, dev); ... return rslt;