Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BSEC Timing problem

    BSEC Timing problem

    kevyk
    Established Member

    Hi.

    Why does it take the BSEC 5 minutes (exactly) to start to produce valid IAQ signals, and is there a way to speed that up?

    Here's what output_ready produces every time:

    ...

    output_ready [284.354675]: timestamp_NS=284354687000, bsec_status=0, iaq=25.00, iaq_accuracy=0
    output_ready [287.576751]: timestamp_NS=287576750000, bsec_status=0, iaq=25.00, iaq_accuracy=0
    output_ready [290.797851]: timestamp_NS=290797843000, bsec_status=0, iaq=25.00, iaq_accuracy=0
    output_ready [294.019897]: timestamp_NS=294019906000, bsec_status=0, iaq=25.00, iaq_accuracy=0
    output_ready [297.241973]: timestamp_NS=297241968000, bsec_status=0, iaq=25.00, iaq_accuracy=0
    output_ready [300.463073]: timestamp_NS=300463062000, bsec_status=0, iaq=25.00, iaq_accuracy=1
    output_ready [303.685119]: timestamp_NS=303685125000, bsec_status=0, iaq=21.78, iaq_accuracy=1
    output_ready [306.907196]: timestamp_NS=306907187000, bsec_status=0, iaq=23.73, iaq_accuracy=1
    output_ready [310.129241]: timestamp_NS=310129250000, bsec_status=0, iaq=23.23, iaq_accuracy=1
    output_ready [313.351318]: timestamp_NS=313351312000, bsec_status=0, iaq=25.88, iaq_accuracy=1

    ...

    The sample rate is BSEC_SAMPLE_RATE_LP.

    Thanks,

    Kevin

    void output_ready(int64_t timestamp_ns, float iaq, uint8_t iaq_accuracy, float temperature, float humidity, float pressure, float raw_temperature, float raw_humidity, float raw_gas, bsec_library_return_t bsec_status, float static_iaq, float co2_equivalent, float breath_voc_equivalent)
    {
    	float timestamp_sec = timestamp_ns / 1000000000.0;
    	printf("output_ready [%1.6f]: timestamp_NS=%lld, bsec_status=%d, iaq=%1.2f, iaq_accuracy=%d\n", timestamp_sec, timestamp_ns, bsec_status, iaq, iaq_accuracy);
    }
     

     

    5 REPLIES 5

    handytech
    Community Moderator
    Community Moderator

    There is one (easy to miss) keyword that you missed in the original reply 😉

    • If no state file was loaded into BSEC (often the case if you are running the sensor for the first time, or if you got rid of the existing state file in your application), then the IAQ output will be fixed for the whole run-in duration (5min in LP mode) although the raw gas value will be reacting as expected.
    • On the on hand if a valid state file was successfully loaded into BSEC, then only you would see the IAQ output react to raw gas changes even during the run-in period (but as expected BSEC will report a low IAQ accuracy during this time).
    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