This is applied in the MCU code as a series of operations so the MCU does not have to apply the equation directly. The
following is a possible sequence for the calculation Pcomp, the trimmed pressure output. Input values are in bold.
c11x1 = c11 * Padc
a11 = b1 + c11x1
c12x2 = c12 * Tadc
a1 = a11 + c12x2
c22x2 = c22 * Tadc
a2 = b2 + c22x2
a1x1 = a1 * Padc
y1 = a0 + a1x1
a2x2 = a2 * Tadc
Pcomp = y1 + a2x2
Note that the Altitude measurement displayed for the MPL115A cannot be directly compared to the previous section on the
MPXM2102A. The MPL115A has an internal 10-bit ADC, with an accuracy of ±1kPa. The system set up on the
DEMOAPEXSENSOR for the MPXM2102A shows less than 1m resolution with a 24-bit ADC. The additional hardware cost,
digital and analog noise filtering, and calibration required is substantial compared to implementing the MPL115A directly to an
MCU. The value of the altitude changes constantly on the display, but it is also a raw conversion. It could be filtered, sampled in
longer intervals etc. to give the illusion of a more stable value. Here it is shown simply to get an idea of the raw conversion result.
The MPL115A can be used to measure changes in vacuum or for barometric pressure rather than the MPXM2102A.
In the Quick Start Guide there is a section to set a threshold above the current barometric pressure for an alarm. When the
alarm is set, the status LEDs will light up green. After the alarm threshold is reached, the red LED toggles on/off while a buzzer
is sounded. This can be activated via waiting for a pressure change, or applying pressure to the DEMOAPEXSENSOR. A clear
Ziploc bag or syringe with a soft applicator tip useful in activating the alarm.
Weather Station Implementation
Freescale application note, AN3914, details altimetry and barometric weather systems and also includes code examples from
the DEMOAPEXSENSOR. There are two sections in the APEX board; a simple weather station or an advanced method. The
simple method does a comparison by asking the user to input their known altitude, and comparing this pressure to that of the
MPL115A. The delta in the value is compared in the Table 7.
Table 7.
Analysis
Output
dP > +0.25 kPa
Sun Symbol
-0.25 kPa < dP < 0.25 kPa
dP < -0.25 kPa
Sun/Cloud Symbol
Rain Symbol
This is typical of a simple application and the APEX simulates a desktop barometer that is commonly bought at retailers.
A more advanced version of this calculates the pressure change by taking values over time and seeing the delta change over
a 3 hour period. This is outlined in Table 8 (AN3914).
Table 8. Advanced Weather Determination
Analysis
dP/dt > 0.25 kPa/h
Output
Quickly rising High Pressure System, not stable
Slowly rising High Pressure System, stable good weather
Stable weather condition
0.05 kPa/h < dP/dt < 0.25 kPa/h
-0.05 kPa/h < dP/dt < 0.05 kPa/h
-0.25 kPa/h < dP/dt < -0.05 kPa/h
dP/dt < -0.25 kPa/h
Slowly falling Low Pressure System, stable rainy weather
Quickly falling Low Pressure, Thunderstorm, not stable
AN3956
Sensors
Freescale Semiconductor
16