Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    Problem when reading two BME680

    Elektrix
    Member

    Problem when reading two BME680

    Hello all,

    I am new to the forum. Somebody at the Embedded World fair told me about this forum. Thanks for that.

    In my application I have two BME680 sehsors to measure air quality in two different rooms. The sensors are connected via I2C (together with bus drivers). BSEC version is 1.4.7.4 from github. The controller is a Adafruit ItsyBitsy M0 (Cortex M0) and my IDE is the arduino IDE 1.8.10 running on Debian Buster. I had my software up and running with an  old version of BSEC, I think it was 1.4.6 or 1.4.7.1. The way I read the sensors is the same as in the basic example but doubled for two sensors. In the old version I had readings from both sensors every three seconds as expected. Now only one sensor is read although the other one is up and running.

    To show you the problem I have altered the basic example for two sensors. For better readability I have deleted the helper functions and it reads only two values per sensor. I attach the file as zip.

    My output is:

    Sensor1 3040, 21.58, 61.29
    Sensor1 6040, 21.58, 61.29
    Sensor1 9040, 21.58, 61.30
    Sensor1 12040, 21.58, 61.33
    Sensor1 15040, 21.58, 61.32
    Sensor1 18040, 21.59, 61.41
    Sensor1 21040, 21.59, 61.51
    Sensor0 24040, 22.31, 60.09
    Sensor0 27041, 22.31, 60.07
    Sensor0 30041, 22.31, 60.04
    Sensor1 33040, 21.60, 61.44
    Sensor1 36040, 21.60, 61.35
    Sensor0 39041, 22.32, 60.06
    Sensor1 42040, 21.60, 61.30
    Sensor0 45041, 22.31, 60.04
    Sensor0 48041, 22.32, 60.03
    Sensor0 51040, 22.32, 60.02
    Sensor1 54040, 21.59, 61.41
    Sensor0 57040, 22.30, 60.31
    Sensor0 60041, 22.31, 60.36
    Sensor1 63040, 21.59, 61.97
    Sensor0 66041, 22.31, 60.38
    Sensor1 69040, 21.60, 61.90

    Sometimes it reads sensor 0 and sometimes sensor 1 but I don't get readings from every sensor every three seconds.

    The problem seems to be a timing problem. I think when iaqSensor.run() is TRUE there is only very little time to read the values. Otherwise they are gone. In my application reading and displaying the results on a serial display takes so much time that the values of the other sensor are already gone.

    This behaviour is strange and unexpected to me as it makes no sense in my eyes. And it worked correctly this way in an older version of the BSEC library.

    So my question is:can anybody give me any information how to solve the problem?

    Very best regards

    Elektrix

    8 REPLIES 8
    kgoveas
    Community Moderator

    Re: Problem when reading two BME680

    Hi Elektrix,

    At present, the library doesn't support multple sensors. We have an update in the pipeline that would enable this feature. I hope we can provide a release by the end of October. 

    Regards,
    kgoveas

    Elektrix
    Member

    Re: Problem when reading two BME680

    Hello kgoveas

    thanks for the info. Do you already know when the update will be available? My project is stalled at the moment.

    Best regards

    Elektrix

    kgoveas
    Community Moderator

    Re: Problem when reading two BME680

    Hi Elektrix,

    Sorry to keep you waiting. I was unable to test it extensively, but the prelimiary tests seem to work without issues. Kindly refer to the experimental branch on Github to try it out. In the meantime, I will test this implementation further and merge it to the master when complete. Any findings you have in the meantime will be helpful. 

    Regards,
    kgoveas

    maren
    New Poster

    Re: Problem when reading two BME680

    Hello kgoveas,

    I am doing a similar project with 2 BME680 sensors on an Arudino UNO, using I2C connection and the library from Adafruit, as the library from Bosch is not working on Arduino UNO as far as I know. This post is now already a little bit older, do you maybe know if there is now a library available for Arudino UNO which supports 2 sensors? The measurement with only 1 sensor works good. I have connected the two sensors via I2C (adress 0x77 and 0x76), both of the sensors were also found, but all read values are 0. 

    If you maybe know a solution it would be great to get an answer. Thank you! 

    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