janw-cz/JWA_BME280

Properly implement temperature offset in compensation data

Closed this issue · 1 comments

I'm experiencing large deviations with my current batch of BME280.

Please note: I've tried reconditioning them, updating my driver to the latest code, using forced or normal mode but nothing can get rid of those 5 to 8 C off the real temperature. I've been through many posts stating the BMEs may have some accuracy problems but never to that scale. We could have a long debate regarding the underlying issue but that's not the point here. The fact here is 2 BME280 sitting side by side are respectively reporting 23C and 31C.

I'm only looking to implement a software offset the proper way. Looking a the calibration data and the procedures in the driver, I have no clue how I should implement it. Well I know I could reverse all those bit shifting and calculations but that would take a while... probably a very long while!

I'm pretty sure there's a way to change the compensation data once read from the BME to factor in an offset and keep all the calculations untouched.

Would anyone share how to achieve that?
Thanks a lot!

Hello,

the sensor should come precalibrated from manufacture. The calibration data is read from the sensor and used by internal compensation algorithm in bme280.c.

If the readings are still incorrect I would not change the compensation data. I would rather implement additional offset correction inside the specific application.

Have fun