We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you've provided to them or that they've collected from your use of their services.

Masuring the atmospheric pressure

The next caprice of mine in the frenzy of registering everything what is possible was measuring the atmospheric pressure.  Initially I planned to use the BMP085 sensors available for USD 11 for 5 pieces including shipment.  At the end, however, I figured out that it has been enough of all that soldering.  I wanted to be a bit lazy.  I bought at Aliexprees a ready connection board with the BMP180 sensor costing USD 4.7 a piece (obviously, including shipment).

The BMP180 uses I2C to communicate with the world.  It could easily be a part of 1-wire extension as it also uses the I2C.  The board is small enough to fit into every device.  At the end I prepared a very easy "base", which fits into 1-module DIN case.  It all now hands in my central cabinet with the RPi and all the other devices.  Here are some photos: 

BMP180 board

BMP180 base1

BMP180 base2

BMP180 base3

If anybody wants to ask what the whole pressure measuring is for - I can say - for no good reason.  It just costs so little and is so easy to connect that giving it up would be a shame.

At learn.adafruit.com one can find a very detailed article describing all the steps needed to connect the sensor to the RPi.  It all boils down to: 

  • Connecting the SDA SCL GND and 3V3 pins,
  • Checking with command: "i2cdetect -y 1" if at 0x77 address a new device was found,
  • Downloading from Adafruit libraries for I2C connection and using the BMP180 sensor with command: "git clone https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code.git",
  • Running the file "Adafruit_BMP085_example.py", which can be found in Adafruit-Raspberry-Pi-Python-Code/Adafruit_BMP085 pliku Adafruit_BMP085_example.py directory.

Here are the readings from my sensor:

Temperature: 20.40 C
Pressure: 994.18 hPa
Altitude: 159.83

It is quite impressing if you remember the device costs some 5 dollars :)

I was analyzing for some time if the measurements made in the cabinet in the basement makes any sense and if the sensor should not be placed outside.  I am currently of the opinion, that the place of measurement cannot have a too great impact.  The house is not hermetic and the pressure in side and outside must be even.  Even if there is a delay in capturing the pressure changes it should not matter too much.  What is important for a amateur enthusiast are the changes and the dynamics.  The absolute values tell me nothing.

And, as usuall, a simple graph with some data:

AirPressure