BMP180 Barometric Sensor With Arduino

About: Share Knowledge about Arduino, ESP,GSM,Basic Electronics, DIY PROJECTS, Raspberry pi

This post is about how to use the BMP180 barometric sensor with the Arduino. It is also applicable for other similar barometric sensors.

Introducing the BMP180 barometric sensor

The BMP180 barometric sensor (model GY-68) is the one in the following figure (front and back view). It is a very small module with 1mm x 1.1mm (0.039in x 0.043in).

It measures the absolute pressure of the air around it. It has a measuring range from 300 to 1100hPa with an accuracy down to 0.02 hPa. It can also measure altitude and temperature.
The BMP180 barometric sensor communicates via I2C interface. This means that it communicates with the Arduino using just 2 pins.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Where to Buy?

This sensor is very cheap. You can buy one for approximately $3BMP180

Step 2: Pin Wiring

Wiring the sensor to the Arduino is pretty straightforward:

PinWiring to Arduino Uno





Step 3: Code

To control the BMP180 barometric sensor, you need to install the SFE_BMP180 Library.

Installing the SFE_BMP180 Library

1.Click here to download the SFE_BMP180 libraryYou should have a .zip folder in your Downloads folder.

2.Unzip the .zip folder and you should get BMP180_Breakout_Arduino_Library-master folder.

3.Rename your folder from BMP180_Breakout_Arduino_Library-master to BMP180_Breakout_Arduino_Library.

4.Move the BMP180_Breakout_Arduino_Library folder to your Arduino IDE installation libraries folder

5.Finally, re-open your Arduino IDE

Go to File > Examples >SparkfunBMP180 > SFE_BMP180_example.

This example is very well commented and explained on how the sensor reads the pressure, temperature and computes the altitude.

Step 4: Set the Altitude

Before uploading the code, you need to set up your current altitude. Go to your address and check your altitude’s location. Set your altitude in the code. The place where you should write your altitude is commented.

Step 5: Demonstration

After uploading the code, open your serial monitor at a baud rate of 9600.

You’ll be able to see your sensor readings.

Step 6: Wrapping Up

The BMP180 is an interesting sensor to be used in your own weather station.

Because the pressure changes with the altitude, this sensor is also able to compute the altitude.

thank you

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest