Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Op-Amp Simultaneous Equations

Status
Not open for further replies.

gaspode42

Member
Hi All

I have been trying to get to grips with op-amp design using the attached 'tutorial'.

I never was very goos with equations so I am struggling. I am stuck on page 4-14.
Cheating (by using a spreadsheet) I can solve the simultaneous equation and get the correct values for the slope and intercept. However we now get to:

m = 10 = (Rf + Rg) ÷ Rg
This they have solved to be Rf = 9Rg

Can somebody please be kind enough to explain how this is reached.

Thanks in advance,

Rupert
 

Attachments

  • op-amps.pdf
    2 MB · Views: 1,067
Last edited:
Hi All

I have been trying to get to grips with op-amp design using the attached 'tutorial'.

I never was very goos with equations so I am struggling. I am stuck on page 4-14.
Cheating (by using a spreadsheet) I can solve the simultaneous equation and get the correct values for the slope and intercept. However we now get to:

m = 10 = (Rf + Rg) ÷ Rg
This they have solved to be Rf = 9Rg

Can somebody please be kind enough to explain how this is reached.

Thanks in advance,

Rupert


Hi,


Looks like a good paper on op amps there.

For this problem all you have to do is perform the math and then
simplify.

For this problem we start with:
10 = (Rf + Rg) ÷ Rg

so first perform the division by Rg to obtain:
10=Rf/Rg+Rg/Rg

and of course Rg/Rg=1 so replace that to get:
10=Rf/Rg+1

now subtract 1 from both sides to get:
9=Rf/Rg

and last multiply both sides by Rg to get:
9*Rg=Rf

and that's that.
 
Last edited:
Mr Al

Thank you very much for your help - I now understand this but I now have a problem.
From my first calculation I got a slope of 0.56 and an intercept of -2.88 so I chose the formula for a=mx-b.

Using your example if I inset my values Rf=-0.44*Rg, now I appreciate that this may just mean the the value of Rf is less than that of Rg, but when I try to calculate it I get a negative result and I have not found many resistors that have a negative Ω value!:eek:

Could you please be kind enough to tell me where I have gone wrong now!

Thanks again for all your time and help so far.

Rupert
 
If i understand your problem...you are getting stuck on page 4-14 still ?

i'm going to assume that MrAI did a good job of explaining why Rf=9Rg.

comparing eq. 4-37 with 4-14 you can see that some parts are similar.
Both equations have a Vout on the left-hand-side(LHS) and both have a Vin on the right-hand-side(RHS) multiplied by m followed by some constant.

We can then say that eq. 4-38 and 4-39 is true since both equations look simialar. All we really did was give assign the unknown variables in eq. 4-14 a 'value'.

We are then given some information about the circuit.
When Vin=0.2, then Vout=1.5. Similarily when Vin=0.5, then Vout = 4.5.

Looking back at unknowns, m and b, there are 2 unknowns. 2 unknowns means 2 equations are needed to solve for them.

We have our two equations now
All equations follow y=mx+b, whether or not m or b is positive or negative. using that as a template we can then write our two equations

(1) 1.5 = 0.2m + b (Vout =1.5, Vin=0.2)
(2) 4.5 = 0.5m + b (Vout =4.5, Vin=0.5)

You can solve this in many ways. In the end you end up with m=10 and b=-0.5 (did not actually do the math, im assuming the pdf is correct).

You should not be able to use those values into your other equations to get more realistic values for resistors.

Hope it helps, i feel its kind of choppy and incomplete, but post if you have any more questions.
 
Hi

Yes, thanks for the answer, however what I am trying to do is complete the calculation with my own set of values. Now if I calculate my values I get a slope of 0.56 and an intercept of -2.88 (rather than 10 & -0.5) so when I try to move to the next stage to calculate the ratio of resistances between Rf & Rg, I get the following Rf=-0.44*Rg, so if I say Rg=10K then Rf would be -440! So what have I done wrong or is it just the fact that my figures for slope and intercept mean that an op-amp is not the correct device in this situation?

Many thanks,

Rupert
 
Hi again,


Since you are doing your own example, can you post more details about what
exactly you are doing, and what you are starting with?
 
I get the following Rf=-0.44*Rg, so if I say Rg=10K then Rf would be -440!

Code:
10,000  
.44 ×
--------------------------
4,400 =

Check you maths.:)
 
Hi All

As such I am not doing (building) anything - I am just trying to learn how I would configure op-amps for various scenarios.
For example I tried to do the calculations in the next section of the manual (y=-mx+b) to try do duplicate a post Eric did this morning, but needless to say I did not get the correct answer.
As in Eric's post above, yes 10000+.44=4400 but the result I get was -0.44 which if you multiply gives -4400.

I guess what I am saying is that I don't understand the examples in the tutorial (post 1) on two levels:
1) I don't understand how to rearrange the math go get the results
2) I don't understand where (in their examples) they get some of the numbers from

So far I think the moral of the story is - I hope I never need to design a circuit that requires an op-amp!

Sorry for being so thick but I really would like to understand this stuff, with my calculations to date every simulation I have done in LTSpice has given me the wrong result :(
 
hi,
Look at this pdf, it may help to explain some of the points you are having problems with.:)

I would suggest that you use the simplified equations when designing general purpose amps. Dont get too bogged down in the maths.
 

Attachments

  • opamps.pdf
    273.2 KB · Views: 419
Eric,

Thanks for the reply - I got lost on page 13 :mad:

Using the PDF I posted together with a spreadsheet I can calculate the slope and the intercept so I know what model to use, but after that I get lost.

I have always worked with digital circuits (when I worked in electronics) and by boss did the analogue stuff! Now I want to learn more, so I can do more, but I just don't understand the math.

I guess I am just too old and stupid so will have to keep doing digital and pray nobody ever asks for anything analogue - perhaps I should go to the library and get 'Maths for Morons' :confused:

Thanks for trying to help anyway.

Rupert :(
 
Eric,

Thanks for the reply - I got lost on page 13 :mad:

Using the PDF I posted together with a spreadsheet I can calculate the slope and the intercept so I know what model to use, but after that I get lost.

I have always worked with digital circuits (when I worked in electronics) and by boss did the analogue stuff! Now I want to learn more, so I can do more, but I just don't understand the math.

I guess I am just too old and stupid so will have to keep doing digital and pray nobody ever asks for anything analogue - perhaps I should go to the library and get 'Maths for Morons' :confused:

Thanks for trying to help anyway.

Rupert :(

hi Rupert,
You sound like a spring chicken to me.:rolleyes:

Dont give in so quickly, why dont you post a specific equation/problem.
In that we can guide you thru it in stages, remember bite size sized chunks that will not choke you.:)
 
Last edited:
Eric

Thank you for your time and patience.
Today I was trying to 'dulpicate' the model you posted in this thread.

Now if I have anything correct we have (or had) the following conditions:

Input Range: 0V to 0.68V
Output Range: 3.4V to 0V
V Ref is (was) 9V

That gives me a slope of -0.2(m) and an intercept of 0.68(b) so using the PDF I posted, we are using model 3 - section 4.3.3 Vout=-mVin+b (page 4-16).

Now in their example they have -5.6(m) and 0.444(b).
If you go over the page they then say m=5.56=Rf/Rg ≡ Rf=5.56Rg
So my first question is going to be why/how has -5.6 become 5.56?
Secondly using my numbers would give Rf=0.2Rg? Thus if I make Rg 10K Rf would be 2K?

If I have this correct so far then it's a miracle :D

Then when I get to (4-53) I get completely lost - the only number I understand in (4-54) is 66 which in my case I guess would be 12 (or 12000)? Is the 0.444 calculated or is it the value of (b)?

I really do want to be able to do this stuff, and get very frustrated when I don't understand.
Sorry if I am causing you a headache, it probably took you less time to do the original circuit that it is trying to explain it to me!

Thanks again :D

Rupert
 
hi Rupert,
Copied your post and I will go thru your pdf, see if we can sort it.:)

EDIT:
Quick look at the pdf, the line after [4-52] is a typo, it should read 55.6K, so the nearest preferred value is 56K.

So you are not going crazy.:)

I'll look at the rest tomorrow.
 
Last edited:
Hello again,


For your first op amp circuit i would recommend using whole values
for the resistors. For example (using Eric's circuit schematic):

R2=5k
R3=1k
R4=4k
R5=1k

The output voltage can be calculated as follows.
Vo=vp*(G+1)-G*V1

where
G=R2/R3, and
vp=V2*R5/(R4+R5)

You'll notice that the gain G is just the feedback resistor divided by the input resistor R3,
and the voltage at the non inverting terminal vp is just the voltage due to the votlage
divider effect of R4 and R5.

For the suggested values above and V2=5v and V1=1v the output voltage
calculates to 1v.

There is something else to keep in mind however when using a simulator
to check your results. That is, the models used for the op amps
often have an offset voltage included in the model. This means that
the output voltage calculation may come out a tiny bit different
that what we calculate from the above formulas.
For example, with an input offset of 0.001v the output will change
from the calculated 1.000v to 1.006v. For an input offset of 0.010v
the output will go to 1.06v. There are also effects because of the non
infinite internal gain that the spice model has while the theoretical model
has infinite internal gain, which also produces a small error in the 'perfect'
calculation above. This is something to keep in mind when working with
the spice models in a simulator.
 
Last edited:
hi rupert,

This is a LTspice sim of the example circuit.

In the original circuit, R1 and R2 are crossed over.

IMHO, as there are so many errors in this section of the datasheet, its totally useless as a teaching guide.
 

Attachments

  • rupert1.gif
    rupert1.gif
    24.6 KB · Views: 255
Eric

Thank you very much, I have have a look at this as soon as I return.
Do you know of any better teaching material on this subject that someone as thick as me could understand? I really need to get to grips with this stuff as my future career may depend on it!

Rupert
 
Eric

Thank you very much, I have have a look at this as soon as I return.
Do you know of any better teaching material on this subject that someone as thick as me could understand? I really need to get to grips with this stuff as my future career may depend on it!

Rupert

hi,
Look thru these links.

For general purpose use of opa's, the simple formula for gain will cover most circuits.

Inv Gain: Vout = - Vin * [Rfeedback/Rinput]; note sign

Non Inv Gain: Vout = Vin * ([Rfeedback/Rinput] +1)

For GP use, a Rinput value of 1K thru 10K is often used.

To create a fixed dc offset voltage in the Vout, apply a dc voltage of the required polarity and magnitude to either the NI or INV inputs.

**broken link removed**

**broken link removed**

**broken link removed**
 
Eric

What can I say - THANK YOU SO MUCH!!!
I have have a good read this morning and based on the pH probe question of the forum came up with this - it may not be the best in the world but it's the first one I have ever got correct (maybe)!:D



Rupert
 

Attachments

  • pH.PNG
    pH.PNG
    77.5 KB · Views: 222
Eric

What can I say - THANK YOU SO MUCH!!!
I have have a good read this morning and based on the pH probe question of the forum came up with this - it may not be the best in the world but it's the first one I have ever got correct (maybe)!:D



Rupert

hi,
It looks OK at first glance, please post your *.asc file for LTspice.;)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top