Interface BMP180 Sensor with Arduino to measure Pressure & Temperature

Interface BMP180 Sensor with Arduino (Last Updated On: February 25, 2019)

Introduction:

In this post we will learn how to Interface BMP180 Sensor with Arduino to measure Pressure & Temperature. The BMP180 Sensor is a barometric sensor capable of measuring pressure, temperature & altitude as well. The BMP180 Arduino Code is given below. Go through this link to learn the advance version of this project:
BMP180 for Altitude, Pressure & Temperature Measurement

With Arduino Barometric condition is one of the criteria used to predict coming change in weather and deduce altitude above sea level. Here is a demo to show you how to read the barometric data from this Grove – Barometer Sensor (BMP180).


Interface BMP180 Sensor with Arduino to measure Pressure & Temperature:

Components Required:

1. Arduino UNO Board
2. BMP180 Bosch Sensor
3. 16 x 2 LCD
4. Breadboard
5. Connecting wires



Circuit Diagram:

Interface BMP180 Sensor with Arduino


BMP180 Barometric Sensor:

Introduction:

This precision sensor from Bosch is the best solution for measuring barometric pressure and temperature. It is an ultra low-power digital temperature and pressure sensor with high accuracy and stability. Because pressure changes with altitude you can also use it as an altimeter. It measures the absolute pressure of the air around it. It has a measuring range from 300 to 1100hPa with an accuracy down to 0.02 hPa. It can also measure altitude and temperature.

Interface BMP180 Sensor with Arduino

It consists of a piezo-resistive sensor, an analog to digital converter and a control unit with EEPROM and a serial I2C interface. The raw measurements of pressure and temperature from the BMP180 sensor has to be compensated for temperature effects and other parameters using the calibration data saved into the EEPROM.

Here we will Interface BMP180 Sensor with Arduino. We will use an Arduino board to read the temperature and barometric pressure measurements from the BMP180 sensor and display the data on 16*2 LCD.

BMP180 Features & Specifications:

1. Supply Voltage:1.8V to 3.6V
2. Low power consumption:0.5uA at 1Hz
3. I2C interface
4. Max I2C Speed: 3.5Mhz
5. Very low noise: up to 0.02hPa (17cm)
6. Pressure Range: 300hPa to 1100hPa (+9000m to -500m)

Pin Details:

  1. Vin – +5V DC
  2. GND – GND
  3. SCL – I2C Interface
  4. SDA – I2C Interface

Working of BMP180:

The BMP180 consists of a piezo-resistive sensor, an analog to digital converter and a control unit with E2PROM and a serial I2C interface. The BMP180 delivers the uncompensated value of pressure and temperature. The microcontroller sends a start sequence to start a pressure or temperature measurement. After converting time, the result value (pressure or temperature respectively) can be read via the I2C interface.

Interface BMP180 Sensor with Arduino

For calculating temperature in °C and pressure in hPa (hecto Pascal), the calibration data has to be used. These constants can be read out from the BMP180 E2PROM via the I2C interface at software initialization. The sampling rate can be increased up to 128 samples per second (standard mode) for dynamic measurement. In this case, it is sufficient to measure the temperature only once per second and to use this value for all pressure measurements during the same period.

Interface BMP180 Sensor with Arduino


Program/Source Code:

To interface BMP180 Sensor with Arduino to measure Pressure & Temperature copy the code below and upload it to the Arduino UNO Board.

#include <Adafruit_BMP085.h>
#include <Wire.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);//RS,EN,D4,D5,D6,D7

char PRESSURESHOW[4];// initializing a character of size 4 for showing the result
char TEMPARATURESHOW[4];// initializing a character of size 4 for showing the temparature result
Adafruit_BMP085 bmp;

void setup() {
lcd.begin(16, 2);
// Print a logo message to the LCD.
lcd.print(" BMP180 Sensor");
lcd.setCursor(0, 1);
lcd.print("Temp. & Pressure");
lcd.setCursor(0, 2);
delay (3000);

lcd.clear();//clear display
Serial.begin(9600);
if (!bmp.begin())
{
Serial.println("ERROR");///if there is an error in communication
while (1) {}
}
}
void loop()
{

lcd.print("Pressure= "); // print name
String PRESSUREVALUE = String(bmp.readPressure());
// convert the reading to a char array
PRESSUREVALUE.toCharArray(PRESSURESHOW, 4);
lcd.print(PRESSURESHOW);
lcd.print("hPa ");
lcd.setCursor(0, 1);
lcd.print("Temparature=");// print name

String TEMPARATUREVALUE = String(bmp.readTemperature());
// convert the reading to a char array
TEMPARATUREVALUE.toCharArray(TEMPARATURESHOW, 4);
lcd.print(TEMPARATURESHOW);
lcd.print("C ");
lcd.setCursor(0, 0);//set the cursor to column 0, line1
delay(500);
}

Video Preview & Explanation:



Recommended For You

2 Comments

  1. PLEASE HELP ME IT DOES NOT WORK WITH AN BMP 280.. IT JUST APPEAR DE INTROUCTION PART BUT THEN IT DOESNT SHOW THE DATA ABOUT PRESSURE AN TEMPERATURE

Ask A Question .......

Close