What is wrong with this simulation?

Thread Starter

vindicate

Joined Jul 9, 2009
158
I'm doing some simulations for a single supply amplifier, and I can't figure out what is wrong with it.

I set up a virtual ground through U1, and I can't seem to get the expected output on u2. I suspect it may be my resistor values in the negative feedback portion of u2. Can anyone lend a hand?

 

Attachments

SgtWookie

Joined Jul 17, 2007
22,230
You're creating a virtual ground, but you're referencing V2 to actual ground.

Try removing the ground symbol from V2, and connecting the negative side of V2 to the output of U1. Either that, or provide a 7.5v DC offset for the sine wave.

Also, reduce the amplitude of the sine wave to 1v from 5v, or you will see a clipped waveform on the output.

See the attached for a working example.
 

Attachments

Thread Starter

vindicate

Joined Jul 9, 2009
158
Ok, that worked for the simulation, but I don't get how you would apply that to real life? Would that be considered a DC Bias?

The circuit I am looking at is this: http://cdn.makezine.com/make/blogs/blog.makezine.com/ledColorOrgan-schem_r2.gif

I know the circuits aren't the same, I'm just trying to learn a bit. The circuit I linked to is an inverting amplifier and the one I built is non-inverting. But the concept is similar.

My 5v or 1v after your change is my audio input. So how would I reference that to the virtual ground, or how in that circuit is that input referenced to the virtual ground?
 

SgtWookie

Joined Jul 17, 2007
22,230
Gee, it shows you right in the schematic that you linked to.

Do you see all of the "V-GND" symbols? Those are connected to the output of IC2, which is creating the virtual ground.

The caps on the inputs & outputs block the DC levels, but let the effects of the AC signals through.

On the left, see the "INPUT>" source? Just to the right of that is C1, which isolates the DC levels.

Then pin 3 (noninverting input) of the 1st opamp is connected to the virtual ground.
The 1M and 47k resistors provide the gain, AND keep the average level on the inverting input (pin 2) at the same potential as the virtual ground.
 

Thread Starter

vindicate

Joined Jul 9, 2009
158
I get what V-GND means. And that's what I did in my first sim, connected the v-gnd to one of the op amp inputs.

What I was referring to was when you had me connect the negative side of the AC voltage source to V-GND. I don't see that happening anywhere in the schematic, and that's more the question I was asking.

Was connecting that there more just to get the sim to run correctly, or does that have a real life application too? Assuming that my AC voltage source would be similar to audio out on a cd player or something.

V2 is supposed to be my audio out, in the schematic the ground side of the audio is connected to normal ground not virtual.
 
Last edited:

Audioguru

Joined Dec 20, 2007
11,248
The + input of all the opamps must be at half the supply voltage. It is the reference voltage for the opamps.
An opamp is not needed to make the virtual ground since the + inputs of the opamps are a very high resistance. A simple voltage divider made with two 10k resistors and a 47uf capacitor to ground will work fine as a virtual ground for that circuit.
 

SgtWookie

Joined Jul 17, 2007
22,230
I get what V-GND means. And that's what I did in my first sim, connected the v-gnd to one of the op amp inputs.
No, in your first sim, you had the noninverting (+) input connected to GND via V2.

What I was referring to was when you had me connect the negative side of the AC voltage source to V-GND. I don't see that happening anywhere in the schematic, and that's more the question I was asking.
Well, you're sort of comparing apples to oranges. Your schematic was a non-inverting amp, where the other schematic is an inverting amp. The circuitry is different. Have a look at the attached; I've shown how you would connect it for a non-inverting amp.

Was connecting that there more just to get the sim to run correctly, or does that have a real life application too? Assuming that my AC voltage source would be similar to audio out on a cd player or something.
Both of the inputs had to somehow be referenced to Vcc/2. In the revision I've attached, you can see the noninverting input to U2 connected to the virtual ground via a 100k resistor, and the cap C1 couples the AC signal to the same input.

V2 is supposed to be my audio out, in the schematic the ground side of the audio is connected to normal ground not virtual.
V2 is your input to the amplifier, not the output. ;)
 

Attachments

Thread Starter

vindicate

Joined Jul 9, 2009
158
Ok, I get why your modifications have worked. You are adding the DC Bias to the original AC voltage. And I realize that my circuit was a non-inverting amp where the one in the link is an inverting. But from what I understand the the two are very similar.

My main question right now is this. Where in the link to the color organ from MAKE are they adding DC Bias to the input AC voltage? The schematic just shows the virtual ground just connecting to the inputs of the amplifiers.

I found this: http://www.eng.yale.edu/ee-labs/morse/compo/sloa058.pdf and they had a similar setup.



Neither of them have the virtual ground connected to Vin.
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,230
Input bias current for a JFET input opamp like a TL07x or TL08x is typically 5pA when the supply is ±15v. It would take a very long time for an input cap to charge or discharge via that tiny current. So, a high-value resistor is used to ensure that the input is near where it needs to be.
 

Thread Starter

vindicate

Joined Jul 9, 2009
158
OK, thanks alot. I feel like a dummy now haha.

For an inverting amplifier using a virtual ground does the gain equation change?

Maybe not necessarily change, but I've noticed in my sim, that depending on the capacitor you use on VIN will change the amount of gain you need. So is there a way to calculate that other than just inserting different resistor values and cap values.
 

Audioguru

Joined Dec 20, 2007
11,248
An inverting opamp usually does not need a low impedance virtual ground circuit because its (+) input is a high resistance that simply needs a reference voltage at a very low current. The reference voltage can be made with 2 high value resistors in series making a voltage divider and a capacitor to ground as a filter.

The gain of an inverting opamp is Rf/Rin where the input impedance of the signal source and the reactance of the series input capacitor are added to Rin.

A series input capacitor passes high frequencies and blocks low frequencies depending on its value. The formula is simple, 1 divided by 2 pi R f reduces the level by 0.707 times.
 
Top