# Homework Help: Simple intro lvl question about Op-amps

1. Jun 15, 2013

### t3rom

1. The problem statement, all variables and given/known data

For inverting op-amps Vout = -Vin(R2/R1)

But I've no clue what happens when you add third resistor with a voltage source to the amplifier. Is there a general gain equation for such circuit?

See the attached problem in the image.

2. Relevant equations

For inverting op-amps Vout = -Vin(R2/R1)

3. The attempt at a solution

I tried calculating for the R1 and R2 but the answer is wrong.
1. The problem statement, all variables and given/known data

I will be grateful if someone can help me understand it by solving it. Thanks!

#### Attached Files:

• ###### op-amp.jpg
File size:
23.8 KB
Views:
110
2. Jun 15, 2013

### darkxponent

You must have studied superposition principle in Circuit Analysis. Can you tell us what it is?

3. Jun 15, 2013

### t3rom

No, I haven't. I'm only taking a basic course where they tell you an equation and you plug in the values. Theorems etc. are beyond the scope of the course.

4. Jun 15, 2013

### darkxponent

What about Nodal Analysis?. Nodal Analysis is tought in basic physics courses.

5. Jun 15, 2013

### t3rom

Yes, I know nodal analysis.

6. Jun 15, 2013

### darkxponent

There is just one node to care for. The Op-Amps inverting input terminal

What is the Voltage at this Node?
Write its node equation?

7. Jun 15, 2013

### TimeToShine

Try it by applying Kirchoff's current law. You have an ideal OP amp so no current flows into the terminals. Find expressions for the currents flowing into the node from the two voltage sources and subtract the current flowing out of the node from this. KCL states that this will be equal to zero. Find in terms of Vi or Vo.

8. Jun 15, 2013

### t3rom

I did this (see attached)

Please have a look at my original op-amp circuit too. Thanks!

#### Attached Files:

• ###### op.jpg
File size:
33.2 KB
Views:
99
9. Jun 16, 2013

### darkxponent

Thats good work. There is just ine mistake. That too of just one negative sign In the Nodal analysis we take Voltage coming at the the. Why did you take In leaving the Node. Reverse the dirction of In. Your first equation will become

I1+I2+In = 0.

There is nothing wrong in taking In leaving the node. But it leads to errors as you have done in next equation itself. If you are reversed the direction of In, you have to reverse the order of voltages.
You can do either way but the better method would be reversing the direction of In.

10. Jun 16, 2013

### t3rom

Ah I see, it should have been -(Vn/R2-v2/R2)=0 if I stick with my current In direction, or +(V2/R2-Vn/R2) if reverse the direction of In making i1+i2+in=0. Thanks for helping me out, but mostly motivating me with hints!

11. Jun 16, 2013

### darkxponent

You are welcome.

The circuit you just solved is a 'Weighted Summer', where the output is weighted sum of input voltages. The general Vo for Weighted Summer is given by

Vo = -Rf{(V1/R1)+(V2/R2)+(V3/R3)+....+(Vn/Rn)}

Where Rf is the resistance in the feedback path and R1, R2...Rn are the resistance connected with the input voltages. In your problem n=2.

12. Jun 16, 2013

### t3rom

Cool! My Vo equation conforms it :)

Can you kindly recommend any good book on intro to circuit analysis which is easily accessible?

Thanks again! :)

13. Jun 16, 2013

### darkxponent

There are many good books on Circuit Analysis. It is really hard to recommend one. But the best i think is by 'Hayt & kimmerly(Linear Circuit Analysis)' It stars from basics.
But i would recommend two other books. One is by 'Decarlo & Linn(Linear Corcuit Analysis)' and the other one is by 'Van Valkenburg(Network Analysis)'.

You can refer to any one of the three books i recommended. All three are good books.

14. Jun 16, 2013

### t3rom

A big thanks friend!!!