## Barometric Pressure Sensor Circuit using Arduino

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 we will learn 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.

The circuit:

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.

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.

Program:

//-----------Program by R.Girish----------------//

#include <Wire.h>
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.println(" *C");
Serial.print("Pressure = ");
Serial.println(" Pascal");
Serial.print("Altitude = ");
Serial.println(" meters");
Serial.print("Pressure at sealevel (calculated) = ");
Serial.println(" Pascal");
Serial.print("Real altitude = ");
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 weather?

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.