Barometer in Mobile Devices: What It Is, Types, and How It Works

Author: IT Sectr Published: 2026-03-22 Reading time: 9 min

A barometer in a smartphone is a MEMS sensor that measures atmospheric pressure for altitude determination and weather forecasting. Modern barometers record pressure in the range of 300 to 1100 hPa with an accuracy of 1 hPa, which corresponds to an altitude error of less than 1 meter. According to Bosch Sensortec BMP580, 2024, the absolute accuracy of modern pressure sensors is ±0.5 hPa, allowing altitude determination with an accuracy of 0.4 meters.

Key Takeaways

  • Barometer — an absolute pressure MEMS sensor measuring atmospheric pressure from 300 to 1100 hPa.
  • Altimeter uses the barometric formula: every 8 meters of ascent reduces pressure by approximately 1 hPa.
  • Android API provides Sensor.TYPE_PRESSURE for getting current pressure in hPa (millibars).
  • Calibration of the barometer happens automatically — the sensor requires no gestures or user actions.
  • FCC requirements in the USA require manufacturers to install barometers in smartphones for accurate location determination during emergency calls.

What Is a Barometer in a Smartphone

Barometer in a mobile phone is a miniature absolute pressure sensor based on MEMS technology (Micro-Electro-Mechanical Systems). It measures atmospheric pressure in hectopascals (hPa), equivalent to millibars. The first mass-market smartphone with a barometer — Samsung Galaxy Note 2 (2012) — started the trend of integrating the sensor into flagship devices.

Technical Specifications of Modern Barometers

Market leaders are Bosch Sensortec (BMP series) and STMicroelectronics (LPS series). A typical BMP580 sensor measures 2.0×2.0×0.7 mm, consumes 1.3 µA in low-power mode, and has a range of 300–1250 hPa. Relative accuracy is ±0.08 hPa, allowing altitude changes of 0.7 meters to be detected. According to the BMP580 Datasheet (2024), noise level does not exceed 0.2 Pa.

ParameterValue
Range300–1250 hPa
Absolute Accuracy±0.5 hPa
Relative Accuracy±0.08 hPa
Power Consumption1.3 µA (low power)
Size2.0×2.0×0.7 mm
InterfaceI²C / SPI

Why a Barometer in a Phone

The main function is refining altitude in navigation. In the USA, the Federal Communications Commission (FCC) has recommended since 2015 that smartphones be equipped with barometers to improve location accuracy during emergency 911 calls — vertical accuracy saves lives in multi-story buildings.

How a MEMS Barometer Works

At the heart of a MEMS barometer is a silicon diaphragm 1–3 microns thick that flexes under atmospheric pressure. The diaphragm is integrated with a vacuum cavity — a reference pressure. Capacitive or piezoresistive methods are used to measure the deflection.

Capacitive Measurement Principle

In capacitive sensors (Bosch BMP), the diaphragm acts as a movable capacitor electrode. When pressure changes, the gap between the diaphragm and the fixed electrode changes by 0.1–1 nm, causing a capacitance change of 5–50 fF. A C/V conversion circuit (capacitance-to-voltage) amplifies the signal to a level sufficient for a 24-bit ADC.

Temperature Compensation

MEMS barometers contain an integrated temperature sensor because gas pressure directly depends on temperature according to the law P = ρRT. Without compensation, a 1 °C temperature change causes an error of 0.1 hPa — equivalent to 0.8 meters of altitude. Modern sensors use calibration coefficients stored in OTP memory (One-Time Programmable) for digital correction in the range from -40 to +85 °C.

Barometer vs GPS for Altitude Determination

GPS determines altitude based on satellite signal trilateration — vertical error is 10–30 meters due to satellite geometry and ionospheric delays. Barometer provides altitude with an accuracy of 0.5–1 meter using the barometric formula. In scenarios with limited sky view (urban canyons, indoors), GPS may be unavailable — the barometer always works.

Barometric Formula

Altitude is calculated using the formula: h = (T₀ / L) × (1 − (P / P₀)^(R×L / g)), where T₀ is the temperature at sea level, L is the temperature gradient, P is the measured pressure, P₀ is the sea level pressure. Simplified: a pressure change of 1 hPa corresponds to approximately 8.4 meters at low altitudes. Accurate calculation requires weather station data for P₀.

Hybrid Approach

Modern navigation systems (Google Maps, Yandex Maps) use a hybrid algorithm: GPS provides absolute altitude with an error of 15 meters, the barometer provides relative change with an accuracy of 0.5 meters. A Kalman filter combines both signals, outputting altitude with an accuracy of 1–3 meters in real time.

kotlin
data class BaroReading(
    val pressure: Float,
    val altitude: Float
)

private val P0_SEA_LEVEL = 1013.25f

fun calculateAltitude(pressure: Float): Float {
    return SensorManager.getAltitude(
        P0_SEA_LEVEL, pressure
    )
}

fun calibratePressure(
    gpsAltitude: Float, baroPressure: Float
): Float {
    // P0 calibration by GPS altitude
    val expectedPressure = P0_SEA_LEVEL *
        Math.pow(1f - (0.0065f * gpsAltitude) / 288.15f, 5.255f)
            .toFloat()
    return P0_SEA_LEVEL * baroPressure / expectedPressure
}

Working with the Barometer in Android

Android provides access to the barometer via Sensor.TYPE_PRESSURE. Data is returned in hectopascals (hPa), equivalent to millibars. A typical value at sea level is about 1013.25 hPa. The sensor belongs to the category of Environmental Sensors — it does not require user calibration and works immediately after initialization.

Registration Features

The barometer does not require a high polling rate — SENSOR_DELAY_UI (67 ms) or SENSOR_DELAY_NORMAL (200 ms) are perfectly sufficient. Atmospheric pressure changes slowly, at most 0.5–1 hPa per hour with weather changes or 1–2 hPa per minute when moving in an elevator. Excessive frequency only drains the battery.

kotlin
class BarometerActivity : AppCompatActivity() {

    private val sensorManager by lazy {
        getSystemService(SENSOR_SERVICE) as SensorManager
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val barometer = sensorManager
            .getDefaultSensor(Sensor.TYPE_PRESSURE)
        barometer?.let { sensor ->
            sensorManager.registerListener(
                this, sensor,
                SensorManager.SENSOR_DELAY_NORMAL
            )
        }
    }

    override fun onSensorChanged(event: SensorEvent) {
        val pressure = event.values[0]
        val altitude = SensorManager
            .getAltitude(1013.25f, pressure)
        updateUI(pressure, altitude)
    }
}

Checking Sensor Availability

Not all Android devices have a barometer — the sensor is absent in budget models and many mid-range devices. Before use, check availability via PackageManager.hasSystemFeature(PackageManager.FEATURE_SENSOR_BAROMETER) or through sensorManager.getDefaultSensor(Sensor.TYPE_PRESSURE) — returning null means the sensor is absent.

Using the Barometer in Mobile Apps

The barometer is used in a wide range of applications — from meteorology to sports trackers and indoor navigation. The WeatherPro app uses barometer data to build a 24-hour pressure chart, allowing weather changes to be forecast 6–12 hours ahead with up to 80% accuracy.

  • Floor-level Navigation — in shopping malls and airports, the barometer detects floor changes by pressure variation. When ascending 3 meters, pressure drops by 0.35 hPa.
  • Fitness Trackers — floor counting and vertical elevation gain. The Strava app uses the barometer to calculate climb gradients in bike rides.
  • Weather Stations — barometer apps show current pressure and build forecasts. A sharp drop of 3–5 hPa in 3 hours indicates an approaching cyclone.
  • Drones and Robotics — altitude stabilization for drones connected to a smartphone, or mobile robots in environments with elevation changes.

Weather Impact on Barometer Readings

During weather changes, atmospheric pressure changes by 1–3 hPa over 6–12 hours. An anticyclone (high pressure area) gives readings of 1020–1040 hPa, a cyclone (low pressure) — 970–1010 hPa. These changes must be considered when calculating altitude: if yesterday the sea level pressure was 1013 hPa, and today it is 1025 hPa, the altitude determination error without P₀ correction will be about minus 100 meters. Modern navigation apps get reference pressure P₀ via the internet from the nearest weather station.

Barometer and Indoor Positioning

In shopping malls and airports, the barometer is used to determine which floor the user is on. The pressure difference between floors of a typical building (floor height 3–4 meters) is 0.35–0.5 hPa — enough for reliable detection. Combining the barometer with Wi-Fi trilateration, indoor navigation determines location with an accuracy of up to 5 meters.

Future of Barometers

A new generation of waterproof barometers (Infineon DPS368, 2024) withstands submersion up to 10 meters and has an accuracy of ±0.05 hPa. The development of MEMS technology is bringing barometers closer to the accuracy of quartz standards — it is expected that by 2027 the typical error will decrease to ±0.2 hPa.

Frequently Asked Questions

Is there a barometer in my phone?

You can check using Sensor Test apps from Google Play. A barometer is present in all flagship Samsung Galaxy S and Note smartphones (starting from S3), Google Pixel (all models), iPhone 6 and newer. In budget models, the sensor is usually absent.

How does a barometer determine altitude?

Using the barometric formula: atmospheric pressure decreases with altitude. At sea level, pressure is 1013.25 hPa, at an altitude of 500 meters — about 955 hPa. Every 8.4 meters of ascent reduces pressure by approximately 1 hPa. For accuracy, calibration against the nearest weather station is needed.

Can a barometer be used for weather prediction?

Yes, in weather station apps. A sharp pressure drop of 3–5 hPa in 3 hours indicates an approaching cyclone and worsening weather. Rising pressure is a sign of improvement. However, accurate forecasting requires meteorological service data.

Do I need to calibrate the barometer in my phone?

No — calibration happens automatically. Manufacturers program calibration coefficients at the factory. However, if you live at an altitude of 1000+ meters above sea level, it is worth setting the reference pressure in the navigation app for better accuracy.

How often should I poll the barometer in my app?

SENSOR_DELAY_NORMAL (200 ms) is optimal — atmospheric pressure changes slowly. For tracking elevator movement, 200 ms is sufficient. Excessive frequency (FASTEST) provides no advantage but increases power consumption by 20–30%.

Summary

  • Barometer — an absolute pressure MEMS sensor with ±0.5 hPa accuracy for altitude determination and weather forecasting.
  • Silicon diaphragm with capacitive or piezoresistive measurement provides sensitivity down to 0.2 Pa.
  • Barometer is more accurate than GPS for vertical positioning: 0.5–1 m vs 10–30 m for satellite navigation.
  • Android API — Sensor.TYPE_PRESSURE with data in hPa, no user calibration required.
  • Hybrid navigation combines GPS and barometer via a Kalman filter for 1–3 meter altitude accuracy.
  • Applications include floor-level navigation, fitness trackers, weather stations, and drone stabilization.
  • New generations of waterproof barometers achieve ±0.05 hPa accuracy with a 2×2 mm size.

We will develop a mobile application turnkey

IT Sectr creates iOS and Android applications for startups and businesses since 2017. We will advise you and propose the best solution.

Discuss the project

Read also