Skip to main content Why Pressure Sensors Can Measure Liquid Level and Altitude | IoT Worker

Why Pressure Sensors Can Measure Liquid Level and Altitude

A pressure sensor seems to output only one thing: pressure. In engineering, that pressure is often used to infer liquid level, altitude, filter blockage, airflow, or tank state.

The first model is: a pressure sensor measures force per unit area. Liquid level, altitude, and flow-related states are model-based interpretations of that pressure.

External pressure acts on diaphragm
-> Diaphragm deforms
-> Piezoresistive or capacitive structure changes
-> Analog front end and ADC
-> Pressure output
-> Application model interprets level, altitude, or differential pressure

What Pressure Is

Pressure is force distributed over area:

P = F / A

That sounds simple, but the reference point matters. A sensor may measure pressure relative to vacuum, relative to local atmosphere, or relative to another port. The same numeric value can mean different things depending on reference.

Pressure sensors are therefore not “liquid level sensors” or “altitude sensors” by nature. They become those through a model.

How a MEMS Pressure Sensor Converts Pressure

Many MEMS pressure sensors use a diaphragm. Pressure bends the diaphragm slightly. The deformation changes a piezoresistive bridge or capacitance.

Pressure
-> diaphragm deformation
-> resistance or capacitance change
-> electrical signal

Common routes include:

  • Piezoresistive: strain changes resistor values
  • Capacitive: diaphragm distance changes capacitance

The signal is small and affected by temperature, package stress, media, and long-term drift. Practical sensors need amplification, ADC conversion, compensation, and calibration.

Absolute, Gauge, and Differential Pressure

The reference matters.

Absolute pressure is referenced to vacuum. Barometric sensors use this.

Gauge pressure is referenced to local atmosphere. Many liquid-level and pneumatic measurements use this.

Differential pressure measures the difference between two ports. It is used for filters, flow elements, sealed tanks, and HVAC.

These cannot be mixed casually. If you use an absolute sensor at the bottom of an open tank and forget to subtract atmospheric pressure, weather changes appear as level changes.

Why Pressure Can Measure Liquid Level

In a static liquid, pressure at depth is:

P = ρ * g * h

Where:

  • P is liquid pressure
  • ρ is density
  • g is gravitational acceleration
  • h is liquid height

So:

h = P / (ρ * g)

This works only when the measured pressure corresponds to the liquid column you care about. In an open tank, bottom gauge pressure can represent level. In a sealed tank, gas pressure above the liquid also contributes, so a differential measurement between bottom and top gas space is usually safer.

Density is part of the formula. Water, oil, chemical liquids, and mixtures do not all have the same ρ. Temperature can also change density. If density changes but the algorithm keeps a fixed value, the level result shifts even if the pressure reading is accurate.

Why Pressure Can Estimate Altitude

Atmospheric pressure decreases with altitude. A barometric sensor can estimate altitude from absolute pressure.

A rough near-sea-level rule is:

1 hPa ≈ 8 m

This is only an approximation. Weather systems also change pressure. A barometric altitude estimate needs reference pressure, calibration, and often filtering.

Why Differential Pressure Can Indicate Airflow and Blockage

Across a filter, duct, or flow restriction, pressure drop changes with flow and blockage. A differential pressure sensor can compare the upstream and downstream sides.

clean filter -> small pressure drop
blocked filter -> larger pressure drop

This does not mean differential pressure directly measures dust mass or flow rate. It measures pressure difference, and the device interprets that through a duct, fan, or filter model.

Temperature and Media Errors

Temperature affects diaphragm stiffness, piezoresistive coefficients, amplifier offsets, air density, liquid density, and package stress.

The medium also matters. Water, oil, steam, corrosive gas, dust, and condensate require different port and diaphragm protection. A sensor that works in clean air may fail quickly in oily water or chemical liquid.

Installation Dominates Many Errors

Pressure readings can be wrong even when the chip is good.

Common issues:

  • Pressure port blocked by dust, water, oil, or condensation
  • Tube leakage or trapped bubbles
  • Sensor mounted above the tank bottom, shifting the level zero
  • Density changes with temperature or fluid composition
  • Dynamic pressure from pumps, waves, or flow
  • Diaphragm not compatible with the fluid
  • Absolute/gauge/differential reference used incorrectly

For level, piping, outdoor, and HVAC use, port design, isolation diaphragm, tubing, drainage, and anti-condensation design often matter more than nominal chip accuracy.

For liquid level, the sensor mounting height becomes the zero point. If the sensor is mounted 10 cm above the tank bottom, it cannot measure the lower 10 cm of liquid column. If the mounting height changes, the level zero changes.

Overload and Compatibility

Pressure sensors have full-scale range, burst pressure, and overload limits. A pump surge, water hammer, freezing liquid, blocked tube, or wrong installation can overload the diaphragm.

A sensor may survive electrically but permanently shift mechanically. For real systems, range, overload protection, isolation, and drain design are part of measurement reliability.

Debugging Checklist

When pressure-derived values look wrong, check:

  • Is the sensor absolute, gauge, or differential?
  • Is the pressure port connected to the intended point?
  • Is there leakage, clogging, trapped air, or condensation?
  • Is the medium density known?
  • Is the pressure static, pulsating, or flow-induced?
  • Has the zero point moved because of installation height?

Engineering Takeaway

A pressure sensor measures pressure first. Everything else is interpretation:

Liquid level -> liquid column pressure
Altitude -> atmospheric pressure
Filter blockage -> differential pressure
Flow -> pressure drop model

Before using the reading, ask:

  • Absolute, gauge, or differential?
  • Where exactly is the pressure port?
  • Is the medium compatible?
  • Is density known?
  • Is the pressure static or dynamic?
  • Can condensation, clogging, or leakage occur?

The key sentence is:

Pressure is the first-layer measurement.
Level, altitude, and blockage are engineering interpretations built on pressure models.