Differential Output Circuit

One of my readers asked me to explain how I designed a circuit I posted in a forum, as a solution to one of the member’s question.  The problem was about designing a circuit with 3 input signals, VA, VB and VCM.  The circuit had to output the sum and difference between VCM and the average of VA and VB as in the following expressions:

image0011 (1)

The solution I posted is the circuit in Figure 1.

differential_output_circuit

Figure 1

What is the easiest way to design this circuit?

Read more

Useful Operational Amplifier Formulas and Configurations

My friends advised me that it would be helpful to have on this site the most common operational amplifier configurations and transfer functions or formulas.  So, here they are.  This article is not just a simple collection of circuits and formulas.  It also has links to the transfer function proof for these circuits so I hope it will be very helpful.  Make sure you post a comment and let me know how I can improve this page.  This article will be updated, so do check it often.

Non-inverting Amplifier

non-inverting-amplifier-1

image0022

Note:  The proof of this transfer function can be found here:  How to Derive the Non-Inverting Amplifier Transfer Function.

Voltage Follower

voltage-follower-2

image0041

Note:  This configuration can be considered a subset of the Non-inverting Amplifier.  When Rf2 is zero and Rf1 is infinity, the Non-inverting Amplifier becomes a voltage follower.  When a resistor has an infinity value, in practice it means it is disconnected.

Read more

The Transfer Function of the Non-Inverting Summing Amplifier with “N” Input Signals

In a previous article, How to Derive the Summing Amplifier Transfer Function, I deduced the formula for the non-inverting summing amplifier with two signals in its input.  But what if we have 3, 4 or an n number of signals?  Can we add them all with one amplifier?

Theoretically, yes.  Practically, it is a different story.  There is a practical limit on how many signals can be summed up with one amplifier.  When the number of input signals grows, each signal component in the sum decreases in value. By the end of this article you will understand why.

summing_amplifier_1

Figure 1

We already saw that, for a summing amplifier with two input signals (Figure 1), the transfer function is

image002 (1)

If we need to add 3 signals, the circuit schematic looks like the one in Figure 2.  What is the transfer function of this summing amplifier with 3 inputs?

Read more

How to Derive the Summing Amplifier Transfer Function

The summing amplifier, or the non-inverting summing amplifier, is an analog processing circuit with the transfer function (the summing amplifier formula as some say) shown in the following equation.

image001 (1)

The first term of the product is the actual summing, while the second term is a gain due to the R3 and R4 resistors.  I prefer this type of summing amplifier as shown in Figure 1, because it is more flexible and allows us to achieve any linear function we want.

summing_amplifier1

Figure 1

Some authors prefer the following schematic,

summing_amplifier2

Figure 2

with the transfer function

image0041 (2)

One can see that the summing amplifier in Figure 2 is a subset of my preferred schematic in Figure 1.  In Figure 2, R4 is zero, while R3 is infinity (open connection).  It performs the analog summation between V1 and V2, with a gain of 1.  Therefore, the amplifier in Figure 1 gives us more choices when designing a function with this circuit.  If the gain is not needed, this should come up from calculations, as in this article Solving the Summing Amplifier.

If you followed this website, by now you probably figured that I am not a promoter of learning formulas by heart.  I like to derive the transfer function if I need it. So, how do we prove this formula?

We will use the Superposition Theorem, which says that, the effect of all the sources in a circuit is equal with the sum of the effects of each source taken separately in the same circuit.  Therefore, if we take out one source, V2, and replace it with a wire, we then can find the voltage in each node and the current in each branch of this circuit due to the remaining source V1.  Then we do the same with V1 and then sum up the currents on each branch and the voltage levels on each node.  We are only interested in Vout, so this should be simple.

We will first make V2 = 0V, by connecting R2 to ground, as in Figure 3.

summing_amplifier3

Figure 3

The Op Amp is considered an ideal component, so that the input bias currents are negligible.  If the current in the non-inverting input is zero, R1 and R2 make a voltage divider for V1.  The non-inverting input voltage V1n, can be written as

image0061 (3)

and, based on the non-inverting amplifier transfer function, Vout1 is

image0071 (4)

By replacing V1n in (4), the output voltage is

image0082 (5)

In the second part of my demonstration, based on the Superposition Theorem, R2 is connected back to V2 and V1 = 0, by connecting R1 to ground.  Following the same train of thought Vout2 can be written as

image0091 (6)

Now we have to add Vout1 to Vout2 to complete the third step of the Superposition Theorem.  After factorizing the gain component 1+R4/R3, the summing amplifier transfer function becomes the mathematical relation shown in (7).

image001 (7)

Q.E.D.

>>>  <<<

This formula shows that this sum is a weighted sum between V1 and V2.  This is better than a direct sum V1 plus V2, because, again, brings flexibility in design.  Together with the differential amplifier, this circuit brings another treat in the art of electronics design.

The Transfer Function of an Amplifier with a Bridge in the Negative Feedback

In allaboutcircuits.com forum an interesting circuit was posted. The question was, how to determine the transfer function, Vout/Vin?

The circuit schematic was drawn as in Figure 1.

fig1

Figure 1

To make a point regarding its feedback and for clarity, I redrew it as in Figure 2.

fig2

Figure 2

Now, things started to make more sense. R1 and R2 are feedback resistors. Also, the bridge does not alter the feedback, because there is no current going through it from Vout to the bridge and to U1 input. Assuming that U1 is close to an ideal amplifier, its bias current in the inverting input is zero. Therefore, whatever current emerges from the R1 and R2 node, noted with I12, and goes to the bridge is zero. Also, the current that goes into the inverting input, In, has to be zero.

It becomes clear now that the circuit is very simple. The only currents that Vin generates are local currents, I46 and I35, through the bridge legs.

Let’s write the voltage difference V46-V35, which is the voltage that alters Vout. I will call it Vbridge.

image003

This voltage alters Vout because it appears in the amplifier input. For that reason, Vout is given by the following equation:

image004 (1)

The amplifier output adjusts Vout so that V35 = 0V. The inverting input is at a virtual ground, so we can write Vbridge as

image005 (2)

If we find out V46 as a function of Vin, the circuit is solved. How do we calculate it?

By inspecting the bridge we can write V46 as follows:

image006 (3)

The current through R3 and R5 is I35 and its value can be written as in the following equation.

image007

With I35 known we can calculate V3.

image008

Following the same train of thoughts, V4 is

image009

By replacing V3 and V4 in (3), V46 in (2) and Vbridge in (1), the transfer function is

image010

Q.E.D. (quod erat demonstrandum)

>>>  <<<

This equation shows us that, if the bridge is balanced, when

image0111

the output voltage is zero. Hence, this circuit can be used for tuning, or for measurements, when one of the resistors in the bridge is a sensor. Due to the resistor ratios in the transfer function, the actual resistor value does not matter. What matters is the ratio of these resistors. As a consequence, the circuit is insensitive to temperature variations because, if all resistors are from the same technological process, the voltage at output does not change with temperature. If we choose a good operational amplifier, with a low temperature drift and low offset, this amplifier can be used in precision measurements.

The Differential Amplifier Common-Mode Error – Part 2

Power Supply Output Current Measurement with a Differential Amplifier

When designing a differential amplifier, part of the art is to manage the errors affecting the precision of the circuit.  In MasteringElectronicsDesign.com: The Differential Amplifier Common-Mode Error – Part 1 of this presentation I discussed the common-mode error of a differential amplifier.  I also showed that, given the circuit in Figure 1, the common-mode voltage can be viewed as V2, when we consider V1-V2 as a signal that rides on top of V2.  The same goes for V1, which can be considered the common-mode voltage of the differential amplifier when -(V1-V2) is the signal that rides on top of V1.

image001

Figure 1

Most of the times, however, the input signals V1 and V2 would vary in time, whether there is an AC signal riding on top of a DC signal, or the input signals have a noise component as in Figure 2.

image002

Figure 2

Because of that, it is customary to consider the common-mode voltage the average of the input signals, V1 and V2, as in Figure 3, so that the common-mode input signal lands in between V1 and V2.

image003Figure 3

Let’s note this signal with Vcm, and the difference V1-V2 with Vd.

image0041 (1)

From a signal difference point of view, each input will be referred to the common-mode voltage as shown in Figure 3.  In this case, the difference signal Vd = (V1-V2) is split in two, so that the input R1 has a signal Vd/2 and the input R3 has a signal -Vd/2 as referred to the common-mode voltage Vcm.

What is the common-mode error in this case?

With these notations, I can express the input signals as in (2).

image005 (2)

In MasteringElectronicsDesign.com: The Differential Amplifier Common-Mode Error – Part 1 I demonstrated that the output signal of the differential amplifier can be expressed as a function of V1-V2 and V2 as shown in (3).

image006 (3)

By replacing V1 and V2 with the expressions (2), Vout becomes,

image007 (4)

After calculations, the differential amplifier output becomes,

image008 (5)

In equation (5), the first parenthesis is the differential gain and I will note it with Gd.  The second parenthesis is the common-mode gain, noted with Gcm.

image009 (6)

One can see that, if the resistor ratios are equal, Gcm is zero.  We should note that this gain is the same as in the MasteringElectronicsDesign.com: The Differential Amplifier Common-Mode Error – Part 1, when the same expression multiplied V2.  Indeed, this proves that, no matter the level of the common-mode voltage at the amplifier input, V2, Vcm or anything in between for that matter, the common-mode gain is the same.

Equation (5) also shows that the larger Vcm, the larger the common-mode error at the differential amplifier output.  Since many times we cannot do anything about the common-mode voltage level, the electronics designer can only minimize the common-mode gain to reduce the error.  This can be done by matching the resistor ratios.

One good example of  using the differential amplifier is current measurement.  One way is to measure the voltage drop across a small resistor.  Another way is to measure the current inductively, with a magnetic probe.

Measuring the current through a network branch with a small resistor, called sense resistor, is preferred by many designers, because it can be very precise.  Depending on the expected current level, the resistor value is chosen so that the voltage drop on this resistor is around a few hundred millivolts.  A differential amplifier connected across the sense resistor amplifies the voltage drop to a manageable level, usually around 2.5V or 5V, so that an Analog to Digital Converter (ADC) can measure it with good resolution.

If the measurement has to be done at a power supply output (see Figure 4), the common mode voltage can be high, because it equals the power supply voltage level.

image010

Figure 4

Let’s say that this is a 12V power supply that sources a nominal current of 5A to a system it powers.  Based on the powered system functionality, the load current can vary in time and we need to monitor it.  The voltage drop on Rsense has to be small enough so that the powered system still receives approximately 12V.  If, instead of 12V, the system is powered at 11.9V, it can be good enough for most applications.  Therefore, we can choose the drop on Rsense as 100mV.   At 5A, the sense resistor has to be Rsense = 20 milliohms.

Also, let’s say we need to read the current with a microcontroller.  For this, we need to use an ADC, with a reference voltage of 2.5V. We can design the differential amplifier resistors so that the nominal current of 5A means 2V at the amplifier output.  This means that the nominal value is placed at 4/5th of the ADC range, so that there is some room for positive or negative load current variation.

If the resistor ratios are equal, the differential gain, Gd is

image011 (7)

The gain of the differential amplifier has to be

image012 (8)

Let’s choose R2 = R4 = 20 kohms and R1 = R3 = 1 kohm.  What tolerances should I select for these resistors? Resistors with 1% tolerance are quite common nowadays and they are not expensive.   With 1% tolerance resistors, what is the common-mode error?

Since V2 = Vpower, let’s choose equation (3) to calculate the output voltage, for a nominal power supply current of 5A.

image013 (9)

With the tolerance t = 0%, the output is the ideal nominal value Vout = 2V.

When the tolerance is t = 1%, and in the worst case in which the resistor values may be as follows,

image014 (10)

the output voltage is Vout = 2.413V.  The extra 0.413V is the common-mode error which is significant, as it represents 20.6% of the nominal value.

What if we use resistors with 0.1% tolerance? For the worst case scenario described above, the output becomes Vout = 2.042V.  The error of 42mV means that the power source current is measured with an error of 2.1%.  Depending on the application requirements, this measurement may be good enough, or may not be acceptable.  If the error is too high, the designer has to choose either better matched resistors, or choose instrumentation amplifiers.  Analog Devices’ AD620 can do the job with high precision.

There are some other questions that rise from this experiment:

Can the common-mode voltage damage the operational amplifier used for the differential amplifier circuit?

Is the sense resistor small enough so that the differential amplifier components do not modify its value and generate errors?

Is the offset voltage of the differential amplifier small enough so that the output offset does not appear as an error?

Are the operational amplifier input bias currents small enough, or their offset for that matter, so that there are no perceived errors at the amplifier output?

Is the temperature coefficient of the differential amplifier components small enough so that any temperature variation does not result in measurement errors?

I will discuss all these possible errors in future articles.  Stay tuned.

Show Buttons
Hide Buttons
'