Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    BME680 returning meaningless data

    BME680 returning meaningless data

    PeterAS17
    Member

    Hello,

    I've started working with the I2C protocol yesterday to use the BME680 sensor I bought, so please forgive any silly mistakes I might've made or details I might've overlooked.

    I've created a C++ project that uses the BME680 driver on Github. I've managed to get some data in return, but it looks meaningless, as you can see in the image below:
    bme680.jpg

    Here's how I initialize it:
    bme680.jpg

    And how I read the data:
    bme680.jpg


    I've tried reading the I2C frequency on my device, and it reads 100'000.

    The room where the device is running in is at least 20°C, so am I missing something?

    3 REPLIES 3

    handytech
    Community Moderator
    Community Moderator

    @PeterAS17 wrote:

    bme680.jpg


    In this picture, Chip ID as well as calib parameters are zero. If that is the output after calling bme680_init() function, it most likely indicates that something went wrong, or that your communication is not working.

    Can you confirm that your platform specific i2c read/write and delay functions are working as expected? You could for example use an oscilloscope or logic analyzer to capture the chip ID read-out. Also verify that the BME680 connections are correct, including proper selection of the I2C address via SDO pin, and CSB directly connected to Vddio.

    Please note that it is mandatory to configure the sensor's settings (at least once), and set the sensor to forced mode to trigger each measurement.

    You could also have a look at the integration example in BSEC's package for reference.

    Thank you for your reply!

    Turns out I wasn't checking what the init function was returning, which is BME680_E_DEV_NOT_FOUND. I'm currently checking my read and write functions to see what's wrong and I'll get back to you if I find nothing.

    Yes, looks like a mix of me not looking at the init's return value and a faulty read function was the reason behind all of this. Thank you for your help!

    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