My BMP180 sensor is giving a low reading

I'm trying to put together a weather station and the final part of it is a barometric sensor, so I hooked it up onto my Arduino Mega as instructed in this circuitbasics tutorial
http://www.circuitbasics.com/set-bmp180-barometric-pressure-sensor-arduino/

I live in a very flat part of Ireland that is 56 metres above sea level so the difference in pressure is very small

Right now the pressures is supposed to be 1002 hPa but my sensor is giving back a reading of about 975 hPa

can anybody please help me with this problem, I've been working at it for days and still don't understand what the problem is.

Heres my code:

#include <Wire.h>
#include <SFE_BMP180.h>

SFE_BMP180 bmp180;

void setup() {
  Serial.begin(9600);
  bool success = bmp180.begin();

  if (success) {
    Serial.println("BMP180 init success");
  }
}

void loop() {

  char status;
  double T, P;
  bool success = false;

  status = bmp180.startTemperature();

  if (status != 0) {
    delay(1000);
    status = bmp180.getTemperature(T);

    if (status != 0) {
      status = bmp180.startPressure(3);

      if (status != 0) {
        delay(status);
        status = bmp180.getPressure(P, T);

        if (status != 0) {
          Serial.print("Pressure: ");
          Serial.print(P);
          Serial.println(" hPa");

          Serial.print("Temperature: ");
          Serial.print(T);
          Serial.println(" C");
        }
      }
    }
  }
}

I don't think there's such a thing as "supposed to be" when it comes to pressure: the pressure changes all the time, that's what weather is. It's why in the old sea-faring movies you see the Captain tapping the barometer with his pipe and sucking his teeth....

It's why aeroplanes call in to their control towers to get the "QNH" so they can set the altimeter pressure, so that the altimeter actually shows the airfield altitude when they land, which is known by actual land survey.

Unless of course by "supposed to be" you mean that's what's shown on another, known-good, barometer?

Take your project to the airport. Yes, the barometer can be that fickle. Plus, you might need to buy 10 or so BMP180's to get one that will match the airport readings. Or, you can monitor the airport and the BMP180 and determine an offset.

Thats most likely what i'll do if i can't determine the issue within a couple more days

Then in that case, and assuming their gear is more expensive and better than yours, I guess yours is not accurate enough.

I have never used the SFE library you use, I use the Adafruit equivalent which has an editable value for the standard sea level pressure. Perhaps you could "fudge" your reading to bring it in line with reality by editing your library, if it has a similar variable?

You deleted a post?: now my last one, and Idahowalkers which refers to "the airport" since you mentioned the one near your base, don't make a lot of sense...

Some BMP examples have the ability to add or remove an OFFSET to account for small differences and aid accuracy.

Some may ask for a latitude and longitude if they are internet enabled examples so they can also get the local differences live.

Might I suggest some more playing with examples and other BMP libs.

Bob.

Sorry i accidentally deleted a post while trying to reply, I'm still new. I'll probably try to multiply my results by a number to bring them up to the same as the local airports

Thanks for all the help.

You might find this useful

  • calculate the effect of temperature and altitude in pressure.
    If it’s a windy day , you can get variations if for example the wind is hitting the side of your house, and you are measuring pressure inside .
    Bought one of these and after taking account of these variations ( used a map to calculate altitude), I found it was spot on out of the box .

Right now the pressures is supposed to be 1002 hPa but my sensor is giving back a reading of about 975 hPa

Airports report the pressure corrected to sea level and in many cases are infrequently updated. And 56 meters makes a significant difference! According to this calculator, if the sea level pressure is 1002HPa (100200 Pa), the pressure at 56 m is 995 HPa (99500 Pa), assuming 15C air temperature. The equations for pressure change with elevation are on the page linked above.

In any case, you need to calibrate your sensor and calculate a correction factor by comparing readings from a calibrated barometer, made at the same location and elevation.