Inverting summing amplifier help please?

Thread Starter

Homebrew1964

Joined Nov 22, 2024
136
I built this circuit just out of interest and it doesn't behave as expected

i was of the understanding that the inverting summing amplifier would output the sum of two inputs and then invert the result which when i make R6 2k happens but if i make R6 110R i get a result that doesn't make any sense, can someone shine a light on what is going on here, my math isn't very good since i have ADHD so i might be missing something obvious

My readings are all taken relative to the virtual ground (+4.5v pin 3 of the LM358).
 

Attachments

MrChips

Joined Oct 2, 2009
34,663
You are committing a common mistake. The opamp cannot generate a negative voltage if you don't supply it with a negative supply voltage. That is why we use dual supplies, both positive and negative supply voltages.
 

sarahMCML

Joined May 11, 2019
695
With R6 as 110R the output is trying to give +4.8V out, but only has +4.5V as its positive supply. It's going as high as its output stage will allow, given the low supply voltage. Try + and - 9V supplies!
 

WBahn

Joined Mar 31, 2012
32,736
I built this circuit just out of interest and it doesn't behave as expected

i was of the understanding that the inverting summing amplifier would output the sum of two inputs and then invert the result which when i make R6 2k happens but if i make R6 110R i get a result that doesn't make any sense, can someone shine a light on what is going on here, my math isn't very good since i have ADHD so i might be missing something obvious

My readings are all taken relative to the virtual ground (+4.5v pin 3 of the LM358).
This was addressed in your earlier thread. An opamp cannot output a voltage outside of it's power rails -- and many cannot get within more than a volt or two of them. You indicated that you that made sense to you.

As shown in the LM 358 data sheet, even under light loading (50 µA) the output range is typically

(Negative Rail) + 0.1 V < output < (Positive Rail - 1.35 V)

If (Negative Rail) = 0 V and (Positive Rail) = 9 V, then your output range will be from about 0.1 V to about 7.65 V. Under a 1 mA load, the manufacturer only promises that it can deliver outputs in the range from 1 V to 7.5 V. If your circuit tries to output anything outside that range, it will clip at that limit.

Is that table in your diagram what you expected to see, or what you claim you actually saw? I don't see how it can be the latter, since there's no way for there to be ANY negative voltages in that circuit? If it's what you expect to see, how can you expect the voltage at (a) or (b) to EVER be negative? It is a voltage divider chain and the voltages at those two nodes is going to be somewhere between the voltages at the top and bottom of the chain, which are 0 V and 9 V. The only way it can be otherwise is if the voltage on the right of R2 and R3 is WAY outside the range so that significant current is either being injecting into or extracted from those resistors.

What did you ACTUALLY see? How can we tell you if what you saw makes sense if you don't tell us what you saw?

This is like going to a doctor and saying, "I've been eating a lot of vegetables and the results aren't what I expected. Can you tell me why not?"

The only rational answer they can give you is, "Nope. have no idea because you haven't given me anything to work with."

But if you go in and say, "I've been eating a lot of carrots and I expected my eyesight to improve, but instead my skin turned orange. Can you tell me what is going on?"

Now they can say, "Yep. The notion that carrots will improve your eyesight is unrealistic unless you are Vitamin A deficient. But eating an excessive amount of them can cause your skin to take on an orange hue, which fortunately will go away when you reduce your intake to more sensible levels."

So, what would I expect to see with your circuit?

I'm willing to walk through that, but only if you are going to actually make an effort to understand it.
 

WBahn

Joined Mar 31, 2012
32,736
With R6 as 110R the output is trying to give +4.8V out, but only has +4.5V as its positive supply. It's going as high as its output stage will allow, given the low supply voltage. Try + and - 9V supplies!
I'm getting that it's trying to output ~9.34 V but has a 9 V positive supply rail, which limits the output to around 7.6 V max.
 

Thread Starter

Homebrew1964

Joined Nov 22, 2024
136
Is that table in your diagram what you expected to see, or what you claim you actually saw? I don't see how it can be the latter, since there's no way for there to be ANY negative voltages in that circuit? If it's what you expect to see, how can you expect the voltage at (a) or (b) to EVER be negative? It is a voltage divider chain and the voltages at those two nodes is going to be somewhere between the voltages at the top and bottom of the chain, which are 0 V and 9 V. The only way it can be otherwise is if the voltage on the right of R2 and R3 is WAY outside the range so that significant current is either being injecting into or extracted from those resistors.

What did you ACTUALLY see? How can we tell you if what you saw makes sense if you don't tell us what you saw?



I'm willing to walk through that, but only if you are going to actually make an effort to understand it.
The table is what i actually measured with my black voltage probe on pin 3 of the LM358 (4.5v)

I thought that with a split supply i would be able to get a negative output?

I have a negative supply, the virtual earth being 4.5v?
 

WBahn

Joined Mar 31, 2012
32,736
The table is what i actually measured with my black voltage probe on pin 3 of the LM358 (4.5v)

I thought that with a split supply i would be able to get a negative output?

I have a negative supply, the virtual earth being 4.5v?
Ah, I do see where your OP states that. My bad and my apologies.

Relative to your virtual ground, you can only expect your LM358 to output voltages between about -4.4 V and +3.1 V. The actual limits might be a bit wider, but shouldn't be any smaller.

As you can see, your reading with R=110 Ω is right at the expected limit (you saw 3.13 V and the data sheet only claims that it can go to +3.1 V).
 

WBahn

Joined Mar 31, 2012
32,736
I'm getting that it's trying to output ~9.34 V but has a 9 V positive supply rail, which limits the output to around 7.6 V max.
The TS pointed out that their numbers are relative to the 4.5 V midpoint (and I see where he actually stated that in the original post and I missed it), so now I can pretty safely assume that you were using that same reference.
 

Thread Starter

Homebrew1964

Joined Nov 22, 2024
136
So what we are saying then is my issue is due to limitations of the LM358 and i'd be better to try an op amp that has an output that can swing rail to rail?
 

WBahn

Joined Mar 31, 2012
32,736
So what we are saying then is my issue is due to limitations of the LM358 and i'd be better to try an op amp that has an output that can swing rail to rail?
Even with a rail-to-rail op-amp you are not going to get 4.8 V out (relative to your virtual ground) when you are powering it with a 4.5 V rail (relative to your virtual ground).
 

Thread Starter

Homebrew1964

Joined Nov 22, 2024
136
You are committing a common mistake. The opamp cannot generate a negative voltage if you don't supply it with a negative supply voltage. That is why we use dual supplies, both positive and negative supply voltages.
As i stated in my original post, i am running a split supply.
 

ericgibbs

Joined Jan 29, 2010
21,406
Hi H1964,
Reading your original post it looks like a single power supply.

This attached image shows ov using a lower case letter 'O', not 0V .???

Post your LTSpice asc file.
E
EG 2071.jpg
 

Thread Starter

Homebrew1964

Joined Nov 22, 2024
136
Hi H1964,
Reading your original post it looks like a single power supply.

This attached image shows ov using a lower case letter 'O', not 0V .???

Post your LTSpice asc file.
E
View attachment 365949
In my original post i clearly state i am using a split supply.

" My readings are all taken relative to the virtual ground (+4.5v pin 3 of the LM358). "

it is also clearly seen to be a split supply in the supplied schematic.
 

ericgibbs

Joined Jan 29, 2010
21,406
hi H,
OK, I see you have created a virtual ground/common.
Are you using the LTSpice simulator, if yes post your asc file.
Did you check the image I posted?
E
 

Thread Starter

Homebrew1964

Joined Nov 22, 2024
136
hi H,
OK, I see you have created a virtual ground/common.
Are you using the LTSpice simulator, if yes post your asc file.
Did you check the image I posted?
E
I am using LTspice but don't know what an .as file is and I don't know how to use the simulator, I've only recently started using it for drawing schematics.
 
Top