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, a 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:
S.N. | Components Name | Quantity | Purchase Links |
---|---|---|---|
1 | Arduino UNO Board | 1 | Amazon | AliExpress |
2 | BMP180 Sensor | 1 | Amazon | AliExpress |
3 | Potentiometer 10K | 1 | Amazon | AliExpress |
4 | 16x2 LCD Display | 1 | Amazon | AliExpress |
5 | Connecting Wires | 10 | Amazon | AliExpress |
6 | Breadboard | 1 | Amazon | AliExpress |
Circuit Diagram:
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.
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:
- Supply Voltage:1.8V to 3.6V
- Low power consumption:0.5uA at 1Hz
- I2C interface
- Max I2C Speed: 3.5Mhz
- Very low noise: up to 0.02hPa (17cm)
- Pressure Range: 300hPa to 1100hPa (+9000m to -500m)
Pin Details:
- Vin – +5V DC
- GND – GND
- SCL – I2C Interface
- 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.
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.
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
#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); } |
3 Comments
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
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
Hii sir, is the project working for you?