4.3. Simultaneous Equations
Taking an orderly path to developing a circuit that works the first time starts here: Follow these steps until the equation of the op amp is determined. Use the specifications given for the circuit coupled with simultaneous equations to determine what form the op amp equation must have. Go to the section that illustrates that equation form (called a case), solve the equation to determine the resistor values, and you have a working solution.
The equation of a straight line has four possible solutions, depending on the sign of
m, the slope, and
b, the intercept; therefore simultaneous equations yield solutions in four forms. Four circuits must be developed, one for each form of the equation of a straight line. The four equations, cases, or forms of a straight line are given in
(4.13)(4.14)(4.15) and
(4.16), where electronic terminology has been substituted for math terminology:
Given a set of two data points for
VOUT and
VIN, simultaneous equations are solved to determine
m and
b for the equation that satisfies the given data. The signs of
m and
b determine the type of circuit required to implement the solution. The given data are derived from the specifications; that is, a sensor output signal ranging from 0.1 V to 0.2 V must be interfaced into an analog to digital converter that has an input voltage range of 1 V to 4 V. These data points (
VOUT = 1 V at
VIN = 0.1 V,
VOUT = 4 V at
VIN = 0.2 V) are inserted into
Equation (4.13), as shown in
(4.17) and
(4.18), to obtain
m and
b for the specifications:
Note: Although
Equation (4.13) was the starting point, the form of
Equation (4.22) is identical to the format of
Equation (4.14). The specifications or given data determine the signs of
m and
b; and starting with
Equation (4.13), the final equation form is discovered after
m and
b are calculated. The next step required to complete the problem solution is to develop a circuit that has
m = 30 and
b = −2. Circuits were developed for
(4.13)(4.14)(4.15) and
(4.16) and they are given under the headings Case 1 through Case 4, respectively. Different circuits yield the same equations, but these circuits were selected because they require no negative references.
4.3.1. Case 1. VOUT = mVIN + b
The circuit configuration that yields a solution for Case 1 is shown in
Figure 4.10. The figure includes two 0.01 μF capacitors. These capacitors, called
decoupling capacitors, are included to reduce noise and provide increased noise immunity. Sometimes two 0.01 μF capacitors serve this purpose, sometimes more extensive filtering is needed, and sometimes one capacitor serves this purpose. Special attention must be paid to the regulation and noise content of
VCC when
VCC is used as a reference, because some portion of the noise content of
VCC is multiplied by the circuit gain.
The circuit equation is written using the voltage divider rule and superposition:
For example, the circuit specifications are VOUT = 1 V at VIN = 0.01 V, VOUT = 4.5 V at VIN = 1 V, RL = 10 k, 5% resistor tolerances, and VCC = 5 V. No reference voltage is available, so VCC is used for the reference input, and VREF = 5 V. A reference voltage source is left out of the design as a space and cost saving measure, and it sacrifices noise performance, accuracy, and stability performance. Cost is an important specification, but the VCC supply must be specified well enough to do the job. Each step in the subsequent design procedure is included in this analysis to ease learning and increase boredom. Many steps are skipped when subsequent cases are analyzed.
The data are substituted into simultaneous equations:
The slope of the transfer function,
m, is obtained by substituting
b into
Equation (4.27):
Resistors of 5% tolerance are specified for this design, so we choose R1 = 10 kΩ, and that sets the value of R2 = 183.16 kΩ. The closest 5% resistor value to 183.16 kΩ is 180 kΩ; therefore select R1 = 10 kΩ and R2 = 180 kΩ. Being forced to yield to reality by choosing standard resistor values means that there is an error in the circuit transfer function, because m and b are not exactly the same as calculated. The real world constantly forces compromises into circuit design, but the good circuit designer accepts the challenge and throws money or brains at the challenge. Resistor values closer to the calculated values could be selected by using 1% or 0.5% resistors, but that selection increases cost and violates the design specification. The cost increase is hard to justify except in precision circuits. Using 10 cent resistors with a 10 cent op amp usually is false economy.
The resulting circuit equation is
The gain setting resistor,
RG, is selected as 10 kΩ, and 27 kΩ, the closest 5% standard value is selected for the feedback resistor,
RF. Again, a slight error is involved with standard resistor values. This circuit must have an output voltage swing from 1 V to 4.5 V. The older op amps cannot be used in this circuit, because they lack dynamic range, so the TLV247X family of op amps is selected. The data shown in
Figure 4.7 confirm the op amp selection because there is little error. The circuit with the selected component values is shown in
Figure 4.11. The circuit was built with the specified components, and the transfer curve is shown in
Figure 4.12.
The transfer curve shown is a straight line, which means that the circuit is linear. The VOUT intercept is about 0.98 V rather than 1 V as specified, and this is excellent performance, considering that the components were selected randomly from bins of resistors. Different sets of components would have slightly different slopes because of the resistor tolerances. The TLV247X has input bias currents and input offset voltages, but the effect of these errors is hard to measure on the scale of the output voltage. The output voltage measured 4.53 V when the input voltage was 1 V. Considering the low and high input voltage errors, it is safe to conclude that the resistor tolerances have skewed the gain slightly, but this is still excellent performance for 5% components. Often lab data similar to that shown here is more accurate than the 5% resistor tolerance, but do not fall into the trap of expecting this performance, because you will be disappointed if you do.
The resistors were selected in the kilo-ohm range arbitrarily. The gain and offset specifications determine the resistor ratios, but supply current, frequency response, and op amp drive capability determine their absolute values. The resistor value selection in this design is high because modern op amps do not have input current offset problems and they yield reasonable frequency response. If higher frequency response is demanded, the resistor values must decrease, and resistor value decreases reduce input current errors, while supply current increases. When the resistor values get low enough, it becomes hard for another circuit, or possibly the op amp, to drive the resistors.
4.3.2. Case 2. VOUT = +mVIN − b
The circuit shown in
Figure 4.13 yields a solution for Case 2. The circuit equation is obtained by taking the Thevenin equivalent circuit looking into the junction of
R1 and
R2. After the
R1,
R2 circuit is replaced with the Thevenin equivalent circuit, the gain is calculated with the ideal gain equation,
Equation (4.37):
Comparing the terms in
(4.37) and
(4.14) enables the extraction of
m and
b:
The specifications for an example design are
VOUT = 1.5 V at
VIN = 0.2 V,
VOUT = 4.5 V at
VIN = 0.5 V,
VREF =
VCC = 5 V,
RL = 10 kΩ, and 5% resistor tolerances. The simultaneous equations follow:
From these equations, we find that
b = −0.5 and
m = 10. Making the assumption that
R1‖
R2 ≪
RG simplifies the calculations of the resistor values:
Let
RG = 20 kΩ and
RF = 180 kΩ:
Select
R2 = 0.82 kΩ and
R1 = 72.98 kΩ. Since 72.98 kΩ is not a standard 5% resistor value,
R1 is selected as 75 kΩ. The difference between the selected and calculated value of
R1 has about a 3% effect on
b, and this error shows up in the transfer function as an intercept rather than a slope error. The parallel resistance of
R1 and
R2 is approximately 0.82 kΩ, and this is much less than
RG, which is 20 kΩ, thus the earlier assumption that
RG ≫
R1‖
R2 is justified.
R2 could have been selected as a smaller value, but the smaller values yielded poor standard 5% values for
R1. The final circuit is shown in
Figure 4.14 and the measured transfer curve for this circuit is shown in
Figure 4.15.
The TLV247X was used to build the test circuit because of its wide dynamic range. The transfer curve plots very close to the theoretical curve; the direct result of using a high performance op amp.
4.3.3. Case 3. VOUT = −mVIN + b
The circuit shown in
Figure 4.16 yields the transfer function desired for Case 3.
The circuit equation is obtained with superposition:
Comparing terms between
(4.45) and
(4.15) enables the extraction of
m and
b:
The design specifications for an example circuit are
VOUT = 1 V at
VIN = −0.1 V,
VOUT = 6 V at
VIN = −1 V,
VREF =
VCC = 10 V,
RL = 100 Ω, and 5% resistor tolerances. The supply voltage available for this circuit is 10 V, and this exceeds the maximum allowable supply voltage for the TLV247X. Also, this circuit must drive a back terminated cable that looks like two 50 Ω resistors connected in series, so the op amp must be able to drive 6/100 = 60 mA. The stringent op amp selection criteria limits the choice to relatively new op amps if ideal op amp equations are going to be used. The TLC07X has excellent single supply input performance coupled with high output current drive capability, so it is selected for this circuit. The simultaneous equations,
(4.49) and
(4.50), follow:
From these equations, we find that
b = 0.444 and
m = −5.6:
Let
RG = 10 kΩ and
RF = 56.6 kΩ, which is not a standard 5% value, hence
RF is selected as 56 kΩ:
The final equation for the example follows:
Select
R1 = 2 kΩ and
R2 = 295.28 kΩ. Since 295.28 kΩ is not a standard 5% resistor value,
R1 is selected as 300 kΩ. The difference between the selected and calculated values of
R1 has a nearly insignificant effect on
b. The final circuit is shown in
Figure 4.17 and the measured transfer curve for this circuit is shown in
Figure 4.18.
As long as the circuit works normally, there are no problems handling the negative voltage input to the circuit, because the inverting lead of the TLC07X is at a positive voltage. The positive op amp input lead is at a voltage of approximately 65 mV, and normal op amp operation keeps the inverting op amp input lead at the same voltage because of the assumption that the error voltage is zero. When VCC is powered down while there is a negative voltage on the input circuit, most of the negative voltage appears on the inverting op amp input lead.
The most prudent solution is to connect the diode, D1, with its cathode on the inverting op amp input lead and its anode at ground. If a negative voltage gets on the inverting op amp input lead, it is clamped to ground by the diode. Select the diode type as germanium or Schottky so the voltage drop across the diode is about 200 mV; this small voltage does not harm most op amp inputs. As a further precaution, RG can be split into two resistors with the diode inserted at the junction of the two resistors. This places a current limiting resistor between the diode and the inverting op amp input lead.
4.3.4. Case 4. VOUT = −mVIN − b
The circuit shown in
Figure 4.19 yields a solution for Case 4. The circuit equation is obtained by using superposition to calculate the response to each input. The individual responses to
VIN and
VREF are added to obtain
Equation (4.56):
Comparing terms in
(4.56) and
(4.16) enables the extraction of
m and
b:
The design specifications for an example circuit are
VOUT = 1 V at
VIN = −0.1 V,
VOUT = 5 V at
VIN = −0.3 V,
VREF =
VCC = 5 V,
RL = 10 kΩ, and 5% resistor tolerances. The simultaneous
(4.59) and
(4.60) follow:
Let
RG1 = 1 kΩ and
RF = 20 kΩ:
The final equation for this example is
The final circuit is shown in
Figure 4.20 and the measured transfer curve for this circuit is shown in
Figure 4.21.
The TLV247X was used to build the test circuit because of its wide dynamic range. The transfer curve plots very close to the theoretical curve, and this results from using a high performance op amp.
As long as the circuit works normally, there are no problems handling the negative voltage input to the circuit because the inverting lead of the TLV247X is at a positive voltage. The positive op amp input lead is grounded, and normal op amp operation keeps the inverting op amp input lead at ground because of the assumption that the error voltage is zero when VCC is powered down while there is a negative voltage on the inverting op amp input lead.
The most prudent solution is to connect the diode D1 with its cathode on the inverting op amp input lead and its anode at ground. If a negative voltage gets on the inverting op amp input lead, it is clamped to ground by the diode. Select the diode type as germanium or Schottky, so the voltage drop across the diode is about 200 mV; this small voltage does not harm most op amp inputs. RG2 is split into two resistors (RG2A = RG2B = 51 kΩ) with a capacitor inserted at the junction of the two resistors. This places a power supply filter in series with VCC.