Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    BME688 BSEC What values should be assigned to sensor input ID 22, 23, 24 ?

    BME688 BSEC What values should be assigned to sensor input ID 22, 23, 24 ?

    vic
    Member

    I am using the BSEC Library v2.4.0.0 Generic Release 23012023 and trying to use the library to get IAQ data.

     

    I read the API docs and the examples to build my own application. I am calling bsec_update_subscription  with these parameters

    bsec_sensor_configuration_t requested_virtual_sensor = { .sensor_id = BSEC_OUTPUT_IAQ, .sample_rate= BSEC_SAMPLE_RATE_LP};
    const uint8_t n_requested_virtual_sensors = 1;
    bsec_sensor_configuration_t required_sensor_settings[BSEC_MAX_PHYSICAL_SENSOR];
    uint8_t n_required_sensor_settings = BSEC_MAX_PHYSICAL_SENSOR;

    bsec_update_subscription(requested_virtual_sensor,
                                                             n_requested_virtual_sensors,
                                                             required_sensor_settings,
                                                             &n_required_sensor_settings);

     

    These parameters should give me as output the sensors required to get the IAQ output. After executing the function I get the following sensors IDs in the array required_sensor_settings with a sample rate of 0.3333 (i.e. BSEC_SAMPLE_RATE_LP)

    2,3,4,22,23,24

    According to the header bsec_datatypes.h enum bsec_physical_sensor_t, sensor IDs 2,3,4 are humidity, temperature, gasresistor respectively. What I do not know is what is the meaning of sensor ID 22,23,24.

    ID 22 is not specified and I do not find an example on what value should be assigned to the signal data member of struct bsec_input_t. In addition, could you explain what values should I assign to sensor IDs 22 (undefined), 23  (BSEC_INPUT_DISABLE_BASELINE_TRACKER) and 24 (BSEC_INPUT_PROFILE_PART).

    From my attempts at understanding the sample code, sensor ID 23 (BSEC_INPUT_DISABLE_BASELINE_TRACKER) should be assigned to gas index if the operation mode of the BME688 is not FORCED_MODE (line 380 file bsec_integration.c). But sensor ID 22 and 24 (BSEC_INPUT_PROFILE_PART) are not used in the samples.

    Is it safe and valid to use bme68x_bsec_process_data for my use case (IAQ virtual sensor) ignoring input ID 22 and 24  (i.e., sample rate = BSEC_SAMPLE_RATE_DISABLED) ?

    If not could this be added to the docs or answered in this question?

    Thanks in advanced and if I am missing something please let me know as I am new to the BSEC library.

    As further information I am calling as per documentation first bsec_init and then  bsec_set_configuration with config from folder bme688_sel_18v_3s_4d  file bsec_selectivity.c.

     

     

     

     

     

     

    6 REPLIES 6

    BSTRobin
    Community Moderator
    Community Moderator

    Hi vic,

    If you want to get IAQ output, you don't need to use virtual sensor IDS 22~25(BSEC_OUTPUT_GAS_ESTIMATE_1~BSEC_OUTPUT_GAS_ESTIMATE_4) which are used for gas estimate, supports up to 4 gas estimate. Normall current BSEC example code didn't support run IAQ and gas estimate at the same time.
    It means that you can only use one of the following two macro definitions.
    //#define BME68X_OUTPUT_GAS_ESTIMATE
    #define BME68X_OUTPUT_GAS_IAQ

    Actually the sensor IDs 22-24 as mentioned in the first post come from the Physical Required sensors as per the documentation of function bsec_update_subscription not the virtual ones.
    Regards and thanks for your support.
    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist