background image

AN4159

Pressure sensor demonstration boards

Doc ID 023639 Rev 3

5/27

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. 

Summary of Contents for LPS331AP

Page 1: ...idelines 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 www st com ...

Page 2: ...uencing 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 One shot mode measurement sequence 11 5 1 2 Power optimization and estimation 12 6 Software 14 6 1 Device register list 14 6 2 Hints 14 6 2 1 One shot mode conversion time estimation 15 6 2 2 Reference S W to get started with LPS331AP 15 6 2 3 Pressure to altitude conversion 15 6 2 ...

Page 3: ...n mapping 6 Figure 4 HCLGA 16L 3x3x1 mm 6 Figure 5 LPS331AP electrical connection 8 Figure 6 Recommended land and solder mask design for LGA packages 9 Figure 7 Overview first to second order compensation 17 Figure 8 Comparison first and second order compensation at fixed pressure 18 Figure 9 High temperature lead free soldering profile 260 C max 23 Figure 10 Example of solder machine profile 23 ...

Page 4: ...erboard 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 b...

Page 5: ...oards Doc ID 023639 Rev 3 5 27 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 ...

Page 6: ...s and layout AN4159 6 27 Doc ID 023639 Rev 3 2 Hardware designing PCB schematics and layout 2 1 LPS331AP device package interconnect and polarization 2 1 1 Typical application circuit Figure 3 Pin mapping Figure 4 HCLGA 16L 3x3x1 mm V ...

Page 7: ...ded 2 2 kΩ 10 kΩto VDD_IO 7 SA0 I2C SDO SPI 4W NC SPI 3W I2C slave address select SPI 4 wire data output Not connect SPI 3 wire High VDD_IO 0xBA BB I2C slave address best Low GND_IO 0xB8 B9 I2C slave address 8 CS SPI slave select and I2C SPI mode selection 1 VDD_IO I2C mode 0 GND SPI mode 9 INT1 Interrupt 1 data ready Leave unconnected if unused 10 GND Connect to PCB ground 11 INT2 Interrupt 2 dat...

Page 8: ... 3 0 1 Pressure sensor PCB layout and solder recommendations The LPS331AP has an opening on top of the package sensor performance can be compromised by Mechanical stress coming from PCB board The whole package surface air should have minimum temperature gradient Avoid placement in long and narrow PCB area warp free area Temperature gradients non uniform rapidly changing temperature around sensor S...

Page 9: ...and balance for pad connection will help component self alignment and will lead to a better control of solder paste reduction after reflow For better performances over temperature it is strongly recommended not to place large insertion components like buttons or shielding boxes at distances less than 2 mm from the sensor Pin 1 indicator must be left unconnected to ensure proper device operation Fi...

Page 10: ... after soldering must be done to remove any possible source of leakage between pads due to flux residues The PCB soldering profile depends on the number size and placement of components on the board The soldering profile should be defined by experience more than the pressure sensor soldering profile only No solder material reflow on the side of the package is allowed since LGA packages show metal ...

Page 11: ...n LPS331AP_WriteByte LPS331AP_RES_ADDR 0x7A 0x10 0x7A Please note that 0x7A is forbidden in auto mode 25Hz 25Hz use 0x79 instead 7 Turn on the pressure sensor analog front end in single shot mode LPS331AP_WriteByte LPS331AP_CTRL_REG1_ADDR 0x84 0x20 0x84 8 Run one shot measurement Temperature and Pressure self clearing bit when done LPS331AP_WriteByte LPS331AP_CTRL_REG2_ADDR 0x01 0x21 0x01 9 Wait u...

Page 12: ...evice automatically goes stand by when measurement is completed The right compromise between consumption update speed and software filtering has to be tuned application by application Icc 1 µA Hz 48 nA Hz Pavg ODRP 32 nA Hz Tavg ODRT ODRP ODR Pressure Hz ODRT ODR Temperature Hz Pavg nPAve Pressure Average 1 2 4 512 Tavg nTAve Temperature Average 1 2 4 128 Examples 1 ODRT ODR Temperature 25 Hz ODRP...

Page 13: ...3 27 Examples 2 ODRT ODR Temperature 1 Hz ODRP ODR Pressure 1 Hz Pavg Pressure average 512 Tavg Temperature Average 64 Icc 27 6 µA When using one shot mode the current consumption is equivalent to the current consumption at 1 sample Hz during the conversion time see conversion time ...

Page 14: ...erating a START bit Table 3 Registers address map Name Type Register address Default Comment Hex Binary Reserved do not modify 00 07 0D 0E Reserved REF_P_XL R W 8 1000 0 REF_P_L R W 9 1001 0 REF_P_H R W 0 A 1010 0 WHO_AM_I R 0 F 1111 10111011 Dummy register RES_CONF R W 10 10000 11111010 Reserved do not modify 11 1F Reserved CTRL_REG1 R W 20 010 0000 0 CTRL_REG2 R W 21 010 0001 0 CTRL_REG3 R W 22 ...

Page 15: ...ssure sensor 6 2 3 Pressure to altitude conversion The simplest and widely used barometer altitude formula used in most watches come from the US Standard Atmosphere for example the 1976 edition Example of the source code is shown below void From_Pressure_mb_To_Altitude_US_Std_Atmosphere_1976_ft double Pressure_mb double Altitude_ft 1 A18 1013 25 0 190284 145366 45 Altitude_ft 1 pow Pressure_mb 101...

Page 16: ...ce the positioning noise 6 2 6 BOOT SWRESET bit The boot bit can be used when the device is enabled to reinitialize the volatile registers from internal non volatile trimming memory Follow this sequence 1 Turn on BOOT bit 2 Wait BOOT bit self clear with S W timeout 3 Wait an additional 5 msec 4 Configure the registers 5 Power up the device for normal use The SWRESET bit resets all the other regist...

Page 17: ...nges by implementing a quadratic compensation second order polynomial approximation on top of the piecewise linear PWL one by S W using the same calibration data built in the sensor registers Here we describe the basic quadratic concept assuming the T0 10 C Figure 7 Overview first to second order compensation Input parameters TCV1 TCV2 TCS1 TCS2 Dgain Constants parameter T1 480 10 42 5 LSB T2 0 LS...

Page 18: ...n 2 Step 3 linear system resolution for pwl compensation Equation 3 Coefficient straight line equation Equation 4 Since d1 d2 c the linear system resolution became Equation 5 Step 4 output pressure correction Equation 6 Figure 8 Comparison first and second order compensation at fixed pressure y1 e1 T d1 y2 e2 T d2 ...

Page 19: ...ensing element and ASIC is damaged Do a registers dump for us to do a diagnostic This feature is available on FROG LGA socket to UNICO adapter is available especially for failure analysis preliminary report A very big or negative pressure could come from bonding wire being cut by mishandling of the device bonding between sensing element and ASIC An example of C type self test function is available...

Page 20: ...in the PCB middle layer that is under the LPS331AP You can place the ground plane in the PCB middle layer under the LPS331AP but not in the plane immediately under the LPS331AP Case 4 We are going to mount the LPS331AP and the LIS3DH on an accessory The accessory is powered by coin batteries and Vdd fluctuations are possible For this device accessory we plan to use lithium coin battery CR2032 and ...

Page 21: ...e VDD is 2 8 V or higher A sample reference source code can be provided under LUA Case 6 What is a recommended way to perform a manual soldering of the LGA package Apply solder paste e g ALPHA OM 338 T on the PCB solder pads using syringe air bubble free and position the LGA accordingly then press it make sure it is flat on PCB then heat up in the over using 260C JDEC profile First remember that H...

Page 22: ... controlled temperature soldering profile that avoid peak temperature over the max JEDEC spec can reduce the accuracy shift The guideline are the same already provided in the approval sheet and keeping the temperature profile well controlled and do not exceed the max time at max temperature and if possible in the lower part of the JEDEC specification What is the absolute accuracy SPEC 0 C 0 C afte...

Page 23: ...e LPS331AP pressure sensor is not covered Case 11 What are the soldering and processing guidelines for the LPS331AP pressure sensor chip No wash Please find reflow profile Pb free IPC JEDEC standard here There are no particular processing guidelines for the pressure sensor The key things to remember are To place the pressure sensor at the edge of the pcb where warping is minimal There should be no...

Page 24: ...e example u8 LPS331AP_ActivatePressureBand u16 Threshold_mb_x16 u8 reg u8 regs 4 Warning this can only be done if the 1 point calibration HW feature is unused reg LPS331AP_ReadByte LPS331AP_CTRL_REG1_ADDR if reg 0x02 return FALSE if DIFF_EN bit is set to clear it and increase LPS331AP_Adjust_Value_Pressure_Reg by the DELTA_PRESS value LPS331AP_WriteByte LPS331AP_CTRL_REG1_ADDR reg 0x08 activate th...

Page 25: ...sure band interrupt once enabled when the pressure exceeds the threshold an interrupt will be generated What is the recommended way of updating the reference pressure Once an interrupt is generated set AUTOZERO again to reinitialize the reference pressure REF_P to the current value Q A How can I disable the differential pressure interrupt and go back to the normal mode of operation To come back to...

Page 26: ...9 Rev 3 7 Revision history Table 4 Document revision history Date Revision Changes 24 Sep 2012 1 Initial release 30 Oct 2012 2 Added Case 12 Minor text and formatting changes throughout the document 08 Nov 2012 3 Removed page 11 Power sequence ...

Page 27: ...ARRANTIES OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION OR INFRINGEMENT OF ANY PATENT COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT UNLESS EXPRESSLY APPROVED IN WRITING BY TWO AUTHORIZED ST REPRESENTATIVES ST PRODUCTS ARE NOT RECOMMENDED AUTHORIZED OR WARRANTED FOR USE IN MILITARY AIR CRAFT SPACE LIFE SAVING OR LIFE SUSTAINING APPLICA...

Reviews: