What is Barometric Pressure Sensor and Get Started Barometer Sensor with Arduino

Barometric Pressure Sensor, also known as a newer form of the barometer, is an Arduino compatible tool used for atmospheric pressure measurement in environments. Such measurements mainly allow for forecasting of short term changes in the weather.

With design changes over the years, barometric pressure sensors are now miniaturized for usages on smartphones and microcontroller boards such as Arduino, where one of the most common ones being BMP180, BMP280, BME280.

In today’s guide, I’ll be diving deeper into Barometric Pressure Sensor, alongside with an Arduino Guide to help you get started!

How does a barometric pressure sensor work?

Knowing the functionality of a barometric pressure sensor is one thing, but how does it work?

  • Since barometric pressure sensors date back to a long time ago, we’ll take a look at how it works back then and currently.

How a barometric pressure sensor works in the older days:

In the past, most barometer uses liquids for atmospheric pressure measurement since the technology wasn’t advanced back then.

But do you know such barometers date back to the 1600s? Yes more than 400 years ago!

Mercury Barometer

One of the oldest types of barometers is the above mercury barometer, consisting of a vertical glass tube sitting on a mercury-filled basin at the bottom.

Here’s how it works:

  • Works through balancing a column of mercury and measures the height of the mercury column
  • The higher the height of the mercury column = the higher the atmospheric pressure is present
    • High atmospheric pressure results in more force placed on the reservoir, which forces mercury higher in the column
    • Low atmospheric pressure results in lesser force placed on the reservoir, which allows mercury to drop lower down the column

How modern barometric pressure sensors work

With the advancement in technology, Modern-day barometric pressure sensors no longer require liquid for sensing, resulting in better accuracy!

Such barometric pressure sensor types include aneroid barometers and MEMS barometer. Here’s how they work!

Aneroid Barometer

As compared to the mercury barometer, the Aneroid barometer uses aneroid cell and mechanical movements for atmospheric pressure measurements instead!

How it works:

  • Aneroid barometer consists of an aneroid cell inside
  • The aneroid cell expands/contracts when there are small changes to atmospheric pressure
  • This movement from the aneroid cell causes mechanical levers to amplify, resulting in display pointers to trigger and register as readings on the front display

MEMS Barometric Pressure Sensor

Modern-day barometer uses mems technology, making it capable of measuring atmospheric pressure in a small and flexible structure. Such barometers are the ones found applicable to smartphones and Arduino boards, such as BME280, BMP280, and the DPS310 shown above.

With such technology, the MEMS Barometric Pressure Sensor not only offer higher functionality but is capable of dynamic/static air pressure measurement. This allows for it to be a popular option for portable weather stations and Arduino projects.

How it works:

  • Contains a diaphragm that’s formed through one capacitive plate that’s in contact with the atmosphere
  • Atmospheric pressure is detected through how much the diaphragm is deformed due to resulting pressure
    • The higher the pressure, the more the diaphragm moves, which result in a higher barometer reading

How to read barometric sensor readings

Overall, be it an old barometer or new barometric pressure sensor, it should provide the same form of readings:

  • A falling barometric reading means there’s a decrease in air pressure, which often indicates there’s a higher chance of rain coming
  • An increase in barometric reading means there’s an increase in air pressure, clearing the skies and indicating cool, dry air is coming

Barometric Pressure Sensor Applications

What is a barometric pressure sensor used for you may ask? A barometric pressure sensor can be used mainly in these applications:

Weather forecast and predictions

  • Able to predict rain through seeing if there’s a rapid increase in atmospheric pressure
    • Result in better planning of outdoor activities
    • Maintaining health and well-being as many believe weather correlates to human health

Smartphone applications

  • Integrated pressure transducer sensors that detect pressure changes and converting it into an electric signal

Car Engines

  • Engine management sensor found in many vehicles
  • Located in the intake manifold towards the rear of the engine, it’s responsible for pressure, density measurement
    • This affects how a vehicle runs as different air pressures affect engine oxygen and its fuel requirement

Choosing the right barometric pressure sensor

Now that we have a clearer understanding of barometric pressure sensors, here’s what you need to consider when in the market of buying one for yourself!

What to consider Explanation
Pressure Precision Higher pressure precision allow for better sensing accuracy and reliability.
This results in a better, stable, and more accurate output.
Pressure and Temperature Range Higher pressure and temperature range allow for a wider range of sensing
If you require sensing at extreme temperatures/pressure, ensure that sensor you pick delivers the accuracy as well
Power consumption No one likes a sensor that consumes a large chunk of power, hence do consider those that consume lesser power
Ensure the sensor chosen meet your power requirements of your project as well.
Size of sensor Thankfully for most barometric pressure sensors, they are small in size, making it suitable for compact projects.
Price If you’re willing to splash the cash, there are high end barometric pressure sensors out there but may not provide the best bang for the buck
Selecting one with the best cost-to-performance ratio is highly recommend for extra savings!

Barometric Pressure Sensor Comparison available at Seeed

With the wide array of biometric pressure sensors offered, what are the differences between all of them? Here’s a comparative table that illustrates

Know what to consider when buying a barometric pressure sensor but need some recommendations to help you easily make a purchase decision?

Here are some of our favorites here at Seeed!

Seeed Barometer Selection Guide
Seeed Barometer Selection Guide

Which Barometer Sensor Is The Best For You?

SpecificationsGrove – BMP280Grove – BME280Grove – DPS310Grove – HP206C
Pressure Range300 ~ 1100hPa300 ~ 1100hPa300 ~ 1200hPa700 ~ 1100hPa
Temperature Range-40 ~ 85°C-40 ~ 85°C-40 ~ 85°C-40 ~ 85°C
Pressure Precision//± 0.002hPa (±0.02m)/
Pressure Accuracy (Absolute)± 1hPa (or ±8m)± 1hPa (or ±8m)± 1hPa (or ±8m)± 1.5hPa (or ±8m)
Pressure Accuracy (Relative)± 0.12 hPa± 0.12 hPa± 0.06 hPa± 0.06 hPa
Pressure Resolution0.18Pa0.18Pa0.06Pa0.01hPa
Humidity/0 ~ 100%//
Communication InterfaceI2C / SPII2C / SPII2C / SPII2C

1) Grove – Barometer Sensor (BMP280)

Based on the Bosch BMP280, this barometer sensor is a low cost and high precision option for barometric pressure/temperature sensing!

Want to pair use it alongside your Arduino board? This BMP280 supports both I2C/SPI communication and we provide the Arduino library to help you easily pair it up!

Its Features include:

  • High accuracy, the absolute accuracy of ±1.0 hPa for pressure measurement and ±1 accuracy for temperature measurement
  • Easy-to-use Grove Compatible Interface
  • Supports both I2C and SPI communication
  • Can be used as an altimeter with the accuracy of ±1 meter

Criteria Evaluation:

  • Pressure and temperature range
    • Pressure range: 300 – 1100 hPa
    • Temperature range: -40 to 85℃
  • Power consumption
    • 0.6 mA
  • Size of the sensor
    • 130mm x 90mm x 8.5mm
  • Price
    • $8.90

Interested to find out more about the Grove – BME280? Check out our product page for more information!

2) Grove – BME280 Temperature Humidity Barometer

Need an option that enables humidity sensing? The Grove – BME280 is the one for you!

Based on the Bosch BME280, this is a low-cost yet high precision environment sensor that not only provides a precise measurement of barometric pressure and temperature but is capable of humidity readings as well!

Want to pair use it alongside your Arduino board? This BME280 supports both I2C/SPI communication and we provide the Arduino library to help you easily pair it up!

Its features include:

  • High accuracy, the absolute accuracy of ±1.0 hPa for pressure, ±1 accuracy for temperature and ±3% for humidity
  • Easy-to-use Grove Compatible Interface
  • Supports both I2C and SPI communication
  • Can be used as an altimeter with the accuracy of ±1 mete

Criteria Evaluation:

  • Pressure and temperature range
    • Pressure range: 300 – 1100 hPa
    • Temperature range: -40 to 85℃
  • Power consumption
    • 0.4 mA
  • Size of the sensor
    • 40mm x 20mm x 15mm
  • Price
    • $17

Interested to find out more about the Grove – BME280? Check out the following resources:

3) Grove – High Precision Barometric Pressure Sensor (DPS310)

Saving what’s to be considered the best for last is the Grove – High Precision Barometric Pressure Sensor based on DPS310 by Infineon!

Running on DPS310, it allows for high accuracy sensing with low current consumption, making it suitable for building a barometric pressure sensor drone!

Not only that, it comes with our Grove IIC port, where you can just plug it into the Seeeduino or Arduino+Base shield. Allowing for no wiring, no soldering at ALL!

To better showcase its benefits, here are its features:

  • High-Pressure Precision: ± 0.002 hPa (or ±0.02 m)
  • High Pressure Accuracy: ± 0.06 hPa (or ±0.5 m)-Relative; ± 1 hPa (or ±8 m)-Absolute
  • Wide Range: Pressure: 300 –1200 hPa; Temperature: -40 – 85 °C.
  • Easy to Use: Grove IIC (with interrupt) / SPI 
    Low power consumption

Criteria Evaluation:

  • Pressure and temperature range
    • Pressure range: 300 – 1200 hPa
    • Temperature range: -40 to 85℃
  • Pressure Precision
    • ± 0.002 hPa (or ±0.02 m)
  • Power consumption
    • 1.7 µA (pressure measurement)
    • 1.5 µA (temperature measurement)
  • Size of the sensor
    • 2.0mm x 2.5mm x 1.0mm (DPS310, not actual module size)
  • Price
    • $5.90

Interested to find out more about the Grove – High Precision Barometric Pressure Sensor (DPS310)?
Check out our product page for more information!

Barometric Pressure Sensor Arduino Guide

For this Arduino Guide, we’ll be using the Grove – BME280 as it’s the more commonly known Barometric pressure sensor although the DPS310 is the best cost-effective option!

What do you need?

  • Seeeduino is Seeed’s very own Arduino, built with advantages over the regular Arduino board

Hardware Configurations:

  • Step 1: Connect Grove-Barometer Sensor-BME280 to port I2C of Grove-Base Shield
    • You can opt to directly connect the BME280 to Seeeduino as well
  • Step 2: Plug Grove – Base Shield into Seeeduino
  • Step 3: Connect Seeeduino to PC via a USB cable

It should look something like this after the above steps:

Software configurations:

  • Step 1: Download the Library and example code from Github
  • Step 2: Refer How to install library to install library for Arduino
  • Step 3. Create a new Arduino sketch and paste the codes below to it or open the code directly by the path: File -> Example ->Barometer_Sensor->Barometer_Sensor

Here’s the code:

/*
 * bme280_example.ino
 * Example sketch for bme280
 *
 * Copyright (c) 2016 seeed technology inc.
 * Website    : www.seeedstudio.com
 * Author     : Lambor
 * Create Time:
 * Change Log :
 *
 * The MIT License (MIT)
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
#include "Seeed_BME280.h"
#include <Wire.h>

BME280 bme280;

void setup()
{
  Serial.begin(9600);
  if(!bme280.init()){
    Serial.println("Device error!");
  }
}

void loop()
{
  float pressure;

  //get and print temperatures
  Serial.print("Temp: ");
  Serial.print(bme280.getTemperature());
  Serial.println("C");//The unit for  Celsius because original arduino don't support speical symbols

  //get and print atmospheric pressure data
  Serial.print("Pressure: ");
  Serial.print(pressure = bme280.getPressure());
  Serial.println("Pa");

  //get and print altitude data
  Serial.print("Altitude: ");
  Serial.print(bme280.calcAltitude(pressure));
  Serial.println("m");

  //get and print humidity data
  Serial.print("Humidity: ");
  Serial.print(bme280.getHumidity());
  Serial.println("%");

  delay(1000);
}
  • Step 4: Upload the code. If you do not know how to upload the code, please check how to upload code
  • Step 5: Open the serial monitor to receive the sensor’s data including temperature, barometric pressure value, altitude, and humidity

Summary

Despite the popularity of the Bosch series BMP barometer sensors, one shouldn’t overlook the DPS310, a cheaper and arguably better option based on the earlier comparative table.

If you’re looking to get started with environmental sensing with a Barometric pressure sensor, pick up the
Grove – High Precision Barometric Pressure Sensor (DPS310) and test out its capabilities yourself!

For project ideas to help you get started, you can check out the Barometric Pressure Sensor Projects on our Seeed Project Hub as well!

About Author

Calendar

December 2019
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031