Compensate BME280 pressure measurements...

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
netsrac
Posts: 17
Joined: Sun Jun 07, 2020 7:19 pm
Location: Berlin, Germany

Compensate BME280 pressure measurements...

Post by netsrac » Mon Jan 31, 2022 2:29 pm

Hi guys,

I know, this is not really MicroPython specific, but as I use MiocroPython for all my sensors, I'll post ist here.

So I have several BME280 sensors. I gave up on the on-board temperature sensor, because this has a known issue self-heating and therefore always showing higher temperature values. I only want to use the air pressure sensor now:

I have two sensors outside, one of them measures 1029, the other 1031 and I think this slight difference is okay and within the tolerances. But now I checked the weather forecast and the current air pressure in my region is 1003. I know that air pressure given by the forecast is reduced to sea level, but I'm only 38m above see level. So in order to compensate my measurement I need to add (38/8 = 4.75 hPa) to my measurement which will give me aprox. 1035 hPa.

So the difference between the forecast and my measurement is (currently) around 32 hPa.

Unfortunately it's not a fixed difference.

I had a measured of 1077 which compensated to 1082 - the forecast at this time said it's 1035 which makes a difference of 47 hPa.

So anybody know how to successfully compensate the pressure sensor so that the readings makes any kind of sense?
Did I miss something here?

Thanks, Carsten

User avatar
Roberthh
Posts: 3668
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Compensate BME280 pressure measurements...

Post by Roberthh » Tue Feb 01, 2022 9:51 am

Do not trust the weather forecast. Compare it to a known good value. I compared the BME280 and BME680 reading with the values published by the local University's lab figures and found them accurate within the specification.

netsrac
Posts: 17
Joined: Sun Jun 07, 2020 7:19 pm
Location: Berlin, Germany

Re: Compensate BME280 pressure measurements...

Post by netsrac » Tue Feb 01, 2022 11:08 am

Roberthh wrote:
Tue Feb 01, 2022 9:51 am
Do not trust the weather forecast. Compare it to a known good value. I compared the BME280 and BME680 reading with the values published by the local University's lab figures and found them accurate within the specification.
Good point, but I check the values of various different sources - one from the "local airport" and one from "Meteorological institute of the free university of berlin" as well as the weather forecast. They all show the same value +/-2 hPa.

So unfortunately the problem still lays on my side.

User avatar
Roberthh
Posts: 3668
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Compensate BME280 pressure measurements...

Post by Roberthh » Tue Feb 01, 2022 11:19 am

Which library do you use? I made my tests with that one: https://github.com/robert-hh/BME280

netsrac
Posts: 17
Joined: Sun Jun 07, 2020 7:19 pm
Location: Berlin, Germany

Re: Compensate BME280 pressure measurements...

Post by netsrac » Tue Feb 01, 2022 4:48 pm

Roberthh wrote:
Tue Feb 01, 2022 11:19 am
Which library do you use? I made my tests with that one: https://github.com/robert-hh/BME280
Okay, never thought it could be a library thing. But I definitely used a different one. I'll make a test with the one you referenced above and see if this delivers different values...

Post Reply