Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BME280 CHIP_ID wrong

    BME280 CHIP_ID wrong

    Hpmax
    New Poster
    A friend of mine bought a board which I believe is this:

    https://lastminuteengineers.com/bme280-arduino-tutorial/

    I am writing software to poll the sensor for temperature and humidity information. I am using this software:

    https://github.com/BoschSensortec/BME280_driver

    When I run a bme280_init() it fails to detect a device. I threw some printf's in to debug it and it appears that the get_regs() on 0xd0 returns 0x45 for a chip_id rather than 0x60.

    Can anyone explain to me what's going on?
    7 REPLIES 7

    BSTRobin
    Community Moderator
    Community Moderator

    Hello Hpmax,

    Whic interface you used, I2C or SPI? You could capture waveform to check the actual communication.

    I do not have the hardware, and therefore can't connect any scope probes. I'm giving code to my friend and observing the results through debug statements that I'm adding.

    I believe the hardware is connected via I2C as described in the link I included.

    BSTRobin
    Community Moderator
    Community Moderator

    Hello Hpmax,

    BME280 chip id is 0x60.

    It is better to check HW communication, otherwise you couldn't know if the communication is correct or not.

    I am aware that it is supposed to be 0x60, which is why I was posting this.  As previously stated, I cannot check the hardware.  I was wondering if there were other devices that might respond with 0x45 (another variant in the same series perhaps).

    That said, I asked my friend to disconnect the device and he got the same result.  There is an MS5611 on the I2C bus which uses the same address, so my assumption is my software was talking to the MS5611 rather than the BME280, but it's difficult for me to understand why the BME280 seemed to have no impact.  I presume a write command (from the MCU) would work fine despite the collision, instead it's only the read that would be affected by the collision, and I'd expect that the impact of a collision would essentially be effectively a logical AND.  That is if the MS5611 is outputing a 0x45, and the BME280 is outputting a 0x60, I'd expect to read in a 0x40.

    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