adafruit / Adafruit_BME680

117 stars 76 forks source link

Gas resistance reading is heavily dependent on polling interval #37

Open bobnecat opened 4 years ago

bobnecat commented 4 years ago

As the header states, there is an issue with logic of gas reading part of the code "gas_resistance".

The output of this function is heavily dependent on frequency of polling the sensor. For example if I call this function every 3 seconds, the output would be in the range of 100kOhms, however dropping down polling interval to 1 minute, the average output drops to ~20kOhm while performing reading every 10 minutes result in inconsistent output between 1 and 5kOhms.

I've been reading through the library code, however unable to identify what causes it. Most likely there is a bug in the way heating (temperature and duration) of gas sensor plate is realized in this library.

Manuel-Sensate commented 4 years ago

I just stumbled over this issue as well.. did you find a solution?

bobnecat commented 4 years ago

Nope, moreover I think this sensor or the library implementation do not make any sense without original BSEC library. I've switched my polling interval to every 3 seconds (to mimic polling in BSEC library) and my results in the long term are still all over the place. The sensor definitely reacts to changes in conditions, however those reactions are not consistent and don't make much sense overall.

xjzp commented 4 years ago

@bobnecat - I had just given up here after seeing that behavior as well, at least I know I'm not alone on that. I thought I had damaged mine running it perhaps too much.

CptHolzschnauz commented 2 years ago

I can confirm. It changes also with ages. A new (but burnt in for 24h) gives a tenth of an old sensor. As long as Bosch is playing games with secret algorithms it's very difficult to read out a sensible value.