The Celtic Engineer is a weekly newsletter produced by Celtic Engineering Solutions. We hope you enjoy it. If you have any suggestions for topics, would like to give feedback or want your email added to the distribution list please send an email to: [email protected].
Virtual Grounds when real ground just won’t do
In a world with virtual computers and virtual libraries, the idea of a virtual ground in an electrical circuit should fit right in. What do we mean by ground, the real one? I once worked with a physics student who could not accept the concept of negative voltage. To him all voltages were positive and ground was an absolute. The truth is that ground is a voltage potential that is merely a definition. Once we select that point all other points can be defined accordingly.
The chassis of a car is defined as ground (for that system). The batter is nominally 12V above the chassis potential. But what is the voltage of the car relative to a bank of batteries with a 100V potential. The answer depends on how they are electrically connected. If they are not connected, then no relationship exits. If the chassis of the car is connected to the positive side of the battery bank and the negative side of the battery bank is physically connected the earth, then the positive battery post in the car is at 112V relative to earth ground.
The idea of relative voltages is important when considering the operation of an op amp and its virtual ground. When an op amp is connected with feedback, it will adjust the output voltage of the op amp in such a way as to maintain the voltages of the inputs at the same level. If one of those inputs is connected to a physical ground the op amp will try and maintain the other at the same level. While not actually connected to ground that point is at the same voltage potential as ground. That is why it is called a virtual ground.
Figure 1 An inverting Op Amp
The inverting op amp, shown in figure 1, has a virtual ground at pin 2. When a positive voltage is applied to Vin current will flow through Rin to the virtual ground. No current can flow into pin 2. If nothing else happened, the voltage at pin 2 would rise. But the presence of Rfb closes the loop around the op amp. Once there is a potential difference between pins 2 and 3 the voltage at Vout will decrease so that the potential between pins 2 and 3 remains close to zero. So, the op amp maintains the ground potential at pin 2. The same thing would happen if the voltage at Vin were lower than ground. The op amp would raise the voltage at Vout to maintain the voltage potential at Pin 2 at ground level.
I thought we were going to talk about summing junctions
Figure 2 Summing Junction
The above discussion holds true even if additional current paths are connected to the input. In figure 2 we can see that there are multiple currents leading into the summing node. Current 1 is voltage V1/R1; current 2 is V2/R2; current 3 is V3/R3. Each current flows to ground potential and is therefore not affected by the other currents. Still no current can flow into pin 2, so all the currents, I2, I2 and I3, must flow through Rfb. The voltage Vout then is the sum of the currents times the value of Rfb time -1 because it is an inverting op amp.
And this is useful for what?
The most obvious use is to add two or more voltages together. If all the resistors are the same, then the output is just the sum of the inputs. Now there is a sign change but that can be flipped by putting another inverting op amp with a gain of -1 as a second stage. The real power is if you want to weight each voltage. Say I want V1 to be twice as important as V2. That can be done by halving the resistance of R2.
The summing junction can be used to make a simple digital to analogue converter. In this case, each voltage is a 0 or a 1. The current in Rfb is the weighed sum of all the logic inputs. If the resistors are equal then each voltage is weighted equally, otherwise some are weighted more heavily than others.
This idea is used in audio mixers and in circuits that look at averages. For example, if you wanted to take 10 temperature measurements at different locations of a system and look at the average temperature of that system, you could use a summing circuit.
This newsletter is sponsored by Celtic Engineering Solutions LLC, a design engineering firm based out of West Jordan, Utah, which can be found on the web at www.celticengineeringsolutions.com. You can find the newsletter on the company blog, LinkedIn or by subscribing. Send your emails to The Celtic Engineer at [email protected].