SparkFun Forums 

Where electronics enthusiasts find answers.

General project discussion / help
Did you make a robotic coffee pot which implements HTCPCP and decafs unauthorized users? Show it off here!
By 8Volts
#163894
Hello,

I have experimented with several op amp circuits, mainly differential configurations and have been using the following traditional formulas:

Vout = rf/ra(V2-V1)

Vout = V2[(r1/(r2+r1)(1+rf/ra)]-V1(rf/ra)

Vout = (Acm)(Vcm)+(Ad)(Vd)

+ CMMR and CMR equations and so on ... etc...

But one thing I noticed is that all these formulas are useful only when we know the resistors in the circuit. Suppose we are faced with and requirement where we need to design a circuit from scratch instead of having the typical "find Vout"
pre-drawn schematic where all resistor values given to us!!

Suppose the requirements went like this:
We need an op amp (not necessarily a differential typology) to have 5Vdc at its inverting input and requires to supply 2.0Vdc at the output? Our available power supply voltage sources are only 5Vdc and 9Vdc. We are also told that the op amp rails are connected to an auxiliary power supply of +/-15Vdc. Therefore, here, we have no resistor values given to us what so ever and all we know is that we have an op amp with a voltage input and a voltage output specification along with 5Vdc and 9Vdc power supplies!!! :think:
Well, I did figure it out, but I just would like to run it by you guys and see what you think .... so remember, I haven't taken this from a book or from any Internet article... I made this up myself... so it could look ridiculous... so please forgive me if I am totally wrong here :mrgreen:

Here it goes:

First, since the only power supplies available are 5Vdc and 9Vdc, I set up 5Vdc at V1 and 9Vdc at V2 and made ra, rf, r1 and r2 all equal to 10K ohm resistors. Calculating Vout intuitively or by using one of the equations mentioned above I get the output to be 4Vdc This set up is a purely differential op amp which really doesn't satisfy the requirements. See Attach_A.

However, I need 2Vdc and not 4Vdc at the output!!! So I re-draw the configuration (See attach_B), but this time I calculate the closed loop gain required by taking the difference between the required output (which is 2Vdc) and the presumed va (which is 4.5) and divide it by the Vrf (which is 0.5Vdc). This gives me exactly 5.0!

This means that my gain (rf/ra) needs to be 5.0. Therefore, I make rf 5 times ra which gives me the required voltage of 2Vdc!

My question is, when you guys are faced with this sort of problem, how do you do it? Is there a better way to calculate it? Am I doing it the long way ? if so is there a shorter way? :|

thanks
You do not have the required permissions to view the files attached to this post.
By lyndon
#163899
I'm not sure why you're doing this. Normally, no one says "let me put X voltage at the input to this op-amp so I can have Y voltage at the output."

Instead what would happen in a "normal" situation, is "I have voltage range X to Y and I need to turn it into voltage range A to B." How you accomplish that may not even involve opamps at all.

That said, if you have an input of +5VDC and you need to turn it into -2VDC, we can assume that you want a circuit that has a transfer function (relationship of output to input) of out= in * (-2/5). That assumption is not necessarily valid, but let's run with it.

The simplest opamp circuit to achieve Vo= -0.4*Vin is a non-inverting combination with Rf= 50k and Ri= 20k (or the closest allowable values).
By Mee_n_Mac
#163904
K.I.S.S.
What are the 2 basic op-amp configurations ?
Why not ...
opamp2_5.jpg
Do you need 2 inputs ?
You do not have the required permissions to view the files attached to this post.
By lyndon
#163911
Never mind. Don't know what I saw differently, but I could have sworn it said -2.0V at the output, not +2.0V!

If you have 5 volts and want to turn it into 2, I'd just use a voltage divider unless there's a reason for the opamp.
By Mee_n_Mac
#163935
lyndon wrote:Never mind. Don't know what I saw differently, but I could have sworn it said -2.0V at the output, not +2.0V!
Hey, who are you gonna believe ... me or your lying eyes ? :mrgreen: