Design Considerations for a Low-Cost Sensor and A/D Interface
Abstract
Most sensors are inherently analog and must have their signals digitized before they can be used in today's electronic systems. This application note will cover the basics of ratiometric sensors and how they interact with analog-to-digital converters (ADCs). In particular, it will show how the ratiometric characteristics of sensors and ADCs can be exploited to improve accuracy while simultaneously reducing component count, lowering cost, and reducing board space.
Note: For the purposes of this article ratiometric means that the output of the device is dependent on the ratio of the property being measured and some other voltage or current.
Sensors and Resistive Sensing Elements
Many sensor outputs are proportional to, or ratiometric to their supply voltage. This is usually because the outputs' sensing element is a ratiometric device. The most common ratiometric elements are resistors whose values change as the intensity of the property being measured changes. Resistance temperature detectors (RTDs) and strain gauges are examples of resistive sensing elements.
Resistive elements are ratiometric because resistance is not measured directly. It is determined by the ratio of the voltage across the resistor to the current through the resistor.
R = V/I Eq. 1 (Ohms law)
Sensors using resistive elements typically send a current through the resistor and measure the resulting voltage. This voltage can be amplified and level shifted before reaching the sensor's output, but it is still dependent on the current through the resistor. If that current is derived from the supply voltage, then the sensor's output will be ratiometric to the supply voltage. Equation 2 describes the output of a generic ratiometric sensor (Figure 1), where Vs is the output signal, Ve is the excitation voltage, S is the sensitivity of the sensor, P is the intensity of the property being measured, and C is the offset of the sensor.
Vs = Ve (P x S + C) Eq. 2
Figure 1. Generic ratiometric sensor.
The Honeywell™[1] MLxxx-C series of pressure transducers is typical of many ratiometric automotive sensors. When operated at the nominal supply voltage of 5V, the offset voltage is 0.5V and the full-scale output is 4.5V. If the excitation voltage changes, there will be a proportional change in both the offset voltage and the full-scale output.
Needing to know the excitation voltage in order to use the output signal is very inconvenient in many applications. To solve this problem manufacturers add a voltage reference to the circuit. These devices provide a very accurate voltage independent of temperature and the supply voltage. If the current flowing through the sensing resistor is derived from a voltage reference, then Ve in Equation 2 is replaced by a constant. This gives rise to Equation 3, where the new constant is incorporated in S2 and C2.
Vs = P x S2 + C2 Eq. 3
Equation 3 is not ratiometric because the output signal is only a function of the property being measured. Honeywell's MLxxx-R5 series of pressure transducers is an example of nonratiometric sensors. The offset is 1V and the full-scale output is 6V when operated with any supply voltage between 7V and 35V.
Analog to Digital Converters (ADCs) as Resistance Devices
The ADCs used to digitize sensor signals are also ratiometric devices. Regardless of their internal architecture, all ADCs operate by comparing the unknown input voltage to a known reference voltage. The digitized output of the converter is the ratio of the input voltage to the reference voltage times the full-scale reading of the ADC. To allow for internal amplification and variations in design, a scaling factor, K, may also be needed. Whatever the value of K, it will remain fixed as long as the configuration of the ADC is unchanged. Equation 4 describes a generic ADC's (Figure 2) digital reading (D) in terms of the input signal (Vs), the reference voltage (Vref), the full-scale reading (FS), and the scale factor (K).
D = (Vs/Vref)FS x K Eq. 4
Figure 2. Generic analog-to-digital converter.
The source of the reference voltage depends on the design of the ADC. In some ADCs the reference is the supply voltage, in others it comes from an internal voltage reference, and with others the user must connect a reference voltage to the Vref input on the ADC. If the reference voltage has been made constant through the use of an internal or external voltage reference, then Equation 4 can be simplified to Equation 5, where K2 is a new constant equal to FS x K/Vref.
D = Vs x K2 Eq. 5
Measuring the Sensor
The output of a small system consisting of a nonratiometric sensor and an ADC with a fixed voltage reference can be seen by substituting Equation 3 (the output of the sensor) for Vs (the input of the ADC) in Equation 5. This results in Equation 6.
D = P x S2K2 + C2K2 Eq. 6
Equation 6 provides exactly what is needed. The digital value (D) is proportional to changes in P and is only affected by changes in P. D is not affected by changes in temperature or supply voltage.
Eliminating the Voltage Reference
Using voltage references to stabilize sensors and ADCs is a valid and necessary technique. It is not, however, always the best technique.
The remainder of this article will show how creative use of an ADC's reference voltage input can eliminate the voltage references and current sources used in many sensor circuits. This design saves component cost, board space, and overhead voltage. Small improvements in accuracy can also be achieved, as eliminating the voltage reference eliminates the errors associated with an imperfect reference. The automotive industry has taken advantage of these techniques for years. By specifying both sensors and ADC that are ratiometric to the supply voltage, the need for accurate voltages references is eliminated.
The use of similar techniques with current-driven sensors and single-element resistive sensors such as RTDs is less common. With all these circuits the ADC's sensitivity will vary with temperature or supply voltage. The combination of the ADC and sensor input is, nonetheless, quite stable.
Sensors that Are Ratiometric to the Supply Voltage
By substituting Equation 2 for the input signal (Vs) in Equation 4, one can see the ADC measuring a ratiometric sensor. This results in Equation 7, which shows D as function of P, Ve, and Vref.
D = P(S x FS x K x Ve/Vref) + C(FS x K x Ve/Vref) Eq. 7
At first glance the approach in Equation 7 appears undesirable because the output (D) is a function of three variables, not just P. A closer look, however, shows that it is the ratio of Ve/Vref that is important, not the individual values. The ratio of Ve/Vref can inexpensively be made constant by deriving both voltages from the same source. Once this is done, D will be proportional to changes in P, and only changes in P. Setting Ve/Vref to a constant allows Equation 7 to be simplified to a form that matches Equation 6. This shows, therefore, that equivalent performance can be achieved without using voltage references.
From a practical standpoint, Ve and Vref must be large enough that noise is not a problem; they must also lie within the specified limits of the ADC and the sensor. Using the positive supply voltage as the source of both Ve and Vref usually satisfies all these conditions and allows numerous sensors to be powered in parallel, as shown in Figure 3[2].
The MAX1238 shown in Figure 3 has a 12-input multiplexer on the front-end and a built-in voltage reference. In this case, there would be no additional cost to add a reference to the ADC, but there would be a significant cost to add a reference to each of the ten sensors. The MAX1238 also allows the AN11 input to be used as the reference voltage. Using AN11 as the reference input and connecting it to the 5V supply sets the full-scale input of the ADC to 5V and allows it to be used with the ratiometric sensors. In Figure 3, the MAX1238's internal voltage reference is not wasted. Through software control the internal voltage reference can be selected and used for diagnostic purposes, such as measuring the supply voltage. This is done through a voltage-divider connected to input AN10.
Figure 3. The MAX1238 ADC allows the input from AN11 to serve as the reference voltage, thereby allowing the ADC to be used with ratiometric sensors.
The topology of Figure 3 works well in automotive applications and other applications where power is provided by a single voltage source and voltage drops along the power lines are small. It is not appropriate for applications where the sensor must operate with very long lead wires or applications where the ADC and sensors are powered by different supplies.
Current-Driven Bridges
In low-noise environments or systems where a pressure sensor is in close proximity to the ADC, it may not be necessary to use a sensor with an amplified signal. For these applications lower cost bridge-output sensors can be more appropriate. To reduce sensor cost while providing good performance over temperature, many of these pressure sensors, such as Nova Sensor's NPI-19 series[3], are powered by a current source rather than a voltage source. (See Appendix 1 for further discussion.) The output of a generic current-driven sensor is given by Equation 8, where Ie is the excitation current.
Vs= Ie (S x P+C) Eq. 8
Figure 4 includes a current source commonly used with a bridge-output sensor. The current source is created by using a resistor with a low TCR (Temperature Coefficient of Resistance), an op amp, and a voltage reference. If the ADC and pressure sensor are manufactured as an integral unit, the voltage reference for the current source can also provides the reference voltage for the ADC. In the circuit of Figure 4 the voltage reference stabilizes both the sensor and the ADC against changes in temperature or supply voltage.
Figure 4. In this design the current source for a current-driven sensor is comprised of a resistor, op amp, and voltage reference.
An alternate approach to Figure 4 is shown in the circuit of Figure 5, which does not require a current source or a voltage reference. It is important to note that, while the combination of the sensor and ADC is stable over temperature, both the ADC and the sensor have large temperature drifts. If measured independently, the sensor's sensitivity will decrease with rising temperature and the ADC's sensitivity will increase. Because the ADC's output is not stable over temperature, care must be taken when applying this technique to circuits where the ADC has multiple inputs.
Figure 5. Combining a sensor and ADC, this alternative design does not require a separate current source or voltage reference.
The derivation for Figure 5 follows with Equation 9:
Vref = Ie x R1 Eq. 9
Starting with the ADC Equation 4 above and substituting Equation 9 for Vref and Equation 8 for Vs, yields Equation 10.
D = [Ie (S x P+C)/(Ie x R1)](FS x K) Eq. 10
The excitation current (Ie) drops out because it is common to both the numerator and denominator. This yields Equation 11, which shows that the output is independent of the excitation current. If the constants in Equation 11 are combined, the result is once again equivalent to Equation 6: the system using voltage references.
D = P(S x FS x K/R1)+C(FS x K/R1) Eq. 11
R1 must have a low temperature coefficient if it is to behave as a constant. Requiring R1 to have good temperature stability is not a drawback of Figure 5 when compared to Figure 4, because the resistor in Figure 4 must also have good temperature stability.
R2 does not appear in Equation 11 and is not needed for this circuit. R2 is, nonetheless, included in this analysis to show that it does not affect the ADC reading. R2 can be replaced by another current-driven pressure sensor, an RTD, or the resistance of a solid-state switch without affecting the ADC reading.
Theoretically it is possible to use a multiple-input ADC with several current-driven sensors powered in series. However, placing sensors in series lowers the excitation current (Ie), the sensor signal (Vs), and the reference voltage (Vref). When placing sensors in series, special attention must be paid to the ADC's Vref requirements as well as system noise.
RTDs
The RTD is a second type of sensor frequently associated with current sources. RTDs are typically platinum-based and have a positive temperature coefficient of approximately 3,800 ppm/°C. The traditional method for measuring an RTD is to use it as one leg of a resistive bridge. In practice, however, bridges are seldom used. The low cost of high-resolution ADCs makes it economical to simply force a current through the RTD and measure the voltage across it directly. This approach eliminates the nonlinearity of an unbalanced bridge and the need for three precision resistors to complete the bridge.
The circuit in Figure 6 also measures the RTD (Rt) without using a bridge or requiring a stable current source. The circuit requires one stable reference resistor (R1) and one low-grade current-limiting resistor (R2).
Figure 6. This circuit does not require a bridge or stable current source to measure Rt.
The derivation of the circuit in Figure 6 follows:
Vs = (V+) x Rt/(R1+R2+Rt) Eq. 12
Vref = (V+) x R1/(R1+R2+Rt) Eq. 13
Starting with Equation 4 and substituting Equation 12 for Vs and Equation 13 for Vref, gives the output of the ADC in Figure 6. The results of this substitution can be simplified to yield Equation 14. Equation 14 shows that if R1 is stable, changes in D will be directly proportional to, and only dependent on, changes in Rt, which is the desired result.
D = FS x K x (Rt/R1) Eq. 14
As can be seen from Equation 14, R2 does not affect the reading; R2 reduces the power dissipated by Rt. If R2 did not have this effect, the self-heating of Rt could cause significant errors in the temperature reading. R2 also lowers the common-mode input voltage to the ADC. This is necessary for some ADCs where the common-mode input-voltage range is less than the supply voltage.
ADCs like the MAX1403 include current sources for driving RTDs. These are not, however, precision current sources and require some type of calibration. Calibration is frequently accomplished by using an additional ADC input to measure a reference resistor driven by the same current source. Software is then used to scale the measurement of the unknown resistor to the measurement of the known resistance. While this technique works quite well, using R1 as the reference resistor is simpler and does not require an additional ADC input. The onboard current source can still be used to excite the RTD and reference resistor. Replacing R2 in Figure 6 with a current source will not affect Equation 14.
Two matched current sources are provided on some ADCs for accurately measuring remote RTDs. The resistance of the long lead wires used in these applications adds to the resistance of the RTD, thus creating an error that must be removed. The lowest cost solution is to use a three-wire RTD. As shown in Figure 7, current source 1 is used to create a voltage drop across the RTD. This current also creates an unwanted voltage drop in the upper lead wire going to the RTD. To compensate for this unwanted voltage, current source 2 is used to create a voltage drop in the middle lead wire. Both currents are carried to ground by the bottom wire on the RTD. All three leads on the RTD are the same length and made of the same material, which make their resistances closely matched. Matched resistors carrying matched currents will have matching voltage drops. As a result, the voltage drops along the top two leads cancel each other, and the differential input voltage at the ADC will be the same as the voltage across the RTD.
Figure 7. The MAX1403 ADC has two matched current sources. In this circuit, current source 1 is used to create a voltage drop across the RTD, and current source 2 is used to create a voltage drop in the middle lead wire.
Temperature and Pressure
Figure 8 combines the concepts of Figures 5 and 6 to allow the measurement of both temperature and pressure using a simple circuit with a single resistor as the reference. The magnitude of Vs1 and Vs2 can be quite different. This difference is easily accommodated by changing the gain of the programmable gain amplifier (PGA) built into ADCs like the MAX1415. These converters allow the PGA to be set to a different gain for each channel. Changing the gain changes the value of K in Equation 4, thereby allowing a wide range of input voltages to be used with a single reference voltage.
Figure 8. A simple circuit with a single resistor as reference measures temperature and pressure.
The Wheatstone Bridge
The Wheatstone bridge was invented in the early days of electronics by Sir Charles Wheatstone (1802 to 1875). The Wheatstone bridge measures resistance by comparing the value of three known resistors to an unknown resistance. When the bridge is properly balanced, the resistance measurement is independent of the excitation voltage, meter accuracy, or the load that the meter places on the circuit. These were important factors at a time when voltage standards and high-quality meters were not readily available. Yet, bridge circuits remain popular today because they eliminate large offsets and reject temperature effects when all the bridge resistors have the same temperature coefficient.
Figure 9 is a Wheatstone bridge comprised of two voltage-dividers powered from the same voltage source. It is customary to draw bridges in a diamond configuration because that shape emphasizes the importance of having the same voltage supplied to each divider. The output of the bridge (Vo) is the difference in the output voltage of the two dividers (Equation 15). The bridge is said to be balanced when Vo is zero. In this condition, the exact value of the excitation voltage (Ve) is unimportant as Ve is being multiplied by a term with a value of zero. Equation 16 gives the value of an unknown resistor (Ru) in a balanced bridge. In practice it would be common to have Ra = Rb, which would reduce Equation 16 to Ru = Rc.
Figure 9. Illustration of a Wheatstone bridge which is comprised of two voltage-dividers powered from the same voltage source.
Vo = Vb(Rc/(Rc+Ru) - Rb/(Ra+Rb)) Eq. 15
If Vo = 0, then Ru = Rc x Ra/Rb Eq. 16
Today balanced bridge circuits are seldom used to measure resistance, but it is quite common to use an unbalanced bridge in a sensor. During factory calibration the bridge is usually balanced at a well-defined point; deviations from that point are measured by measuring the imbalance in the bridge. The benefits of using a bridge in this manner are easily seen in the following example.
Assume that a silicon strain gauge has been bonded to a diaphragm to make a pressure sensor and that a pressure resolution of 0.1% is desired. The value of the resistor is 5000Ω at 0psi and 25°C. At 100psi (full-scale pressure) and 25°C the value of the resistor has increased by 2% to 5100Ω. Besides being sensitive to strain, the resistor is sensitive to temperature and has a Temperature Coefficient of Resistance(TCR) of 2000ppm/°C.
Because the resistor changes 100Ω over the pressure range, it will be necessary to resolve 0.1Ω of resistance to achieve 0.1psi (0.1%) pressure resolution. Measuring 0.1Ω out of 5000Ω is 1 part in 50,000 or about 15.6 bits of resolution. A bigger problem than the resolution requirement is the affect of temperature changes. Due to a resistor's high TCR, a temperature change of 1°C will create the same change in resistance as a 10psi pressure change. That translates to 10% of full-scale per °C.
Now consider the same resistor used in a bridge circuit that has two volts of excitation. The other three resistors are 5000Ω each and have the same TCR as the sensing resistor. The resistors are mounted isothermally. There are two significant benefits to this approach.
The greatest benefit of the bridge in this application is that it rejects changes due to temperature. Examining Equation 15 shows that TCR no longer matters. The bridge resistors could double in value and the output would remain the same. As long as all the resistors change by the same percentage, the output does not change!
The second benefit of the bridge is that it reduces resolution requirements. The bridge's output is 0mV at 0psi and 10mV at 100psi. To resolve 0.1psi it will be necessary to resolve 10µV out of 10mV. This only requires 10 bits of resolution, compared to the 15.6 bits required if the resistance is measured directly.
From a practical standpoint, 10-bit ADCs cannot measure 10µV directly. The signal must be amplified. The cost of amplification can make it more attractive to use a higher resolution ADC that does not need an external amplifier. The big benefit of lower resolution comes from the reference requirements. It is generally impractical to design in a voltage reference, current source, or reference resistor that is stable to 16-bits over time and temperature.
The values in this example were not chosen to exaggerate the importance of the bridge. Rather, these values are typical of many piezoresistive pressure sensors (See Appendix 2).
Linearizing the Wheatstone Bridge
One drawback to using an unbalanced Wheatstone bridge is nonlinearity. The Ru term in the denominator of Equation 15 means that the bridge's output is not a linear function of Ru. The linearity error is small for very small changes in resistance, and becomes larger as the bridge becomes more unbalanced. Fortunately this error can be eliminated if the reference voltage for the ADC is taken from the bridge.
Figure 10 shows a simple temperature sensor with a digital display. The temperature-sensing element (Rt) is a platinum RTD. Platinum was chosen because of its linear resistance change with respect to temperature. The bridge circuit removes the unwanted signal at 0°, which allows the ADC reading to equal the temperature. Equation 17 gives the bridge signal (Vs) for Figure 10. Equation 18 is the reference voltage for the ADC. Both signals are nonlinear functions of Rt, but they work together to provide a linear result.
Figure 10. In this simple temperature sensor with a digital display, the bridge circuit removes the unwanted signal at 0°, which allows the ADC reading to equal the temperature.
Vs = (Vb)(R3/(R2+R3) - (R1/(R1+Rt)) Eq. 17
Vfer = (Vb)(R1/(R1+Rt) Eq. 18
The ADC's output, Equation 19, is obtained by starting with Equation 4 and substituting Equations 17 and 18 for Vs and Vref, respectively. Equation 19 shows that by using this reference voltage, the ADC output becomes a linear function of Rt, minus the desired offset term.
D = Rt(R3/(R1(R2+R3)) - R2/(R2+R3) Eq. 19
In Figure 10 R3b and R1b adjust offset and sensitivity respectively. When this is done the display will directly show the temperature in °C or °F. The only significant errors will come from the nonlinearity of the RTD its self. This error will be a few tenths of a degree between 0°C and 100°C.
The circuit in Figure 10 can also be calibrated digitally by using the serial interface on the MAX1492 ADC to correct the displayed reading for offset and sensitivity errors. This method of calibration not only eliminates the need for R1a and R3a, but it also provides an opportunity to correct for linearity errors in the RTD. If higher resolution measurements are needed, the MAX1492 can be replaced with the MAX1494, which provides an additional digit of resolution.
According to Equation 19, the value of R4 will not affect the reading. R4 has been added to the circuit to reduce the self-heating of the RTD. This also reduces the signal from the bridge and reduces the reference voltage. Although the MAX1492 does not have an internal PGA, it does allow for small reference voltages. Using a small reference voltage eliminates the need for additional amplification.
Conclusion
Simple circuits that maintain the proper relationship between the output of a sensor and the reference input of an ADC can eliminate the need for a voltage reference or a current source in many sensor applications. Besides reducing cost and saving space, these circuits can improve performance by eliminating the small errors generated by imperfect references.
A similar article appeared in the July, 2005 edition of Sensors magazine.
Appendix 1. Composition Characteristics of Current-Driven Sensors
The most common pressure sensors today are made from silicon wafers similar to those used for computer chips. Standard semiconductor processing techniques are used to implant four stress-sensitive resistors into the silicon and to apply metal traces that connect the resistors in a bridge configuration. A thin diaphragm is then created by selectively etching away silicon on the backside of the wafer. When finished, the backside of the wafer looks like a waffle with each dimple in the waffle corresponding to an individual pressure sensor. Mass production makes these sensors low cost. The properties of silicon make them robust and provide a relatively large output signal.
Silicon also has an undesirable characteristic that causes the sensitivity of these sensors to decrease with temperature, typically at rate greater than 2000ppm/°C. Fortunately it is possible to create bridge resistors whose resistance increases at the same rate as sensitivity decreases. When these sensors are powered by a current source, the bridge voltage will increase at the same rate that the sensitivity decreases. This provides an output signal that, over a limited temperature range, is temperature independent.
For the bridge circuit to reject changes in resistance due to temperature, it is critical that all four resistors have the same Temperature Coefficient of Resistance (TCR) and are at the same temperature. The silicon sensors easily meet these requirements. The small size of the sensor ensures uniform temperature, and fabricating all four resistors at the same time results in TCRs that are virtually identical.
It is also customary to have all four resistors respond to pressure. Two resistors will increase in value as the pressure increases and two resistors will decrease in value. This not only increases the output of the bridge by a factor of four, but it also eliminates the nonlinearity error seen in unbalanced bridges with a single active element.
Appendix 2. Voltage Regulators vs. Voltage References
Most circuits have at least one voltage regulator to supply a constant voltage for powering the ICs. While the accuracy, power supply rejection, and temperature stability of these regulators are fine for powering ICs, they fall sort of the stability needed for making high-accuracy analog measurements. Voltage references, however, can be extremely accurate over a wide temperature range, but do not have the load-handling capability of voltage regulators. The MAX8510, for example, has excellent specifications for a low-noise voltage regulator and could even be used as a reference in a low-accuracy application. Yet the MAX8510's voltage stability is an order of magnitude worse than low-noise voltage references like the MAX6126. Meanwhile the MAX6126 has excellent initial accuracy and stability, but it can only supply one tenth as much current as the MAX8510. Most nonratiometric measurement circuits require both a voltage regulator and a voltage reference.
Device | Function | Max Load | Accuracy @ 25°C | Temperature Coefficient | Line Regulation | Load Regulation |
MAX8510 | Regulator | 120mA | 1.0% | 12ppm/°C, typ | 10ppm/V, typ | 30ppm/mA, typ |
MAX6126A | Reference | 10mA | 0.02% | 0.5ppm/°C, typ | 1.2ppm/V, typ | 0.4ppm/mA, typ |
References
¹For more information on the Honeywell sensors, visit their website
²For more information on the Melexis sensors, visit their website
³For more information on the Nova Sensor products, visit their website
4For more information on this Honeywell temperature sensor, visit their website
Related to this Article
Products
PRODUCTION
Ultra-Low-Noise, High PSRR, Low-Dropout, 120mA Linear Regulators
PRODUCTION
Ultra-High-Precision, Ultra-Low-Noise, Series Voltage Reference
PRODUCTION
+3V, 18-Bit, Low-Power, Multichannel, Oversampling (Sigma-Delta) ADC
2.7V to 3.6V and 4.5V to 5.5V, Low-Power, 4-/12-Channel, 2-Wire Serial, 12-Bit ADCs
3.5- and 4.5-Digit, Single-Chip ADCs with LCD Drivers
16-Bit, Low-Power, 2-Channel, Sigma-Delta ADCs
3.5- and 4.5-Digit, Single-Chip ADCs with LCD Drivers
{{modalTitle}}
{{modalDescription}}
{{dropdownTitle}}
- {{defaultSelectedText}} {{#each projectNames}}
- {{name}} {{/each}} {{#if newProjectText}}
-
{{newProjectText}}
{{/if}}
{{newProjectTitle}}
{{projectNameErrorText}}