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.
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.
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:
S(1) = Y(1)
S(t) = α*Y(t-1) + (1-α)*S(t-1)
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.
FILTERING – Simple Buffered Average