BME680 is as combined digital gas, humidity, pressure and temperature sensor based on proven sensing principles.
API Link: https://github.com/BoschSensortec/BME680_driver
BSEC Link: https://www.bosch-sensortec.com/bst/products/all_products/bme680
Sensor data type
Gas sensor data is gas sensor resistance.
Humidity sensor data is in type of percentage (10%-90%, in 0°C-65°C).
Pressure sensor data is in type of hPa (300hPa-1100hPa, in 0°C-65°C).
Temperature sensor data is in type of °C (-40°C-85°C).
Use function bme680_get_sensor_data in API to get sensor data.
Use BSEC software Library, put gas/humidity/pressure/temperature sensor data as inputs into BSEC, you can also get IAQ(Indoor Air Quality) from outputs.
Measurement preiod
The BME680 measurement period consists of a temperature, pressure and humidity measurement with selectable oversampling. Moreover, it contains a heating phase for the gas sensor hot plate as well as a measurement of the gas sensor resistance.
After the measurement period, 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 and gas, such a filter is not needed and has not been implemented
Gas resistance sensitivity
The sensitivity of BME680 to certain target gas is gas_resistance/gas_resistance_base. The sensitivity equaling to 1 means BME680 is not sensitivity in this concentration of the target gas, while the less value in sensitivity, the more sensitive BME680 to the target gas.
Data Interrupt
There is new data interrupt in BME680, below table shows how to enable this feature.
Pressure sensor drift
Used to represent errors in measured values. Basically, two drifts will appear on the pressure part in BME680: one is solder drifts and the other is long term drift.
Pressure sensor offset temperature coefficient (TCO)
TCO is the change in the pressure signal introduced by a change of the temperature.
For pressure sensor, TCO is ±1.5 Pa/K, equiv. to ±12.6 cm at 1 °C temperature change, which means pressure sensor data will change within ±1.5 Pa with 1 °C temperature change at constant pressure.
Accuracy of temperature/pressure/humidity
This feature is used to represent how much accuracy can be achieved on certain condition.
Humidity sensor:
±3 % relative humidity, on condition: 20-80 %r.H., 25°C, including hysteresis
Pressure sensor:
0.12 hPa, on condition: 25°C-40°C, 700-1100hPa, at constat humidity
Temperature Sensor:
±1°C, on condition: 25°C
±0.5°C, on condition: 0…65°C
OSR / Oversampling of humidity/pressure/temperature
There are several oversampling options for different sensors. It is possible to reduce noise, but the power consumption will be higher.
Humidity sensor OSR
As for how to set osrs_h<2:0>, b000->skip humidity data/no humidity, b001->oversamplingx1, b010->oversamplingx2, b011->oversamplingx4, b100->oversamplingx8, b101/Others->oversamplingx16.
Pressure sensor OSR
As for how to set osrs_p<4:2>, b000->skip humidity data/no humidity, b001->oversamplingx1, b010->oversamplingx2, b011->oversamplingx4, b100->oversamplingx8, b101/Others->oversamplingx16.
Temperature sensor OSR
As for how to set osrs_t<7:5>, b000->skip humidity data/no humidity, b001->oversamplingx1, b010->oversamplingx2, b011->oversamplingx4, b100->oversamplingx8, b101/Others->oversamplingx16.
You can use function bme680_set_sensor_settings in API to set OSR of any sensor.
Signal filter
The environmental pressure is subject to many short-term changes, caused e.g. by slamming of a door or window, or wind blowing into the sensor. To suppress these disturbances in the output data without causing additional interface traffic and processor work load, the BME680 features an internal IIR filter. Via setting filter coefficient(c), it effectively reduces the bandwidth of the temperature and pressure output signals and increases the resolution of the pressure and temperature output data to 20 bit(Pressure and Temperature OSR must be non-zero). When c is bigger, response time will be longer.
As for how to set filter<4:2>, b000->filter coefficient 0, b001-> filter coefficient 1, b010-> filter coefficient 3, b011-> filter coefficient 7, b100-> filter coefficient 15, b101-> filter coefficient 31, b110-> filter coefficient 63, b111-> filter coefficient 127.
You can use function bme680_set_sensor_settings in API to set filter.
Hello
I have some problem I have used your API code exactely and used write& read code below but I got some nonsense results such as temp 326.40c or H 0% or pressure 1342268hpa can you guid me please whats the problem?
void user_delay_ms(uint32_t period)
{ HAL_Delay(period);
}
int8_t user_i2c_read(uint8_t dev_id, uint8_t reg_addr, uint8_t *reg_data, uint16_t len)
{
if(HAL_I2C_Master_Transmit(&hi2c4, dev_id, ®_addr, 10, 10) != HAL_OK) return -1;
if(HAL_I2C_Master_Receive(&hi2c4, dev_id, reg_data, len, 10) !=HAL_OK) return -1;
return 0;
}
int8_t user_i2c_write(uint8_t dev_id, uint8_t reg_addr, uint8_t *reg_data, uint16_t len)
{
if(HAL_I2C_Master_Transmit(&hi2c4, dev_id,®_addr, 10, 10) != HAL_OK) return -1;
return 0;
}
same issue as bove.
Did anyone manage to solve above issue.
Regards
Nikhil
I am looking for a datasheet information on
// temperature_xlsb 0x24 , R [7:4]
// temperature_lsb 0x23 , R [7:0]
// temperature_msb 0x22 , R [7:0]
After they are read, how can I use this data? Are they all temperature information 16b or 20b?
others data seems also not to be clear on read data? anyone can give these data information of how to use?
Vrai
I learnt something new, to enable the new data interrupt, spi3 mode has to be used. thanks
Hello, I have a problem, I am not sure what the meaning of timestamp is here, because when I run the program, in bsc_integration.c if I enter bsec_sencor_control (...) with any timestamp value, it only exits this function with the bsec_status = BESC_OK the first time I enter after bsec_iot_init (...), the next times I enter the function
bsec_sencor_control (...) exits with bsec_status = BSEC_W_SC_CALL_TIMING_VIOLATION.
Can someone help me understand what value I have to return in get_timestamp_us () for everything to work ok.
Waiting for an answer, best regards, Luis Valseca
I am learning something new, to enable the new data interrupt, SPI3 mode has to be used. thanks a lot
Need the information on the range and the resilution of CO2 and VOC values ?
Range
CO2: 400 – 2000 ppm;
B-VOC: 0.13 – 2.5 ppm
Resolution
CO2 1ppm;
BVOC 0.01ppm.
Can anyone confirm the above ?
Yes , understand that it is a relative sensor, I need further inputs on it , like what is the unit of the IAQ which the sensor gives the feedback. Is it in pm or Microgram/Meter Cube . Also in any given situation , will it give the range as we require below ?
Range
CO2: 400 – 2000 ppm;
B-VOC: 0.13 – 2.5 ppm
Resolution
CO2 1ppm;
BVOC 0.01ppm.
Can you please confirm regarding this ?
Hi,
I write my own code (not using BSEC) on platform mbed 32-bit ARM compiler. Following the BME680 guidelines, I get a temperature compensated value 248763 (decimal). Does it mean 24.8763 deg Celsius ? The sensor is working fine, as its output rise when near to a heat source. I suppose Bosch BSEC software output a 4 digit (decimal) value e.g. 2487 for a 24.87 deg Celsius reading. Can anyone confirm ?
I have the same question as many people on here before me, regarding calibration...........but I see no answers....
How to convert ADC data to 'real' values? for example: Temperature ADC value = 492590. This value increases and decreases, when I apply heat and cold - so the device is working.
Default device params: par_t1 = 0, par_t2 = 26559, par_t3 = 3. Using API 'calc_temperature()'. 'calc_temp' = 15609 - what is this value? There is no explanation of the equations used by the API.
Hi there,
how were these calibration parameters taken and how accurate are these. Is there a documentation of somekind ?
Thanks.
Hello,
I've been working with the BME680 and BME688 sensors for a while. Currently, I'm involved in a project where I need to implement the 'Data Interrupt' feature to detect new data availability in IAQ LP mode and/or standard scan mode. My attempts to test this with a BME 680 and an ESP32 haven't been successful, as the BME libraries lack a function for this purpose. I've even tried manually setting registers 0x75 and 0x72 to activate 'Data Interrupt', but this led to issues. For instance, when operating in parallel mode, the gas index consistently reads 15! (we only have 10 gas indexes), and this value doesn't change. I would appreciate any advice or suggestions you might have on this matter.