# BMP085 station conversion

Hi,

I realize this is more of a barometric pressure conversion question than a microcontroller question, but maybe someone can point me in the right direction? I have the BMP085 connected to my FEZ Panda II.

I am wondering if anyone has experience converting BMP085 pressure readings (or pressure from any sensor in Pascals) to weather station barometric pressure, which commonly reads inHG of mercury at sea level?

I am using the code at: [url]http://code.tinyclr.com/project/235/bmp085---i2c-barometric-pressure-sensor/[/url] and adding the following code, but I am off from 2 - 5 hundreds (from my nearest weather station (within 5 miles) Is this expected? Do I have the conversions right?:

``````
// correct for altitude
StationPressure_In_Pascals = Pressure_In_Pascals / System.Math.Pow((1 - (stationAltitudeInMeters / 44330.75)), 5.255);

// 1inHG = 3386.389 pascals at 0degC (32F)
// 1inHG@ 60F = 3376.85 pascals
// Therefore, we must correct inHG by temperature using linear interpolation
//
// linear interpolation
//double m = (3386.389 - 3376.85) / (32 - 60);
//double b = 3376.85 - (m * 60);
double m = -0.3406785714;
double b = 3397.2907142857;

// [°F] = [°C] × 9/5 + 32
TemperatureF = TemperatureC * 9 / 5 + 32;
double tempCorrectedPascalsToInMg = m * TemperatureF + b;
Pressure_inHG_atSeaLevel = StationPressure_In_Pascals / tempCorrectedPascalsToInMg;

``````

Does anyone know what the temperature correction is from pascals to inches of mercury? Would it matter that I am measuring the pressure in my house currently? My house is warmer than the air outside…

Even the best sensor need to be calibrated against a reference. I am not sure what is the best way to do it. The BMP085 has built in termal compensation (that’s why it is always reading first the temperature, and then adjusting its presure sensore against it).

I found out that the BMP085 is very useful to see pressure variations (or altitude variation), not to use as a reference. Even if it’s good.

I was the author of that driver, and I can’t testify it’s bullet-proof
However, by comparing the readings to my next weather station, in kPa, I never found a “huge difference”. When you say 2-500 difference, what is the difference in percentage ? Only relative precision really matters. I thing the reading I had where accurate to about 5% to the weather station. And the variations were very accurate.

Good luck

I see in the datasheet + or - 1 hectopascal is typical, which would explain what I am seeing. Do you know anything about the temperature adjustment for pascals to inches of mercury?