Op-amp Circuit with virtual Ground

In summary, the circuit is wired correctly, but the output gets stuck high. The problem may be due to the virtual ground. It is possible to fix the issue by using a voltage regulator.
  • #1
cpscdave
403
120
Hi everyone,
I'm trying to implement the attached circuit. (the .txt is for http://www.falstad.com/circuit/)
Since I only have a single power supply and I ultimately want to drive this with a battery I am powering the opamp with a virtual ground.
Using a voltage divider to achieve this.
Opamp VCC+ connected to + of power supply
Opamp VCC- connected to - of power supply
Ground in circuit connected to middle of voltage divider.

The problem I am having is when I turn the circuit on, the output correctly outputs for about 1/4 of a second and then gets stuck high. As far as I can tell the circuit is wired correctly, and I am at loss what could be causing this behaviour.
Hoping someone might be able to point out the errors of my way.
Is what I'm trying to do even possible??
Thanks :)

*edit* the output of the left and middle op-amps are supposed to be sin waves, according to Falstad they are about 1.4mV p-p
The right most op-amp just amplifies the signal to a level that I can use.
 

Attachments

  • opamp.JPG
    opamp.JPG
    13 KB · Views: 933
  • opamp.txt
    1,000 bytes · Views: 442
Engineering news on Phys.org
  • #2
Why does the right-most opamp have positive feedback? Are the +/- terminals reversed?

What do you want to do with this circuit? Virtual grounds are a pain, IMO. Much better if you can use single-supply opamps and keep the signal between the power rail and ground...
 
  • #3
cpscdave said:
Ground in circuit connected to middle of voltage divider.
If this is just two resistors, that is probably your problem. The virtual ground needs to be very stable. I would use a fourth op-amp connected as a buffer to produce the virtual ground.
 
  • #4
Thanks for the suggestions Berkeman,

I'm trying to build a circuit to generate an AC current so we can field test current sensing Toroids so we can fully commission stuff.
They get tested prior to leaving the panel shop with an AC power supply but then the panels will quite often sit out in the field for months before they are ready to be used.

Svein I actually have capicitors across the resistors to help smooth out noise. Not sure if that would help the ground remain stable (read that off of a circuits forum about using virtual grounds)

Tinkering with the circuit I think I've figured out my issue. One of my 10uF capacitors is bad. I swapped them for 1uF ones and the circuit operates as intended, just at a higher frequency
 
  • #5
cpscdave said:
Svein I actually have capicitors across the resistors to help smooth out noise. Not sure if that would help the ground remain stable (read that off of a circuits forum about using virtual grounds)

Just for future reference, In this case, noise isn't the issue. Voltage stability, specifically the lack of, when using a resister divider is the issue
the + or - voltage rails will continually fluctuate with every variation in current that the 2 rails draw. This is why voltage regulator IC's are used
so as to produce a stable voltage over a range of variations of current

if this circuit you are doing is to become a permanent one, rather than just an experimental setup, I would strongly suggest you
consider the use of regulators

cheers
Dave
 
  • #6
davenn said:
Just for future reference, In this case, noise isn't the issue. Voltage stability, specifically the lack of, when using a resister divider is the issue
the + or - voltage rails will continually fluctuate with every variation in current that the 2 rails draw. This is why voltage regulator IC's are used
so as to produce a stable voltage over a range of variations of current

I get that voltage regulators would be a better choice. If they decide that this is something that they'll use I'll look into a more proper way to do it.
I am a little confused about the voltage stability. I understand why they rails fluctuate. But do the cap's across the resistors not help smooth that out?

I attached a little (cheap and portable) Oscope across the + and neutral rails without the 47uF Caps across the resistors in the voltage divider:
no_caps.jpg


With the caps
with_caps.jpg


I'm just making sure I understand what is going on :) I worked with 1 lab partner through all of school. He was the circuits guy, I was the math and programming guy :)
On our last design project we had 2 12v batteries arranged to get +12, -12 volts. My partner used a regulator to give us a +5v rail, but then still had caps across the +5 and neutral rails. When I asked about it, he implied that it was to help compensate for the fluctuations due to varying draw on the rails.

Thanks for all your help :)
 
  • #7
The trouble with a resistive divider is when any current flows into or out of that virtual ground , it loads the divider shifting the voltage away from halfway between rails.. That gives unwanted feedback.

One fix is to connect to your divider an opamp wired as follower, use output of that amp as virtual ground. It'll handle a few milliamps without shifting.
Another is to use an audio amp like LM833 . It automatically sets its output pin halfway between rails and will handle a few amps of current.
http://www.engineering.uiowa.edu/sites/default/files/ees/files/NI/pdfs/00/71/DS007145.pdf
 
Last edited by a moderator:
  • Like
Likes davenn and berkeman
  • #8
cpscdave said:
I'm trying to build a circuit to generate an AC current
That's called an oscillator.

Irrespective of any issues with the voltage divider ground, I don't see any way that the original circuit you posted can work. It has (approx) infinite gain positive feedback at DC.

You should take a look at the circuit for a "Wein bridge" oscillator, it's has a very simple single opamp implementation. I've used it in the past, and with a jfet (as a voltage variable resistor) to stabilise the gain/amplitude it was very reliable.
 
  • #9
uart said:
a "Wein bridge" oscillator
That is "Wien bridge" (Wien = Vienna, Wein = wine).
There is nothing essentially wrong with the circuit (except for problematical virtual ground). It is called a state-variable oscillator. The positive feedback on the rightmost op-amp creates a comparator with hysteresis, so he gets a square wave out.
One small reservation: Most state-variable oscillators I have seen are slightly more complicated (Google "state variable oscillator circuit").
 
  • #10
Svein said:
That is "Wien bridge" (Wien = Vienna, Wein = wine).
There is nothing essentially wrong with the circuit (except for problematical virtual ground). It is called a state-variable oscillator. The positive feedback on the rightmost op-amp creates a comparator with hysteresis, so he gets a square wave out.
Yes I understand that. I still think that there is a problem with the implementation (as shown in the cct diagram in the op), due to the DC positive feedback. Just because it's a state variable implementation doesn't change the fundamentals regarding stability.

EDIT: Whoops I just took another look at the circuit and it's not positive feedback. Late at night here, and for some reason when I first looked at it I thought there was "double inverted" feedback. But now that I look again I see that the first stage is non-inverting in regard to the feedback signal. My mistake.
 
Last edited:
  • #11
Thanks for all the feedback, if it turns out that they will actually use this in the field I will implement the proper way.
I just have a feeling this is something that the field guys say they will use but never actually end up using. Hence why I wanted to spend no money (for additional components) and little time on it.
The oscillator works well enough despite being held together with chewing gum and duct tape (lol its in a prototype board currently)
 
  • #12
cpscdave said:
Thanks for all the feedback, if it turns out that they will actually use this in the field I will implement the proper way.
I just have a feeling this is something that the field guys say they will use but never actually end up using. Hence why I wanted to spend no money (for additional components) and little time on it.
The oscillator works well enough despite being held together with chewing gum and duct tape (lol its in a prototype board currently)
To be honest I've used a voltage divider ground (capacitor bypassed) like that many times without any issues. Particularly in an application like this, where the load current is ac. As long as you have capacitors in parallel with the voltage divider resistors so that the ac impedance of the ground is low, then it can work well. :)
 
  • Like
Likes jim hardy
  • #13
I would not rely on that circuit at all. In theory the 2 op-amps on the left will be stable. Together they have a gain of one at DC and much less than a gain of one as the frequency goes up. What's up with the output taken from the left op-amp? The problem with that if you really want it as an output is that when 2 separate op-amps are used together to form the negative feedback there really is no guarantee what the voltage is between stages. Suppose for the sake of argument that the open loop gain of the first stage is around 100 (seriously exaggerated low for the sake of discussion) and the second one has an open loop of 100,000. It all works out in the end with the feedback as far as the last op-amp in the chain goes but the voltage at the output of the first op-amp will be different if the op-amps were swapped even though together they have a stable gain.

The right most op-amp does in fact form a schmitt trigger with the positive feedback. I suspect what you see on the scope is an UNWANTED oscillation. I have made oscillators similar to this but in order to do so the output of the schmitt trigger has to feedback to something. Basically you want to form a triangle wave generator using something similar to the left op-amp in the schematic and use the output of the schmitt trigger to drive the input of that. Off the top of my head you may need to invert the output of the schmitt trigger before it drives the triangle wave generator. The circuit posted does not even look like an oscillator to me. I looked a long time at it but I can't see an oscillator.
-
Edit: Doing it the way I described shouldn't require any virtual ground.
 
  • #14
Averagesupernova said:
-
Edit: Doing it the way I described shouldn't require any virtual ground.

The left most output isn't being used. I started with Falstad's Sine Wave Generator which has a sine and a cosine output. One of which I've used as an input to the third op-amp. The other isn't being used for anything. I realize that if I use it to drive something it'll will affect the operation. I should've removed it from the schematic prior to posting :)
 
  • #15
This type of circuit is sometimes seen where sine wave and square wave signals are needed.

The left two op-amps make a phase shift oscillator with sine wave output. The amplitude is limited by symmetrical clipping at the op-amp power supply voltage rails. There will be some harmonic distortion of the sine wave as a result.

The right hand side op-amp is a schmitt-trigger producing a square wave with amplitude, again set by the op-amp power supply rails.

The sine wave oscillator employs three equal phase shifts, each of 60°. Each RC integrator is buffered or lightly loaded, so the frequency will be largely independent of the power supply voltage. As designed there is a phase shift of about 60° plus the schmitt-trigger hysteresis delay between the sine and square waves.

If the left hand op-amp is removed then the remaining middle op-amp should be rewired as a Sallen-Key two pole low pass filter with the third pole in the feedback loop, or the sine wave oscillator should become a Wien Bridge circuit.

How best to design the circuit would require specification of the frequency, purity, phase and amplitude of the required signals.
 
  • #16
cpscdave said:
The left most output isn't being used.
Ok, so you're not using either of the (quadrature) sine wave outputs. In that case there are much easier ways of building a square wave oscillator.
 

1. What is a virtual ground in an op-amp circuit?

A virtual ground is a concept used in op-amp circuits to represent a node that maintains a constant voltage, typically at 0V. It is achieved by using negative feedback to balance the input and output voltages of the op-amp, resulting in a voltage that appears to be grounded.

2. Why is a virtual ground useful in op-amp circuits?

A virtual ground allows for a wide range of input and output voltages to be amplified by the op-amp, without the need for a dual power supply. It also helps to minimize distortion and improve the accuracy of the circuit.

3. How is a virtual ground created in an op-amp circuit?

A virtual ground is created by using a feedback resistor between the output and the inverting input of the op-amp. This resistor, along with the internal gain of the op-amp, ensures that the inverting input is at the same voltage as the non-inverting input, creating the virtual ground.

4. What are the limitations of using a virtual ground in op-amp circuits?

One limitation is that the virtual ground is not a true ground and can vary slightly depending on the characteristics of the op-amp. Also, the virtual ground can only handle a certain amount of current before it starts to deviate from its intended voltage. Additionally, high frequency signals can cause problems with the stability of the virtual ground.

5. Are there any alternative methods to creating a virtual ground in op-amp circuits?

Yes, there are alternative methods such as using a voltage divider or a buffer amplifier to create a virtual ground. However, these methods may not be as effective as using negative feedback with a feedback resistor.

Similar threads

Replies
2
Views
434
Replies
6
Views
2K
  • Electrical Engineering
Replies
6
Views
3K
Replies
9
Views
4K
  • Electrical Engineering
Replies
3
Views
805
  • Electrical Engineering
Replies
8
Views
1K
  • Electrical Engineering
Replies
3
Views
1K
  • Electrical Engineering
Replies
6
Views
1K
Replies
8
Views
495
  • Electrical Engineering
Replies
6
Views
1K
Back
Top