# Virtual ground or not?

Discussion in 'Electronic Basics' started by [email protected], Feb 24, 2005.

1. ### Guest

Using a classic inverting op amp circuit with the "+" input tied to
ground, I lift the pin and connected it 1 volt. Will the "+" input
behave like a virtual ground when a signal is applied to it's "-"
input? What should I expect?

boat_ranger

2. ### Robert MonsenGuest

Which pin did you lift? And what do you mean by 'lift'?

If the V+ input is tied to ground, and there is feedback of some kind,
the opamp will try to make the V- input equal ground. This makes it an
inverting amplifier (the gain is negative,) so unless you have a
positive and negative power supply for the opamp, it won't be able to do
that. The output will just sit at zero.

This makes sense, right? An opamp's output is A * (V+ - V-), where A is
some large number. If V+ = 0, then the output is -A*V-, which means it
can only go below 0 for inputs higher than ground.

--
Regards,
Robert Monsen

"Your Highness, I have no need of this hypothesis."
- Pierre Laplace (1749-1827), to Napoleon,
on why his works on celestial mechanics make no mention of God.

3. ### Guest

Hi, the "+" pin was removed from gnd and tied to 1volt, provided
by a voltage divider. The output then shifted to 1 volt, without a
signal on the "-" input.

The op amp has a + and - 12v supply.

In my case the input signal will swing negative so the output swings
positive.

My thinking is that the 1volt provides a offset for the output, I'm
unsure what to expect if I place a scope on the "+" input while there
is a signal on the minus.

What should I expect and why?

boats_ranger

..

4. ### Robert MonsenGuest

Well, it depends on how you hook it up. If you leave the negative input
unconnected, there is no telling what will happen. If you put a signal
on the V- input without some kind of negative feedback, then the output
will be A*(1-V-), where A is the open loop gain of the opamp. A is
typically quite large for low frequencies, more than 100,000. However,
your opamp clearly can't put the output outside the +-12V supply. Thus,
almost any signal will cause the output to be at the positive or
negative extreme of what the opamp can output (which won't be -+12V
unless you have a 'rail to rail' opamp).

If you use feedback from the output to the inverting input, then the
opamp will try to modify it's output so the inverting input equals the
noninverting input.

If you have a reference voltage of Vref, an input resistor of Ri, an
input voltage of Vi, and a feedback resistor of Rf, then it's 'almost
true' that V- == Vref. Thus,

(Vref - Vi)/Ri + (Vref - Vo)/Rf = 0

This just states that the current going into the V- node is equal to the
current coming out.

You can solve that equation for what you don't know. In your case, Vref
= 1, so

(1 - Vi)/Ri + (1 - Vo)/Rf = 0

If we assume that Ri = Rf and aren't 0, then they divide out, so

(1 - Vi) + (1 - Vo) = 0

so

Vo = 2 - Vi

This is another way of saying

(Vo + Vi)/2 = 1

which says the average of the output and input voltage is 1V, your
reference.

--
Regards,
Robert Monsen

"Your Highness, I have no need of this hypothesis."
- Pierre Laplace (1749-1827), to Napoleon,
on why his works on celestial mechanics make no mention of God.

5. ### Ingvar EskGuest

If you mean that V- is not connected to anything, I think the output is
unpredictable and very sensitive to noise on the V- input.
Without feedback to the inputs you will basically see +12V or -12V depending
on the input level on V- compared to V+ (1V).
You will see 1V, as that is what you provided. The V+ is not an output so it
can't be affected by the opamp.
Ingvar

6. ### Guest

The way it works is a little more complicated than you imagine, but
not too much.

If the -ve input goes slightly +ve (w.r.t. the +ve input) then, as you
know, the output goes -ve. And, because the gain of the op-amp is
huge, the output will slam down -ve as hard as it can...

....but as it moves down, the voltage on it will be fed back to the -ve
input via the feedback resistor. The size of the voltage appearing on
the -ve input depends on the ratio of the input resistor to the
feedback resistor (you will have to draw this out and think about it
maybe: if you get to understand it, then you will also see why how the
gain depends on this ratio too).

You also know that the "input impedance" of the op-amps inputs is
"very high" i.e. it is easy to "move them up or down" but you also
know that some books refer to "virtual earth" ?!

The reason for this is: while the actual inputs are "high z" (on their
own) they will "obviously" have an actual "impedance" equal to
whatever is connected to them i.e. the resistors (in parallel (to
"earth")).

But this "impedance" is not a static thing i.e. "just" the resistors,
it is dynamic i.e. the "effect" of the "virtual earth" depends on how
the -ve node is affected when you try to move it up or down from the
*outside* i.e. before the input resistor - the effect is that it
"cannot be moved" (because the feedback resistor moves it back again
(via the output)... So the effect is that it appears to be fixed or
"virtual earth" (but only if the +ve input is at earth).

If you move the +ve input to 1V then the -ve input will now become
fixed at 1V too so it will now become a "virtual 1V".

The phase "virtual earth" is sloppy and as you can see, misleading.

Cheers
Robin

7. ### John FieldsGuest

I think you're confused as to what a 'virtual ground' is. If an opamp
is hooked up in the inverting configuration with the non-inverting (+)
input grounded, like this"

+--[R2]---+
| |
| +12 |
| | |
VIN>--[R1]--+--|-\ |
/ | >---+-->VOUT
/ +--|+/
/ | |
VV | -12
|
GND

The output of the opamp will do whatever it has to to drive the -
input to whatever voltage GND happens to be, regardless of what Vin
happens to be. Therefore, the - input, not the +, is the virtual
ground since it always tries to be at GND potential.

If R1 = R2 and we make a table with a few values of Vin:

VIN VV VOUT
-----|---|------
-2 0 +2
-1 0 +1
0 0 0
+1 0 -1
+2 0 -2

+--[R2]---+
| |
| +12 |
| | |
VIN>--[R1]--+--|-\ |
| >---+-->VOUT
VREF>-[R3]--+--|+/
| |
[R4] -12
|
GND

If the + input is at +1V, then the output will swing to whatever
voltage it has to in order to drive the - input to +1V, so the - input
is a "virtual +1V".

Making a table similar to the first, where VV is the voltage on the
opamp's - input, we'll have:

VIN VV VOUT
-----|---|------
-2 +1 +4
-1 +1 +3
0 +1 +2
+1 +1 +1
+2 +1 0V

So in both cases the voltage on VV stays constant and follows the
voltage on the + input, so it's "virtually" the voltage on the +
input.

8. ### Guest

In essence whatever the voltage on the "+" input will cause the output
to drive the
"-" input to be equal through the feedback resistor.
It's not clear to me, how the above table was derived, given r1= r2
and Vref = 1v.

boats_ranger

9. ### John FieldsGuest

---
It wasn't derived with Vref = 1V, it was derived with the voltage on
the non-inverting input of the opamp equal to 1 volt.

Looking at:

+--[R2]---+
| |
| +12 |
| | |
VIN>--[R1]--+--|-\U1 |
| >---+-->VOUT
VREF>-[R3]--+--|+/
| |
[R4] -12
|
GND

It should be clear that if Vref = 1V, then it would be impossible for
the voltage on U1+ to also be equal to 1V, and I don't believe I
referred to the voltage on U1+ as "Vref" anywhere in my earlier post.

+--[R2]---+
| |
| +12 |
| | |
VIN>--[R1]--+--|-\U1 |
| >---+-->VOUT
Vref>--+----+--|+/
| |
+1V -12

Such being the case, and remembering that the opamp's output will do
whatever it has to to make the voltage on U1- be equal to the voltage
on U1+, then we can model the circuit as a simple voltage divider,
like this:

Vout
|
[R2]
|
Vref---+---1.0V
|
[R1]
|
Vin

Now, the game becomes trying to find out what Vout has to be to make
sure that Vref always stays at 1.0V as Vin varies, if R1 and R2 are
equal resistances. Since, if they're equal, it won't matter what
value they are, let's set them at one ohm for convenience and redraw
the circuit like this with Vin = 0V:

Vout
|
[1R] R2
|
+---1.0V Vref
|
[1R] R1
|
0V Vin

From Ohm's law,

E
I = ---
R

and, since there's 1V across R1, we can say:

Vref - Vin 1V
I = ------------ = ---- = 1A
R1 1R

Since R1 and R2 are in series the same current has to be flowing
through both of them, so if R2 has a resistance of one ohm there'll be
one volt dropped across it as well. That one volt will be on top of
the voltage across R1, so we now have:

2V Vout
|
[1R] R2
|
+---1V Vref
|
[1R] R1
|
0V Vin

And if we start a new table it'll look like this:

Vin Vref Vout
------|------|------
-2 +1
-1 +1
0 +1 +2
+1 +1
+2 +1

Proceeding in the same vein, if we make Vin equal to 1V and we want
Vref to also be at 1V, then zero current must flow in R1, and the only
way to also make zero current flow in R2 will be to make Vout equal to
Vref, so we now have:

1V Vout
|
[1R] R2
|
+---1V Vref
|
[1R] R1
|
1V Vin

And our new table will have a new entry:

Vin Vref Vout
------|------|------
-2 +1
-1 +1
0 +1 +2
+1 +1 +1
+2 +1

Now, by setting the voltage at Vin to be whatever you want it to be
and calculating the current in R1 and R2 (remembering that they have
to be the same) you ought to be able to figure out what Vout has to be
to make that happen, and to fill out the rest of the table.

10. ### Guest

I must have lost something if, Vin = -2 , Vref = +1, R1 and R2 =
1ohm
and "+" is a virtual +1v.

Given the above the current is I = (1 -(-2))/1 = 3amps
The IR drop across R1 is 3 volts, If the R2 current = 3 amps. the
voltage
drop would be 3volts. Why is the answer zero? I must be missing
somthing.

A confused boat_ ranger.

11. ### Rich GriseGuest

If you had included a little context, it'd be much easier to figure

1. If you insist on using the new fucked-up google groups, then at least
learn how to copy/paste context.

2. Or, get a real newsreader and a real newsserver, and post like someone
who knows their elbow from a hole in the ground.

Good Luck!
Rich

12. ### Guest

If you had included a little context, it'd be much easier to figure
That's a fair statement. If there a method which make's
Cut and paste is not a problem, some of the illustrations are
difficult to
decipher.
I never heard of a newsreader, As far as the post, I appreciate those

"Rich", if what I written upset's you don't read the thread, It's not
worth the time.

boat Ranger

13. ### John FieldsGuest

---
I don't understand what you're talking about.

If this is what you're referring to:

Vout
|
[1R] R2
|
+---1V Vref
|
[1R] R1
|
-2 Vin

Then there will be a 3V drop across R2 if Vref is to remain at 1V,
which makes Vout equal to +4V.

Here's the table I originally posted, where VV is Vref:

VIN VV VOUT
-----|---|------
-2 +1 +4
-1 +1 +3
0 +1 +2
+1 +1 +1
+2 +1 0V

Notice that the "answer" is zero when Vin = +2V, not when it's -2V.

14. ### Robert MonsenGuest

Rich, you've been in a foul mood lately, not your usual sunny self.

If we scare off all the beginners, there won't be anything to do except
whine about politics and religion. Next thing you know, Larkin and
Thompson will start posting recipies again.

Boat_ranger was the guy who wanted to build a 500V 200mA SMPS a few
weeks ago. Lighten up, he is obviously learning.

From "The Life of Brian". As you recall, this was sung by the guys
hanging on the crosses at the end:

Always Look on the Bright Side of Life

words and music by Eric Idle

Some things in life are bad
They can really make you mad
Other things just make you swear and curse.
When you're chewing on life's gristle
Don't grumble, give a whistle
And this'll help things turn out for the best...

And...always look on the bright side of life...
Always look on the light side of life...

If life seems jolly rotten
There's something you've forgotten
And that's to laugh and smile and dance and sing.
When you're feeling in the dumps
Don't be silly chumps
Just purse your lips and whistle - that's the thing.

And...always look on the bright side of life...
Always look on the light side of life...

For life is quite absurd
And death's the final word
You must always face the curtain with a bow.
Enjoy it - it's your last chance anyhow.

So always look on the bright side of death
Just before you draw your terminal breath

Life's a piece of shit
When you look at it
Life's a laugh and death's a joke, it's true.
You'll see it's all a show
Keep 'em laughing as you go
Just remember that the last laugh is on you.

And always look on the bright side of life...
Always look on the right side of life...
(Come on guys, cheer up!)
Always look on the bright side of life...
Always look on the bright side of life...
(Worse things happen at sea, you know.)
Always look on the bright side of life...
(I mean - what have you got to lose?)
(You know, you come from nothing - you're going back to nothing.
What have you lost? Nothing!)
Always look on the right side of life...

--
Regards,
Robert Monsen

"Your Highness, I have no need of this hypothesis."
- Pierre Laplace (1749-1827), to Napoleon,
on why his works on celestial mechanics make no mention of God.

15. ### JeffMGuest

If you had included a little context, it'd be much easier to figure
He shouldn't have to ask. Here's the rule book for Usenet.
http://66.102.7.104/search?q=cache:...gh+at-*-top-*-*-message+do-not-*-*-*-original

boats_ranger,
Easy way: Don't click the Reply link that is in plain sight.

To view ASCII art, click the **Fixed font** link at the top of the
page.

Forgive Rich. This is his week to be incensed
by those who post without having lurked long enough
to glean a clue about how posting is done properly.

Like that's not obvious.

If your ISP doesn't have a good news server:
http://66.102.7.104/search?q=cache:...notated/newsservers.php+news-servers+giganews

....or YOU could take the time to learn how to post properly.

16. ### Guest

Yes, I'm a beginner, Again I'm a beginner. But I'm willing to
learn and
in the future will be able to pass that knowledge to someone else

John, I build up a circuit this morning, Allow me to double my efforts,
I will repost
with the proper etiquette (hopefully).

To all other, I appreciate your patience in this matter.

Beginner boat ranger

17. ### John FieldsGuest

---
Your etiquette's OK, but it _would_ be nice if you left a snippet from
the post you're responding to in your response to it. That way,
everybody'll know what you're talking about without having to

One other thing, just in case you don't know, is that it isn't
necessary for R1 and R2 to be one ohm each, they just both have to be
the same resistance. That way you won't have to use such a large
power supply to try it out.

19. ### Rich GriseGuest

Yeah, sorry, I came down on you a little hard, as has been pointed out
by others.

I guess I need to learn some patience.

Thanks,
Rich

20. ### Fred AbseGuest

And from the same team:

"Pray that there's intelligent life, somewhere out in space
'Cos there's bugger-all here on earth."

(From Monty Python's "The Meaning of Life")