Home Sensor Projects BMP180 barometric pressure sensor

BMP180 barometric pressure sensor

by shedboy71

I recently acquired a BMP180 barometric pressure sensor and was pleased to see that it used the BMP085 library from Adafruit, what I was interested in was how accurate the altitude reading was.

The BMP180 is the function compatible successor of the BMP085, a new generation of high precision digital pressure sensors for consumer applications. The ultra-low power, low voltage electronics of the BMP180 is optimized for use in mobile phones, PDAs, GPS navigation devices and outdoor equipment.

With a low altitude noise of merely 0.25m at fast conversion time, the BMP180 offers superior performance. The I2C interface allows for easy system integration with a microcontroller

This is a picture of the breakout I used

bmp180 bmp180

UNO and BMP180

UNO and BMP180

Here is a quick wiring diagram, the critical thing here is that VCC is 3.3v

 

Code

[codesyntax lang=”cpp”]

#include <Wire.h>
#include <Adafruit_BMP085.h>

// Connect VCC of the BMP180 sensor to 3.3V
// Connect GND to Ground
// Connect SCL to i2c clock  thats A5
// Connect SDA to i2c data  thats A4

Adafruit_BMP085 bmp;
  
void setup() 
{
  Serial.begin(9600);
  if (!bmp.begin()) 
  {
	Serial.println("BMP180 sensor not found");
	while (1) {}
  }
}
  
void loop() {
    Serial.print("Temperature = ");
    Serial.print(bmp.readTemperature());
    Serial.println(" *C");

    Serial.print("Altitude = ");
    Serial.print(bmp.readAltitude(101500));
    Serial.println(" meters");
    
    Serial.println();
    delay(1000);
}

[/codesyntax]

 

Output

this was the reading from the serial monitor

Temperature = 22.90 *C
Altitude = 103.32 meters

To see how accurate this was I went to http://elevationmap.net and typed in my address, the stated elevation was 99m. Given that there was probably an additional couple of metres where the device was located in my house that’s not too bad accuracy wise

 

Links
1PCS GY-68 BMP180 Replace BMP085 Digital Barometric Pressure Sensor Module For Arduino

You may also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More