Home Arduino Projects Arduino Barometer Project Using BMP180

Arduino Barometer Project Using BMP180

by Nikodem Bartnik
Arduino Barometer Project Using BMP180

Pressure sensors are widely used in drones, weather stations, smartphones and more. It is important to know how this small piece of technology works.

We are going to be using the BPM180 sensor. The name of the module is GY-68. The small device can read, pressure, altitude, and temperature.

Let’s build a small device that uses BPM180 to read pressure and altitude and uses an I2C LCD display to show that information (You can as well choose to display it on the serial port).

Arduino Barometer Project Using BMP180

Here are the components we need:

As usual, we need to do the connection before uploading the sketch into the board.

Because both the LCD and the pressure sensor use the I2C, we have to connect the pins SDA and SCL to the analog pins 4 and 5.

Arduino Barometer Project Using BMP180

Some barometers have a Vin pin and some a 3V3 pin. If yours has a Vin, it should be connected to 5V and if it does have 3V3 it should be connected to 3.3V.

Arduino Barometer Project Using BMP180

After connecting the component together, we need to upload the following code to the Arduino board. We need additional libraries, one of them is the Adafruit_BMP085.h. You should be wondering the reason why it says BMP085 while we are using the sensor BMP180. Do not worry, this library should work with this sensor as well.

If you don’t know how to add libraries, I will suggest you check this to learn how to add libraries to your sketches. This code will display pressure and altitude on the LCD. You can also display temperature if you have bigger LCD, on my one (16×2) there was no space for that. To display text in two lines we use setCursor() function.

Note, you can use this same setup to display temperature.

The code helps capture pressure and altitude from the pressure sensor and displays it on the LCD. It displays pressure in hPa and altitude in meter.

Arduino Barometer Project Using BMP180

Hope this has somehow sparked an Arduino project idea in your mind. Now it is time to go and build something amazing!

You might also like:

Related Posts

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Privacy & Cookies Policy