Interfacing Barometric Pressure Sensor Breakout (BMP180) With an Arduino

Barometric pressure sensors measure the absolute pressure of the air around them. Pressure varies with both weather and altitude. Thus with pressure measurement, you can get information on altitude, changes in weather etc.

This is a breakout board for high-precision, low-power digital pressure sensor BMP180 from Bosch. BMP180 is based on piezo-resistive technology for EMC robustness, high accuracy and linearity as well as long term stability. The output of the sensor is available in I2C format. Thus the sensor data can be read by using any microcontroller with I2C interface.

 

BMP180 – Features

  • Digital two wire (I²C, TWI, “Wire”) interface
  • Wide barometric pressure range of 300 to 1100 hPa
  • Input voltage : 1.8V to 3.6V
  • Ultra-low power consumption
  • Low noise measurements
  • Factory-calibrated
  • Includes temperature sensor
  • Low-profile with a small footprint

Interfacing with Arduino

In the following sections, we can see how to interface the breakout board with Arduino UNO. The breakout board has 4 pins which are mentioned below. The board has 3.3V regulator. So you can use either 5V or 3.3V as supply voltage.

  1. Vin     – Supply voltage (3.3V / 5V)
  2. GND  – Ground
  3. SCL    – I2C Clock
  4. SDA   – I2C Data

Make connections between Arduino and  breakout board as shown in the following diagram.(Even with any other microcontroller, the pins remain the same).

Arduino library SFE_BMP180 that allows you to easily interface BMP180 sensor with Arduino (Click to download). Add this library to your Arduino IDE. Open the example code and upload it to your Arduino (remember to select the correct board type and serial port), and open the Serial Monitor to 9600 baud. The sample codes read sensor data via I2C interface and transmit them serially. On the Serial Monitor, you can see the sensor data at regular intervals.

The sequence to be followed for taking pressure or temperature reading is

  • Read calibration constants from BMP180 EEPROM
  • Send start sequence to start pressure or temperature measurement
  • After converting  time (available from datasheet),  the  result  value  (UP  or  UT,  respectively)  can  be  read  via  the  I2C  interface
  • For calculating  temperature  in  °C  and  pressure  in  hPa,  the  calibration  data  has  to  be  used.

As mentioned above, we can calculate altitude with the measured pressure using the international barometric formula

where p   – measured pressure
            p0  – baseline pressure

Based on the baseline pressure, you can calculate height in 2 ways

  • If you use sea level pressure (1013.25 hPa) as the baseline pressure (p0), the output of the equation will be your current altitude above sea level.
  • If you take the pressure reading at your current location as baseline pressure(p0), then the altitude calculated will be relative altitude from your current location.

ResourcesBMP 180 datasheet
Arduino library for BMP 180

Shop with usBarometric Pressure Sensor Breakout – Bmp180

SupportPlease share your ideas with us, visit our forum for discussion 

Leave a Reply