Introduction to using the BMP180 barometric sensor with Arduino

bmp180 barometricsensor    Send article as PDF   
The BMP180 barometric sensor (model GY-68) in the following two images is a very small module with 10mm x 10.1mm (0.039in x 0.043in) footprint. This guide is also applicable for other similar barometric sensors.

bmp180 barometric sensor

The BMP180 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. Because of this,it can also be used to measure altitude and temperature.

The BMP180 barometric sensor communicates via I2C interface, which means that it communicates with the Arduino using just the 2 pins.

Where to buy?

This sensor is very cheap, and you can purchase one for approximately $3 from eBay.

Pin wiring:

Wiring the sensor to the Arduino is pretty straightforward:

  BMP180 Pins Wiring to Arduino Uno Pins  
  Vin 5V
  SCL A5
  SDA A4


Wire your sensor to the Arduino as shown in the schematics below.

bmp180 to arduino schematic


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 library. You 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.

Set the altitude:

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

bmp180 set altitude


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

You’ll be able to see your sensor readings.

bmp180 serial monitor output


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 of your current position.

Previous Post

Using the HC-SR04 Ultrasonic Sensor with Arduino

The working principle of an ultrasonic sensor is simple and use high-frequency sound waves that are evaluated when the sensor received back the waves. To determine the distance between the ... Read more

Next Post
0.96" OLED Display

Using a 0.96 inch OLED Display with Arduino Microcontroller

In this article I will show how to use the small 0.96 inch OLED display with an Arduino Microcontoller board to build a very basic Weather Station. The 0.96 inch ... Read more

Short URL:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Do NOT follow this link or you will be banned from the site!