10-24-2019 12:20 AM
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
10-24-2019 12:39 PM
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
11-13-2019 07:21 PM
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
11-18-2019 04:54 PM
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
08-19-2022 09:31 AM
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!