AN4159
Application note
Hardware and software guidelines for use of the LPS331AP
Introduction
The LPS331AP is a digital MEMs pressure sensor with small package footprint and
enhanced digital features.
The official reference specification remains the datasheet.
Several demonstration systems supporting the LPS331AP are available.
November 2012
Doc ID 023639 Rev 3
1/27
www.st.com
Contents
AN4159
Contents
1
2
Pressure sensor demonstration boards . . . . . . . . . . . . . . . . . . . . . . . . . 4
Hardware (designing PCB schematics and layout) . . . . . . . . . . . . . . . . 6
2.1
LPS331AP device package, interconnect and polarization . . . . . . . . . . . . 6
2.1.1
Typical application circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3
Pin mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.0.1
Pressure sensor PCB layout and solder recommendations . . . . . . . . . . 8
4
PCB design rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.1
Power supply and sequencing, fail-safe I/Os . . . . . . . . . . . . . . . . . . . . . . 10
5
Using the device step-by-step, from basic to advanced . . . . . . . . . . . 11
5.1
First time bring-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.1.1
5.1.2
One shot mode measurement sequence . . . . . . . . . . . . . . . . . . . . . . . . 11
Power optimization and estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
6
Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
6.1
6.2
Device register list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Hints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
6.2.1
6.2.2
6.2.3
6.2.4
6.2.5
6.2.6
6.2.7
6.2.8
6.2.9
One shot mode conversion time estimation . . . . . . . . . . . . . . . . . . . . . . 15
Reference S/W to get started with LPS331AP . . . . . . . . . . . . . . . . . . . 15
Pressure to altitude conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Auto mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
SW filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
BOOT/SWRESET bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Absolute accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Self test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Questions and answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
7
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2/27
Doc ID 023639 Rev 3
AN4159
List of figures
List of figures
Figure 1.
Figure 2.
Figure 3.
Figure 4.
Figure 5.
Figure 6.
Figure 7.
Figure 8.
Figure 9.
Figure 10.
STEVAL-MKI120V1 LPS331AP adapter, STEVAL-MKI109V2 MEMS motherboard . . . . . . 4
STEVAL-MKI120V1 LPS331AP adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Pin mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
HCLGA-16L 3x3x1 mm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
LPS331AP electrical connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Recommended land and solder mask design for LGA packages . . . . . . . . . . . . . . . . . . . . . 9
Overview first to second order compensation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Comparison first and second order compensation at fixed pressure . . . . . . . . . . . . . . . . . 18
High temperature lead-free soldering profile 260 °C max. . . . . . . . . . . . . . . . . . . . . . . . . . 23
Example of solder machine profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Doc ID 023639 Rev 3
3/27
Pressure sensor demonstration boards
AN4159
1
Pressure sensor demonstration boards
UNICO/eMotion demonstration system: [STEVAL-MKI109V2] + [STEVAL-MKI120V1].
Figure 1.
STEVAL-MKI120V1 LPS331AP adapter, STEVAL-MKI109V2 MEMS
motherboard
The STEVAL-MKI109V2 is a motherboard designed to provide users with a complete,
ready-to-use platform for the demonstration of STMicroelectronics’ MEMS products. The
board features a DIL24 socket to mount all available adapters for both digital and analog
output MEMS devices.
The motherboard includes a high-performance 32-bit microcontroller, which functions as a
bridge between the sensor and a PC, on which it is possible to use the downloadable
graphical user interface (GUI), or dedicated software routines for customized applications.
Figure 2.
STEVAL-MKI120V1 LPS331AP adapter
The STEVAL-MKI120V1 adapter board is designed to facilitate the demonstration of the
LPS331AP product. The board offers an effective solution for fast system prototyping and
device evaluation directly within the user’s own application.
The STEVAL-MKI120V1 can be plugged into a standard DIL 24 socket. The adapter
provides the complete LPS331AP pinout and comes ready-to-use with the required
decoupling capacitors on the VDD power supply line.
4/27
Doc ID 023639 Rev 3
AN4159
Pressure sensor demonstration boards
The pinout of the adapter is fully compatible with all other available adapter boards, making
it possible to easily switch from one sensor to another during device evaluation without the
need for board redesign.
Doc ID 023639 Rev 3
5/27