BMP180 and Arduino

The BMP180 is a new digital barometric pressure sensor of Bosch Sensortec, with a very high performance, which enables applications in advanced mobile devices, such as smart phones, tablet PCs and sports devices.

It follows the BMP085 and brings many improvements, like the smaller size and the expansion of digital interfaces. The good news for arduino developers is that if you have used the BMP085 it is identical with regards interfacing and 3rd party libraries also will still work correctly.

Here is a picture of the breakout we bought for this and yes it is really small so like the SHt21 sensor mentioned in another post I would recommend using a breakout board of some description.

 

bmp180

Now we will show you how to connect this to your Arduino, its quite simple with this being an I2C device but again be careful with the Vcc for this device, I used 3.3v

Arduino UNO and BMP180

There are a couple of libraries available

https://github.com/sparkfun/BMP180_Breakout_Arduino_Library

https://github.com/adafruit/Adafruit_BMP085_Unified

 

I used the Adafruit library as I already had tested that with the BMP085 sensor, both are easy to use

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 output

Temperature = 232.90 *C
Altitude = 101.32 meters

You can use various internet sites and check the elevation of your location, mine was accurate to about 1 metre

 

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

Related posts

VEML6070 ultraviolet light sensor on an Arduino

Programming an Attiny44 using an Arduino

Programming an Attiny85 using an Arduino