Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BME280 returns reset values

    BME280 returns reset values

    turboscrew
    New Poster

    What could be the problem, when after power-on reset I get temperature and pressure right, but humidity value is the reset value (0x8000).

    The next read returns the reset values for all of them.

    The communication looks good (saleae) taken from the BME280 board pins.

    Could that be caused by floating CSB? Too frequent reading? Bad oversampling setting? I'm using XinaBox SW1 with threads soldered on the connection pads and DuPonts in the other end. The processor is STM32L425 also running with VCC 1.8V.

    It's hard to imagine how that could be power issue, because of the low current consumption compared the 3A output of the power supply.

    I'm using 1.8V for Vcc and Vccio, though.

    15 REPLIES 15

    Well, temperature measurement seems to work, and so does pressure measurement.

    My guess is, that the humidity should be around 30%. (0x5295 / 0xFFFF * 100% = 32.26%)

    And I already listed the compensation parameters for humidity:

    "The compensation constants read from the chip are:

    digH[0] int32_t 75
    digH[1] int32_t 397
    digH[2] int32_t 0
    digH[3] int32_t 783
    digH[4] int32_t 50
    digH[5] int32_t 30"

     

     

    A-ha, digH[4] was formed the wrong way. Reg 0xE4 contains the high part, not the low part.

    In the case of digH[4], the "endianness" is different from others.

    But now I'm getting 100%. I think I should be getting about 70%.

    The raw value divided by 0xFFFF and multiplied by 100% goesn't go even close. The compensation is obviously quite complex.

     

     

     

    Also, I'm not sure how my superiors would like a BSD-3 licenced code in our product.

     

    Vincent
    Community Moderator
    Community Moderator

    You can follow the formula get from the API and re-write your code. 

    The formula in the API are tested and working properly. 

    If the relative humidity is still wrong,  you need go back to check each calibration parameters are get correctly (not only the register content, also how to assembly to parameters like unsign or sign value) . 

    How about the temperature value read from sensor?  Humidity calculation will also use temperature value from sensor.  So both need to be checked. 

    Hmm, I don't use any OS, and the driver in https://github.com/BoschSensortec/BME280_driver seems to use Linux kernel definitions, like U8_C(x) (defined in linux/include/asm-generic/int-ll64.h).

     

     

     

    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