Altimeter Example 2:
A GPS equipped smart-phone loses GPS signal as it enters a building. Knowing the approximate elevation with the GPS, the
beginning ‘zero point’ is 300 m. Entering the building the pressure sensor starts measuring the elevation, and tries to calculate
the height in meters.
Issues in this Example for Consideration:
• When entering a building from outside, a sudden rise in pressure is highly probable. This will send two different scenarios.
It could signify that the user has ‘fallen’ in altitude by several meters (such as jumping off a building or small cliff). Or they
have entered into a building with significant pressurized airflow (typical of an air-conditioned lobby with high air flow).
• Buildings vary on height per a floor. Lobbies of sky-rises have higher ceilings. Hotel accommodation floors tend to have
shorter standard heights. A restaurant located halfway or on top of the building may have a higher ceiling. The main point
is that the altitude in meters does not ideally correspond to floor location.
• Large buildings can be pressurized or not. It depends on building design. Some stadiums for sporting events are
pressurized to keep a fabric roof afloat. Tall high-rises have multiple stages of air-conditioning units. This leads to varied
pressure per a floor depending on that section’s on/off cycle, fan speed, or the air-tight nature of that section. Elevator
shafts also can equalize pressure, or create some pressure change as elevators move up and down.
• Smart use of Altimetry in tall buildings would use building information stored in a ‘smart’ GPS device so the altitude can
translate to floor level. This way location based services, emergency 911, etc. can know which floor the user is located.
MPL115A Miniature Barometer DEMOAPEXSENSOR
The MPL115A is a small 5 x 3 x 1.2 mm digital absolute pressure sensor. It is available in either I2C or SPI version. It has a
pressure range of 50 to 115 kPa. This narrower range is more application specific for events occurring in that altitude or in devices
requiring that pressure. In this section, the DEMOAPEXSENSOR’s implementation of the MPL115A and the information
displayed on the APEX is described.
In the Quick Start Guide section, the “Barometer Compensated Pressure Output” describes the compensated Pressure output
of the MPL115A in screen shots of the DEMOAPEXSENSOR.
Barometer Compensated Pressure Output
MPL115A2
Press ADC
Temp ADC
RawValues
6 Coefficients
Compensated Pressure
PComp =9778 kPa
Altitude = 365 m
74c0
6b40
0467
0428
ao = 3dc4
b1 = bd7a
b2 = c299
c11 = f8a0
c12 = 2flc
c22 = 0dc0
ENTER for Coefficients
Stage 1
Stage 2
Stage 3
Raw Values of Temperature
and Pressure displayed on
LCD screen.
Display of 6 coefficients listed
on LCD screen.
Display of Compensated
Pressure output in kPa units.
The MPL115A’s Implementation is described in detail in the Application Note AN3785; How to Implement the Freescale
MPL115A Digital Barometer. Essentially in the LCD screen shots above, the Raw values of Pressure and Temperature are
displayed in Hexadecimal and Decimal format. Following this, the six coefficients MSB+LSB are shown in Hex format. The
combination of this data (streamed via I2C or SPI from the MPL115A) is used at the host MCU to calculate the Pcomp value.
Using eq. 2, the altitude is calculated and shown in meters.
The Pcomp value is the compensated absolute pressure value. This value unlike the analog pressure sensors does not require
any calibration trim, or offset auto zero. The Pcomp spec for the MPL115A is such that the value has an accuracy of ± 1kPa. The
advantage is implementing the sensor and having the compensated pressure readings without any additional calibration etc. on
the customer side.
As stated in AN3785, the MCU has to apply the equation below for Pcomp given that a0, b1, b2, c11, c12, c22 are coefficients
stored in MPL115A registers. Padc and Tadc are the raw ADC values of Pressure and Temperature that are clocked out of
MPL115A digitally.
Pcomp = a0 + (b1 + cl ⋅ Padc + c12 ⋅ Tadc) ⋅ Padc + (b2 + c12 ⋅ Tadc) ⋅ Tadc
(eq. 3)
AN3956
Sensors
Freescale Semiconductor
15