Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BME680 didnot measure anymore

    BME680 didnot measure anymore

    Ruslan
    Member

    Hi, I already understood how to work with this sensor and compiled my project with STM32F103C8 and BSEC Lib without errors. It worked with BSEC_SAMPLE_RATE_LP mode in bsec_iot_init. It worked good for ~20 hours. However the temperature and humidity was not true, temperature was 5 degs higher than real and humidity lower from real. I made reserve copy of whole working project to other folder. Then I changed mode to BSEC_SAMPLE_RATE_ULP but sensor stopped to output data.  I decided that I made something wrong with my code  and opened and compiled previous working project with BSEC_SAMPLE_RATE_LP mode. But sensor did not output measurements results , however sensor is working. I can read chip ID and after bsec_iot_init function I recieve OK answers:

    ret = bsec_iot_init(BSEC_SAMPLE_RATE_LP, 0.0, bus_write, bus_read, sleep, state_load, config_load);
    sprintf(uart_buf,"\nBSEC Init: %i, BME680 Status: %i" , ret.bsec_status, ret.bme680_status); UART1_Transmit_string(uart_buf);

    Answers in PC_terminal:  BSEC Init: 0, BME680 Status: 0 that means all OK.

    By debugging I found that program stops in "static uint8_t calc_heater_res(uint16_t temp, const struct bme680_dev *dev)" function. It calculates var1 and stops. Sometimes it calculates var2 and var3. I dont know what happened and why reserve working project stopped to output measured data.

    2 REPLIES 2

    Vincent
    Community Moderator
    Community Moderator

    This funciton you mentioned is convert the sensor output to the register value needed for lib.

    It will take the calibration parameters during sensor initialize and the register value after each measurement then calculate it.

    For your problem,  i need to know detail when error happens what is the sensor read out value and if the parameters are still stored in dev structure? 

    Hi, I noticed strange behavior of program. I just uncommented  #define BME680_FLOAT_POINT_COMPENSATION  and project began to work again in LP mode and even in ULP mode. I cant understand why my program worked with integer version in LP mode and than stopped after I changed LP mode to ULP mode in bsec_iot_init function. bsec_serialized_configurations_iaq was not loaded at both compilations( with LP mode and ULP mode).

    One more question: why measured and outputted temperature and humidity differs from real values? RAW temp and RAW humidity are same as compensated values. Such result  in LP mode and ULP mode, with and without loading configs(bsec_serialized_configurations_iaq).

    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