Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BME680 Not Sleeping

    BME680 Not Sleeping

    chongcl
    Member

    Dear All, 

    I have a custom board with Multitech xdot LoRA Chip and BME680 Sensor.

    I can confirmed my board already deep sleeping, as measured from the development kit without BME. The total power consumption of the board now having 0.08mA draw (80uA), which is similiar to the sensor power consumption described in BME developer guide. Somewhere in this forum had seen people doing 0.15-0.18uA only.

    My sensor reading is fine at the moment and I believe my bme680 is not sleeping yet..

    I tried debuging sensor mode before and after setting sensor mode and in func bme680_bsec_trigger_measurement, the mode is always in FORCED mode. 

     

    Can the problem be the I2C Write or maybe I2C Read function? The Read should be correct as I'm getting the sensor values.. I'm not sure about the Write. Anyone had any experience in this?

    Below is my I2C function with Mbed I2C Api
     
     
    Spoiler
    int8_t Bsec::i2cRead(uint8_t devId, uint8_t regAddr, uint8_t *regData, uint16_t length) {
        int8_t rslt = 0;
        char data[1];
        data[0] = (char) regAddr;
        rslt = Bsec::i2c->write(devId, data, 1);
        rslt = Bsec::i2c->read(devId, (char *) regData, length);
        return rslt;
    }

    int8_t Bsec::i2cWrite(uint8_t devId, uint8_t regAddr, uint8_t *regData, uint16_t length) {
       int8_t rslt = 0;

       char data[length + 1];
       data[0] = (char) regAddr;
       for(int i = 1; i <= length; i++) {
         data[i] = (char) regData[i-1];
       }
       rslt = Bsec::i2c->write(devId, data, length + 1);
       return rslt;
    }
     
    3 REPLIES 3

    handytech
    Community Moderator
    Community Moderator

    In sleep mode, the BME680 consumes <1µA. In forced mode, the BME680 triggers the measurement of only one sample of temperature/pressure/humidity/gas (as configured by the user), then goes back to sleep mode. During the actual sensor measurements, the current consumption would be quite higher than you mentioned (see datasheet for full details). We also don't know if your measurement is an averaged current, or what is your BME680 configuration/data-rate.

    Since you are measuring the total board current, we would recommend to measure the current consumption of each components, otherwise we couldn't conclude that the current is drawn by the BME680. You also pointed out that you are using I2C, which could lead to leakage current in your system. After power-up sequence, the BME680 automatically starts in sleep mode, this could be a useful reference before checking that the BME680 isn't going back to sleep.

    Totally agree with you!

    Currently I don't have my devkit with me, only integrated custom built pcb. Probably next week or two I'll go get a devkit to confirm the power draw and consumption at component basis.

    In the meantime, you said BME680 power up in default in sleep mode? I tried remove bsec library and no i2c initialization.. My board total consumption is still 0.08mA. 

    Another thing is.. i tried to log bme680_get_sensor_mode(&_bme680), from init bsec & bme then run trigger measurement and so on.. the sensor mode always 0. Which mean in forced mode. it's not getting to sleep. I even tried to manually set the mode to sleep then print the result. But it is still 0. 

    Then I tried to change the updateSubscription, from ULP, to LP to Disabled, no changes in battery consumption also, same 0.08mA when board sleeping.

    What can be wrong here? i2c write function not writing it correctly?

    The BME680 requires i2c write to configure and trigger the measurements, and i2c read to get the data afterwards. If you are getting data that makes sense (e.g. increase in temperature when touching it, decrease in gas resistance when bringing alcohol close to the part, etc.) Then everything works as expected.

    Seeing that your current consumption measurement seems static, my best guess at this stage would be to say that your current measurement setup is the issue here. The BME680 draws on average ~1mA(avg) when used in LP mode, and ~100uA(avg) when used in LP mode.

    However, the current consumption while sensing gas is in excess of 10mA ! You need a current measurement setup that can sample at a high rate and make the average over time.

    o_o
    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