Handheld devices for measuring toxic gas, blood glucose, and similar applications are increasingly popular, and their low cost has made them throwaway devices, to be discarded when the battery or the sensor expires. Typical devices include a lithium (Li) primary cell, a sensor, an A/D converter (ADC), conditioning circuitry, a microcontroller unit (MCU), and an LCD. To minimize cost, the design often employs simple LED indicators, a low-cost 8-pin MCU, and a discrete dual-slope ADC. This note explains the use of "offset flipping" for on-the-fly calibration of the ADC.
A block diagram of the circuit (Figure 1) includes a single primary lithium (Li) cell, a millivolt-output bridge sensor, a differential amplifier, and the dual-slope ADC, plus correction circuitry for offset, zero, and span.
Figure 1: Block diagram of the slope-ADC calibration circuit.
(Click to enlarge image)
Component values are selected on assumption that the Li-cell voltage ranges from 2.2 V to 3.6 V. Because that voltage serves as bias for the bridge and also as reference for the ADC, the ADC input and its full-scale output (span) move together as the cell voltage changes. This ratiometric configuration minimizes error and eliminates the need for a precision voltage reference.
The sensor (S1) produces 20 mV/V at full scale (Figure 2).
Figure 2: This circuit (depicted in Figure 1) produces offset and span readings, to be stored and used for on-the-fly calibrations of a dual-slope A/D converter
(Click to enlarge image)
For a 3.6 V Li cell, therefore, the output is:
20 mV/V x 3.6 V = 72 mV. The dual op amp (U2) draws only 18 μA of quiescent current per amplifier. Its outputs swing rail-to-rail, and operate down to 1.8 V. U2A is configured as a standard differential amplifier with gain of 30. Operating with a 3.6 V lithium cell, it achieves a full-scale output of 2.160 V. (Note that the resistor network around a differential amplifier loads the input-signal source (sensor), so the sensor should have a low output impedance. If not, you should buffer the sensor with an instrumentation amplifier or equivalent.)
The precision resistor dividers (RN1, RN2, and RN3) are available with accuracies from 0.035% to 0.1% (0.1% was selected for this design), and with divider ratios that exhibit a very low temperature coefficient. The resulting differential-amplifier output is
VOUTA = VREF + RB/RA [(VINA- - VS1-)] " RC/RD [(VINA+ -VS1+)],
VINA- is the negative input of amplifier U2A,
VINA+ is the positive input of amplifier U2A, and
VS1- and VS1+ are the sensor outputs.
Since RB/RA = RC/RD = 30, the equation simplifies to
VOUTA =VREF + 30[(VS1+ - VS1-)].
Precision divider RN3 is connected between VLi and ground (GND) to generate the offset voltage (VREF), and RE = 30RF.
Note that you can alter the magnitude of VREF (from VLi/31 to 30VLi/31) by toggling the switches U1X and U1Y, which swaps the divider connections to VLi and GND. For VLi = 3.6 V, VREF is
VREF = RF/(31RF)(VLi) = VLi/31 = 0.116 V.
This offset voltage simplifies calibration by ensuring that the U2A output remains positive at VLi/31. VREF is buffered by U2B to eliminate the effects of RN2 loading. Thus, we have a millivolt sensor amplified by a difference amplifier with a gain of 30 and zero offset of VLi/31.
Now to calibrate the ADC: Section U1Z of the triple-SPDT switch is used to short sensor outputs VS1+ and VS1- together. Its low impedance (maximum value is 1.2 Ω) is negligible compared to the resistance of the sensor bridge (300 Ω to 500 Ω). Otherwise, the resistor network of the differential amplifier would impose an excessive load on the sensor. The output of U2A therefore equals VREF plus the net effect of offset and gain errors.
To zero the ADC, configure U1Z (via its digital input "C") to connect Z to Z1, and set VREF in the normal operating mode by connecting X to X1 (using "A") and Y to Y1 (using "B"). An ADC conversion now provides a zero reading.
To obtain a full-scale reading (span), reverse the resistor divider RN3 by toggling the U1X and U1Y switches. Z remains connected to Z1. VREF now becomes VREF = (30/31)VLi.
For VLi = 3.6 V, VREF = 3.484 V.
The output of amplifier A now "flips" to VREF = 3.484 V, plus the net effect of offset and gain errors. An ADC conversion in this configuration provides a span reading of (30/31)VLi.
Following the span measurement, return the reference to its normal state by connecting X to X1 and Y to Y1, and remove the sensor short by connecting Z to Z0. You have now calibrated the ADC by generating a code for zero and a code for span. This technique can be executed on-the-fly, at any time a calibration is needed. The use of low-cost, off-the-shelf, precision resistor dividers provides good accuracy and temperature stability.
About the authors
Greg Sutterlin is a Senior Field Applications Engineer at Maxim Integrated Products, based in Dallas, where he has been for nine years. He started his design career at Packard Electric/ GM in Warren, OH in 1984, then moved to Mine Safety Appliances in Cranberry, PA, and then to Respironics in Murrisville, PA. He has a BSEE (1984) and an MSEE from the University of Pittsburgh.
Vladimir Vitchev is no longer with Maxim.