The Bosch BMP085 and BMP180 barometric pressure sensors are two small sensors that can measure minute changes in atmospheric pressure.  These sensors, like most barometric pressure sensors, can be used to monitor the weather.  A big benefit to Bosch’s sensors is they are also sensitive enough to measure changes in altitude. This high sensitivity is a double-edged sword though; with the extra sensitivity comes extra noise.  This tutorial will show you how to hook up a Bosch BMP085 or BMP180 breakout board, basic software to get started, and software to improve the data coming from the sensor.

This tutorial shows one of the ways to use this sensor with an Arduino.  There are several Arduino-compatible libraries that can be used with this sensor such as:

In addition to the wide variety of libraries, there are several breakout boards that will work with this tutorial. These include:

When choosing a breakout board for the BMP180, the critical specification is whether or not it can operate at 5v or 3v.  If the board is not 5v compatible, different wiring will be required. 

Parts Required:

 

  • Arduino UNO (other variants will most likely work, but small changes may be needed)
  • USB Cable for the Arduino. (Most likely a type B for an Arduino UNO.)
  • 4x Male Hookup wires
  • Small Breadboard
  • 5v Compatible BMP180 Sensor (Adafruit 1604 used on this project)

Software Required:

  • Arduino IDE (Version 1.6.6 used here)
  • Adafruit BMP085 Library (Sketch -> Include Library-> Manage Libraries->Search for “BMP085”)
  • The Arduino files used in this tutorial (download below)

Instructions:

  • Wire Up the Barometric Pressure sensor to the Arduino
    • Attach Vcc on the sensor breakout board to 5v on the Arduino
      • A red hook-up wire was used for this tutorial
      • Please ensure your breakout board is 5v Compatible
    • Attach GND on the sensor breakout board to GND on the Arduino
      • A brown hookup wire was used for this tutorial
    • Attach SCL on the breakout board to A5 on the Arduino
      • A yellow wire was used for this tutorial
    • Attach SDA on the breakout board to A4 on the Arduino
      • A white wire was used for this tutorial.
    • The wires should look similar to this:

 

  • Download the below files.

 

  Bosch Sensor Zip File  


  • Open the file AAC_BMP180_Part1

    • This is a very basic program to read the pressure from the sensor, convert it to altitude, and send over the serial port to the computer.  

    • Below, 1 minute's worth of data are plotted. 

As you can see from the plotted data, the sensor’s data fluctuates.  In the next step, we will smooth out the data to get more consistent results.

  • Open the file: AAC_BMP180_Part2
    • This program contains a little bit more functionality than the previous program.
    • This takes 1, 25, and 50 samples of data and obtains the average.
    • The data is then sent to the serial port in a .csv format so it can be plotted in Excel.

Looking at the chart below, the 50 sample average is shown in red, the 25 sample average is shown in blue, and the singular sample is shown in orange:

 

Looking at the data, the averaged samples show a more consistent result.

Conclusion

As you can see, with a little basic processing on the Bosch barometric pressure sensors, the data can be improved. This smoother data could provide better results in many applications such as drones or indoor location systems. This project used a simple moving average to smooth the data, but there are quite a few other smothing algorithms such as exponential smoothing and additive smoothing that could achieve similar (or better!) results.


Video

 


Comments

1 Comment


  • KEN UKWIZARD 2015-12-31

    I’m interested in the Bosch BMP085 and BMP180 for use with a LED readout circuit.
    Is it possible to locate one!?

    Arduino is not for me thanks.

    • Phil-S 2015-12-31

      Without Arduino or MCU of any description, you are going to find this difficult. It’s output is digital I2C that needs processing. There might be industrial indicators that will take an I2C input, but are going to cost a lot more than an MCU (Arduino Atmel 328 chip about $3 with bootloader). There are straightforward (Wire.h and LCD.h) libraries ready written for Arduino. LED’s are going to be trickier than LCD and use more power. Once you get to grips with this one, there are countless other sensors that use the same system.