I connected my BMP180 on Raspberry Pi, temerature reading is correct, but pressure reading is incorect. It says Pressure=100448.00Pa, Sealevel Pressure=10450.00Pa while my local weather station says 1020hPa. I followed Adafruit tutorial, and I'm using their library.
1 Answers
I don't quite have an answer for you but this might lead you to a solution.
It says Pressure=100448.00Pa, Sealevel Pressure=10450.00Pa while my local weather station says 1020hPa.
So this is a discrepancy of a few kPa. However, note that weather stations report the pressure adjusted for temperature and altitude. Unfortunately the altitude adjustment actually adds (unless you are below sea level) and so does the temperature if you are above ~freezing.
I have some C++ code for the Adafruit BMP085 board; I believe they say these two devices have the exact same interface (the 180 is a replacement model).
To unpack that: tar -xvjf BMP085_C++.tar.bz2.
I can promise you it works as I have been using it to record data for more than a year and occasionally check the pressure against local weather stations (well, right now I'm 0.2 kPA high). There's a README in there which will tell you how to how to compile a quick demo which will spit out the pressure adjusted for temperature but not altitude (since it does not know the altitude). The adjust for temperature formula is in adjustedPressure().
There's a constant in there (SEA_LEVEL_PRESSURE) and a static function (getMeanPressure()) you can calculate the altitude adjustment with. Here's the formula, which I must have gotten online somewhere:
pow(1.0 - (height/44330.0), 5.255) * SEA_LEVEL_PRESSURE
Here 'height' is in meters and SEA_LEVEL_PRESSURE is 101.325. In case this is not clear, it means 1.0 - (height/44330.0) raised to the power of 5.255, times mean sea level pressure. This is for kPa.
You would subtract that from sea level pressure then add the difference to the adjusted for temperature figure. That should nearly match the number from local weather.
- 60,325
- 17
- 117
- 234