Author Topic: Issues with OP-AMP (LM358N)  (Read 4685 times)

0 Members and 1 Guest are viewing this topic.

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5133
  • Country: bt
Re: Issues with OP-AMP (LM358N)
« Reply #25 on: April 04, 2020, 02:42:53 pm »
I wonder why to use even 1 capacitor there. I've been using C2 but always in doubt whether I do it properly. Something is telling me there shouldn't be any :)
PS: there should be one capacitor wired at V1.
That is I've been asking myself since ever  :-//

With both or without both you get the same result..
If the supply has a higher impedance, you get better results with two capacitors, but it would be better to put one of the capacitors across both supplies though.

In all honesty, I don't know which is worse: double the ripple on one rail and none on the other, or half the ripple on both.
Readers discretion is advised..
 

Offline wraper

  • Supporter
  • ****
  • Posts: 17581
  • Country: lv
Re: Issues with OP-AMP (LM358N)
« Reply #26 on: April 04, 2020, 02:43:49 pm »
With two capacitors, there's equal ripple on both rails and as you said, both rails become bypassed, hence it's better to use two, rather than one capacitor.
You should have separate capacitor to bypass power rails. With what you have shown, virtual GND is not stable against any of power rails. With one capacitor it will be stable against one of power rails. And if you use such virtual ground with one cap say in audio amplifier, you then can connect series capacitor with input/output and input/output will be referenced nicely to real GND. If you use two capacitors in virtual ground, you will inject noise into the signal.

EDIT: http://www.ecircuitcenter.com/Circuits/opinv_ss/opinv_ss.htm
« Last Edit: April 04, 2020, 03:16:54 pm by wraper »
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5133
  • Country: bt
Re: Issues with OP-AMP (LM358N)
« Reply #27 on: April 04, 2020, 02:52:29 pm »
A more "complex" example you may play with..  :D  :phew:
Readers discretion is advised..
 

Offline wraper

  • Supporter
  • ****
  • Posts: 17581
  • Country: lv
Re: Issues with OP-AMP (LM358N)
« Reply #28 on: April 04, 2020, 02:55:17 pm »
Also consider that with one cap, you have low pass RC filter. With 2 caps you don't have it.
« Last Edit: April 04, 2020, 03:15:14 pm by wraper »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19918
  • Country: gb
  • 0999
Re: Issues with OP-AMP (LM358N)
« Reply #29 on: April 04, 2020, 03:30:01 pm »
With two capacitors, there's equal ripple on both rails and as you said, both rails become bypassed, hence it's better to use two, rather than one capacitor.
You should have separate capacitor to bypass power rails. With what you have shown, virtual GND is not stable against any of power rails. With one capacitor it will be stable against one of power rails. And if you use such virtual ground with one cap say in audio amplifier, you then can connect series capacitor with input/output and input/output will be referenced nicely to real GND. If you use two capacitors in virtual ground, you will inject noise into the signal.

EDIT: http://www.ecircuitcenter.com/Circuits/opinv_ss/opinv_ss.htm

That's different, because you've got the reference on the negative rail, rather than the midpoint, so it's not a virtual ground circuit. There's a subtle difference. In some cases the capacitor is better on positive side, if everything is referenced to the positive.

In the case where all of the 0V nodes go to the centre point of the power supply, I see no problem with having both capacitors. It seems rather arbitrary.
 

Offline wraper

  • Supporter
  • ****
  • Posts: 17581
  • Country: lv
Re: Issues with OP-AMP (LM358N)
« Reply #30 on: April 04, 2020, 03:45:24 pm »
In the case where all of the 0V nodes go to the centre point of the power supply, I see no problem with having both capacitors. It seems rather arbitrary.
I see no problem using none of capacitors at all as they do nothing good for virtual ground when both of them are used. Also due to their tolerance (imbalance), you won't get exactly middle point when voltage ripple is present.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19918
  • Country: gb
  • 0999
Re: Issues with OP-AMP (LM358N)
« Reply #31 on: April 04, 2020, 05:12:23 pm »
In the case where all of the 0V nodes go to the centre point of the power supply, I see no problem with having both capacitors. It seems rather arbitrary.
I see no problem using none of capacitors at all as they do nothing good for virtual ground when both of them are used. Also due to their tolerance (imbalance), you won't get exactly middle point when voltage ripple is present.
A capacitor will reduce the noise, both from the resistors and the op-amp bias currents, so I agree, only one is required and it can be relatively small (10µF would give a lower cut-off of 320mHz, with two 100k resistors, so is overkill). All it does is filter out the noise. It makes no difference to the ripple and the op-amp's supply rejection still has the same amount of "work" to do, whether it's there or not.
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Issues with OP-AMP (LM358N)
« Reply #32 on: April 04, 2020, 10:36:53 pm »
The schematic in the OP message is complete and clear, showing unipolar power supply and the opamp negative supply powered from the supply negative, same as the lower leg of the divider.

Complete and clear, you must be kidding. With no ground shown on the OP's schematic almost everyone would assume that the first part of it is forming a virtual +/- supply for the op amp with Vg being the signal ground, how would anyone ever guess that what looks like the -V supply is actually the signal ground.

Zero999
Just in case you've missed it, the OP's post is nothing at all to do with split supplies or virtual grounds, but about the only clue I can see that it's not used as a split supply is in the text of the OP:
"Also I'm not sure if this is critical information, but the Op-Amp and the Oscillator share the same voltage source."

I have no idea why us, or at least me! got so much stick from wraper & Siwastaja for assuming Vg was the virtual ground / signal ground of a split supply.

« Last Edit: April 04, 2020, 10:54:54 pm by StillTrying »
.  That took much longer than I thought it would.
 

Offline wraper

  • Supporter
  • ****
  • Posts: 17581
  • Country: lv
Re: Issues with OP-AMP (LM358N)
« Reply #33 on: April 04, 2020, 10:57:19 pm »
I have no idea why us, or at least me! got so much stick from wraper & Siwastaja for assuming Vg was the virtual ground of a split supply.
First of all it's not really a virtual ground but just bias. Virtual ground usually means there is follower circuit so such virtual ground can at least provide some current without voltage drifting and is used for larger part of the circuit. Secondly I didn't say anything wrong about calling it a virtual ground as such. Just about some weird assumptions of how it works.
 
The following users thanked this post: Siwastaja

Offline wraper

  • Supporter
  • ****
  • Posts: 17581
  • Country: lv
Re: Issues with OP-AMP (LM358N)
« Reply #34 on: April 04, 2020, 11:02:35 pm »
According to description and still without OP's answers to my questions currently it's like this:

« Last Edit: April 04, 2020, 11:05:16 pm by wraper »
 

Offline kidchemicalTopic starter

  • Newbie
  • Posts: 4
  • Country: us
  • Hello World.
    • P o o p s h o o t .
Re: Issues with OP-AMP (LM358N)
« Reply #35 on: April 05, 2020, 02:55:39 am »
Wow guys I feel grateful to have so much input from this community, thanks a bunch!
I will tell you one thing, adding the "Bleeding Resistor" to my "Virtual Ground" between the capacitor and non-inverting pin seemed to solve the issue!  :-+ Thanks xavier60 & magic!
I am still trying to wrap my head around a lot of the theory presented so bare with me while I go back and try to answer all of the questions here! 
I understand that the 330 \$\Omega\$ resistor from the feedback VGND or "DC Reference" I suppose was redundant so I removed that as well.

I ended up changing my feedback resistance to something like 39k and 1k to get a much larger gain which I am looking for!
When I placed a capacitor from my virtual ground to my V-, my signal was amplified a bit, keeping it there.

So now my sawtooth oscillates 5v/-5v which I am pleased with, I really have no intention to drive a speaker necessarily but to actually be a "line level" output that I can connect into an effects module.
« Last Edit: April 05, 2020, 03:16:40 am by kidchemical »
ARDUINO UNO : C# : JUCE
.::K I D C H E M I C A L::.
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8760
  • Country: fi
Re: Issues with OP-AMP (LM358N)
« Reply #36 on: April 05, 2020, 08:49:11 am »
The schematic in the OP message is complete and clear, showing unipolar power supply and the opamp negative supply powered from the supply negative, same as the lower leg of the divider.

Complete and clear, you must be kidding. With no ground shown on the OP's schematic almost everyone would assume...

You know, adding the ground symbol somewhere does not change the circuit behavior the slightest. Ground is just one arbitrary circuit node, it has no special physical properties. SPICE simulators, though, AFAIK, require the ground symbol to be put somewhere in order to simulate (which is understandable - SPICE simulators are able to report single node voltages (instead / in addition to voltage differences between two nodes), and for that, you need one specified reference point.

The schematic is complete because there are no floating nodes, opamp power is also connected directly (unipolarly) to the 12V voltage source. It's clear because the nets are properly labeled (inlucing opamp power rails), and drawn in a uncluttered way. I see absolutely nothing wrong* with it; I would use the ground symbol for the "V-" net, though, but it doesn't change anything.

*) wrong as in the way the schematic is drawn; functionally, it's clearly wrong because the circuit does not work, hence this topic!

You can add the missing ground symbol to any node (some are more convenient than others, though). There is no need to "assume" anything about the schematic, it can be analyzed using the normal circuit analysis methods, like Kirchoff laws, opamp "rules of thumb", or simulated using SPICE, as long as the ground symbol is added to some node so SPICE can refer the voltages to that point.

I think your confusion is a good example why terminology such as "virtual ground" is dangerous. I'm baffled, the circuit in the OP is extremely simple. At least some of the issues have been correctly listed, as well, one being the lack of biasing Vin (to counteract input bias currents) because we were later told that there is an AC coupling capacitor. The hint that this is likely the problem is given by the fact that the circuit seems to work briefly.
« Last Edit: April 05, 2020, 08:58:13 am by Siwastaja »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19918
  • Country: gb
  • 0999
Re: Issues with OP-AMP (LM358N)
« Reply #37 on: April 05, 2020, 12:18:20 pm »
The schematic in the OP message is complete and clear, showing unipolar power supply and the opamp negative supply powered from the supply negative, same as the lower leg of the divider.

Complete and clear, you must be kidding. With no ground shown on the OP's schematic almost everyone would assume...

You know, adding the ground symbol somewhere does not change the circuit behavior the slightest. Ground is just one arbitrary circuit node, it has no special physical properties. SPICE simulators, though, AFAIK, require the ground symbol to be put somewhere in order to simulate (which is understandable - SPICE simulators are able to report single node voltages (instead / in addition to voltage differences between two nodes), and for that, you need one specified reference point.

The schematic is complete because there are no floating nodes, opamp power is also connected directly (unipolarly) to the 12V voltage source. It's clear because the nets are properly labeled (inlucing opamp power rails), and drawn in a uncluttered way. I see absolutely nothing wrong* with it; I would use the ground symbol for the "V-" net, though, but it doesn't change anything.

*) wrong as in the way the schematic is drawn; functionally, it's clearly wrong because the circuit does not work, hence this topic!

You can add the missing ground symbol to any node (some are more convenient than others, though). There is no need to "assume" anything about the schematic, it can be analyzed using the normal circuit analysis methods, like Kirchoff laws, opamp "rules of thumb", or simulated using SPICE, as long as the ground symbol is added to some node so SPICE can refer the voltages to that point.

I think your confusion is a good example why terminology such as "virtual ground" is dangerous. I'm baffled, the circuit in the OP is extremely simple. At least some of the issues have been correctly listed, as well, one being the lack of biasing Vin (to counteract input bias currents) because we were later told that there is an AC coupling capacitor. The hint that this is likely the problem is given by the fact that the circuit seems to work briefly.
Yes, I'm sure he knows that the ground symbol is arbitrary and theoretically shouldn't change the operation of the circuit, however in practice it can do, because it implies where all the inputs and outputs are referenced to, which isn't shown in the schematic in the original post.


Wow guys I feel grateful to have so much input from this community, thanks a bunch!
I will tell you one thing, adding the "Bleeding Resistor" to my "Virtual Ground" between the capacitor and non-inverting pin seemed to solve the issue!  :-+ Thanks xavier60 & magic!
I am still trying to wrap my head around a lot of the theory presented so bare with me while I go back and try to answer all of the questions here! 
I understand that the 330 \$\Omega\$  resistor from the feedback VGND or "DC Reference" I suppose was redundant so I removed that as well.

I ended up changing my feedback resistance to something like 39k and 1k to get a much larger gain which I am looking for!
When I placed a capacitor from my virtual ground to my V-, my signal was amplified a bit, keeping it there.

So now my sawtooth oscillates 5v/-5v which I am pleased with, I really have no intention to drive a speaker necessarily but to actually be a "line level" output that I can connect into an effects module.

Awhile ago, another member here, audioguru, did a schematic showing the most common op-amp applications, both using a single and dual supply configurations. Here's my version. You want the non-inverting, single supply one which is the top right. I'd recommend using higher values though: R1 = 10k, R2 = 3k3 and just use 10k where it says ½R1, which was just to minimise the effects of bias currents, but that's not important in this application. All capacitors are 10µF aluminium.
« Last Edit: April 05, 2020, 12:47:07 pm by Zero999 »
 
The following users thanked this post: iMo, Vovk_Z, kidchemical


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf