Freescale Semiconductor AN1636
Application Note Rev 2, 10/2007
Implementing Auto-Zero for Integrated
Pressure Sensors
by: Ador Reodique
Sensor Systems and Applications Engineering
INTRODUCTION A two-point pressure calibration can be performed to
accurately determine the sensitivity and get rid of the offset
This application note describes how to implement an auto-
calibration errors altogether. However, this can be very
zero function when using an integrated pressure sensor with
expensive in a high volume production due to extra time and
a microcontroller and an analog to digital converter (MCU and
labor involved. The system designer therefore designs a
an A/D). Auto-zero is a compensation technique based on
pressure sensor system by relying on the sensitivity and offset
sampling the offset of the sensor at reference pressure
data given in the data sheet and using a linear equation to
(atmospheric pressure is a zero reference for a gauge
determine the pressure. Using the later, the sensed pressure
measurement) in order to correct the sensor output for long-
is easily determined by:
term offset drift or variation.
Sources of offset errors are due to device to device offset P = (VOUT – VOFF)/S
variation (trim errors), mechanical stresses (mounting
stresses), shifts due to temperature and aging. Performing If an offset error is introduced due to device to device
auto-zero will greatly reduce these errors. The amount of error variation, mechanical stresses, or offset shift due to
correction is limited by the resolution of the A/D. temperature (the offset has a temperature coefficient or TCO),
In pressure sensing applications where a zero-pressure those errors will show up as an error, ΔP, in the pressure
reference condition can exist, auto-zero can be implemented reading:
easily when an integrated pressure sensor is interfaced to an P+ ΔP = [VOUT − (VOFF + ΔVOFF)]/S
MCU.
As evident in Figure 2, offset errors, ΔVOFF, have the effect
EFFECTS OF OFFSET ERRORS of moving the intercept up and down without affecting the
Figure 1 illustrates the transfer function of an integrated sensitivity. We can therefore correct this error by sampling the
pressure sensor. It is expressed by the linear function: pressure at zero reference pressure (atmosphere) and
subtracting this from the sensor output.
VOUT = VOFF + [(VFSO - VOFF)/(PMAX - PREF)] × P = VOFF + S × P
Here, VOUT is the voltage output of the sensor, VFSO is the Sensor Output VOUT
full-scale output, VOFF is the offset, PMAX is the maximum
pressure and PREF is the reference pressure. Note that VFSO
(VFSO = -VOFF/PMAX - PREF) can be thought of as the slope of
the line and VOFF as they y-intercept. The slope is also
referred to as the sensitivity, S, of the sensor.
VP
Sensor Output
ΔVOFF
VFSO
ΔP
VOFF Pressure
Span
PREF(atm) P PMAX
S
Figure 2. Effect of Offset Errors
VOFF
Pressure
PREF PMAX
Figure 1. Definition of Span, Full-Scale Output, Offset
and Sensitivity
© Freescale Semiconductor, Inc., 2005, 2007. All rights reserved.
AUTO-ZERO CONSIDERATIONS There is a difference in Auto-zero and Factory Calibration.
IN APPLICATIONS Although a product can be calibrated with auto-zero at the
factory, variations in environment may cause the need for the
There is an important consideration when implementing product to be auto-zeroed just before usage. Continuous
auto-zero. In order to use this technique, a zero pressure usage of Auto-zero can also lead to improved measurement
reference condition must be known to exist in the system. than a one-time application.
There are a lot of applications that will lend themselves A look up table can cause skewed results, the atmospheric
naturally to auto-zeroing. Typical applications are those that: pressure can differ from the factory location, or the particular
• Experience a zero-pressure condition at system start up, temperature can shift in the customer’s location. Auto-zero in
• Are idle for a long time (zero pressure), take a pressure the operating cycle will improve accuracy by compensating for
measurement then go back to idle again. these offset shifts.
For example, in a water level measurement in a washing
machine application, there is a zero pressure reference IMPLEMENTATION OF AUTO-ZERO WITH A
condition when the water in the tub is fully pumped out. MICROCONTROLLER
Another application that is perfect for auto-zeroing is a Auto-zero can be implemented easily when the integrated
beverage fill level measurement; a zero reference condition sensor is interfaced to a microcontroller. The auto-zero
exists before the bottle is filled. HVAC air flow applications can algorithm is listed below:
also use auto-zeroing; before system start up, an auto-zero
1. Sample the sensor output when a known zero
can be initiated. In other words, it can be used in applications
reference is applied to the sensor (atmospheric
where a zero pressure condition can exist in order to auto-
pressure is a zero reference for gauge type
zero the system. Remember that such a condition may exist
measurement). Store current zero pressure offset as
in a product during its startup, or at its shutdown. The
CZPO.
operation cycle should be scrutinized for auto-zeroing
2. Sample the sensor output at the current applied
opportunities.
pressure. Call this SP.
An auto-zero command can be automated by the system or
can be commanded manually. Each system will have a 3. Subtract the stored offset correction, CZPO, from SP.
different algorithm to command an auto-zero signal. For The pressure being measured is simply calculated as:
example, using the beverage fill level measurement as an PMEAS = (SP − CZPO)/S
example, the system will auto-zero the sensor before the
bottle is filled. Note that the equation is simply a straight line equation,
where S is the sensitivity of the sensor. The auto-zero
algorithm is shown graphically in Figure 3.
Start
Sample Current Zero Offset, CZPO
Sample Current Pressure, SP
Calculate Pressure
SP – CZPO
PMEAS =
S
Measure Again Auto-Zero Command Received
End
Figure 3. Flowchart of the Auto-Zero Algorithm
AN1636
Sensors
2 Freescale Semiconductor
IMPROVEMENT ON OFFSET ERROR A/D Error
In the following calculations, we will illustrate how auto-zero As mentioned above, we can reduce offset errors
will improve the offset error contribution. We will use the (calibration and TCO) when we perform auto-zero. These
MPXV4006G interfaced to an 8-bit A/D as an example. When errors are replaced with the A/D error (due to its resolution),
auto-zero is performed, the offset errors are reduced and the
ΔOFFSETAUTOZERO = ΔTCO + ΔOFFSET = ΔA/D
resulting offset errors are replaced with the error (due to
resolution) of the A/D. We can categorize the offset error Typically, a sensor is interfaced to an 8-bit A/D. With the
contributions into temperature and calibration errors. A/D reference tied to VRH = 5.0 V and VRL = 0 V, the A/D can
resolve 19.6 mV/bit. For example, the MXPV4006G has a
Temperature Coefficient of Offset Error sensitivity of 7.5 mV/mm H20, the resolution is therefore
The offset error due to temperature is due to Temperature A/DRESOLUTION = 19.6 mV/bit)/(7.5 mV/mm H20) = 2.6 mm H20/bit
Coefficient of Offset, or TCO. This parameter is the rate of
change of the offset when the sensor is subject to Assuming ± 1 LSB error, the error due to digitalization and
temperature. It is defined as: the resulting offset error is,
TCO = (ΔVOFF/ΔT) ΔA/D = ΔOFFSETAUTOZERO =2.6 mm H20/612 mm H20 = ±0.4% FS
The MPXV4006G has a temperature coefficient of offset It can be seen that with increasing A/D resolution, offset
(normalized with the span at 25°C) of: errors can be further reduced. For example, with a 10-bit A/D,
the resulting offset error contribution is only 0.1% FS when
ΔTCO = (ΔVOFF/ΔT)/VFS@25°C = 0.06% FS/°C
auto-zero is performed. For a higher resolution converter,
As an example, if the sensor is subjected to temperature such as a 12-bit A/D, the resulting offset error contribution is
range between 10°C and 60°C, the error due to TCO is: 0.03% of FS.
If auto-zero is to be performed only once and offset
ΔTCO = (0.06% FS/C)×(60°C - 10°C) = ±3.0% FS correction data is stored in non-volatile memory, the TCO
offset error and calibration error will not be corrected if the
Offset Calibration Errors sensor later experiences a wide temperature range or later
Even though the offset is laser trimmed, offset can shift due experience an offset shift. However, if auto-zero is performed
to packaging stresses, aging and external mechanical at the operating temperature, TCO error will be compensated
stresses due to mounting and orientation. This results in offset although subsequent offset calibration error will not be
calibration error. For example, the MPXV4006G data sheet compensated. It is therefore best to auto-zero as often as
shows this as: possible in order to dynamically compensate the system for
offset errors.
VOFF MIN = 0.100 V,
VOFF TYPICAL = 0.225 V and VOFF MAX = 0.430V CONCLUSION
Auto-zero can be used to reduce offset errors in a sensor
We can then calculate the offset calibration error with system. This technique can easily be implemented when an
respect to the full scale span as: integrated pressure sensor is interfaced to an A/D and a
ΔVOFF MIN,MAX = microcontroller. With a few lines of code, the offset errors are
(VOFF TYPICAL - VOFF MIN,MAX)/VFS effectively reduced; the resulting offset error reduction is
limited only by the resolution of the A/D.
This results in the following offset calibration error,
ΔVOFF MIN = 2.7% FS and
ΔVOFF MAX = 4.5% FS
AN1636
Sensors
Freescale Semiconductor 3
How to Reach Us:
Home Page:
[Link]
Web Support:
[Link]
USA/Europe or Locations Not Listed:
Freescale Semiconductor, Inc.
Technical Information Center, EL516
2100 East Elliot Road
Tempe, Arizona 85284
+1-800-521-6274 or +1-480-768-2130
[Link]/support
Europe, Middle East, and Africa: Information in this document is provided solely to enable system and software
Freescale Halbleiter Deutschland GmbH implementers to use Freescale Semiconductor products. There are no express or
Technical Information Center implied copyright licenses granted hereunder to design or fabricate any integrated
Schatzbogen 7
81829 Muenchen, Germany circuits or integrated circuits based on the information in this document.
+44 1296 380 456 (English)
+46 8 52200080 (English) Freescale Semiconductor reserves the right to make changes without further notice to
+49 89 92103 559 (German) any products herein. Freescale Semiconductor makes no warranty, representation or
+33 1 69 35 48 48 (French)
[Link]/support guarantee regarding the suitability of its products for any particular purpose, nor does
Freescale Semiconductor assume any liability arising out of the application or use of any
Japan: product or circuit, and specifically disclaims any and all liability, including without
Freescale Semiconductor Japan Ltd. limitation consequential or incidental damages. “Typical” parameters that may be
Headquarters provided in Freescale Semiconductor data sheets and/or specifications can and do vary
ARCO Tower 15F in different applications and actual performance may vary over time. All operating
1-8-1, Shimo-Meguro, Meguro-ku, parameters, including “Typicals”, must be validated for each customer application by
Tokyo 153-0064 customer’s technical experts. Freescale Semiconductor does not convey any license
Japan under its patent rights nor the rights of others. Freescale Semiconductor products are
0120 191014 or +81 3 5437 9125
[Link]@[Link] not designed, intended, or authorized for use as components in systems intended for
surgical implant into the body, or other applications intended to support or sustain life,
Asia/Pacific: or for any other application in which the failure of the Freescale Semiconductor product
Freescale Semiconductor Hong Kong Ltd. could create a situation where personal injury or death may occur. Should Buyer
Technical Information Center purchase or use Freescale Semiconductor products for any such unintended or
2 Dai King Street unauthorized application, Buyer shall indemnify and hold Freescale Semiconductor and
Tai Po Industrial Estate its officers, employees, subsidiaries, affiliates, and distributors harmless against all
Tai Po, N.T., Hong Kong claims, costs, damages, and expenses, and reasonable attorney fees arising out of,
+800 2666 8080 directly or indirectly, any claim of personal injury or death associated with such
[Link]@[Link]
unintended or unauthorized use, even if such claim alleges that Freescale
For Literature Requests Only: Semiconductor was negligent regarding the design or manufacture of the part.
Freescale Semiconductor Literature Distribution Center
P.O. Box 5405 Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc.
Denver, Colorado 80217
1-800-441-2447 or 303-675-2140 All other product or service names are the property of their respective owners.
Fax: 303-675-2150 © Freescale Semiconductor, Inc. 2005, 2007. All rights reserved.
LDCForFreescaleSemiconductor@[Link]
AN1636
Rev. 2
10/2007