Bosch Sensortec Community

    Precision of BME680

    New Poster

    Re: Precision of BME680

    The values are the one taken from the bsec (from the function BSEC_output_ready in bsec_iot_example.c):

    void BSEC_output_ready(int64_t timestamp, float a_iaq, uint8_t a_iaq_accuracy, float a_temperature, float a_humidity,
    float a_pressure, float a_raw_temperature, float a_raw_humidity, float a_gas, bsec_library_return_t a_bsec_status,
    float a_static_iaq, float a_co2_equivalent, float a_breath_voc_equivalent).

    Every 3 seconds this function is called and return all data logged in the excel file and converted to integer value. In reality I've made some modification to the file BSEC_iot_example.c and bsec_integration.c to avoid blocking functions.

    In Bsec_integration.c I have modified the number of data requested in order to have all data (compensated and raw data). The defined constant NUM_USED_OUTPUTS has been set to 10 

    * @brief Virtual sensor subscription
    * Please call this function before processing of data using bsec_do_steps function
    * @param[in] sample_rate mode to be used (either BSEC_SAMPLE_RATE_ULP or BSEC_SAMPLE_RATE_LP)
    * @return subscription result, zero when successful
    static bsec_library_return_t bme680_bsec_update_subscription(float sample_rate)
    bsec_sensor_configuration_t requested_virtual_sensors[NUM_USED_OUTPUTS];
    uint8_t n_requested_virtual_sensors = NUM_USED_OUTPUTS;

    bsec_sensor_configuration_t required_sensor_settings[BSEC_MAX_PHYSICAL_SENSOR];
    uint8_t n_required_sensor_settings = BSEC_MAX_PHYSICAL_SENSOR;

    bsec_library_return_t status = BSEC_OK;

    /* note: Virtual sensors as desired to be added here */
    requested_virtual_sensors[0].sensor_id = BSEC_OUTPUT_IAQ;
    requested_virtual_sensors[0].sample_rate = sample_rate;
    requested_virtual_sensors[1].sensor_id = BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_TEMPERATURE;
    requested_virtual_sensors[1].sample_rate = sample_rate;
    requested_virtual_sensors[2].sensor_id = BSEC_OUTPUT_RAW_PRESSURE;
    requested_virtual_sensors[2].sample_rate = sample_rate;
    requested_virtual_sensors[3].sensor_id = BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_HUMIDITY;
    requested_virtual_sensors[3].sample_rate = sample_rate;
    requested_virtual_sensors[4].sensor_id = BSEC_OUTPUT_BREATH_VOC_EQUIVALENT;
    requested_virtual_sensors[4].sample_rate = sample_rate;
    requested_virtual_sensors[5].sensor_id = BSEC_OUTPUT_RAW_TEMPERATURE;
    requested_virtual_sensors[5].sample_rate = sample_rate;
    requested_virtual_sensors[6].sensor_id = BSEC_OUTPUT_RAW_HUMIDITY;
    requested_virtual_sensors[6].sample_rate = sample_rate;
    requested_virtual_sensors[7].sensor_id = BSEC_OUTPUT_CO2_EQUIVALENT;
    requested_virtual_sensors[7].sample_rate = sample_rate;
    requested_virtual_sensors[8].sensor_id = BSEC_OUTPUT_RAW_GAS;
    requested_virtual_sensors[8].sample_rate = sample_rate;
    requested_virtual_sensors[9].sensor_id = BSEC_OUTPUT_STATIC_IAQ;
    requested_virtual_sensors[9].sample_rate = sample_rate;

    /* Call bsec_update_subscription() to enable/disable the requested virtual sensors */
    status = bsec_update_subscription(requested_virtual_sensors, n_requested_virtual_sensors, required_sensor_settings,

    return status;

    I'm talking to the BME680 via SPI.

    The BSEC version is genric release. The microprocessor is an ARM (STM32)




    New Poster

    Re: Precision of BME680

    I forgot, the VOC value is taken from  BSEC_OUTPUT_BREATH_VOC_EQUIVALENT and shown multiplied for 1000, since we have decided to show the ppb. One issue is that since the VOC are converted from float to integer and I didn't expect this value to overtake 32768 ppb, the negative values happened when the VOC value overtakes 32768 ppb

    Community Moderator

    Re: Precision of BME680

    Which column in the excel file is the VOC sensor output you meant? 

    I saw you are enable 10 different output virtual sensor in BSEC,  are they both in the data log? 

    I also expect the data which input into the lib can be stored in data log also.  then i can try to compare the data set from our side.

    New Poster

    Re: Precision of BME680

    Sorry, probably I had attached the wrong excel file probably. Now there is a new file that I want to be verified if it's correct, with all data taken from a sensor placed outside for a weekend in a protected place from sulight. The acquisition has been taken all weekend. It was placed in a box in order to protect from the rain that was expected on the morning of the last day. Because of the box, the temperature didn't drop very mutch during the night and the condition were stable (too stable seems since IAQ accurancy drop to 1 during the nigth)




    Temperature graph


    The pressure seems correct since a low pressure were approaching during the weekend


    Don't mind the last column VOC/100 filtrated that  was created by me 







    Community Moderator

    Re: Precision of BME680

    Thank you for sharing us the correct data log. 

    With your data log,  i can get the following pollter.



    From the plotter,  you can see the IAQ accuracy is not drop to 1,  it just change between 3 and 2 which is expected.  During the weekend,  the door is keep closed,  then the air quality is not changing too much.   then the accuracy level will drop to 2.  then if there is some activity,  the indoor air quality changes,  then it will change back to 3. 

    Also i found that in your data log, the time interval is 1 minute not 3 second you mentioned. 

    We are gurantee the BSEC lib accuracy only for 3s and 300s.  Any other time interval are not supported and tested right now.