By Michael Stanley -- In part 1 of this series, I introduced the MPL3115A2 Xtrinsic pressure sensor / altimeter. I promised you then that there was a lot of “good stuff” hidden under the “Digital Signal Processing and Control” block in the figure below.

 

mpl3115a2_bd_687x480-6-9-11.jpg

 


In order to optimize power/performance for your application, it’s important to understand the data path of the device in more detail. We’ll start with the expanded block diagram of just the Analog Front End (AFE) and the digital data path shown below.




Block by Block

I’ve labeled the figure to show key components of the current device configuration. We will discuss those components in order below.

  1. The AFE encompasses the core ADC block, PRT driver and sense circuitry, pre-amplification, hardware trim and anti-aliasing circuitry. The core ADC block is based on a hybrid Sigma-Delta/RSD architecture with a top resolution of roughly 17.5 bits. With a pressure measurement range of 20 to 100 kPa, that already gives us an ideal resolution of less than 1 Pascal per bit. But we can do better…
  2. Over-sampling is used to raise the resolution of the ADC result. Assuming an even noise distribution (a fair assumption in this case), we can improve our resolution by N bits by adding 22N samples and right shifting the result by N bits. The table below does the calculation for you. The MPL3115A2 can over-sample up to 2048 times, which raises our maximum ideal resolution to 23 bits.1 The amount of oversampling to be performed is controlled via OS2:OS0 bits in the CTRL_REG1 register.


  3. NOversample Ratio (22N)OS[2:0]
    2.016000
    2.532001
    3.064010
    5128011
    4.0256100
    4.5512101
    5.01024110
    5.52048111
  4. The next block in the chain performs additional linearity and offset trim operations on our oversampled sensor output. It also includes the pressure to altitude conversion functions discussed in my prior posting (Xtrinsic pressure sensor / altimeter: Part 1):

  5. Altitude = K1 X (1 – (P/P0)K2) meters (equation 1)
    where

    This block is designed to output data in one of two formats:
    It is up to the user to determine via the CTRL_REG1[ALT] bit which mode they prefer.

    • K1 = 44330.77 meters
    • K2 = 0.190263 (unitless)
    • P0 = 101325 Pascals
    • temperature & pressure
    • temperature & altitude
  6. Book-keeper functions can track:

  7. Interrupts can be issued if these changes exceed a user specified value. Additionally, the MPL3115A2 calculates:
    You can configure interrupts to be issued if measured values fall within a user-specified window of target altitude/pressure/temperature values. Alternately, you can issue interrupts when measured values cross either extreme of the window or center target value.

    It might help you to visualize these functions by considering one use case we had in mind when designing the MPL3115A2: a hiker moving up and down a series of mountain trails. That hiker may want to know when he nears some target altitude. The MPL3115A2 can be programmed to issue an interrupt to a controlling MCU when the hiker nears his goal. Notice that the host CPU could have been completely shut down during most of that hike, thereby extending battery life.

    At this point we need to consider something that we’ve studiously avoided considering until now: Equation 1 is an ideal expression relating altitude to pressure. In actuality, that relationship is literally as changeable as the wind blowing in your face as you climb that hypothetical mountain.

    • changes in altitude/pressure since last measurement
    • changes in temperature since last measurement
    • min/max values for altitude/pressure since last baseline
    • min/max values for temperature since last baseline
  8. Some deviations can be compensated for by allowing the user to specify offsets to the calculated values for temperature, pressure and altitude (via the OFF_T, OFF_P and OFF_H registers respectively).


  9. We can also be clever about how we use the sensor.

    In part 1 of this series, I showed you a chart of altitude versus pressure as given by equation 1. The modified chart below shows that the altitude versus pressure curve is reasonably linear within the range it is most likely to be used.

    [caption id="attachment_5555" align="aligncenter" width="598" caption="Idealized Altitude as a Function of Air Pressure"]pressurecurve.png[/caption]

    If we know the actual elevation at the trail head before we start our hike (think GPS coupled with mapping software), we can set the OFF_H register to baseline altitude measurements independent of the weather. The relatively linear behavior of the altitude/pressure curve means that when we set our interrupt trigger for 1500 feet above the base of the mountain, it should trigger as expected.

Other Applications

For those of you who don’t make it to the mountains very often, a more practical application might have the MPL3115A2 help to determine which floor of a high rise you’re currently on. Success in the pedestrian navigation arena will require fusing MPL3115A2 data with information from accelerometers, gyros and magnetometers, as well as studying the dynamics of high rise ventilation systems.

The pressure windowing and alarm functions may also come in handy in certain health care applications. Think assisted breathing and sleep apnea systems. Other areas targeted by the MPL3115A2 include appliances, weather stations, security devices and all the tablets, smart phones and navigation systems incorporating features like those we discussed above.

References

  1. Xtrinsic pressure sensor / altimeter: Part 1
  2. MPL3115A2 product page at freescale.com
  3. Properties of the U.S. Standard Atmosphere 1976

Footnotes

  1. Knowledgeable readers know that there is a difference between the ideal resolution of an ADC and the actual Effective Number of Bits (ENOB). Consult the MPL3115A2 datasheet for pressure noise, absolute and relative accuracy numbers.