Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BME680 Save and Load State Issue

    BME680 Save and Load State Issue

    Adi
    New Poster

    Hi

    I am using BSEC library with BME680 5min interval. The flow of our device goes like this:

    • Wakeup from device deep sleep "uC is off" then on, only external RTC is up,
    • Collect BME680 reading (accuracy 0), save state on each reading in EEPROM

     

     

    bsec_iot_loop(bme680_sleep, esp_timer_get_time, output_ready, state_save, 1/* 10000 */);​

     

     

    • Power-off uC.
    • Wake up, load the previous reading, and get new reading then save state, and so on..

    The problem is that accuracy is always 0. Appreciate your support on this and if I misunderstood the whole mechanism.. the assumption is that we'll store the state regardless of the accuracy, as it should be cumulatively changed to acc=3 over time.. also I didnt change the timestamp, so each time the device restart (wake-up from deep sleep it'll start counting from the beginning, since in my implementation the uC is completely off), each time it will reset, assuming it will load the state regardless of the timestamp since it should start from there? or I should only store it if its acc=3? Appreciate more clarification.

    Note: The sensor works perfectly in normal operation, with 5 min intervals; no deepsleep.

    14 REPLIES 14

    BSTRobin
    Community Moderator
    Community Moderator

    Hi Adi,

    Which config file you used?
    And you can record you print information for check.

    Hi BSTRobin,

    Thanks for your prompt response! Sure, this is the configuration file:

    set (BME_PROFILE "generic_33v_300s_28d")

     

    I am using ULP profile while initializing the sensor.

    Here is the logs:

    "18/9/2023 6:32:04 PM",I (10) I2C initialized
    "18/9/2023 6:32:04 PM",I (510)  bme680_sleep entered
    "18/9/2023 6:32:04 PM",I (520) Loading configuration: buffer-size 454 config size 454
    "18/9/2023 6:32:04 PM",I (520)  Entering into the loop
    "18/9/2023 6:32:06 PM",I (2510)  iaq 25.000000 temp 27.860001 hum 37.143002 press 93348.000000 static iaq 25.000000 co2_equivalent 500.000000 breath voc 0.500000 iaq_accuracy 0
    "18/9/2023 6:32:06 PM",I (2530) BME680 - state_save: Saving configuration: buffer-size 139
    "18/9/2023 6:32:06 PM",I (2550) bme680_sleep entered

    It continue like this, nothing is changing even after two days. I would like to add that I am not considering the newly calculated timestamp. I just updated the when to save the statefile parameter from 10000 to 1

    Adi
    New Poster

    @BSTRobin Would really appreciate the feedback on my last post

    BSTRobin
    Community Moderator
    Community Moderator

    Hi Adi,

    1.You can print timestamp, BSEC output values every 300s for check;
    2.Which BSEC version you used?

    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