In this article we are going to explore, what is a Barometer and how to interface a barometric BMP180 sensor with Arduino. We will also be exploring some of its important specification and finally I have explained how to predict weather using barometric readings.
What is Barometer?
Barometer is an instrument for measuring atmospheric pressure. The atmospheric pressure is the amount of force exerted by the atmosphere of earth.
Earth’s atmospheric pressure changes time to time, the change in the atmospheric pressure can predict short term weather condition in the local area.
In modern times, we can get weather forecast on our finger tips via smartphone, TV, radio etc. But in early days, around 17th century, the weather forecast was depend on barometer, which was fabricated using toxic chemical elements such as mercury.
Mercury based barometer was a handy tools for scientists to farmers. It predicted weather fairly accurate, it helped scientist to conduct scientific experiments on atmosphere, and farmers know when to grow crops at right time.
Later on mechanical based barometer was invented, which didn’t use any kind of liquid. Luckily, we are living in era of advanced technology, where barometric sensors are inexpensive and does not size more than our thumb nail.
Illustration of Barometric sensor:
Now, you know what a barometer is and where it is used.
Specifications:
• It can measure pressure ranging from 300hPa to 1100hPa (1hPa=100Pa), “Pa” denotes Pascal and hPa denotes hectopascal.
• Operating temperature is from -40 to +85 degree Celsius.
• Measuring temperature ranging from 0 to 65 degree Celsius.
• Typical operating voltage 3.3V.
• Power consumption 5 microampere.
Now, let’s dive into circuit diagram.
How it Works
The barometric BMP180 sensor circuit using Arduino is actually very simple as it utilizes i2C bus, which is two wire communication. The chip uses 3.3V from Arduino from on-board regulated power supply. It can measure local atmospheric pressure and ambient temperature.
You may also like: How to build an atmospheric pressure indicator circuit using LEDs
Author’s prototype:
The program is designed to calculate other parameters too such as atmospheric pressure at sea level and altitude from sea level, which we can witness from Serial monitor of IDE.
Before you dive into programming part, download the library file from the following link: github.com/adafruit/Adafruit_BMP085_Unified.git and add to Arduino library folder.
Program Code:
//-----------Program by R.Girish----------------//
#include <Wire.h>
#include <Adafruit_BMP085.h>
Adafruit_BMP085 bmp;
void setup()
{
Serial.begin(9600);
if (!bmp.begin())
{
Serial.println("Could not find a valid BMP085 sensor, check wiring!");
while (1) {}
}
}
void loop()
{
Serial.print("Temperature = ");
Serial.print(bmp.readTemperature());
Serial.println(" *C");
Serial.print("Pressure = ");
Serial.print(bmp.readPressure());
Serial.println(" Pascal");
Serial.print("Altitude = ");
Serial.print(bmp.readAltitude());
Serial.println(" meters");
Serial.print("Pressure at sealevel (calculated) = ");
Serial.print(bmp.readSealevelPressure());
Serial.println(" Pascal");
Serial.print("Real altitude = ");
Serial.print(bmp.readAltitude(101500));
Serial.println(" meters");
Serial.println();
delay(10000);
}
//-----------Program by R.Girish----------------//
The link for the library file is originally made for BMP085, but it is compatible with BMP180.
NOTE: While compiling the program, the IDE gives a warning, please ignore it, the code and library works just fine.
How to predict pressure level?
The weather forecast which is broadcast on TV and radios, are measured from sea level and not local atmospheric pressure, this is because the altitude can affect the reading from location to location and measuring at sea level will give a standard value across all the barometer. So, we are focusing on Pressure level at sea level (Calculated) on serial monitor.
The atmospheric pressure keeps on changing and no constant value can be obtained. But, one can determine the weather by monitoring the reading at some interval of time.
Look at the readings and note it, wait for half an hour and note the reading again, if the reading goes high, this means the weather going to be sunny. If the reading goes low, we can predict a storm or rain.
This is same across all barometers. Higher the difference between, initial and current readings, higher the possibility of changing weather condition.
Calin says
You integrate with Arduino. Is it possible to connect the sensor to a gear and make it move a needle? I am thinking of a handheld barometer, without a CPU.
Swagatam says
I don’t think that’s possible with the BMP180 sensor, you will have to depend on Arduino for the interfacing.
Calin says
Thank you for the prompt response.
PCOS says
How do you calibrate the current pressure to make sure your altitude is correct.
What is the performance spec on this. Could I use it in a weather balloon.