Understanding Pressure Measuring with Overview on Sensor Signal Conditioning

Sensing products
ADVANCED COMMUNICATIONS & SENSING
Application note
ST0002_01_US
Understanding pressure measuring
with the SX8725
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
ADVANCED COMMUNICATIONS & SENSING
Application note
Table of contents
Section
I
Introduction ................................................................................................................................................3
1.
General definitions ...................................................................................................................................................3
2.
1.1.
Sensor, transducer ...........................................................................................................................................3
1.2.
Active / Passive................................................................................................................................................ 3
1.3.
Smart sensor ....................................................................................................................................................3
Sensor characteristics .............................................................................................................................................4
2.1.
Linearity ...........................................................................................................................................................4
2.2.
Static characteristics ........................................................................................................................................4
2.2.1.
Input range ................................................................................................................................................4
2.2.2.
Accuracy ...................................................................................................................................................5
2.2.3.
Resolution .................................................................................................................................................5
2.2.4.
Repetability ...............................................................................................................................................5
2.2.5.
Sensitivity ..................................................................................................................................................5
2.2.6.
Offset ........................................................................................................................................................5
2.2.7.
Span ..........................................................................................................................................................5
2.2.8.
Drift ........................................................................................................................................................... 5
2.2.9.
Hysteresis .................................................................................................................................................6
2.3.
ST0002_01_US
Page
Dynamic characteristics ................................................................................................................................... 6
2.3.1.
Response time ..........................................................................................................................................6
2.3.2.
Settling time .............................................................................................................................................. 7
3.
Calibration ................................................................................................................................................................7
II
Sensor signal conditioning .........................................................................................................................8
1.
Introduction ..............................................................................................................................................................8
2.
Wheatstone bridge ...................................................................................................................................................8
2.1.
Measure a resistance .......................................................................................................................................8
2.2.
The bridge ........................................................................................................................................................8
2.3.
Null detector .....................................................................................................................................................9
2.4.
Wheatstone bridge with constant voltage drive ...............................................................................................9
2.4.1.
One active element ...................................................................................................................................9
2.4.2.
Two actives element ...............................................................................................................................10
2.4.3.
Four active elements ...............................................................................................................................10
3.
Signal amplification ................................................................................................................................................11
4.
Bridge connection to the ADC ...............................................................................................................................11
III
The working principle of pressure sensor ................................................................................................13
1.
Introduction ............................................................................................................................................................13
2.
Strain gauge pressure sensor ................................................................................................................................13
IV Measuring pressure with SX8725 ............................................................................................................15
1.
Introduction ............................................................................................................................................................15
1.1.
SX8725 features ............................................................................................................................................15
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 1
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
ADVANCED COMMUNICATIONS & SENSING
Application note
Table of contents
Section
2.
Page
How to use ZoomingADC™? .................................................................................................................................17
2.1.
Overview ........................................................................................................................................................17
2.2.
Gain setting rules ...........................................................................................................................................18
2.2.1.
Using PGA3 ............................................................................................................................................18
2.2.2.
Using PGA1 and PGA2 ...........................................................................................................................19
2.2.3.
Distributing the gain over the 3 stages ....................................................................................................20
2.2.4.
PGA settling time ....................................................................................................................................21
2.3.
Conversion time and choice of the resolution ................................................................................................21
3.
MPX2202AP sensor ..............................................................................................................................................23
4.
Measuring pressure from MPX2202AP pressure sensor ......................................................................................24
4.1.
Connection to the sensor ...............................................................................................................................24
4.2.
Calculating the overall gain ............................................................................................................................24
4.3.
Distributing the gain .......................................................................................................................................24
4.4.
Offset calculation ...........................................................................................................................................25
4.4.1.
PGA2 setting ...........................................................................................................................................25
4.4.2.
PGA3 setting ...........................................................................................................................................25
4.4.3.
PGAsetting ..............................................................................................................................................25
4.5.
5.
6.
SX8725 configuration ............................................................................................................................................26
5.1.
RegACCfg0 register .......................................................................................................................................26
5.2.
RegACCfg1 register .......................................................................................................................................27
5.3.
RegACCfg2 register .......................................................................................................................................27
5.4.
RegACCfg3 register .......................................................................................................................................27
5.5.
RegACCfg4 register .......................................................................................................................................28
5.6.
RegACCfg5 register .......................................................................................................................................28
Using the evaluation board ....................................................................................................................................29
Calibration procedure ............................................................................................................................................30
7.1.
Measure .........................................................................................................................................................30
7.2.
Calibration curve ............................................................................................................................................31
ST0002_01_US
7.
Resolution setting and conversion time .........................................................................................................25
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 2
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Introduction
ADVANCED COMMUNICATIONS & SENSING
Application note
Introduction
Sensors can be found in a large number of applications. From consumer to industrial, automotive to medical, sensors are
everywhere.
This guide is intended to give some practical notions on the way of designing the material interface between the sensor
and the microcontroller. It focus on circuit used to do the signal conditioning.
In the different chapters, various applications are explained. Most of them are from common industrial application such as
industrial measurement. Organized by sensor application, each chapter describes the application, then the sensor is
presented and the interface design is explain.
We attempted to provide a useful handbook with technical explanations that are clear. The pressure application is the first
chapter available. It will be updated regularly with new applications design using different sensors.
1. General definitions
1.1. Sensor, transducer
A sensor is a device that measures or detects a real-world condition, such as motion, heat or light and converts the
condition into an analog or digital representation.For example, a photodiode is a sensor capable of converting light into
either current or voltage.
A transducer is a device that converts a signal from one physical form to an other such as a photovoltaic panel which
convert solar energy to electricity.
Although a sensor is not an energy converters it is often called transducer.
1.2. Active / Passive
An active sensor requires an external source of excitation. It is the case of most resistor-based sensors which requires a
current to determine the output voltage.
On the other hand, passive sensors generate their own electrical output signal without requiring external voltage or current.
A photodiode doesn’t need any excitation source to produce voltage output.
1.3. Smart sensor
With the high level of integration nowadays available, all the functions needed for a complete sensor application are
sometimes integrated in the same chip to build a smart sensor. It is possible by this way to miniaturize and to minimize
component cost and improve the reliability of the system.
ST0002_01_US
Mixed-signal technology used amplifiers, Analog to Digital converter (ADC) and a microcontroller to do the processing. The
figure 1 presents the different kind of integrated sensor it is possible to find from the simple transducer to the complete
acquisition system.
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 3
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Introduction
Application note
ADVANCED COMMUNICATIONS & SENSING
Effector
(physical, magnetic,
chemical,...)
Active
surface
Amplification
Transducer
/
Filtering
Sensor
Data
storage &
processing
Integrated sensor
Smart sensor
Output
/
control
Sensor system
Figure 1. From sensor to system
2. Sensor characteristics
2.1. Linearity
A linear sensor produces an output value which is directly proportional to the input. A real sensor is never linear but in a
determined working range, it can approach a linear function transfer with a good accuracy.
Linearity interest is in the simplicity of the processing: there is few correction to applied to obtain the input value. One way
to measure linearity is to use Least Mean Squares (LMS) method which gives the best fit straight line as seen in figure 2.
Output
Best fit line
Actual
Input
Figure 2. LMS method to obtain best fit line
ST0002_01_US
2.2. Static characteristics
2.2.1. Input range
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 4
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Introduction
Application note
ADVANCED COMMUNICATIONS & SENSING
The input range of the sensor is the maximum and minimum values of applied parameter that can be measured. It works
well under this given range. Outside this range, accuracy is not guaranteed, it can even give erratic results or do not work.
2.2.2. Accuracy
The accuracy is the parameter which answer to the question: How well the sensor measures the environment in an
absolute sense?
The comparison is done with calibration standards and the result is most of the time in percentage or in absolute for small
value of input range.
2.2.3. Resolution
It is the ability of the sensor to see small differences in reading. It must not be confused with accuracy. A temperature
sensor can have a resolution of 0.1ºC but only an accuracy of 1ºC.
Resolution is often determined by the quantization of the analog to digital process.
2.2.4. Repetability
This is the ability of a sensor to repeat a measurement when put back in the same environment.
2.2.5. Sensitivity
The sensitivity of the sensor is defined as the slope of the output characteristic curve or, more generally, the minimum input
of physical parameter that will create a detectable output change.
2.2.6. Offset
The offset is defined as the output that will exist when it should be zero.
2.2.7. Span
The span is the output difference when the full input range is applied.
Output
Span
Sensitivity
Offset
Input
input range
ST0002_01_US
Figure 3. Definitions
2.2.8. Drift
This is the change in a signal over a long periods of time. It is often associated with electronic aging of components or
reference standards in the sensor but the drift can also be the effect of temperature. Offset drift (or baseline drift) is a
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 5
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Introduction
Application note
ADVANCED COMMUNICATIONS & SENSING
gradual change in the offset. Span drift (or sensitivity drift) is a change in the sensitivity response. In most sensors, offset
drift is a more serious problem than span drift.
Output
Effect of
offset drift
Actual
Effect of
span drift
Input
Figure 4. Effect of offset and span drift
2.2.9. Hysteresis
A linear up and down input to a sensor, results in an output that lags the input e.g. you get one curve on increasing
pressure and another on decreasing. Many pressure sensors have this problem, for better ones it can be ignored.
Output
Hysteresis
Input
Figure 5. Effect of hysteresis
2.3. Dynamic characteristics
ST0002_01_US
The sensor response to a variable input is different from that exhibited when the input signals are constant. The dynamic
characteristics are determined by analyzing the response of the sensor to a family of variable input waveforms such as a
step, an impulse or a ramp signal.
2.3.1. Response time
A step input is applied to the sensor. The response time is the time delay until output signal stabilize.
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 6
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Introduction
Application note
ADVANCED COMMUNICATIONS & SENSING
The response can be different wether it is a first or a second order system.
2.3.2. Settling time
It is the time for the sensor to reach a stable output once it is turned on. Therefore, if you are conserving power by turning
off the sensors between measurements, you need to turn on the power and wait a certain time for the sensor to reach a stable
output.
3. Calibration
Calibration is often needed to improve the sensor output accuracy. The calibration establishes the relationship between the
physical measurement variable and the signal variable. A sensor is calibrated by applying a number of known physical
inputs and recording the response of the system. A model of the sensor law can then be computed.
For example, a linear system can be put in equation on the form Y = a ⋅ X + b . Therefore, two sets of points are needed at
minimum to find a and b. With more points the calibration would be indeed more accurate. Theses coefficient are with a
linear sensor the offset and the sensitivity.
Output
Input
Figure 6. Calibration
ST0002_01_US
A system with a more complex law needs more calibration points. The Least Mean Squares (LMS) algorithm is a solution
often used to find a function which best fit a data set.
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 7
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Sensor signal conditioning
ADVANCED COMMUNICATIONS & SENSING
Application note
Sensor signal conditioning
1. Introduction
Because the physical variations in the sensor are small, most of the time the signal of interest is weak. Therefore it had to
be conditioned to be exploited. The signal conditioning is a very important part of the signal processing to gain accuracy. It
is not only an interface to amplify the signal; it has to remove the noise, to adapt the impedance and all the action to make
the signal compatible for the reading.
The Wheastone bridge is very used with resistive elements sensor. The first section will introduced it and explain its
advantages.
2. Wheatstone bridge
2.1. Measure a resistance
The most common sensors are resitive elements sensors as they are inexpensive. They are used for measure strain,
humidity, pressure, temperature and many others physical phenomena. Their measure principle is based on resistance
variation with the physical variable to sense.
Consequently sense the physical phenomena comes to measure the resistance variation of the sensor.
A resistance is easily measured by forcing a current in it and measure the difference voltage. The resistance calculated by
Ohms law is given by equation 1.
V
R = --I
(1)
I
V
Figure 1. Ohms law
A Wheatstone bridge is a better method for measuring small resistance changes accurately.
2.2. The bridge
Invented by Samule Hunter Christie in 1833 and improved by Sir Charles Wheastone in 1843, the Wheastone bridge is
used to measure a resistance.
ST0002_01_US
This type of electrical circuit has 2 legs in which the current splits. Each path is composed of two resistors in series. The
Wheatstone bridge is shown in figure 2.
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 8
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Sensor signal conditioning
Application note
ADVANCED COMMUNICATIONS & SENSING
VB
R4
R3
VO
R1
R2
Figure 2. The wheastone bridge
A bridge measures resistance indirectly by comparison with a similar resistance. The two principle ways of operating a
bridge are as a null detector or as a device that reads a difference directly as voltage.
2.3. Null detector
When VO is null, the bridge is said to be balanced. It is easy to see that the bridge is balanced when the following equation
is verified.
R4
R3------- = -----R1
R2
(2)
This useful property of Wheatstone bridge is used to measure unknown resistance. Indeed if R1 is unknown, its value can
be found by adjusting R4 until null is achieved. Null measurements are principally used in feedback systems.
2.4. Wheatstone bridge with constant voltage drive
For the majority of sensor application employing bridges, the deviation of one or more resistors in a bridge from an initial
value is measured as an indication of the magnitude in the measured variable. In this case the output voltage change is an
indication of the resistance change.
The sensor can have one active resistive element, two or four elements. Depending of the sensor used, several types of
configuration exist for Wheatstone bridge.
2.4.1. One active element
ST0002_01_US
The corresponding circuit is shown in figure (A). All the resistances are nominally equal but one of them (the sensor) is
variable by an amount ∆R. It is not difficult to show that the output VO is not linear with ∆R as shown in equation 3.
VB
∆R
V O = ------ ⋅ ----------------4
∆R
R + ------2
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
(3)
Page 9
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Sensor signal conditioning
Application note
ADVANCED COMMUNICATIONS & SENSING
The non linearity values depend of the change in resistance. This change in resistance divided by 2 gives approximatelly
this linearity error.
In some applications the bridge non linearity may not be acceptable so but there are various methods to linearize bridges.
2.4.2. Two actives element
Depending of the sensor working, two differents circuits can be used as illustrated in figure (B) and (C).
The voltage output are respectively given by equation 4 and equation 5.
VB
∆R
V O = ------ ⋅ ----------------2
∆R
R + ------2
V B ∆R
V O = ------ ⋅ ------2 R
(4)
(5)
There is a linearity error in the first case which is the same as in the single active element but the gain has doubled.
The second case is more interesting as no linearity error is provided by the circuit.
2.4.3. Four active elements
The circuit with the four active element is shown in figure (D).
The all-element varying bridge produces the most signal for a given resistance change and is inherently linear. It is
important to notice that the output is not just a linear function of ∆R; it is a linear function of ∆R/R as stated in equation 6.
∆R
V O = V B ⋅ ------R
(6)
VB
R
R
VO
R
R
ST0002_01_US
A
B
R
R+
R
VO
VO
R+
VB
R-
R
R
R+
R
VB
VB
RR+
R
R
R+
R
R+
R
R
VO
R
R
C
R-
D
Figure 3. Constant voltage drive bridge configurations
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 10
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Sensor signal conditioning
Application note
ADVANCED COMMUNICATIONS & SENSING
3. Signal amplification
Most often, the differential output voltage of the sensor is too low to be exploited directly. For example, it is common to
obtain 10mV full scale for a pressure sensor. To drive an ADC converter the signal must be amplify first. The benefit is to
increase the signal to noise ratio and so to gain in resolution..
An instrumentation amplifier is a type of differential amplifier that has been specifically designed to obtain good
characteristics in measurement applications. Theses characterisitics include very low DC offset, low drift, low noise, very
high open-loop gain, very high common-mode rejection ratio and very high input impedance. They are used where great
accuracy and stability of the circuit both short and long-term are required.
The most commonly used instrumentation amplifier circuit is shown in the figure 4.
V1
+
R2
R3
R1
V2
Rgain
+
R1
V2
+
R2
R3
Figure 4. Instrumentation amplifier
The gain of the circuit is given by the following equation.
V out
2R 1  R 3
----------------- =  1 + ----------- • -----
V2 – V1
R gain R 2
(7)
ST0002_01_US
4. Bridge connection to the ADC
The output voltage of any bridge is directly proportional to its supply voltage. Therefore, the circuit must either hold the
supply voltage constant to the same accuracy as the desired measurement, or it must compensate for changes in the
supply voltage. The simplest way to compensate for supply-voltage change is to derivate the ADC’s reference voltage from
the bridge’s excitation.
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 11
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Sensor signal conditioning
Application note
ADVANCED COMMUNICATIONS & SENSING
5V
R1
Ref + VCC
IN
Rgain
ADC
Ref -
R2
GND
Figure 5. Bridge connection to the ADC
ST0002_01_US
In figure 5, the ADC’s reference voltage comes from voltage divider made with R1 and R2 placed in parallel with the bridge.
This cause changes in supply voltage to be rejected because the reference voltage is proportional to the bridge supply.
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 12
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
The working principle of pressure sensor
Application note
ADVANCED COMMUNICATIONS & SENSING
The working principle of pressure sensor
1. Introduction
Pressure sensors include all sensors, transducers and elements that produce an electrical signal proportional to pressure
or changes in pressure. Pressure sensors are devices that read changes in pressure, and relay this data to recorders or
switches.
Pressure sensors have a wide variety of applications. For example, they are used in medical to measure blood pressure, in
automotive to monitor the tire pressure, in consumer applications for barometer or altimeter and in various industrial
purposes.
Different kind of pressure sensors
There are numerous technologies by which pressure transducers and sensors function. Each sensor technology will have
its strength and weakness. Depending of the application, the kind of measure to be done (absolute, differential, gauge), the
kind of fluid to be measured (liquid, gas, viscosity), the range (low or high pressure), the frequency (low or high), an
adequate sensor had to be chosen.
Some of the most widely used technologies include piston technology, mechanical deflection, strain gauge, semiconductor
piezoresistive, piezoelectric (including dynamic and quasistatic measurement), microelectromechanical systems (MEMS),
vibrating elements (silicon resonance, for example), and variable capacitance.
2. Strain gauge pressure sensor
As we can see from Figure 1, a strain gauge is a long length of conductor arranged in a zigzag pattern on a membrane.
Figure 1. Strain gauge
It is used to measure deformation of an object. A pressure transducer contains a diaphragm which is deformed by the
pressure which can be measured by a strain gauged element. The Figure 2 presents the functional diagram and the
Pressure
source
Pressure
sensor
(Diaphragm)
Mechanical
output
Strain gauge
Signal
conditioning
electronics
ST0002_01_US
Figure 2. Functional diagram
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 13
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
The working principle of pressure sensor
Application note
ADVANCED COMMUNICATIONS & SENSING
Strain gauges are mounted in the same direction as the strain. When it is stretched, it naturally becomes longer and thinner
and its resistance increases. On the contrary, when it is compressed, its resistance decreases. The Figure 3 below shows
a diaphragm fitted with four gauges.
R1
R3
R2
R4
R1
R3
R2
R1
R4
R2
Diaphragm fitted with 4
gauges
An upward bend stretches the
gauges on the top and
compresses those on the bottom
R3
R4
A downward bend stretches the
gauges on the top and
compresses those on the bottom.
Figure 3. Strain gauge work principle
ST0002_01_US
It is then efficient to mounted fours strain gages to form a full Wheatstone bridge. As seen in a previous chapter a
Wheatstone bridge is appropriated to measure the resistance change with a good sensibility and optimal linearity when all
the element varying.
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 14
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Measuring pressure with SX8725
Application note
ADVANCED COMMUNICATIONS & SENSING
Measuring pressure with SX8725
1. Introduction
This chapter is intended to demonstrate the capabilities of the SX8725 to measure pressure signal from the Freescale
MPX2202AP sensor.
The aim is to build an application to measure pressure between 1000hPa to 2000hPa with a resolution better than 5Pa.
The number of sample per second should be at least 100 samples per second (100SPS).
This requirements determine the settings of the SX8725 for the pressure measuring application. Therefore, sensor signal
amplification, sampling frequency and all the parameters determining the application are explained in section 4. A sum up
of all registers configuration is done on section 5.
Previously, the working principles of SX8725 are clear up in section 2. It is an important part of the document as it
describes the ZoomingADC™ working. Numerous examples are taken to make the understanding easier. These examples
are linked to the final application.
The pressure sensor is introduced in section 3. Characteristics and part of the datasheet are shown.
Last part of the document describes the evaluation kit setting for the application in section 6.
Real evaluation of the sensor is done in last section.
1.1. SX8725 features
The ZoomingADC™ is an inovative technology which permits to connects most types of miniature sensors directly to the
chip. The analog adaptation circuit is therefore reduce to minimun allowing to reduce cost and space on the board.
The ZoomingADC™ has a multiplexer to select the input channel. It can be selected in pairs or one by one. Its digital
outputs are used to bias or reset the sensing elements.
It is possible to choose between two voltage references: the internal voltage reference VREF around 1.22V and the supply
voltage VBATT. Internal voltage reference is stable over time and temperature and has a low level of noise, that is why it
should be used to obtain best result.
It has been designed by Semtech and is present in the low power Sigma Delta ADC family. The SX8722, SX8723,SX8724
and SX8725 are data acquisition systems and have a ZoomingADC™ to amplify small signals. A various number of
sensors can be connected to the chip depending of the version. The main differences between theses chips are highlited in
the table below.
Resolution
Programmable gain
SX8723
SX8724
SX8725
16
16
16
16
1/12 to 1000
1/12 to 1000
1/12 to 1000
1/12 to 1000
Sensor offset
compensation
up to 15 times full
up to 15 times full
up to 15 times full
up to 15 times full
scale of input signal scale of input signal scale of input signal scale of input signal
Reference
2 differential inputs
VDD, internal, 1
single ended input
VDD, internal, 1
single ended input
VDD, internal, 1
single ended input
2 alarm pins with
ON & OFF
thresholds
2
4
2
Digital Outputs
ST0002_01_US
SX8722
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 15
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Measuring pressure with SX8725
Application note
ADVANCED COMMUNICATIONS & SENSING
SX8722
SX8723
SX8724
SX8725
Number of
differential inputs
4
2
3
1
Number of singleended inputs
7
4
6
2
Internal 1.2MHz
Internal 2.0MHz
Internal 2.0MHz
Internal 2.0MHz
Serial
Communication
I2C
I2C
I2C
I2C
Other Features
* Digital filtering
* Calibration pin
Package
MLPQ-44 (7x7)
MLPD-W-12 (4x4)
MLPQ-16 (4x4)
MLPD-W-12 (4x4)
Oscillator
The SX8725 is chosen for this application because only one differential input is needed for the pressure sensor.
The SX8725 has 4 sampling frequency from 67.5kHz to 500kHz. This frequency originates from the internal 2MHz
oscillator. With low frequency it is possible to reduce power consumption by decreasing current biasing in the ADC and the
programmable gain amplifier.
VDD
VBATT
D0
D1
VPUMP
SX8725
READY
AC2
AC3
SCL
SDA
VSS
Figure 1. Input output of the SX8725
If not mentioned, the following settings are used in this application note:
ST0002_01_US
The internal Vref equals to 1.22V is chosen to be the reference of the ADC and the PGA.
V REF, ADC = V REF ≅ 1.22 V
The sampling frequency is set to 500kHz.
The bias current of the ADC and the PGAs are set to 100%.
The following writing convention is taken:
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 16
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Measuring pressure with SX8725
Application note
ADVANCED COMMUNICATIONS & SENSING
A x-y signal is a signal with a minimum voltage of x volt and a maximum voltage of y volt refer to the ground.
Example: A 0-100mV signal is comprised in the 0-100mV range refer to the ground.
The medium voltage of a x-y signal is (x+y)/2.
2. How to use ZoomingADC™?
2.1. Overview
The ZoomingADC™ shown in figure 2 is a complete analog front end intended for sensing applications.
The total acquisition chain consists of an input multiplexer, 3 programmable gain amplifier (PGA) stages and an over
sampled A/D converter.
The reference voltage can be selected on two different channels. The input voltage is modulated and amplified through
stages 1 to 3. Fine gain programming up to 1'000 V/V is possible. Two offset compensation amplifiers allow a wide offset
compensation range. The programmable gain and offset give the possibility to zoom in on a small portion of the reference
voltage defined input range.
The output of the PGA stages is directly fed to the analog-to-digital converter (ADC), which converts the signal VIN,ADC into
digital.
When the resolution of the ADC is set to 16 bits, the simple equation 1 link OUTADC to VIN,ADC.
V IN, ADC
OUT ADC = 65535 × -------------------- – 32768
V ref
(1)
In the next section, we will see the rules to follow, the use of the different PGA through examples and at last the complete
use in a pressure measure application.
fs
PGA1
PGA2
GD1
GD2
PGA3
AC0
Analog
Inputs
Vref
AC1
VIN
AC2
+
GD3
-
VIN,ADC
+
16
ADC
-
AC3
OFF2
Input
selection
VBATT
Reference
Inputs
+
-
VREF
OFF3
VREF,ADC
+
ST0002_01_US
-
Reference
selection
Figure 2. The ZoomingADC™ functional block
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 17
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Measuring pressure with SX8725
ADVANCED COMMUNICATIONS & SENSING
Application note
2.2. Gain setting rules
The gain is applied with a series of 3 PGAs to be able to obtain a high amplification. The goal is to map the input signal on
the full input range of the ADC to reach the maximum of the resolution. Each PGA has its speciality depending of its
position in the signal chain.
PGA1 is a coarse gain for high amplification level while PGA2 has a medium gain and offset tuning.
PGA3 has a fine gain and offset tuning. Therefore, the following recommendation have to be used to optimize the gain
distribution between the three amplifiers.
This 4 rules are to be followed to obtain the best of the ZoomingADC™:
1 For a good linearity, a maximal gain must be applied to the last amplification stages, reducing the output amplitude of
the first gain stages.
2 Make sure that the output range of PGA1 should be within ± Vbatt/5 and output range of PGA2 should be within ±Vbatt/
2 otherwise part of the signal will saturate the ADC.
3 Keep some margin for the absolute precision of the parameters (15% if no offset cancellation and 25% if offset
cancellation)
4 Keep some margin for temperature drift
A PGA that is not used can be by-passed, adding no noise or current requirement to the system. If only one PGA is used,
it should be PGA3 that is the most versatile and has the highest linearity. Therefore the explanations below will start with
PGA3.
2.2.1. Using PGA3
PGA3 can be set for gains between 1/12 and 127/12 with a pitch of 1/12. It is a fine gain to reach with accuracy the gain
wanted. The output range of PGA3 must fit within ± Vref/2.
Offset cancellation is used to avoid amplifier saturation when dynamic of the signal is not centered to 0. Having min.-max of
the signal well distributed around 0 is interesting to apply a maximal gain.
Offset is related to Vref. The setting selected is multiplied with Vref to obtain the corresponding offset voltage. Offset can be
applied between -63/12.Vref and 63/12.Vref with a resolution of 1/12.Vref.
The output of PGA3 is directly connected to the input of the ADC. Following equation link output and input of PGA3 with the
gain and offset setting.
V out ( PGA 3 ) = V in ( PGA 3 ) ⋅ PGA 3 ( Gain ) – V REF ⋅ PGA 3 ( Offset )
(2)
(3)
Therefore offset setting can be calculated with
( maxV out ( PGA 3 ) + minV out ( PGA 3 ) ) ⋅ PGA 3 ( Gain ) 1
PGA 3 ( Offset ) = ---------------------------------------------------------------------------------------------------------------------------------- ⋅ ----------2
Vref
(4)
(5)
Example i:
Situation : A 0-100mV full scale signal is applied at the input of PGA3. An amplification factor of 117/12 is set up on PGA3.
What is the advantage of offset compensation ?
Solution:
ST0002_01_US
The amplifier will saturate if no offset compensation is used. An offset compensation of 5/12.Vref is applied to focus the
50mV medium voltage on 0V. Using the offset compensation permits to avoid amplifier saturation.
( 100 mV + 0 ) 1
5
PGA 3 ( Offset ) = ------------------------------- ⋅ ----------- ≅ 0.4 → PGA 3 ( Offset ) = -----12
2
Vref
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 18
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Measuring pressure with SX8725
Application note
ADVANCED COMMUNICATIONS & SENSING
1V
700
PGA3 saturation
600
500
0.5 V
400
Output voltage (mV)
300
0V
PGA3_GAIN=117/12
PGA3_OFFSET=0
-0.5 V
PGA3_GAIN=117/12
PGA3_OFFSET=5/12
200
100
0
0
10
20
30
40
50
60
70
80
90
100
-100
-200
-300
-400
PGA3 saturation
-500
-1 V
Input
signal
PGA3
output
without offset
compensation
PGA3
output with offset
compensation
PGA3 Output without
offset compensation
PGA3 Output with offset
compensation
-600
Input voltage (m V)
Figure 3. Offset compensation to avoid saturation
2.2.2. Using PGA1 and PGA2
If the gain obtained by the PGA3 is not sufficient to have a signal that covers the full input range of the ADC, one can
increase it further by using PGA2 and PGA1.
The middle amplification stage PGA2 has a medium gain tuning. The gain of PGA2 can be chosen between 1,2 5 or 10. It
could be strange to apply a unity gain wether while bypassing the stage permit to reach better performance in terms of
noise and power. In fact this possibility is to allows offset cancellation when no amplification is needed.
As for PGA3, stage 2 has an offset cancellation feature. The offset cancellation can be set between -1.Vref to 1.Vref with
step of 0.2.Vref.
PGA1 can be set if needed for a gain of 11 or 10. It is a coarse gain tuning which is useful to obtain high gain.
Remember, the output voltage of the programmable gain amplifier must not exceed ±Vbatt/5 for PGA1 and ±Vbatt/2 for
PGA2 as stated in rule 2. Following equations show the relation between input and output voltage.
V out ( PGA 2 ) = V in ( PGA 2 ) ⋅ PGA 2 ( Gain ) – V REF ⋅ PGA 2 ( Offset )
ST0002_01_US
1.
(6)
Set PGA1 with a gain of 1 does not change the total gain. It could have an interest to obtain a high input impedance.
Indeed, the input impedance is the impedance of the first stage enabled and is inversely proportional to gain.
The disadvantage is noise is added to the circuit and power consumption is increased.
Example: PGA2 is set with a gain of 10.
By applying a gain of 1 on PGA1 instead of bypassing it, the input impedance is multiplied by 10.
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 19
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Measuring pressure with SX8725
ADVANCED COMMUNICATIONS & SENSING
Application note
V out ( PGA 1 ) = V in ( PGA 1 ) ⋅ PGA 1 Gain
(7)
( maxV out ( PGA 2 ) + minV out ( PGA 2 ) ) ⋅ PGA 2 ( Gain ) 1
PGA 2 ( Offset ) = ---------------------------------------------------------------------------------------------------------------------------------- ⋅ ----------2
Vref
(8)
Example ii:
Situation: A 0-20mV signal is applied at the input of PGA2 programmed with a gain of 5.
Is it possible to best center around 0 this signal ?
Solution:
The absolute min.-max value of the output signal are 0-100 mV. Theses values fit within ±Vbatt/2. The minimum offset
value (0.2.Vref) is too high to re-center the input signal, it makes no sense to offset the signal.
( 20 mV + 0 ) ⋅ 5 1
PGA 2 ( Offset ) = ------------------------------------ ⋅ ----------- ≅ 0.04 → PGA 2 ( Offset ) = 0
2
Vref
Input signal (mV) PGA2 output (mV)
0
0
20
100
Table 1 : PGA2 output
2.2.3. Distributing the gain over the 3 stages
As stated before, the goal is to map the input signal on the full input range of the ADC to reach the maximum of the
resolution.
The gain distribution for the PGA can be find with the help of the flowchart given on figure 4. This flowchart gives a rough
approximation of how to distribute the overall gain G between the 3 stages.
Example iii:
Situation : An overall gain of 48.8 have to be distributed on the amplifier stages of the ZoomingADC™.
What are the gains distribution for each stage of the Zooming ADC?
Solutions:
PGA1 should be bypassed following the flowchart. PGA2 gain is set to 5 because the overall gain is lower than 50 but
superior to 20. At least the gain for the stage 3 should be around 9.76. The available gain the nearest is 117/12.
ST0002_01_US
48.8
117
PGA 3 ≅ ---------- = 9.76 → PGA 3 = --------5
12
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 20
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Measuring pressure with SX8725
Application note
ADVANCED COMMUNICATIONS & SENSING
G > 100
No
Yes
PGA1
disabled
G2=G
PGA1=10
G2=G/10
G2>50
Yes
PGA2=10
No
G2>20
No
Yes
G2>10
No
Yes
PGA2=5
PGA2=2
PGA2=1 or
disabled
PGA3 ≅ G2/
PGA2
Figure 4. Gain selection flowchart
2.2.4. PGA settling time
When the PGA is switch ON from OFF or when the gain is changed, the PGA needs some time to settle. Indeed a
feedback loop controls their common mode voltage output and it requires time to stabilize. This time depends of the ADC
resolution; it is equal to the over sampling ratio in number of period of fs. Therefore when using the PGA, a delay must be
placed in software between the last access of the RegACCfg1-5 register and the triggering of the ZoomingADC™ start.
Time to wait before the conversion must be superior or equal at delay given by the following formula.
OSR
delay = ----------fS
(9)
2.3. Conversion time and choice of the resolution
A complete analog-to-digital conversion sequence is made of a set of NELCONV elementary incremental conversions and
a final quantization step. Each elementary conversion is made of (OSR+1) over-sampling periods. If NELCONV is choose
superior or equal than 2, acquisition path offset will be removed.
The result is the mean of the elementary conversion results. A few additional clock cycles are also required to initiate and
end the conversion properly.
ST0002_01_US
The conversion time is calculated with the equation 10:
NELCONV ( OSR + 1 ) + 1
T CONV = ---------------------------------------------------------------fs
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
(10)
Page 21
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Measuring pressure with SX8725
ADVANCED COMMUNICATIONS & SENSING
Application note
The figure 5 shows the conversion time vs. the resolution with a sampling frequency of 500kHz whit different values for
NELCONV and OSR.
Figure 5. Resolution vs. Conversion time with different NELCONV and OSR settings
ST0002_01_US
The resolution is determined by two programmable parameters: the over-sampling frequency fs and the Number of
Elementary Conversions NELCONV. Increasing NELCONV does not increase the resolution as fast as increasing OSR as
shown in table 2.
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 22
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Measuring pressure with SX8725
Application note
ADVANCED COMMUNICATIONS & SENSING
NELCONV
OSR
1
2
4
8
6
7
8
8
9
16
8
9
10
11
32
10
11
12
13
64
12
13
14
15
128
14
15
16
256
16
16
16
16
16
512
16
16
16
16
1024
16
16
16
16
Table 2 : Resolution vs. OSR and NELCONV
Example iv:
Situation: A resolution of 16 bits must be obtained in less than 10 ms with a sampling frequency of 500kHz.
What are the corret settings to reach the wanted resolution ?
Solution:
The parameters OSR=512 and NELCONV=8 permit to obtain this result according to figure 5.
3. MPX2202AP sensor
MPX2202AP from Freescale is a single monolithic silicon diaphragm with a strain gauge and a thin-film resistor network
integrated on-chip. It features temperature compensation over 0ºC to 85ºC which makes it easy to use and commonly use
in medical application and robotics, barometers, altimeters…
It is given range is 0 to 2000hPA with 40mV full scale span for 10V supply voltage. The figure 6 is a plot of the output
voltage versus the differential pressure.
ST0002_01_US
Figure 6. MPX2202AP diaphragm
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 23
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Measuring pressure with SX8725
Application note
ADVANCED COMMUNICATIONS & SENSING
4. Measuring pressure from MPX2202AP pressure sensor
Based on the examples described in the previous section, the sensor measuring application is designed.
4.1. Connection to the sensor
Output voltage of the sensor is intrinsically differential then it is advantageous to use the differential input. An output of the
GPIO can be used to bias sensor. The digital pins are able to deliver a driving current up to 8 mA. The connections to the
sensor are then straightforward as shown in figure 7.
AC2 is the negative input while AC3 is positive.
The differential input voltage VIN is then equals to:
(11)
V IN = V INP – V INN = AC 3 – AC 2
VDD
VBATT
D0
D1
VPUMP
SX8725
READY
3
4 Vout2 Vout+
1
AC2
AC3
SCL
SDA
VSS
SENSOR
Figure 7. Sensor connection to the SX8725
4.2. Calculating the overall gain
The pressure sensor has a ratiometric comportment: biased under 5V the span is 20mV. If the internal reference Vref is
used to be the reference voltage of the ADC, the gain to applied is calculated with the following formula according to rule nº
3 seen previously.
SensorSpan 1
Gain = ------------------------------- ⋅ ---------Vref
0.75
(12)
The sensor output span will be 10mV in our application when measuring pressure from 1000hPa to 2000hPa.
ST0002_01_US
According to the SX8725 datasheet, Vref is around 1.22V. Therefore, the gain to applied to obtain the full resolution is 97.6.
4.3. Distributing the gain
This gain of 97.6 has to be distributed over the 3 amplification stages. By using the flowchart on figure 4 the following result
are found :
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 24
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Measuring pressure with SX8725
Application note
ADVANCED COMMUNICATIONS & SENSING
PGA1 is bypassed.
PGA2 is set with a gain of 10.
PGA3 is set with a gain around 97.6/10. The available closest seiting is 117/12=9.75.
4.4. Offset calculation
4.4.1. PGA2 setting
The output signal 10-20mV from the sensor is amplified with stage 2. After the amplification of 10, output voltage of PGA2
is 100-200mV. The medium voltage is then 150mV.
An offset should be substracted to the signal to recenter it. After the offset block, the medium voltage should be the closest
to 0 V. The ideal value of 150mV can’t be set exactly. The best coefficient is 0.2 (xVref) wich makes an offset voltage of
244mV. The medium voltage at the output of stage 2 is -94mV.
4.4.2. PGA3 setting
The block 2 output is amplified by stage 3.
The medium theorical voltage at the output of the amplifier 3 is -916.5 mV. A negative offset should be substracted to make
the medium voltage closest to 0 V. The best coefficient of -0.75 (xVref) makes an offset voltage of -915mV.
4.4.3. PGAsetting
The table 3 sum up the configuration used for the ZoomingADC™.
It is necessary to check that amplifier output do not exceed the limits stated in rule 2. The results of this checking is shown
in table 4.
Gain
PGA1
48.8
Disabled
Disabled
Gain
105
PGA2
Offset
0.20
PGA3 Gain
Offset
117/12
127/12
-9/12
05/12
Table 3 : PGAs setting
Se nsor PGA2
PGA2
output output
output
(m v)
(m V)
m a x (m v)
min
10
0 > -610 mV ?
max
20
100 < 610mV ?
Che ck
OK
OK
PGA3
PGA3
output
output
(m V)
m a x (m v)
-508.33 > -610 mV ?
466.67 < 610mV
?
Che ck
OK
OK
ST0002_01_US
Table 4 : PGA output stage voltage
4.5. Resolution setting and conversion time
The system must have a resolution of 5Pa on a total range of 2000hPa. The minimum resolution is then:
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 25
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Measuring pressure with SX8725
Application note
ADVANCED COMMUNICATIONS & SENSING
2
2000 ×10
Resolution min = ----------------------- = 40000
5
That means the ADC resolution must be 16 bits (65536 output codes > 40000). As stated in the requirements, 100 samples
per second have to be processed by the ADC.
The example iv with figure 5 explain that parameters OSR=512 and NELCONV=8 is a good configuration which respect
the time constraint with this 16 bits resolution.
Time of the conversion is calculated below.
8 ⋅ ( 512 + 1 ) + 1
- = 8.21 ms
T CONV = --------------------------------------3
500 ⋅ 10
5. SX8725 configuration
Registers are configured in this section according to the setting calculated previously.
5.1. RegACCfg0 register
The RegACCfg0 register control the number of elementary conversion (NELCONV) and the oversampling ratio (OSR).
NELCONV and OSR are not directly selected on register RegACCfg0. The relations between NELCONV and SET_NELC
hence OSR and SET_OSR are shown in equation 13 and equation 14.
NELCONV = 2 SETNELC
(13)
OSR = 2 3 + SETOSR
(14)
The ADC is configured in continuous mode to acquire regularly the pressure.
RegACCfg0 (0x52)
1
1
1
1
1
0
1
0
(rw) START
Starts an ADC conversion
(rw) SET_NELC[1:0]
Sets the number of elementary conversions
NELCONV=8
(rw) SET_OSR[2:0]
Sets the ADC over-sampling rate
OSR=512
(rw) CONT
Sets continuous ADC conversion mode
unused
ST0002_01_US
Table 5 : RegACCfg0 settings
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 26
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Measuring pressure with SX8725
Application note
ADVANCED COMMUNICATIONS & SENSING
5.2. RegACCfg1 register
Activation of PGA and ADC are done in RegACCfg1 register. Part of this register allows decreasing of the power
consumption of the chip by reducing the current in ADC and PGA blocks when it doesn’t work at full speed. This function is
not used in this application. Setting is described in table 6.
RegACCfg1 (0x53)
1
1
1
1
1
1
0
1
(rw) IB_AMP_ADC[1:0]
Bias current selection for the ADC
100% nominal current
(rw) IB_AMP_PGA[1:0]
Bias current selection for the PGA
100% nominal current
(rw) ENABLE[3:0]
ADC and PGA stage enables
PGA 3 enable
PGA 2 enable
PGA 1 disable
ADC enable
Table 6 : RegACCfg1 setting
5.3. RegACCfg2 register
Sampling frequency is selected in RegACCfg2 register. Gain and Offset are also set in this register according to table 7.
RegACCfg2 (0x54)
1
1
1
1
1
0
0
1
(rw) FIN[1:0]
ADC Sampling Frequency selection
Fs=500kHz
(rw) PGA2_GAIN[1:0]
PGA2 gain selection
PGA2=10
(rw) PGA2_OFFSET[3:0]
PGA2 offset selection
PGA2=-0.2
Table 7 : RegACCfg2 settings
5.4. RegACCfg3 register
ST0002_01_US
PGA1 and PGA3 gain selection are made in RegACCfg3. Gain for PGA1 is set to 1 but anyway it is disabled.
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 27
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Measuring pressure with SX8725
Application note
ADVANCED COMMUNICATIONS & SENSING
RegACCfg3 (0x55)
0
1
1
1
0
1
0
1
0
0
1
0
1
1
(rw) PGA1 gain selection
PGA1=1
(rw) PGA3 gain selection
PGA3=117/12
117=(1110101)2
Table 8 : RegACCfg3 setting
5.5. RegACCfg4 register
RegACCfg4 sets the gain and offset for PGA3. Description of this register is made in table 9.
RegACCfg4 (0x56)
-
1
0
0
1
PGA3_OFFSET[6:0]
(rw) PGA3 offset selection
PGA3=-9/12
-9=(1001001)2
Table 9 : RegACCfg4 setting
5.6. RegACCfg5 register
Selection of analog and reference input selection are made through RegACCfg5 register.
Content of RegACCfg5 register is described in table 10.
RegACCfg5 (0x57) = 0x03
0
0
0
0
0
(r) BUSY
Set to 1 if a conversion is running
(w) DEF
Sets all values to their defaults and start a
new conversion
(rw) AMUX[4:0]
Set the mode
Differential inputs -> 0
ST0002_01_US
Set the sign : positive polarity ->0
Set the channel to 1 ->1
(rw) VMUX
Sets the differential reference channel :
VREF ->1
Table 10 : RegACCfg5 setting
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 28
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Measuring pressure with SX8725
Application note
ADVANCED COMMUNICATIONS & SENSING
6. Using the evaluation board
The SX8725 can be evaluated easily by using the XE8000EV121EVK which is configured with an SX8724. The only
difference is the ADC differential input number which is 3 for the SX8724 instead of 1 for the SX8725. The setup and
register will be the same if the AC2-AC3 differential input is set on the SX8724.
The evaluation kit contains an evaluation board and a software which drives it via a USB connection. The board has a large
area where the sensor can be solder and interface the SX8724 to the sensor is straightforward with the connections
available.
The software makes the setting of the chip easy. Two tabs “ZoomingADC™” and “General” permits the configuration of the
PGA and the ADC for the first tab and the GPIO, the charge pump, the oscillator for the second one.
Registers content of SX8724 can be enter directly on the right side of the interface or by checking and selecting the
parameters in the scrolling bars.
ST0002_01_US
Tab to set
parameter of
ZoomingADC
Registers can
be set directly
Figure 8. Graphical interface view of SX87xx evaluation software
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 29
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Measuring pressure with SX8725
ADVANCED COMMUNICATIONS & SENSING
Application note
Each parameter can be set on the different tab (“Inputs”, “PGA”, “ADC”) and the final result is shown on the “Overview” tab
as shown in figure 8.
General configuration is sum up in figure 9.
Figure 9. General tab display
7. Calibration procedure
To improve the accuracy, each sensor must be calibrated to compensate for part-to-part variations. In order to perform a
two point calibration, the offset and the gain of the sensor must be calculated (the assumption of linearity is done on the
sensor).
7.1. Measure
ST0002_01_US
The pressure sensor is connected to a pressure regulator in order to perform measurements. The figure below describes
the pneumatic connection.
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 30
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Measuring pressure with SX8725
Application note
ADVANCED COMMUNICATIONS & SENSING
R e fe ren ce
G au g e
P re ssu re
so u rce
P re ssure
re gu la tor
V alve
P ressu re se n so r
Figure 10. Pneumatic schematic
A set of measures is done with different pressure applied to the sensor between 1000 hPa and 2000 hPa. The ADC output
code is recorded for each pressure applied. The table 11 is then constituted.
ADC
ADC
ADC
ADC
Pressure Output Pressure Output Pressure Output Pressure Output
(hPa)
code (hPa)
code (hPa)
code (hPa)
code
999.4
1016.3
1049.5
1065.1
1084.5
1105.2
1129.6
1154.6
1182.8
1212.8
1241.0
-27828
-26874
-24996
-24132
-23026
-21858
-20503
-19103
-17482
-15851
-14266
1270.4 -12645
1292.3 -11364
1320.5 -9809
1345.5 -8409
1376.2 -6674
1401.2 -5278
1426.3 -3889
1458.8 -2092
1495.1
-35
1500.1
193
1520.2 1374
1543.9
1567.1
1590.3
1611.5
1632.8
1658.5
1682.3
1706.7
1727.3
1746.7
1767.4
2679
3965
5258
6431
7654
9080
10418
11761
12921
14004
15170
1786.8
1810.6
1833.7
1856.9
1880.0
1903.2
1927.6
1939.5
1969.5
1995.8
16236
17608
18873
20205
21496
22768
24134
24794
26511
27965
Table 11 : Pressure measures at ambiant temperature
ST0002_01_US
7.2. Calibration curve
The calibration curve give an idea of how linear is the sensor. If the pressure is applied in the linear response range of the
sensor, the plot should be a straight line. Unfortunately, the system is not perfect and a best-fit straight line should be
computed. The best-fit straight line can be found by linear regression analysis. The least squares criterion is a good
method which consist to minimize the sum of squared errors.
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 31
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Measuring pressure with SX8725
Application note
ADVANCED COMMUNICATIONS & SENSING
Deviations from the best-fit line give a good indication about the precision of the result. It provides an empirical relationship
which depend of the measurement condition for example the temperature. The R-Squared value is often computed by
statistical tools. It is a statistic that will give some information about the goodness of fit of a model. If the R-Squared value
is 1.0, then the regression line perfectly fits the data. If R-Squared is null there is no linear relationship between the
variable.
In our application it is a statistical term saying how good the ADC output code is at predicting the pressure. The value of RSquared of 1 says that the linear model is a good model for the sensor.
Calibration curve
2000
y = 0.0179x + 1496.1
2
R =1
1800
Pressure (hPa)
1600
1400
1200
Mesures
Best Fit Line (Measures)
1000
-32768
-24576
-16384
-8192
0
8192
16384
24576
32768
ADC Output code
Figure 11. Measures and Best Fit Straight Line
The Best Fit Line equation is :
ST0002_01_US
Pressure ( hPa ) = 0.0179 × ADCOutputcode + 1496.1
It could be coded on a microcontroller interfaced to the ADC to display the pressure measured on a LCD.
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 32
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/
Sensing products
Application note
ADVANCED COMMUNICATIONS & SENSING
© 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 Communications & Sensing Products
E-mail: [email protected]@semtech.comInternet: http://www.semtech.com
USA
200 Flynn Road, Camarillo, CA 93012-8790.
Tel: +1 805 498 2111 Fax: +1 805 498 3804
FAR EAST
12F, No. 89 Sec. 5, Nanking E. Road, Taipei, 105, TWN, R.O.C.
Tel: +886 2 2748 3380 Fax: +886 2 2748 3390
EUROPE
Semtech Ltd., Units 2 & 3, Park Court, Premier Way, Abbey Park Industrial Estate, Romsey, Hampshire, SO51 9DN.
Tel: +44 (0)1794 527 600 Fax: +44 (0)1794 527 601
ST0002_01_US
ISO9001
CERTIFIED
AN8725.01 Revision 1.1/May 2008
©2008 Semtech Corp.
Page 33
www.semtech.com
/products/wireless_&_sensing/sensing_-_data_acquisition/