Interfacing Your First Pressure Sensor

Application Note
XE8000EV120 Interfacing your first pressure sensor
ADVANCED COMMUNICATIONS & SENSING
PRELIMINARY
XE8000EV120 Interfacing your first pressure sensor
Application Note
© 2007 Semtech Corp.
www.semtech.com
1
Application Note
XE8000EV120 Interfacing your first pressure sensor
ADVANCED COMMUNICATIONS & SENSING
PRELIMINARY
Table of Contents
1
1.1
1.2
2
2.1
2.2
2.3
2.3.1
2.3.2
2.3.3
3
3.1
3.2
3.2.1
3.2.2
3.2.3
3.2.4
3.2.5
3.2.6
4
4.1
4.1.1
4.1.2
4.1.3
4.1.4
4.1.5
4.1.6
4.1.7
4.2
4.2.1
4.2.2
Introduction ...............................................................................................................................................4
Context ........................................................................................................................................................4
Recommended reading ...............................................................................................................................4
Pressure Sensor........................................................................................................................................4
Sensor characteristics .................................................................................................................................4
Transfer function .........................................................................................................................................5
Sensor Hardware ........................................................................................................................................5
Pin out & Schematic ....................................................................................................................................5
Connection to the SX8722 ..........................................................................................................................6
Connection to the XE8000EV120 ...............................................................................................................7
Using the evaluation board and the GUI.................................................................................................7
Configuration ...............................................................................................................................................7
Reading the sensor using the GUI ..............................................................................................................8
Default state ................................................................................................................................................8
Inputs configuration .....................................................................................................................................9
Rough gain configuration ..........................................................................................................................10
Updating the SX8722 registers .................................................................................................................10
Reading the sensor output ........................................................................................................................11
Filter configuration.....................................................................................................................................13
ZoomingADC™ configuration................................................................................................................17
Zooming on the signal ...............................................................................................................................17
Gain computing .........................................................................................................................................17
Offset cancellation.....................................................................................................................................18
Final gains configuration ...........................................................................................................................19
ADC configuration .....................................................................................................................................20
Noise cancellation .....................................................................................................................................20
Filter configuration adapted.......................................................................................................................21
LSB equivalence .......................................................................................................................................21
ZoomingADC™ Benefits ...........................................................................................................................22
Without zoom ............................................................................................................................................22
With zoom .................................................................................................................................................23
© 2007 Semtech Corp.
www.semtech.com
2
Application Note
XE8000EV120 Interfacing your first pressure sensor
ADVANCED COMMUNICATIONS & SENSING
PRELIMINARY
Table of Figures
Figure 1 Sensor transfer function.............................................................................................................................5
Figure 2 Pressure sensor pin out & equivalent schematic.......................................................................................5
Figure 3 Sensor schematic connection to the SX8722 ............................................................................................6
Figure 4 Connection on the XE8000EV120 Evaluation board .................................................................................7
Figure 5 SX8722 Default state .................................................................................................................................8
Figure 6 SX8722 “inputs” sub tab ............................................................................................................................9
Figure 7 SX8722 “PGA” sub tab configuration.......................................................................................................10
Figure 8 SX8722 registers update .........................................................................................................................10
Figure 9 Opening current configuration graphic.....................................................................................................11
Figure 10 Default configuration graphic .................................................................................................................12
Figure 11 Auto scaled default configuration graphic..............................................................................................12
Figure 12 SX8722 “Filter” sub tab configuration ....................................................................................................13
Figure 13 Auto scaled default configuration graphic with filter feature on .............................................................14
Figure 14 Zoomed out configuration graphic chart ................................................................................................15
Figure 15 Sensor actuation ....................................................................................................................................16
Figure 16 Sensor actuation shown on the graphic.................................................................................................16
Figure 17 Zooming on the signal............................................................................................................................17
Figure 18 PGA parameters ....................................................................................................................................18
Figure 19 SX8722 “PGA” sub tab final configuration .............................................................................................19
Figure 20 SX8722 “Filter” sub tab configuration for the new gain .........................................................................21
Figure 21 Signal span using rough gain setting.....................................................................................................22
Figure 22 Signal span using Zooming settings ......................................................................................................23
Table of Tables
Table 1 Sensor main characteristics ........................................................................................................................4
Table 2 ADC configuration .....................................................................................................................................20
© 2007 Semtech Corp.
www.semtech.com
3
Application Note
XE8000EV120 Interfacing your first pressure sensor
ADVANCED COMMUNICATIONS & SENSING
PRELIMINARY
1 Introduction
1.1 Context
This document intends to show how to interface a pressure sensor using the XE8000EV120 evaluation board.
It also shows how to use efficiently the ZoomingADC™ of the SX8722 and demonstrate the benefits of the
zooming feature.
1.2 Recommended reading
Other useful documents are listed below
• SX8722 Datasheet
• XE8000EV120 User’s Guide
2 Pressure Sensor
This chapter describes the pressure sensor and its main characteristics.
2.1 Sensor characteristics
The chosen sensor for this application is a 200kPa absolute pressure sensor type MPX2202AP by Freescale.
Its main characteristics are described in the table below:
Characteristic
Value (Typ)
Unit
Pressure range
0-200
kPa
Supply voltage
3.3
Vdc
Supply current
1.96
mAdc
Full scale span
13.04
mVdc
Table 1 Sensor main characteristics
© 2007 Semtech Corp.
www.semtech.com
4
Application Note
XE8000EV120 Interfacing your first pressure sensor
ADVANCED COMMUNICATIONS & SENSING
PRELIMINARY
2.2 Transfer function
The transfer function of the sensor is given in the figure below. It shows the output voltage (min., typ. and max.)
as a function of the absolute input pressure for the specified supply voltage.
Sensor output Voltage vs Pressure @ 3.3V supply
16
14
Output Voltage [mVDC]
12
10
Min
Typ
Max
8
6
4
2
0
0
20
40
60
80
100
120
140
160
180
200
-2
Pressure [kPa]
Figure 1 Sensor transfer function
Note: The given transfer function in the datasheet is for a 10V power supply, here the transfer function was
translated for a 3.3V power supply
2.3 Sensor Hardware
2.3.1 Pin out & Schematic
3
VS
Vout+ 2
Sensing
Element
4
3
2
1
Vout- 4
GND
1
PIN 1
Figure 2 Pressure sensor pin out & equivalent schematic
© 2007 Semtech Corp.
www.semtech.com
5
Application Note
XE8000EV120 Interfacing your first pressure sensor
ADVANCED COMMUNICATIONS & SENSING
PRELIMINARY
2.3.2 Connection to the SX8722
The schematic below shows how the sensor is connected to the SX8722 using the pins AC0 – AC1 as
differential input and AR0 – AR1 as reference inputs.
The BIAS is @ VDD.
VDD
VBIAS
3
Inputs
Vout+ 2
AC
Sensing
Element
Vout- 4
0
1
2
3
4
5
6
7
SX8722
fS
MUX
VS
IN,ADC
1
2
3
2
3
ADC
VDD
fS
Measurement engine
GND
1
MUX
AR
0
1
2
3
V REF
VSS
GND
Figure 3 Sensor schematic connection to the SX8722
© 2007 Semtech Corp.
www.semtech.com
6
Application Note
XE8000EV120 Interfacing your first pressure sensor
ADVANCED COMMUNICATIONS & SENSING
PRELIMINARY
2.3.3 Connection to the XE8000EV120
The picture below shows how to connect the sensor on the evaluation board, each black point represent a
connection.
1
2
3
4
Figure 4 Connection on the XE8000EV120 Evaluation board
Note: To avoid crossing Vout+ and Vout-, the schematic above shows that Vout+ is connected to AC0 (default
negative input) and Vout- is connected to AC1 (default positive output).
This means that the signal is inverted, but as the SX8722 allows inverting the polarity of the inputs we will
use the “sign inversion” feature during SX8722 configuration.
3 Using the evaluation board and the GUI
3.1 Configuration
1. Connect the sensor as described in Error! Reference source not found.
2. select the power supply of the evaluation board to 3.3V (see chapter 3.4.2 of the evaluation board user’s
guide)
3. Connect the USB connector to the evaluation board and to the PC.
4. Launch the SX8722 GUI
5. Power on the evaluation board
6. Open the COM port (see chapter 2.2 of the user’s guide)
© 2007 Semtech Corp.
www.semtech.com
7
Application Note
XE8000EV120 Interfacing your first pressure sensor
ADVANCED COMMUNICATIONS & SENSING
PRELIMINARY
3.2 Reading the sensor using the GUI
3.2.1 Default state
By default, if the external EEPROM was not already programmed, the SX8722 state should look like in the
picture beside.
Figure 5 SX8722 Default state
© 2007 Semtech Corp.
www.semtech.com
8
Application Note
XE8000EV120 Interfacing your first pressure sensor
ADVANCED COMMUNICATIONS & SENSING
PRELIMINARY
3.2.2 Inputs configuration
The inputs must be changed to differential mode, and the sign must be inverted (see § 2.3.3), the reference
inputs are already correct.
The inputs configuration sub tab should look like the picture beside
Figure 6 SX8722 “inputs” sub tab
© 2007 Semtech Corp.
www.semtech.com
9
Application Note
XE8000EV120 Interfacing your first pressure sensor
ADVANCED COMMUNICATIONS & SENSING
PRELIMINARY
3.2.3 Rough gain configuration
As the transfer function shows, the total span of the sensor is 14.5mV and the total span of the ZoomingADC is
3.3V (VDD).
The gain that needs to be applied to see the full range of the signal is then calculated as follows:
Gain =
ADCOut Max
3300mV
=
= 227
SensorOut Max 14.5mV
This means PGA 1 = 10, PGA 2 = 10 and PGA3 = 2.25 (granularity of PGA 3 = 1/12)
The biasing of the PGA should be changed from 25% to 100%
The “PGA” sub tab should then look like as picture beside.
Figure 7 SX8722 “PGA” sub tab configuration
3.2.4 Updating the SX8722 registers
Now that the inputs and the gains are defined, we need to update the SX8722 registers by clicking on “Write”
button.
Figure 8 SX8722 registers update
© 2007 Semtech Corp.
www.semtech.com
10
Application Note
XE8000EV120 Interfacing your first pressure sensor
ADVANCED COMMUNICATIONS & SENSING
PRELIMINARY
3.2.5 Reading the sensor output
Now that the inputs are correctly set, we can look at the sensor output signal, to proceed, double-click on the
graphic preview in picture below:
Figure 9 Opening current configuration graphic
© 2007 Semtech Corp.
www.semtech.com
11
Application Note
XE8000EV120 Interfacing your first pressure sensor
ADVANCED COMMUNICATIONS & SENSING
PRELIMINARY
And the window shown below will appear:
Figure 10 Default configuration graphic
Click on the “Auto scale” button
Figure 11 Auto scaled default configuration graphic
The graphic is now zooming on the signal span, it appears to be noisy, and so we will use the filtering feature.
© 2007 Semtech Corp.
www.semtech.com
12
Application Note
XE8000EV120 Interfacing your first pressure sensor
ADVANCED COMMUNICATIONS & SENSING
PRELIMINARY
3.2.6 Filter configuration
Choosing a moving average of ten will be enough to get a clean signal, choose “Moving average” and set on 10
samples.
Then update the SX8722 registers by clicking “Write” button
Figure 12 SX8722 “Filter” sub tab configuration
© 2007 Semtech Corp.
www.semtech.com
13
Application Note
XE8000EV120 Interfacing your first pressure sensor
ADVANCED COMMUNICATIONS & SENSING
PRELIMINARY
Then click on “Auto scale” button again on the chart window, the signal should be looking like the picture below:
Figure 13 Auto scaled default configuration graphic with filter feature on
© 2007 Semtech Corp.
www.semtech.com
14
Application Note
XE8000EV120 Interfacing your first pressure sensor
ADVANCED COMMUNICATIONS & SENSING
PRELIMINARY
Now the signal noise represent only +/- 1 LSB , select “Zoom –“ button and click 4 times on the graphic to get
the following view :
Figure 14 Zoomed out configuration graphic chart
© 2007 Semtech Corp.
www.semtech.com
15
Application Note
XE8000EV120 Interfacing your first pressure sensor
ADVANCED COMMUNICATIONS & SENSING
PRELIMINARY
Now, with your thumb, close and open the sensor input tube as shown in picture below:
4
3
2
1
PIN 1
Figure 15 Sensor actuation
The graphic should show this interaction as shown below:
Figure 16 Sensor actuation shown on the graphic
In the previous steps, you learn how to get a quick view of the sensor output signal; the next chapter shows how
to get the best of the ZoomingADC™ capability.
© 2007 Semtech Corp.
www.semtech.com
16
Application Note
XE8000EV120 Interfacing your first pressure sensor
ADVANCED COMMUNICATIONS & SENSING
PRELIMINARY
4 ZoomingADC™ configuration
4.1 Zooming on the signal
As the sensor is supposed to work at the atmospheric pressure (max: 107.8kPa - min: 88.7kPa) we will zoom on
around these values and thus use the maximum amplification as possible to get the full signal at the ADC input.
As for zoom in pictures we set a particular zone of interest called measuring window (in red below).
Zoomed Sensor output Voltage vs Pressure @ 3.3V supply
8.5
8
Voltage [mVDC]
7.5
Sensor output Voltage vs Pressure @ 3.3V supply
16
7
Min
Typ
Max
6.5
6
14
Output Voltage [mVDC]
12
5.5
10
Min
Typ
Max
8
5
4.5
6
89
91
93
95
97
99
101
103
105
107
Pressure [kPa]
4
2
0
0
20
40
60
80
100
120
140
160
180
200
-2
Pressure [kPa]
Figure 17 Zooming on the signal
4.1.1 Gain computing
To compute the total gain that must be applied to the sensor output signal we must know 2 parameters:
1. The maximum output span of the ADC, here 3.3V
2. The maximum output span value of the sensor in the measuring window, here around 8.5 – 4.5 = 4mV
Now we can apply the following formula to get the gain:
Gain =
ADCOutMax
3300mV
=
= 825
SensorOutMax
4mV
As the total gain is more than 100, we have to enable all PGA’s to obtain a total amplification of 825 we must set
the gains as follow:
• PGA1 = 10
• PGA 2 = 10
• PGA3 = 8.25
© 2007 Semtech Corp.
www.semtech.com
17
Application Note
XE8000EV120 Interfacing your first pressure sensor
ADVANCED COMMUNICATIONS & SENSING
PRELIMINARY
4.1.2 Offset cancellation
The ZoomingADC™ offers to subtract a voltage generated using the Vref input, the schematic below shows how
to use it.
The offset computation uses the middle sensor output value at the ZoomingADC™ input as shown in the
formula below:
MwMax − MwMin 8.5mV − 4.5mV
=
= 6.5mV
2
2
Offset =
Note: Mw stands for measuring window.
Offset removing PGA after PGAs:
• PGA1: Amplified sensor output = 6.5mV x 10 = 65mV
• PGA2: Amplified sensor output = 65mV x 10 = 650mV
Offset cancellation: min +/- 0.2 x Vref (3.3V x 0.2 = 660mV)
The minimum value is too big we cannot use the offset cancellation of PGA2
• PGA3: Amplified sensor output = 650mV x 8.25 = 5362mV
Offset cancellation: min +/- 1/12 x Vref (1/12 x 3.3V = 275mV)
The minimum value fits up to 19 times in 5362mV 19/12 x 3.3 = 5225mV.
Note: 19/12 = 1.583
ADC input sensor voltage vs pressure
1800
1600
1400
Voltage[mVDC]
1200
Sensor output Voltage vs Pressure @ 3.3V supply
16
1000
Min
800
Typ
Max
14
600
12
Output Voltage [mVDC]
400
10
Min
Typ
Max
8
200
0
6
89
91
93
95
97
99
101
103
105
107
Pressure [kPa]
4
2
0
0
20
40
60
80
100
120
140
160
180
200
-2
Pressure [kPa]
Vinmin 4.5mVdc
Vinmax 8.5mVdc
AC
0
1
2
3
4
5
6
7
fS
MUX
Inputs
= 307.2kHz
IN,ADC fS
65mV
x10
1
5362mV 137mV
650mV
x10
2
X8.2
3
0mV
VREF
x0
2
ADC
Measurement
engine
5225mV
x1.58
3
AR
0
1
2
3
MUX
3.3V
Figure 18 PGA parameters
© 2007 Semtech Corp.
www.semtech.com
18
Application Note
XE8000EV120 Interfacing your first pressure sensor
ADVANCED COMMUNICATIONS & SENSING
PRELIMINARY
4.1.3 Final gains configuration
As computed, the PGA gains can be raised to 825.
The offset is 19/12 (see §4.1.2), as the input signal is inverted and not the reference, the offset has to be
negative.
The “PGA” sub tab should then look like as picture beside.
Figure 19 SX8722 “PGA” sub tab final configuration
© 2007 Semtech Corp.
www.semtech.com
19
Application Note
XE8000EV120 Interfacing your first pressure sensor
ADVANCED COMMUNICATIONS & SENSING
PRELIMINARY
4.1.4 ADC configuration
The following PGA and ADC set-up is chosen to implement the measurement window. With this set-up, the input
voltage range of the circuit corresponding to the full scale output code range is 4.5mV to 8.5mV. This window is
represented in Figure 17.
Parameter
Value (typ)
Vbat = Vref
3.3
Sampling freq.
307.2kHz
Gain of PGA1
10
Gain of PGA2
10
Gain of PGA3
8.25
Total PGA gain
825.00
Offset of PGA2
0.00
Offset of PGA3
-1.58
Total equivalent input offset
6.33
Oversampling rate
1024
Elementary conversions
8
Resolution
16.0
Conversion time
27.3
LSB equivalent input voltage
6.29E-08
Equivalent input noise
2.37E-07
PGA settling time
1.94
(1)
quantization noise only
(2)
white noise included
Unit
V
kHz
Vref
Vref
mV
(1)
bit
ms
V
(2)
Vrms
ms
Table 2 ADC configuration
4.1.5 Noise cancellation
In order to cancel completely the white noise generated by the ADC and PGA, we have to average the
measured value. To get a stable reading, you need to reduce the equivalent input noise to VLSB/√12. The
averaging value is calculated as follows:
2
2
 InpNoise
  2.37E - 07

⋅ 12  = 
⋅ 12  = 68

 LSB
  9.94E - 08

© 2007 Semtech Corp.
www.semtech.com
20
Application Note
XE8000EV120 Interfacing your first pressure sensor
ADVANCED COMMUNICATIONS & SENSING
PRELIMINARY
4.1.6 Filter configuration adapted
As computed in §4.1.5, the filtering must be now adapted to the new gain.
The filter chosen is moving average and the filtering value is 70.
The “Filter” sub tab should now look like picture beside
Figure 20 SX8722 “Filter” sub tab configuration for the new gain
4.1.7 LSB equivalence
Using the defined ADC and PGA set-up, an equivalent input pressure per LSB can be calculated. Using the
typical sensor transfer function, we obtain:
Pr essure :
VLSB ⋅ pressure _ range
63nV ⋅ 200 kPa
=
= 0.96 Pa
Sensor _ voltage _ range
13.04mV
The approximate equivalence between Pressure and altitude is defined as follow:
Altitude : 100 kPa ≡ 8620 m →
0.96 Pa ⋅ 8620 m
= 0.0079 m
100 kPa
This means that this implementation has a resolution of 8cm altitude.
© 2007 Semtech Corp.
www.semtech.com
21
Application Note
XE8000EV120 Interfacing your first pressure sensor
ADVANCED COMMUNICATIONS & SENSING
PRELIMINARY
4.2 ZoomingADC™ Benefits
Now that we zoomed on the signal, we can compare with and without zoom performances.
4.2.1 Without zoom
To make a comparison do as follow:
1. Set the configuration to Gain = 225 & no offset cancellation
2. On the graph, set the full scale
3. Then blow in the sensor tube (try to make the maximum signal span)
The result should look like the picture below:
3334 bits span
Figure 21 Signal span using rough gain setting
The signal span correspond to 31923 – 28599 = 3324 bits
1
1
To get the exact value of the span use the “Auto scale” feature.
© 2007 Semtech Corp.
22
www.semtech.com
Application Note
XE8000EV120 Interfacing your first pressure sensor
ADVANCED COMMUNICATIONS & SENSING
PRELIMINARY
4.2.2 With zoom
Now set the parameters as defined in § 4.1.3 (Gain 825, offset -1.58 x Vref) and repeat the points 2-3.
The result should look like the picture below:
10370 bits span
Figure 22 Signal span using Zooming settings
The signal span correspond to 11743 – 1374 = 10370 bits which corresponds to a 320% gain on the signal
reading allowing you to have more consistent readings.
© 2007 Semtech Corp.
www.semtech.com
23
Application Note
XE8000EV120 Interfacing your first pressure sensor
ADVANCED COMMUNICATIONS & SENSING
PRELIMINARY
© Semtech 2007
All rights reserved. Reproduction in whole or in part is prohibited without the prior written consent of the copyright owner.
The information presented in this document does not form part of any quotation or contract, is believed to be accurate and
reliable and may be changed without notice. No liability will be accepted by the publisher for any consequence of its use.
Publication thereof does not convey nor imply any license under patent or other industrial or intellectual property rights.
Semtech assumes no responsibility or liability whatsoever for any failure or unexpected operation resulting from misuse,
neglect improper installation, repair or improper handling or unusual physical or electrical stress including, but not limited to,
exposure to parameters beyond the specified maximum ratings or operation outside the specified range.
SEMTECH PRODUCTS ARE NOT DESIGNED, INTENDED, AUTHORIZED OR WARRANTED TO BE SUITABLE FOR
USE IN LIFE-SUPPORT APPLICATIONS, DEVICES OR SYSTEMS OR OTHER CRITICAL APPLICATIONS. INCLUSION
OF SEMTECH PRODUCTS IN SUCH APPLICATIONS IS UNDERSTOOD TO BE UNDERTAKEN SOLELY AT THE
CUSTOMER’S OWN RISK. Should a customer purchase or use Semtech products for any such unauthorized application,
the customer shall indemnify and hold Semtech and its officers, employees, subsidiaries, affiliates, and distributors harmless
against all claims, costs damages and attorney fees which could arise.
Contact Information
Semtech Corporation
Advanced Communication and Sensing Products Division
200 Flynn Road, Camarillo, CA 93012
Phone (805) 498-2111 Fax : (805) 498-3804
© 2007 Semtech Corp.
www.semtech.com
24