Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Arithmetic operations using op-amps

Status
Not open for further replies.

iVenky

Advanced Member level 2
Joined
Jul 11, 2011
Messages
584
Helped
37
Reputation
76
Reaction score
35
Trophy points
1,318
Location
College Station, Texas
Activity points
6,124
I need to perform

Vout= 0.5 V1 + 0.6 V2 + 0.9V3 - 0.8 V4 -0.9 V5


I know that I have to use superposition.I can easily solve those negative terms simply by assuming Rf and then finding out R1,.. to be connected to the negative terminal of op-amp. But for finding out the positive terms I have many equations and I think I have to solve three equations which has three unknowns and hence it has a unique solution which means that I can't assume a value for any of the resistors.I think it will be very cumbersome. Is there any other easy method?

Thanks in advance.:-D:-D
 

What's your application?

Once i was designing something like this (although there was logarythmic/exponential part too) and i came up with some circuit made out of opamps (don't remember exact schematic, i was really long time ago) and after cost calculation it turned out I'll be better off using cheapest possible MCU with ADC and external DAC (I actually used a filtered PWM signal). If youa application is not extremly demanding in terms of noise, speed and accuracy this is a way to consider :)
 

I need to perform
Vout= 0.5 V1 + 0.6 V2 + 0.9V3 - 0.8 V4 -0.9 V5

I think and hope the following approach will work:
1.) Use feedback resistor Rf=0.9R and two input resistors R1=R and R2=0.9R/0.8 (for the neg. factors) ;
2.) Thus, the basic non-inv. gain is G=(1+Rf/(R1||R2)=0.9R/0.53R=1.7
3.) Because all non-inv. gain factors are smaller than 1.7 you can use simple voltage divider circuits in front of the non-inv. input.
4.) Of course, you can scale all resistors with a suitable factor.

---------- Post added at 17:25 ---------- Previous post was at 16:57 ----------

Of course, calculations are less involved if you are allowed to use more than only one single opamp.
 

I think and hope the following approach will work:
1.) Use feedback resistor Rf=0.9R and two input resistors R1=R and R2=0.9R/0.8 (for the neg. factors) ;
2.) Thus, the basic non-inv. gain is G=(1+Rf/(R1||R2)=0.9R/0.53R=1.7
3.) Because all non-inv. gain factors are smaller than 1.7 you can use simple voltage divider circuits in front of the non-inv. input.
4.) Of course, you can scale all resistors with a suitable factor.

---------- Post added at 17:25 ---------- Previous post was at 16:57 ----------

Of course, calculations are less involved if you are allowed to use more than only one single opamp.


I have done all these steps before. Yet I get 3 equations with 3 unknowns due to resistors that should be connected to V1, V2 and V3
 

I have done all these steps before. Yet I get 3 equations with 3 unknowns due to resistors that should be connected to V1, V2 and V3

Sorry, now I had a closer look on your posting and see that you already have solved for the negative factors by yourself.
But what about using a second opamp?
 

I think the circuit has to be like shown below, but I can't think of an easy way to calculate the values. Perhaps R7 and R8 are not both needed.

 

You need R8 but not R7. Since + gains are < 1 . ( one less to calculate) But it might be easier for impedance matching for input offset current, but in theory with GNd = 0V a, output gain or V is not affected by R7. only input offset voltage.
 

Solved! Let's start by assuming we don't need R8. Then we can proceed as follows:

Step 1:
Choose R1, R2 and R3 arbitrarily, but in the correct proportions relative to each other.
e.g. We can have R1=18K, R2=15K and R3=10K
because 18K*0.5 = 15K*0.6 = 10K*0.5 = 9K

Step 2:
Choose R4 and R5 arbitrarily, but in the correct proportions relative to each other.
e.g. We can have R4=18K and R5=16K
because 18K*0.8 = 16K*0.9 = 14.4K

Step 3:
Calculate the feedback resistor. This is simple if we think in terms of only one input at a time. With V1 = V2 = V3 = 0, it is a simple inverting amplifier as far as the other two inputs are concerned.

For V4 we need R6 = 18K * 0.8 = 14.4K
For V5 we need R6 = 16K * 0.9 = 14.4K

Step 4:
Finally, we can calculate R7. Again, think in terms of only one input at a time. With V4 = V5 = 0, it is a simple non-inverting amplifier (with a voltage divider at the input) as far as the other three inputs are concerned.

For example, if V1 = 1V and all other inputs are grounded, there will be 0.25V at the non-inverting input to the opamp. We want 0.5V at the output so the amp needs to have a gain of two. Double-checking with the V2 or V3 gives the same result.

R6 has already been set to 14.4K so for a gain of 2, the parallel combination of R4,R5 and R7 must also be 14.4K. Oops! That won't work because the parallel combination of R4 and R5 is already lower than 14.4K.

We're going to need R8 after all, to reduce the input to the non-inverting input, so the amp can have a higher gain. If we do that then we don't need R7.

Step 5(oops):
Leaving out R7, we can calculate R8. With the given values of R4, R5 and R6, the gain of the amplifier = 2.7. Given the required attenuation and the values of R1, R2 and R3, we can work out that R8 = 12.857143K.

That works but it's a nasty value. We can either try a parallel combination of two resistors, or change R1, R2 and R3. e.g. If we multiply all of them by 7, we get R1=126K, R2=105K, R3=70K and R8=90K exactly.
 
Last edited:

output gain or V is not affected by R7
Noninv gain is affected, of course. Thus R7 will be present in the general circuit, which uses either R7 or R8, depending on the sum of inv. and noninv. gains. In this case, R7 isn't needed.

That works but it's a nasty value.
Yes, using resistors out of a defined series would be a special problem in real circuit implementation. But it's not required in the original problem, neither a specific accuracy. I assume it's an exercise problem, just a set of ideal resistor values is wanted.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top