Arduino Air Pressure Measurement


                Pressure is defined as force per unit area that a fluid exerts on its surroundings. You can measure this force by detecting the amount of deflection on a diaphragm positioned inline with the fluid. Given the known area of the diaphragm, pressure can then be calculated. Pressure sensors are packaged with a scale that provides a method to convert to engineering units. The SI unit for pressure is the Pascal (N/m2), but other common units of pressure include psi, atmospheres, bars, inches of mercury, millimeters of mercury.

Pressure Measurement Methods

There are three methods for measuring pressure: absolute, gauge, and differential. Absolute pressure is referenced to the pressure in a vacuum, whereas gauge and differential pressures are referenced to another pressure such as the ambient atmospheric pressure or pressure in an adjacent vessel.

Pressure Measurement Methods
Pressure Measurement Methods

Air Pressure Measurement using MPX5010DP

The MPX5010 series piezo-resistive transducer is a state-of-the-art monolithic silicon pressure sensor designed for a wide range of applications, but particularly those employing a microcontroller or microprocessor with A/D inputs. This patented, single element transducer combines advanced micromachining techniques, thin-film metallization, and bipolar processing to provide an accurate, high level analog output signal that is proportional to the applied pressure.

MPX5010 can measure 10kPa pressure and MPX5100 can measure 100kPa (14.5psi) Pressure. It give linear output over the range as shown in figure.

Pressure Measurement Graph
Pressure Measurement Graph

MPX5010 Pinout

Pressure Sensor Pinout
Pressure Sensor Pinout









Arduino Air Pressure measurement Circuit MPX5010

Air Pressure Measurement Circuit
Air Pressure Measurement Circuit

Arduino code for air pressure measurement

  Air Pressure Measurement usning MPX5010 or MPX5100 Pressure Sensor

const float SensorOffset = 102.0;
// the setup routine runs once when you press reset:
void setup() {
  // initialize serial communication at 9600 bits per second:

// the loop routine runs over and over again forever:
void loop() {
  // read the input on analog pin 0:
  float sensorValue = (analogRead(A0)-SensorOffset)/100.0; //Do maths for calibration
  // print out the value you read:
  Serial.print("Air Pressure: ");  
  Serial.println(" kPa");
  delay(1000);        // delay in between reads for stability

Air Pressure measurement result

Open serial monitor and blow some air in pressure sensor input to see variations in pressure. This sensor can be used for water level measurement.

Arduino Pressure Measurement Result
Pressure Measurement Result


2 thoughts on “Arduino Air Pressure Measurement

Leave a Reply