EDN logo


Design Feature: January 4, 1996

Designing amplifiers for sensor applications: a cookbook approach

Eric Jacobsen, Motorola Sensor Products Division

A step-by-step design procedure eases the design of a sensor's signal-conditioning differential amplifier. All you need is the sensor's data sheet or actual measured values from a specific sensor, a calculator, and some paper and pencils.

Many sensors have millivolt-level outputs. When operating with a 5V supply, for example, Motorola's MPX10 pressure sensor typically has a 58-mV dynamic range, or "span" (the difference between the output at full-scale pressure and zero pressure). Therefore, amplification is necessary to signal-condition the sensor's output to a usable range, such as the input to an ADC.

Using three design examples, the following procedure demonstrates how to properly amplify and level-shift a sensor's output to customize the sensor's span for a specific application. Additionally, sensors have process (device-to-device) variations in their zero-pressure offset, or, simply, "offset," and span. This approach lets you properly design the amplifier so that, regardless of these process variations, you can still attain the desired sensor output. You can apply this design procedure to low-level, differential-output signal sensors in general, but pressure sensors serve as the examples.

This design procedure applies to two situations: when you know the device-to-device variations of a sensor from a data sheet and when you know the sensor's offset and span from actual device measurements.

Situation 1: When you know the sensor's variations from a data sheet, the procedure helps you design an amplifier that accommodates these variations. Then, using a sensor with a specific offset and span, you can easily hand-calibrate two potentiometers to obtain the desired output-transfer function.

Situation 2: If you know the sensor's offset and span from actual device measurements, you can design an amplifier for that specific sensor. You can calculate the exact resistor values to position the offset at a desired level and to set the gain for the desired span.

The "cookbook" method

Although temperature variations in the sensor's output impact the overall system performance, the topic of temperature compensation- - using either hardware or software- - is lengthy. Also, the general design procedure applies to both situations 1 and 2. The calibration portion of the procedure is unnecessary in Situation 2, in which you know the sensor's offset and span from measurements. For either situation, you can apply the following method to calculate values for resistors, gain, and the like. You can easily implement the formulas in an Excel spreadsheet format or software program to further simplify the procedure.

thumbnail Figure 1 shows the recommended amplifier stage that provides excellent flexibility for most differential-output signal sensors. (See box, "The details of the amplifier design," for more information about the circuit's operation.) The circuit and all related examples use a regulated 5V supply for VCC.

In this amplifier, potentiometer RG adjusts the gain either to calibrate or to quickly change the span for an application. The voltage V+SHIFT, created by the resistor divider comprised of R+SHIFT1 and R+SHIFT2, positions the offset at the desired level. For example, if, after applying a desired amount of gain, the offset is 0.25V and the desired offset is 0.50V, then a V+SHIFT of 0.25V is necessary. V+SHIFT provides only a positive offset shift. Adjusting the potentiometer R+SHIFT2 sets V+SHIFT to the desired level.

V-SHIFT is similar to V+SHIFT, except that V-SHIFT provides only a negative level shift and, thus, can decrease the offset to a desired level. For example, if, after applying a desired amount of gain, the offset is 1V and the desired offset is 0.50V, then a V- SHIFT of 0.50V is required. Adjusting R-SHIFT2 sets V-SHIFT. During calibration, RG and R+SHIFT2 or R-SHIFT2 or both are the only circuit components that you adjust to calibrate the sensor's amplified offset and span.

The three examples that follow take you through the design, beginning with obtaining the data-sheet or measured values to calibration if necessary. These steps include calculating the amplifier's gain, offset, and corresponding resistor values.


Design Example 1, Situation 1

This first example provides the most detail about the procedure and applies to the most general case for which you design an amplifier based on a sensor's data-sheet specifications. The sensor in this example is the Motorola MPX10.

Step 1: Obtain the sensor's data sheet. Before designing the circuit, obtain the sensor's maximum and minimum offset values and the maximum and minimum span from the data sheet. For this example, the values (for an excitation voltage of 3V) for the Motorola MPX10 pressure sensor are as follows: Minimum span=20 mV, maximum span=50 mV, minimum offset=0 mV, and maximum offset=35 mV.

Step 2: Consider ratiometric outputs. Many sensors have an output that is ratiometric to the supply (excitation) voltage. Therefore, the data sheet for the sensor indicates for which excitation voltage the span and offset values apply. You must scale the span and offset characteristics for the application's actual supply voltage. You can apply the following formula to each sensor characteristic that is ratiometric to the supply voltage:

equation

The resultant scaled sensor characteristics for the MPX10 using a 5V supply are as follows: Minimum span=33.3 mV, maximum span=83.3 mV, minimum offset=0 mV, and maximum offset=58.3 mV.

Step 3: Determine desired amplified span and offset. Each application has its own required amplified span and offset voltage. For example, if the sensor's output is an ADC with 0 and 5V reference voltages, a typical amplified sensor span is 4.0V with an offset of 0.50V. That is, the sensor's span is 4.0V ranging from 0.50V for zero pressure to 4.5V at full-scale pressure. In this example, inputting MPX10 data into an ADC, the desired span is 4.0V with an offset of 0.50V.

Step 4: Calculate the gain range. Calculate the maximum and minimum gains required to achieve a 4.0V span when considering the device-to-device variations in the sensor's span.

Step 5: Implement level shift. Depending on the range of the amplified offset voltage (due to device-to-device variations

equation
equation

of the sensor's inherent offset), you may need a positive, a negative, or both types of level shift to position the offset voltage at the desired level. So, you first must calculate the maximum possible range of the amplified offset due only to the sensor's inherent offset voltage. For the MPX10, these calculations are:

equation
equation

Thus, in this example, the maximum range between the amplified offsets is 0.0V to 7.05V. Therefore, depending on the specific MPX10 sensor, you need either a positive or a negative level shift. For any offset voltage greater than 0.50V, a negative level shift is necessary to reduce the offset to 0.50V. Similarly, for any offset voltage less than 0.50V, a positive level shift is necessary to increase the offset to 0.50V.

Step 6: Determine amount of level shift. Using the calculated values of OFFSET1 and OFFSET2, you can now calculate the required level shift range.

equation
equation

If the value of either V±SHIFT1 or V±SHIFT2 is positive, then a positive level shift is necessary. Alternately, if the value of either V±SHIFT1 or V±SHIFT2 is negative, then a negative level shift is necessary. Therefore, to calibrate any randomly selected MPX10 series sensor to have a 0.50V offset, you may need a negative level shift (maximum V-SHIFT) as high as 6.55V and a positive level shift (maximum V+SHIFT) as high as 0.50V.

The details of the amplifier design

This sensor-amplifier design procedure is based on the flexibility of the amplifiers in Figures 1 and 2. Given certain constraints, both amplifiers exhibit excellent performance and common-mode rejection. By setting R4=R1 and R2=R3, the output of the amplifier in Figure 1 is

equation

where VSENSOR is the voltage differential, S+-S-. Setting R4/R3=R1/R2, the output of the amplifier in Figure 2 is

equation

Both circuits exhibit the best common-mode rejection when the input impedances to the inverting and noninverting terminals of each op amp are equal. Unfortunately, the impedances of IC1C's terminals don't precisely match. IC1C's role is to create level shifts greater than VCC by amplifying the level-shift voltage of the resistor-divider network. This topology doesn't optimize the circuit for matched input impedances.

Thus, depending on the input-offset currents of the op amp, a common-mode error occurs at IC1C's output due to the input-impedance mismatch. For most applications, this error is negligible when you consider that most op amps have small input-offset currents. For applications that require better input-impedance matching, insert a resistor between the output of IC1B and the noninverting input terminal of IC1C. This resistor's value should be equal to the input impedance of IC1C's inverting terminal. You can insert resistors to the inputs of IC1A and IC1B to perform similar input-impedance matching, but additional resistors are necessary only if the sensor's differential output impedance is not zero.

The following resistor choices result in the best common-mode rejection. In general, the ratio of R4 to R3 should equal the ratio of R1 to R2. In this design, for simplification purposes, R4=R1, and R3=R2. R2 and R3 should be low, on the order of tens to hundreds of ohms. Also, the effective parallel resistance of the resistor dividers that establish V+SHIFT and V-SHIFT should be at least an order of magnitude smaller than R1 and the sum of R6 and R7, respectively.

Using high feedback resistors greater than 10 kOhms for IC1B and IC1C maximizes the amplifier's dynamic range. High-feedback resistances allow these amplifiers to saturate closer to their supply rails, thus giving each op amp a larger dynamic range. This approach is the reason for making R4 and R7 at least 10 kOhms.

You can use the familiar equation P=V2/R to calculate the power dissipation in the resistor dividers that create the level shifts. If you double the supply voltage to the resistor divider, the power quadruples. In this design, the power dissipation through the resistor dividers is limited to 25 mW at a 5V supply. You can use the power equation to help you design your resistor dividers for higher supply voltages. However, remember that the resistor divider's effective parallel resistance should be small (compared to that of resistors R1 and the sum of R6 plus R7 in these examples) for good common-mode rejection.

Finally, Figure 1's amplifier works for 99% of all differential-output-sensor designs. However, sensors with very large zero-pressure offsets require a special design to provide for both a positive and negative level shift. In this case, there is a possibility of saturating IC1B. If you have an application that may be subject to this rare case, contact the author for design assistance (call technical marketing at (602) 244-4556).


Summary of steps 1 through 6

Until now, you've calculated the required gain range to establish the desired span (4.0V in the MPX10 example) using the device-to-device variation characteristics in the sensor's data sheet. The subsequent steps determine resistor values and the value of the potentiometer, RG, that adjusts the amplifier's gain over the calculated gain range. From the gain range, you can calculate how the amplified offset can vary. Depending on the value of this amplified offset, a positive or negative or both types of level shift may be necessary to position the offset at the desired level. Again, the sensor's inherent offset variations dictate how much positive or negative level shifting is necessary.

Before calculating resistor values, list the results from steps 1 through 6, so that the values are easily accessible for the resistor calculations. These results are as follows: Maximum gain=121, minimum gain=48, maximum V-SHIFT=6.55V, and maximum V+SHIFT=0.50V.

Step 7: Calculate gain-setting resistor values. When selecting resistors and potentiometers, note that 1% tolerance metal thin-film (low temperature-coefficient) resistors are recommended. Unless noted, use the closest-valued resistor to the calculated value. For potentiometers, the more turns (how many complete turns going from zero to full-scale resistance), the finer the gain- and offset-calibration adjustments.

First, set R7=10 kOhms. Before calculating R6, calculate the following ratios:

If RATIO+SHIFT>RATIO-SHIFT and if RATIO- SHIFT>1, then R6=R7.

equation

equation

Otherwise,

equation

If RATIO+SHIFT<RATIO-SHIFT and if RATIO+SHIFT>1, then R6=R7.

Otherwise,

equation

For the MPX10 example, because RATIO+SHIFT>RATIO-SHIFT and RATIO-SHIFT<1,

equation

The subsequent equations are more convenient to calculate if the ratio of R7 to R6 is an integer and if the ratio simultaneously satisfies the above equation. Therefore, this example sets the ratio at 2 with R6=5 kOhms. R2 and R3, depending on the gain requirement, are typically between 100 Ohms and 2 kOhms. However, the lower their values, the better (see box, "The details of the amplifier design"). R1 and R4 should be at least 10 kOhms. therefore, select equal values for R2 and R3 to satisfy this constraint. If necessary, you can increase the values of R2 and R3 above 2 kOhms to satisfy this constraint. for this MPX10 example, set R2=R3=1.00 kOhms and calculate

equation

When selecting the resistor for R5, make sure its value is equal to or less than the following calculated value.

equation

The maximum required value for the potentiometer is

equation

If you desire a larger or smaller value for R5 and Rg, you can change the 0.80 fraction in the equation for R1 and R4. A larger fraction (but always less than 1) results in a larger calculated value for R5 and Rg. A smaller fraction (but not 0) results in a smaller calculated value for R5 and Rg.

Step 8: Calculate offset-adjust resistor values. The final step is to calculate the resistor values and potentiometer ranges for positive or negative level shifting. Strive to keep the power consumption through the resistor dividers that create the positive and negative level shifts to a moderate level at a 5V supply.

For a positive level shift, set

equation

and

equation

For various reasons, you might sometimes want to use a potentiometer (instead of a fixed-value resistor) for R+SHIFT1 in addition to the potentiometer used for R+SHIFT2. In this case, select a potentiometer with a maximum value of at least R+SHIFT2=0.1×R1. Use the selected maximum value of the potentiometer (not the calculated value) to calculate R+SHIFT1:

equation

For a negative level shift, set

equation

and

equation

As for R+SHIFT1, you may sometimes want to use a potentiometer instead of a fixed-value resistor for R-SHIFT1 in addition to the potentiometer used for R-SHIFT2. In this case, select a potentiometer with maximum value of at least R-SHIFT2=0.1×(R6+R7). Use the selected maximum value of the potentiometer (not the calculated value) to calculate R-SHIFT1, as follows:

equation

To summarize, the 1% values for fixed resistors are as follows:

R1=11.8 kOhmsR7=10 kOhms
R2=1.00 kOhmsRG=10 kOhms
R3=1.00 kOhmsR+SHIFT1=1.18 kOhms
R4=11.8 kOhmsR+SHIFT2=50 Ohms
R5=845 OhmsR-SHIFT1=1.50 kOhms
R6=5.00 kOhmsR-SHIFT2=5 kOhms

Step 9: Build your circuit.

Step 10: Calibration. Now that you've built the circuit, you can calibrate it using the following simple procedure. First, set up the circuit as necessary, connect VCC (typically 5V), and monitor the circuit's output voltage (VOUT in Figure 1) with a DMM. Turn all the potentiometers to their zero-resistance setting (short circuits). Turn on the power and perform the following steps: 1. Apply zero pressure to the sensor (or the lowest pressure to be measured in the application). 2. Adjust either R+SHIFT2 or R-SHIFT2 (but never adjust both for a specific sensor/amplifier combination) to position the offset at the desired level. In the MPX10 example, the desired offset is 0.50V. 3. Apply the application's full-scale pressure to the sensor. 4. Adjust RG until you attain the full-scale output. (In the MPX10 example, the desired full-scale output is 4.5V, that is, a 4.0V span added to a 0.50V offset). 5. The gain adjustment slightly affects the sensor's inherent offset. Therefore, the offset moves. Simply perform an iteration of calibration steps 1 through 4 until you obtain the desired offset and span (one to two more iterations). When adjusting the level shift after the first time, simply increase/decrease the amount of level shift added initially in Step 2. 6. You can now integrate the sensor and amplifier design into your overall system design. You can optionally measure the resistance values of RG, R+SHIFT2, and R-SHIFT2 and replace them with the closest-value 1% resistor.


Design Example 2: from start to finish

The following example works through the preceding steps without accompanying explanation to show how simple and quick this amplifier design procedure can be. This example uses the MPX2010 sensor.

Step 1: Obtain the sensor data sheet. The MPX2010 data sheet states the following values for a 10V excitation voltage: Minimum span = 24 mV, maximum span = 26 mV, minimum offset = -1 mV, and maximum offset = 1 mV.

Step 2: Consider ratiometric outputs. The characteristics of the MPX2010 at a 5V excitation voltage are as follows: Minimum span = 12 mV, maximum span = 13 mV, minimum offset = -0.5 mV, and maximum offset = 0.5 mV.

Step 3: Determine desired amplified span, offset. Desired offset = 0.50V, and desired span = 4.0V.

Step 4: Calculate the gain range.

equation

equation

Step 5: Implement level shift.

equation

equation

You calculate OFFSET2 using the maximum gain instead of the minimum gain as shown previously, because you want the largest range in the amplified sensor offset. In this case, when one of the sensor's offsets is negative and the other is positive, the largest range in the amplified sensor offset is when you calculate both OFFSET1 and OFFSET2 using the maximum gain.

Step 6: Determine amount of level shift.

equation

equation

Thus, only a positive level shift is necessary. In this case, you can define the level shifts as maximum V+SHIFT (for 0.667V) and minimum V+SHIFT (for 0.333V). Likewise, if only negative level shifts were necessary, you could define them, for example, as maximum V-SHIFT (for the most negative level shift) and minimum V-SHIFT (for the least negative level shift). For the subsequent calculations, always use maximum V+SHIFT. The quantity maximum V-SHIFT is not applicable in this example: Maximum gain=334, minimum gain=307, maximum V+SHIFT=0.667V, and minimum V+SHIFT=0.333V.

Step 7: Calculate gain-setting resistor values. First, set R7=10 kOhms. Also, RATIO-SHIFT does not apply because a negative shift is unnecessary.

equation

Because RATIO+SHIFT>1, set R6=R7=10 kOhms and R2=R3=100 Ohms. Then,

equation

equation

and

equation

Step 8: Calculate offset-adjust resistor values.

equation

equation

Because this design requires no negative level shift, the terminal of R6 that connects to both R-SHIFT1 and R-SHIFT2 now connects to ground. (The circuit does not require the R-SHIFT1 and R-SHIFT2 resistors.) Likewise, if a positive level shift were unnecessary, the terminal of R1 that connects to both R+SHIFT1 and R+SHIFT2 would connect to ground. The resistor values are as follows:

R1=12.2 kOhmsR7=10.0 kOhms
R2=100OhmsRG=500Ohms
R3=100OhmsR+SHIFT1=1.22 kOhms
R4=12.2 kOhmsR+SHIFT2=100Ohms
R5=523OhmsR-SHIFT1=N/A
R6=10.0 kOhmsR-SHIFT2=N/A

Step 9: Build your circuit.

Step 10: Calibration.


Design Example 3, Situation 2

This example uses the MPX906 pressure sensor and requires most of the design steps. However, because there are no device-to-device variations to consider (you already measured the sensor's output characteristics), some of the equations are simplified or unnecessary. Even though this design procedure shows how to accurately design the circuit so that hand calibration (Step 10) is unnecessary, resistor tolerances and nonideal op-amp behavior may cause some error in the final output-transfer function.

Because Situation 2 requires no adjustment of potentiometers, the resultant amplifier requires fewer components than the amplifier in Figure 1. The feedback loop with R5 and RG no longer exists. Also, fixed-value resistors replace potentiometers R+SHIFT2 and R-SHIFT2. The new simplified circuit in Figure 2 adheres to the same constraints on resistor-value selection as the circuit in Situation 1.

Step 1: Measure the specific sensor's offset and span. Because the MPX906's offset and span are ratiometric with supply voltage, make sure you measure the device's characteristics with the device powered with the systems intended supply voltage. With a 5V excitation voltage, the measurements are: Offset = -30 mV, and span = 35 mV.

Step 2: Consider ratiometric outputs. You already took care of this step in Step 1.

Step 3: Determine desired amplified span and offset. Desired offset is 0.50V, and desired span is 4.0V.

Step 4: Calculate the gain.

equation

Step 5: Implement level shift. To position the sensor's offset at the desired level, add a positive or negative level shift to the sensor's inherent offset. First, calculate the inherent offset after amplification:

equation

Step 6: Determine amount of level shift. Now, calculate the positive or negative level shift (V±SHIFT) necessary to position the offset at the desired level.

equation

If V±SHIFT is negative, you need a negative level shift of that magnitude. Likewise, if V±SHIFT is positive, you need a positive level shift. For the MPX906 example, a positive level shift (V+SHIFT) of 3.93V is necessary to position the offset at 0.50V.

To help you calculate the resistor values in subsequent steps, list the results from steps 1 through 4. Gain = 114.3, and V+SHIFT(V) = 3.93.

Step 7: Calculate gain-setting resistor values. As before, set R7=10 kOhms. Because

equation

set R6=R7=10 kOhms.

As before and depending on the gain requirement, R2 and R3 are typically between 100 Ohms and 2 kOhms, and the lower their values, the better. Also, R1 and R4 should be at least 10 kOhms. Thus, select equal values for R2 and R3 to satisfy this constraint. You can increase the values of R2 and R3 above 2 kOhms to satisfy the constraint. Thus, set R2=R3=200 Ohms. Then calculate

equation

Step 8: Calculate offset-adjust resistor values. Referring to Step 8 in Situation 1, simply replace maximum V+SHIFT with V+SHIFT and replace maximum V-SHIFT with V-SHIFT. Because a positive level shift of 3.93V is necessary,

equation

and

equation

Because a negative level shift is unnecessary, connect the terminal of R6 that connects to R-SHIFT1 and R-SHIFT2 to ground. (R-SHIFT1 and R-SHIFT2 no longer exist.) Likewise, if a positive level shift were unnecessary, you would connect the terminal of R1 that connects to R+SHIFT1 and R+SHIFT2 to ground. For this example, the resistor values are:

R1=11.3 kOhmsR6=10 kOhms
R2=200 OhmsR7=10 kOhms
R3=200 OhmsR+SHIFT1=1.13 kOhms
R4=11.3 kOhmsR+SHIFT2=732 Ohms

Step 9: Build your circuit.


eric jacobsen

Author's Biography

Eric Jacobsen is a systems and applications engineer with Motorola's Sensor Products Division in Phoenix. He defines, designs, and builds prototypes of sensor and sensor-related systems. Jacobsen holds a BSEE from the University of Illinois, Urbana-Champaign. His hobbies include music and audio equipment.

Reference

1. Motorola's Sensor Device Data Book (Revision 2), (800) 273-6731 or (602) 244-4556.



| EDN Access | feedback | subscribe to EDN! |
| design features | out in front | design ideas | departments | products |


Copyright © 1996 EDN Magazine. EDN is a registered trademark of Reed Properties Inc, used under license.