Skip to content

Adafruit library shows different values than BSEC library #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Napsty opened this issue Apr 2, 2020 · 5 comments
Closed

Adafruit library shows different values than BSEC library #29

Napsty opened this issue Apr 2, 2020 · 5 comments
Assignees
Labels

Comments

@Napsty
Copy link

Napsty commented Apr 2, 2020

I did some comparison between using the Adafruit CircuitPython BME680 python module and the compiled BSEC library from Bosch (using https://github.com/alexh-name/bsec_bme680_linux) and the values retrieved from the sensor differ.

$ cat adafruit_example.py 
import board
import busio
import adafruit_bme680
i2c = busio.I2C(board.SCL, board.SDA)
sensor = adafruit_bme680.Adafruit_BME680_I2C(i2c)
print('Temperature: {} degrees C'.format(sensor.temperature))
print('Gas: {} ohms'.format(sensor.gas))
print('Humidity: {}%'.format(sensor.humidity))
print('Pressure: {}hPa'.format(sensor.pressure))

Results:

$ python3 adafruit_example.py 
Temperature: 4.6993359375 degrees C
Gas: 1578360 ohms
Humidity: 57.53554887071429%
Pressure: 947.7445084251684hPa

The binary compiled with BSEC library shows different values:

2020-04-02 10:02:13,[IAQ (0)]: 25.00,[T degC]: -0.29,[H %rH]: 82.23,[P hPa]: 947.72,[G Ohms]: 104297,[S]: 0,[eCO2 ppm]: 500.000000000000000,[bVOCe ppm]: 0.4999999403953552246093750

Temperature: BSEC is right. I know it's currently below 0 outside.
Humidity: BSEC is more rightish, when I compare the Live Weather maps (https://kachelmannwetter.com/de/analyse/superhd/thurgau/luftfeuchtigkeit/20200402-0720z.html). The reading from 40 mins ago says between 70 and 80% humidity where I live.
Pressure: Both values are the same, look correct
Gas: Large difference! 104297 from BSEC and 1578360 from Adafruit

Are the calculations/calibrations in the Adafruit library incorrect? Do you have a partnership with Bosch to take a closer look at this?

Screenshot humidity map for comparison:

image

@evaherrada evaherrada added the bug label Jun 30, 2020
@evaherrada evaherrada self-assigned this Jul 14, 2020
@evaherrada
Copy link
Collaborator

So the part of this library that is causing this issue is much more complicated than I initially assumed it would be. However, there is a really easy fix for the temperature. It seems like it is usually off by 5 degrees C, so we should just subtract 5 from it like the library you linked does.

@evaherrada
Copy link
Collaborator

@Napsty I've made a PR that ought to fix the temperature issue, although I haven't tested it. Do you think you might be able to test it and see how it compares to the BSEC library?

@jposada202020
Copy link
Contributor

@Napsty Hello :), have you been able to test this? thanks

@Napsty
Copy link
Author

Napsty commented May 6, 2021

Sorry - no, was not able to test yet. The BME680 sensor is still in daily use and I hope I will find a couple of hours to test this but currently busy on other things.

@FoamyGuy
Copy link
Contributor

FoamyGuy commented Nov 7, 2024

closing this for now, I believe it should be resolved by #32. If you get back to it and are still having trouble you can re-open.

@FoamyGuy FoamyGuy closed this as completed Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants