Arduino Projects

Pressure Sensor Working, Types, BMP280 and SKU237545 Pressure sensor with Arduino

Pressure Sensor:

A Pressure sensor is a device that measures a physical quantity and translates it into a signal. We commonly measure the pressure of liquid air and gases amongst other things. The standard unit of pressure is the pascal. One pascal is equal to one newton per meter squared pressure sensors are used in everything from roads to machinery, to vehicles, to laboratories and weaponry. A pressure sensor takes the input value from the environment and monitors this pressure and can display it in one of the several units around the world. This is commonly called pascal, bar, PSI, or pounds per square inch in the United States. The pressure of the air in the tire is a great example of pressure and how it is measured. As we air the tire up the force that it exerts on the tire increases, causing the tire to inflate. This is monitored with a pressure sensor inside the tire on the newer vehicles.

Pressure sensor working:

In the net shell it converts the pressure into a small electrical signal that is transmitted and display. They are also commonly called pressure transmitters because of this. Two common signals that are used in a 4 to 20 milli amps signal and a 0 to 5 V signal. Most of the pressure sensor works on the piezoelectric effect. This is when a material creates an electrical charge in responses to stress. The stress is usually pressure but can be twisting, bending or vibration. The pressure sensor detects the pressure and can be used to indirectly measure flow, speed, water level and altitude and can determine the amount of pressure by measuring the electric charge. Pressure sensors needs to be calibrated. It convert the voltage to pressure because for every value of voltage there is pressure value. This is basic zero and spin calibration or minimum and maximum which is common job for maintenance personnel.

Amazon Purchase Links:

12v Adaptor:

Arduino Uno

Arduino Nano

Mega 2560:

BMP280

SKU237545 Pressure sensor

Other Tools and Components:

Super Starter kit for Beginners

Digital Oscilloscopes

Variable Supply

Digital Multimeter

Soldering iron kits

PCB small portable drill machines

*Please Note: These are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!


Sensor calibration and why it is important:

We can measure different types of pressure with the pressure sensors. There are three common types of pressure which we use in the industry:

Gauge pressure:

This pressure is measured in reference with the atmospheric pressure which is typically 14.7 PSI. It will show positive pressure when it is above the atmospheric pressure and is negative when it is below the atmospheric pressure.

Absolute Pressure:

This is the pressure as measured against absolute vacuum or relative to the vacuum of the space. A full vacuum have an absolute pressure of 0 PSIa and increase from there If we need to read a pressure that is lower than atmospheric pressure  this is the type of sensor we would use.

Differential pressure: 

This is exactly what it sounds like the difference between the two pressures. A pressure is being measured and a reference pressure in industry pressure sensors are used for a wide variety of processes.

Some common uses are to measure the pressure of steam and relatively in expensive sensors used for coarse measurement . Steam is commonly used to heat many processes in manufacturing facilities such as industries where the steam is used for generation of energy. We can use the pressure sensor for multiple purposes. First and most obvious is to observe and monitor the pressure by connecting plc with the scada we can monitor the pressure.

Another purpose is to control when and where the steam can flow and regulate its pressure. The pressure sensor can be used to measure the pressure of the steam can build up a pressure in a vessel and becomes dangerous in industries where steam is used for generation of energy. This process of open and closing the valve can be done with the help of simple programming in the PLC where we will do ladder logic programming. Many industries used Pressure sensors with filters. If the filer begins to clog the flow will decrease. As the flow of the liquid decreases pressure can increases or decreases depending on which side of the filter is monitored. If we monitor the pressure it will gives us simple indication that the filter is clogged and needs to be cleaned or replaced. A common use that is not obvious is the use of pressure sensor as a level sensor. In an open tank we can use the hydrostatic pressure that is measure at the sensor. By doing some calculation we can determine how much of liquid is in the tank if we know the size of the tank and specific gravity.

If the tank is closed it is not as simple of an installation it is still viable option though. This will require at least two sensors which will be installed at the top and bottom of the tank to measure differential pressure. The pressure sensor will be located at the bottom of the tank measuring the liquid pressure and the low pressure sensor near the low pressure sensor near the top measuring the air pressure inside.  Liquid in the tank can be determined by the mathematical calculation.



Pressure sensor technologies:

  • Potentiometric Pressure sensor
  • Capacitive pressure sensor
  • Inductive Pressure sensor
  • Strain gauge pressure sensor
  • Piezoelectric gauge sensor
  • Variable reluctance Pressure sensor

Potentiometric Pressure sensor:

This type of sensor use bourdon tube, capsule or bellows to drive a wiper arm on a resistive element.

Advantage:

This sensor is relative inexpensive sensors use for coarse measurement.

Disadvantage:

  • Reliability and errors
  • Low performance

Inductive pressure sensor:

This type of sensor uses the LVDT of a moving core to vary the inductive coupling between the transformer primary and secondary.

Advantage:

  • Withstand harsh environmental condition
  • Longer life

Disadvantage:

  • Very low frequency response
  • Require filtering if a DC output is desired

Capacitive pressure sensor:

In this sensor the applied pressure causes the diaphragm to deflect and the capacitance to change.

Advantages:

  • Accuracy
  • Durability

Disadvantages:

  • Sensitive to temperature and capacitance
  • Low frequency response
  • Larger in size

Piezoelectric pressure sensor:

This is bidirectional transducers capable of converting stress into an electric potential and vice versa. It consist of metallized quartz or ceramic materials.

Advantages:

  • Small
  • High frequency response
  • Low displacement

Disadvantage:

  • Long term stability
  • Sensitivity to temperature


Strain gauge pressure sensor:

When silicon is deformed by applied stress the resistance changes. This is called the piezoelectric effect.

Advantages:

  • Fast response time
  • Temperature compensation
  • Accuracy

Disadvantages:

  • Unable to provide lower range
  • Low level outputs
  • Long term drift

Variable reluctant pressure sensor:

A magnet circuit is formed and pressure causes a mechanical defection of diaphragm.

Advantages:

  • Can be used to measure gases as well as liquids
  • Rugged and reliable under high stress
  • Withstand extreme temperature and harsh media
  • High output at all pressure

Disadvantages:

  • Relatively larger size
  • Needs signal amplification

BMP280 Pressure Sensor:

BMP280 is barometric pressure and temperature sensor. There are two types of BME sensors in which first one have six pins in which CSD and SDO is in extra pins and second one has only four pins in which Vcc, Gnd, SCL and SDA pins. So we will learn about both the sensors. There is small metallic chip on the module which has the ability to measure the temperature and pressure. BME280 bosch chip sensor

Typical applications

  • Weather forecast
  • Enhancement of GPS navigation (e.g. time-to-first-fix improvement, dead-reckoning, slope detection)
  • Indoor navigation (floor detection, elevator detection)
  • Outdoor navigation, leisure and sports applications
  • Vertical velocity indication (e.g. rise/sink speed)
  • Health care applications (e.g. spirometry)

Target devices

  • Flying toys
  • Handsets such as mobile phones, GPS devices tablet, PCs
  • Navigation systems
  • Portable health care devices
  • Home weather stations
  • Watches


Functional description:

The BMP280 consists of a a mixed-signal ASIC and Piezo-resistive pressure sensing element. The ASIC performs the conversion with the help of A/D which will convert the analogue signal into digital.

BMP280 provides highest flexibility to the designer and can be adapted to the requirements regarding measurement time, accuracy and power consumption by selecting from a high number of possible combinations of the sensor settings.

BMP280 work in three modes:

  • normal mode
  • sleep mode
  • forced mode

In sleep mode, no measurements are performed the sensor will not work mean it will be in off state. Normal mode the sensor will work between the active and inactive standby period. A single measurement is performed is forced mode. The sensor will be return to sleep mode when the measurement is finished.

A set of oversampling settings is available ranging from ultra low power to ultra high resolution setting in order to adapt the sensor to the target application. The settings are predefined combinations of pressure measurement oversampling and temperature measurement oversampling. Pressure and temperature measurement oversampling can be selected independently from 0 to 16 times oversampling.

  • Standard resolution
  • Temperature measurement
  • High resolution
  • Ultra low power
  • Low power
  • Ultra high resolution

BMP280 consists of IIR filter which will help in to minimize the disturbance in the signal the filter coefficient rang is from 0 to 16.

BMP is known as a barometer original sensor it measures the absolute pressure of the air around it. It has measuring range from 300 to 1100 HPa with an accuracy of 0.02HP the bmp 180 sensor communicates via i2c interface this  means that it communicates with Arduino with only to pins SDA and SEL now. Lets interface the BMP180 sensor we will download the library for the sensor.

BMP280 Pressure Sensor interfacing with Arduino:

Now we will connect BMP280 sensor with the Arduino we will connect the vcc of the sensor with the 5V of Arduino ground of the sensor with the ground of the Arduino module. SCL pin of the sensor with the analogue A5 of the Arduino and SDL pin of the sensor with the analogue pin A4 of the Arduino.

Pressure Sensor

To interface this sensor with the Arduino we will first import the library for the sensor in the Arduino software. The output of the sensor can be monitor through serial monitor.


BMP280 Pressure Sensor Arduino Code:

#include <SFE_BMP180.h>
#include <Wire.h>

// You will need to create an SFE_BMP180 object, here called "pressure":

SFE_BMP180 pressure;
#define ALTITUDE 1655.0 // Altitude of SparkFun's HQ in Boulder, CO. in meters

void setup()
{
  Serial.begin(9600);
  Serial.println("REBOOT");

  // Initialize the sensor (it is important to get calibration values stored on the device).

  if (pressure.begin())
    Serial.println("BMP180 init success");
  else
  {
    // Oops, something went wrong, this is usually a connection problem,
    // see the comments at the top of this sketch for the proper connections.

    Serial.println("BMP180 init fail\n\n");
    while(1); // Pause forever.
  }
}

void loop()
{
  char status;
  double T,P,p0,a;

  // Loop here getting pressure readings every 10 seconds.

  // If you want sea-level-compensated pressure, as used in weather reports,
  // you will need to know the altitude at which your measurements are taken.
  // We're using a constant called ALTITUDE in this sketch:
  
  Serial.println();
  Serial.print("provided altitude: ");
  Serial.print(ALTITUDE,0);
  Serial.print(" meters, ");
  Serial.print(ALTITUDE*3.28084,0);
  Serial.println(" feet");
  
  // If you want to measure altitude, and not pressure, you will instead need
  // to provide a known baseline pressure. This is shown at the end of the sketch.

  // You must first get a temperature measurement to perform a pressure reading.
  
  // Start a temperature measurement:
  // If request is successful, the number of ms to wait is returned.
  // If request is unsuccessful, 0 is returned.

  status = pressure.startTemperature();
  if (status != 0)
  {
    // Wait for the measurement to complete:
    delay(status);

    // Retrieve the completed temperature measurement:
    // Note that the measurement is stored in the variable T.
    // Function returns 1 if successful, 0 if failure.

    status = pressure.getTemperature(T);
    if (status != 0)
    {
      // Print out the measurement:
      Serial.print("temperature: ");
      Serial.print(T,2);
      Serial.print(" deg C, ");
      Serial.print((9.0/5.0)*T+32.0,2);
      Serial.println(" deg F");
      
      // Start a pressure measurement:
      // The parameter is the oversampling setting, from 0 to 3 (highest res, longest wait).
      // If request is successful, the number of ms to wait is returned.
      // If request is unsuccessful, 0 is returned.

      status = pressure.startPressure(3);
      if (status != 0)
      {
        // Wait for the measurement to complete:
        delay(status);

        // Retrieve the completed pressure measurement:
        // Note that the measurement is stored in the variable P.
        // Note also that the function requires the previous temperature measurement (T).
        // (If temperature is stable, you can do one temperature measurement for a number of pressure measurements.)
        // Function returns 1 if successful, 0 if failure.

        status = pressure.getPressure(P,T);
        if (status != 0)
        {
          // Print out the measurement:
          Serial.print("absolute pressure: ");
          Serial.print(P,2);
          Serial.print(" mb, ");
          Serial.print(P*0.0295333727,2);
          Serial.println(" inHg");

          // The pressure sensor returns abolute pressure, which varies with altitude.
          // To remove the effects of altitude, use the sealevel function and your current altitude.
          // This number is commonly used in weather reports.
          // Parameters: P = absolute pressure in mb, ALTITUDE = current altitude in m.
          // Result: p0 = sea-level compensated pressure in mb

          p0 = pressure.sealevel(P,ALTITUDE); // we're at 1655 meters (Boulder, CO)
          Serial.print("relative (sea-level) pressure: ");
          Serial.print(p0,2);
          Serial.print(" mb, ");
          Serial.print(p0*0.0295333727,2);
          Serial.println(" inHg");

          // On the other hand, if you want to determine your altitude from the pressure reading,
          // use the altitude function along with a baseline pressure (sea-level or other).
          // Parameters: P = absolute pressure in mb, p0 = baseline pressure in mb.
          // Result: a = altitude in m.
          a = pressure.altitude(P,p0);
          Serial.print("computed altitude: ");
          Serial.print(a,0);
          Serial.print(" meters, ");
          Serial.print(a*3.28084,0);
          Serial.println(" feet");
        }
        else Serial.println("error retrieving pressure measurement\n");
      }
      else Serial.println("error starting pressure measurement\n");
    }
    else Serial.println("error retrieving temperature measurement\n");
  }
  else Serial.println("error starting temperature measurement\n");

  delay(5000);  // Pause for 5 seconds.
}



SKU237545 Pressure sensor:

SPECIFICATIONS

Typical Supply Voltage (VCC) 5VDC

Output Voltage Range 0.5 – 4.5VDC

Accuracy 1.5%

Response time ≤ 2.0ms

Current Draw ≤ 10mA

This sensor consists of three wires black, yellow and red wire. Where the red wire is connected with voltage source the black wire is connected with the ground the yellow wire is connected to the analogue pin which will be used for the measurement.

SKU237545 Pressure sensor Interfacing with Arduino:

Now we will connect the sensor with the Arduino module such that we will connect the red wire with the 5V source and the black wire the ground and yellow wire with the analogue pin A0  which through serial monitor we can view the value of the pressure sensor.

Pressure Sensor

Pressure Sensor SKU237545 Arduino Code:

void setup() {
    Serial.begin(9600);
}
 
void loop(){
int sensorVal=analogRead(A1);
Serial.print("Sensor Value: ");
Serial.print(sensorVal);

float voltage = (sensorVal*5.0)/1024.0;
    Serial.print("Volts: ");
    Serial.print(voltage);
   
  float pressure_pascal = (3.0*((float)voltage-0.47))*1000000.0;
  float pressure_bar = pressure_pascal/10e5;
    Serial.print("Pressure = ");
    Serial.print(pressure_bar);
    Serial.println(" bars");
    Serial.print("Pressure = ");
    
    delay(100);
}

Alps alpine pressure Sensors:

Alps alpine has strong reputation for designing and manufacturing high quality pressure sensors for electronics these sensors can detect different types of pressure such as air pressure or loads which then converted into electrical signal we are here to help you to understand some basic concepts for alps alpine pressure sensor which are of different types:

  • Atmospheric pressure sensing
  • Water pressure sensing
  • Load sensing

These products have similar sensing principles. We will first focus on the sensing principles behind alps alpine air and water pressure sensors. Alps alpine sensors having:

  • Absolute pressure sensor
  • Water proof structure
  • Low current
  • Low power consumption

Alps alpine pressure sensors are used in variety of applications:

  • Dive watches
  • Smart watches
  • Smart sensors
  • Cameras
  • Fitness trackers
  • Drones


Types of pressure sensors:

Electronic:

  • Semiconductor piezo resistive type
  • Semiconductor thin film type
  • Metal thin film type which use metal string gauge
  • Capacitive type which detects change in capacitance

Mechanical:

  • Bourdon type
  • Fabry perot type

Four piezo resistive elements are placed at points in each direction along intersecting perpendicular axises on a diaphragm that bends when pressure is applied when the diaphragm bends the piezo resistive elements also strain causing a change in resistance in a bridge circuit and in the output voltage with this method we can convert into electrical signal.

Pressure Sensor

Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button