BMP180 Pressure Sensor - Wrong pressure measured.

I just got me a tiny BMP180 pressure sensor today. Downloaded the adafruit library and printed pressure values successfully on serial monitor.

The sensor reports in Pa then I divide it by 100 to get hPa. Which is absolutely correct way to do it.

I'm in Turkey and national meteorological service reports that in my city the pressure is 1021,7 hPa. But my reading vary greatly, which is 928 hPa. This is way beyond the margin of error, it can't be right.

That leaves me with questions. Why does my BMP180 measure such low pressure?

#include "Wire.h"
#include "Adafruit_BMP085.h"

Adafruit_BMP085 bmp;

void setup() {
  Serial.begin(9600);
  bmp.begin();  
}

void loop() {
    Serial.print("Temperature = ");
    Serial.print(bmp.readTemperature());
    Serial.println(" *C");

    Serial.print("Pressure = ");
    Serial.print(bmp.readPressure()/100);
    Serial.println(" hPa");

    Serial.println();
    delay(500);
}

some sensors must have exact 5V as power, if it is lower the measured results are lower too.

So measure the power of the sensor? optionally post your schematic.

robtillaart: some sensors must have exact 5V as power, if it is lower the measured results are lower too.

So measure the power of the sensor? optionally post your schematic.

No. Sparkfun says it has to be 3.3v, 5v will damage it.

Here are some shots of the circuit:

Image 1 Image 2 Image 3 Image 4 Image 5

Edit: I connected the sensor to 3.3v as you can see. Nokia 5110 LCD is also connected to 3.3v. I removed the LCD to see if it's causing the issue. But it's not.

Edit 2: Weird thing is, temperature readings are absolutely correct. Problem is the pressure.

I have read a bit about the BMP and if I understand correctly you read the raw temperature which must be corrected for temperature.

see this tutorial - https://learn.adafruit.com/bmp085 -

(BMP180 is the follow up of the BMP085)

robtillaart: I have read a bit about the BMP and if I understand correctly you read the raw temperature which must be corrected for temperature.

see this tutorial - https://learn.adafruit.com/bmp085 -

(BMP180 is the follow up of the BMP085)

Can I get the full link please? The one you provided does not work.

try this one - https://learn.adafruit.com/bmp085/wiring-the-bmp085 -

The Adafruit library you are using already takes care of adjusting the raw temperature and pressure readings.

The barometric pressure reported by meteorologic services is corrected to sea level. It isn’t the absolute pressure. Based on the number your BMP is reporting I would guess that you live at an elevation of about 750 meters above sea level. Is this true?

You are correct Jboyton…the device measures absolute pressure. Here’s a nifty formula to correct the pressure to sea level for a particular location:

Babinets formula

Po = P * [(a + Z) / (a - Z)]

Where a = 16000 + 64Tm
Z = elevation in metres
Tm = mean temperature of the column of air (degrees C)
Po = lower station pressure (sea level corrected) hPa
P = upper station pressure hPa

In this example,

Assume Tm = 25C

Z = 750m

a = 16000 + 64 X 25 = 17600

Po = 928 [(17600+ 750)/(17600-750)]

Po = 1010.61 hPa

Somewhat lower than expected… So your elevation must be higher or much hotter outside!

cagancelik: The sensor reports in Pa then I divide it by 100 to get hPa. Which is absolutely correct way to do it.

The results sound just like what I did as well, and it was due to some kind of type error in the programming.

According to the library description for the BMP085, the type appears to be int32_t: https://github.com/adafruit/Adafruit-BMP085-Library/blob/master/Adafruit_BMP085.h

At some point in doing math on the number, the program screws up the type and so you end up with a completely bogus number. In my case, I consistently got 35669 Pa and I'm at sealevel... I found that I had inadvertently converted the type to (uint16_t) when uploading it to Thingspeak.

The issue was resolved by changing my Loop for pressure readings to this:

int BMP_pressure = bmp.readPressure(); Serial.print("Pressure = "); Serial.print(BMP_pressure); Serial.println(" Pa");

Just now I tested this by dividing it by 100 and the result was correct.

I know this is an old thread, but I came to it without a solution to my own issue resolved and so posting for others.