op-amp with virtual ground in SPICE

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hello,

I just made a simple SPICE simulation with an op-amp and virtual ground (read: single supply). However it doesn't seem to work. The output of the op-amp gets distorted and inverted for some unknown reason to me. Have I made some fundamental error in the circuit or is SPICE just kidding with me?

An externally hosted image should be here but it was not working when we last tested it.

An externally hosted image should be here but it was not working when we last tested it.
 
The circuit should provide an amplifier output, but the input needs to be "centered" at 6 volts. The equivalent circuit to the left of R2 is 6 volts in series with 2.35k. The gain is 1+10k/(1K+2.35k) and the output will be 6 volts when the input is 6 volts. Do you have the input centered at 6 volts?
 
The circuit should provide an amplifier output, but the input needs to be "centered" at 6 volts. The equivalent circuit to the left of R2 is 6 volts in series with 2.35k. The gain is 1+10k/(1K+2.35k) and the output will be 6 volts when the input is 6 volts. Do you have the input centered at 6 volts?

By using a voltage divider I get 6V connected to the op-amp (-) input.
 
#7
user_offline.gif
yakideo
Poland.gif

diyAudio Member

Join Date: May 2010


Quote:
Originally Posted by cbdb
Try biasing the + input to 6 volts too.

How do I do that?





by putting a resistor from the node of r3 and r4 to the +input on the opamp.
And disconnect r2 from the same node and it should work (i hope). jer
 
Last edited:
I tried your circuit in circuit maker an I get the same results .
with an input ac voltage of .1V peak you should have a .0125 (12.5mv)peak to peak sine wave with a 1.55V dc bias.
with a .71v peak input a get a square wave the same as you do.
with the mod I discribed I get the same.
with the original circuit and the signal generator ground tied to the node of R3 and r4 it works prefectly with a clipped sine wave rail to rail with a 6v bias. jer
 
It appears to be an issue with your simulator program of what it assumes ground is.
I have the same problem with circuit makers scope function.
I either can't or don't know how to change its point of ground reference.

This gets very confusing when I am working on balanced output circuit using single ended supplies.
It gives me a false data of 1/2 of what it should be.
It will only give me a measurement on either side of the component in question, but not across it.

However I don't have this problem with the meter function as it assumes it to be a resistive component and can be placed anywhere in the circuit.

I took me a long long time to figure that out.

And I have keep it mind that some of my errors aren't really errors.
This is very frustrating when I plan on building the circuit,especialy a power amplifier circuit.

I hope that makes any sense of the situation. jer
 
Quote:
It will only give me a measurement on either side of the component in question, but not across it.
You cant subtract one side from the other? Time to try LTSpice.



Yes, I do, do this, as can take a sample from either side of say a resistor load from balanced output and use the addtion and/or subtraction function in the value window.
But ,I know that if I get say 10v p-p on either side that there is actualy 20v p-p across the resistor.

I have Ltspice but haven't taken the time to learn it ,and I need too.
Circiut maker 2000 works for me right now especial for the simple stuff,but it does have its quirps.
It is to bad that Microcode Engineering sold out to Altium and stopped support for it right after it's release.
How rude!
Especialy after I spent $500 on the original version and only got one update.
Just another example of a company with a great product losing thier A$$ due to price gouging.
But it works.
Thanks, jer
 
Last edited:
What I ment by a balanced output, is, a bridge tied load (BTL) configuration.

Where on the first 180 degrees of the signal there is 0v on side a and 10v on side b of the load.
And on the second 180 degrees of the signal there is 10v on side a and 0v on side b of the load.

Circuit maker depicts this as it would be in the real world when the scope's ground is referenced to the circuit's ground.

But, In the real world (provided the two units are completely isolated from each other) you can connect the scope directly across the the load and then you will see that infact there is a 20v p-p signal across it.

This messes up the load power dissipation reading aswell.

There are only two ways around this that I know of.

1. Replace all of the power sources with the battery function(symbol) and tie what ever side of the battery that needs to be grounded to all of the rest of the battery sources and keep this ground system a completely seperate enity and this becomes the virtual ground.
Any other inputs and outputs and sources that there may be must be tied to this virtual ground with a (high value) resistor in order for(it to work) spice to simulate it.

Then I where ever I place a (one) ground in the circuit this becomes the reference for the scope function.
The scope will then display a 20v p-p signal when connect to one end of the load and a(one)ground is connected to the other end of the load.

This can get very complicated and makes the drawing to very cluttered and hard to work with.

2.Replace the load with a 1:1 transformer and tie the load to the secondary winding of the transformer and then reference the load with a(one) ground on one end of the load.
Then you wil see a 20v p-p signal aswell.

This works, but, it introduces the transformers reactances into the circuit and gives different data at different frequency's when the inductance values of the transformer are not properly adjusted.

I hope, I explained it a little clearer. jer
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.