Some of Stef's Stuff

BMP085 Pressure Sensor

by Stefano on 2011.12.25, one comment

Want create site? Find Free WordPress Themes and plugins.

Real-time measurement of atmospheric pressure with Bosch-Sensortec BMP085 Barometric Pressure Sensors.
This is a new generation high precision digital pressure sensor for consumer application. The low-power, low-voltage electronics of the BMP085 is optimized for use in mobile phones, PDAs and GPS navigation devices.

Following the rich documentation available on the internet I set up a test bench composed by
SparkFun BMP085 Breakout board
Arduino 2009 board
NI LabVIEW 2011 software

The main objective of the test is the assessment of sensor’s noise; then I would like to evaluate the impact of different environment conditions, in particular the room temperature. Finally a floating point math will be used to process sensor data (Weather Station Data Logger for Arduino uses a floating point math along with BMP085 sensor, read the dissertation).

Further details on how to wire SparkFun board to the Arduino 2009 can be found in the link below. BMP085 library for Arduino (with sample .pde) is available for downloaded from Adafruit GitHub. More details about the process and math involved in the library can be found in the BMP085 datasheet.

BMP085 \ Learning \ Wiring
Interactive Matter – Arduino & Barometric Pressure Sensor BMP085
bildr – Sensing Barometric Pressure | BMP085 + Arduino

Raw pressure

First thing with the BMP085 and Arduino 2009 was to obtain a pressure reading and check the values via ‘Serial Monitor’ of the Arduino IDE. Those readings seemed quite noisy at a first glance, but was quite difficult to judge from rapidly changing values without plotting them; so LabVIEW has been used to plot such pressure data (converted to altitude in [m], in the following screenshot) sent from Arduino to LabVIEW as described in the previous post.

The top plot show LabVIEW input samples, taken in ULTRA HIGH RESOLUTION mode.

The bottom one show the “moving standard deviation” of 10 pressure samples. As described in the BMP085 datasheet on page 12, RMS noise for the different 4 modes (from low-pwr to ultra-hi-res) is taken just like that.

The average noise level is in between 0.25 – 0.30 [m] in accordance with the value stated by constructor.

FILTERING – Exponential Moving Average (EMA)

As suggested in the BMP085 datasheet, the noise can be further reduced increasing the sample rate and by software averaging.

[W: Exponential Moving Average] (EMA) is a simple algorithm for [W: exponential smoothing] easily implementable on embedded sistems (like Arduino’s MCUs). The EMA for a series Y may be calculated recursively:

The following Block Diagram show the EMA applied to pressure samples in LabVIEW.

The top plot show raw pressure (white) and filtered (red) data. The bottom one show the standard deviations on raw and filtered data.

Noise level has been reduced to less than 0.05 [m] by software averaging.

Wikipedia – Moving Average
Wikipedia – Exponential Smoothing

FILTERING – Simple Buffered Average


Did you find apk for android? You can find new Free Android Games and apps.

One thought on “BMP085 Pressure Sensor

  1. Looks good.

    I was looking for a example how to read the BMP085 through Labview. Can you release the sample code pls. Also what i’m missing is how to readout the temperature from the BMP085. Or can you give me directions in how to do that.

    Thank you

Leave a Reply

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