Op-amp Circuit with virtual Ground

Click For Summary

Discussion Overview

The discussion revolves around the implementation of an op-amp circuit utilizing a virtual ground, specifically addressing issues encountered when powering the circuit with a single supply. Participants explore the stability of the virtual ground, the behavior of the circuit output, and potential design improvements.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant describes their circuit setup, noting that the output initially functions correctly before becoming stuck high, expressing uncertainty about the feasibility of their approach.
  • Another participant questions the configuration of the right-most op-amp, suggesting that it may have positive feedback and that virtual grounds can be problematic.
  • A suggestion is made to use a fourth op-amp as a buffer to stabilize the virtual ground, as a simple resistor divider may not provide sufficient stability.
  • One participant mentions using capacitors across the resistors to smooth out noise, while another emphasizes that voltage stability is the primary concern with a resistive divider.
  • There is a discussion about the use of voltage regulators to maintain stable voltage levels, with some participants expressing confusion about the effectiveness of capacitors in this context.
  • Several participants discuss the nature of the circuit, with one suggesting it is an oscillator and another proposing the use of a "Wien bridge" oscillator design for reliability.
  • One participant acknowledges a misunderstanding regarding the feedback configuration in the circuit, clarifying their initial assessment after further review.
  • A participant expresses a desire to keep costs low for a prototype, despite acknowledging that a more robust design may be necessary if the circuit is to be used in the field.

Areas of Agreement / Disagreement

Participants express differing views on the effectiveness of using a voltage divider for the virtual ground, with some advocating for more stable solutions like voltage regulators or op-amp buffers. There is no consensus on the best approach to resolve the issues faced in the circuit implementation.

Contextual Notes

Limitations include potential misunderstandings about circuit behavior, the stability of the virtual ground, and the implications of using a resistive divider. The discussion also reflects varying levels of experience and familiarity with circuit design principles among participants.

cpscdave
Messages
402
Reaction score
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: 1,059
  • opamp.txt
    opamp.txt
    1,000 bytes · Views: 524
Engineering news on Phys.org
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...
 
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.
 
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
 
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
 
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 :)
 
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   Reactions: davenn and berkeman
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.
 
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   Reactions: 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.
 

Similar threads

Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
6K
Replies
6
Views
4K
Replies
9
Views
7K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K