bmp180 air pressure sensor

How to read and display air pressure, temperature and altitude – With a BMP180 and arduino microcontroller board

In today’s post we are looking at the BMP180 digital air pressure sensor and how to interface it to an Arduino microcontroller board to measure pressure, altitude and temperature from it.

The pressure sensor chip is very compact measuring only a few millimetres in length while the circuit board holding the sensor is only slightly larger measuring about 1 cm on each side.

The BMP180 connects to a microcontroller using a the I2C protocol. It is capable of measuring air pressure from 300 to 1100 hPa and operates with a supply voltage range of 1.8 to 3.6 volts.

 


 

 

Wiring the Circuit – BMP180 to microcontroller board

The wiring in this project is very simple, only using 4 wires to coonect the sensor to the board. We start by connecting the Voltage, GND, SDA and SCL pins from the pressure sensor to the corresponding microcontroller board. The pins are for supply voltage, ground, SDA and SCL. Once the wiring is in place and connected correctly the coding can begin.

 

wiring bmp180 to arduino board

Programming the microcontroller

 

First we start a new blank sketch in the Arduino IDE. Then the “adafruit_BMP085.h library” needs to be installed as it does not come as a standard install with the IDE. Go the library manager in the IDE and search for the term “adafruit_BMP085.h library” then install it. We also require the “wire.h” library. We then need to assign the sensor library to the variable “bmp”.

In the setup part of the code, the serial monitor and the variable bmp need to be setup by using the word “begin” (eg. bmp.begin();   serial.begin(9600);). Then in the main loop we read the air pressure, temperature and altitude values then output them to the serial monitor.

 

bmp180 code

 

Once the coding is complete, the sketch is then uploaded to the microcontroller. We can now open the serial monitor tool and view a live stream of data which is updated every 2 seconds.

And that’s it. Another simple Arduino tutorial !

I hope this tutorial has been useful to you.

If you liked it please share it with a Friend !

Subscribe Now !

Receive updates and new information straight to your inbox.