This is a question from my instrumental analytical chemistry text,
which oviously hasn't helped me. I looked through my physics text but
it doesn't cover operational amplifiers.
Design a circuit having and output given by -v_o = 3v_1 + 5v_2 - 6v_3.
I'm assuming there are many solutions to this problem and I'd like to
come up with my own.
Here is one solution:
http://static.flickr.com/103/264187072_a04bbc6001.jpg?v=0
Could someone walk me throught the steps that result in the above
equation so I can make up my own circuit?
Well, since your knowledge ends at Ohm's, you don't understand an
opamp? I think you will need that part, first.
Ignoring power supply voltages for the moment, the opamp has two
inputs and one output. The opamp controls the output, but can only
observe the inputs. It's only desire is to adjust the output in such
a way that the inputs match each other. It _hopes_ that this is
possible to do, but it has no idea if that's the case. The only rule
it applies is that when the + input is more positive than the - input,
it drives the output to be more positive and if the opposite is true,
it drives the output to be more negative. If the condition remains,
the opamp keeps moving the output in the appropriate direction until
it runs out of voltage compliance.
The first opamp in the diagram is an inverting buffer. Since the +
input is grounded, the - input must also be at ground potential if and
only if the opamp's output is somehow connected to allow that to take
place. Otherwise, all bets are off. Assume for the moment that
things are arranged that way (a detail you will see in a minute), so
that the output can slew the - input around to set it at the same
potential as ground. This node is then said to be a "virtual ground"
since it is at ground, but not actually connected to ground. Now
consider the two 1k ohm resistors. Let's say the input is at -2V.
Assuming that the virtual ground really is at ground potential, then
2mA must flow from that virtual ground node towards the -2V source.
Where does that current come from? Not the opamp's - input. That
input should just be observing, not supplying current. So the current
must come through the other 1k ohm resistor. To do that, the opamp's
output must be at +2V. If so, then 2mA will flow from the output via
that resistor into that virtual ground node and then to the -2V input
source. So it's kind of like a see-saw. When the input goes down,
the output of the first opamp must go up in order to supply the needed
current so that the - input can actually be at ground potential.
There's another issue, though. Assume just for a moment that the -2V
input actually tried to pull down the virtual ground node just a
little below ground, so that it became slightly negative. The opamp
would "see" that the + input was then above the - input and would
attempt to raise the voltage on the output to compensate. It turns
out that this is exactly what's needed, as when the output goes a bit
more positive, it will similarly pull that virtual ground node towards
a more positive value, which is exactly what is needed to get it back
to ground potential. In other words, a negative-going excursion or
spike on the input to the first 1k ohm resistor would be immediately
opposed by a positive-going output, bring the virtual ground node back
to ground. If the opamp had been wired with the inputs the other way
around, the output would have gone in the negative direction, making
the 'virtual ground' node even more negative, making the output go
even more negative, etc., until the opamp simply railed at the max
negative voltage it could handle. Which is why it is hooked up the
way it is.
Once you understand that, you can see that the first opamp is just a
way of inverting the voltage. The ratio of the feedback resistor (the
one going from the output back to the - input) to the input resistor
sets the "gain." With 1k and 1k, the gain is 1k/1k or just 1. It
inverts, but doesn't change the magnitude.
The second opamp has a 3k feedback resistor and there are three
different input resistors. The gain ratios will be 3k/1k=3, 3k/600=5,
and 3k/500=6. 3, 5, and 6. If you supply all three inputs at the
same time with three different voltages, each of these voltages will
set up a current flow you can easily predict knowing that the virtual
ground node must be 0V. Each of those currents must be supplied
through the 3k feedback, though. So the output will go to whatever
voltage is needed in order to supply all three currents at the same
time. That will be the sum of those currents and to do it. Also, the
output will be inverted. With the gains involved, that means
Vo=-3*V1-5*V2-6*V3'. But since V3 is inverted by the first opamp,
that means: Vo=-3*V1-5*V2+6*V3. Negating the whole thing gives
-Vo=3*V1+5*V2-6*V3.
Jon