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.

Operational Amplifier + Diode

Status
Not open for further replies.
With superposition method I find the currents flowing through the three voltage sources:

|1.4|A
|0.1|A
|0.5|A

Following the attached drawing, I find that:

iV1 negative
iR1 positive
iv2 positive
iR2 positive
iV3 negative
iR3 positive

so i = -1.4-0.1+0.5 = -1A

however Spice tells me that iR1 should be negative. Can you explain me why?
 

Attachments

  • circuit.gif
    circuit.gif
    12.3 KB · Views: 308
Last edited:
Hello again,


You are saying that you got 3 different current values? Maybe we need to go over this a little bit more.

In a series circuit, the current has to be the same in each element. That also allows us to figure out the current too.

Let me write this equation and we can do some more later.

Starting with the 14v source on the left, the voltage is 14v so we write "14". The current flowing is simply 'i' because we dont know what it is yet. That current i is flowing in every element because it is a series circuit.
Ok, so we have so far:
14
Now we go the next element clockwise and we find R1. Now we assume a current of i amps, so the voltage across R1 has to be 1 times i, or simply 1*i, but when we first encountered this element we hit the tip of the voltage arrow, which is opposite to V1 arrow, so it must be a negative voltage, so we write "-1*i".
Ok, so now we have so far:
14-1*i
Now we go to the next element, V2, and not that we first hit the tip of the arrow, so that voltage is negative too, so we subtract that one, which would be -5.
So now we have:
14-1*i-5
Now we go to the next element, R2, and we hit the tip of the arrow first so it's negative also, so we write -7*i.
So now we have:
14-1*i-5-7*i
As before, we go to the next element V3 but this time we hit the tail of the arrow first, so we write +1 instead of -1.
So now we have:
14-1*i-5-7*i+1
Our last element is R3, so we go to that element next, and we hit the tip of the voltage arrow so it's negative, so we write -2*i.
So now we have:
14-1*i-5-7*i+1-2*i
and that is the last element and it connects through ground to V1 so it's a complete loop so we can equate it to zero:
14-1*i-5-7*i+1-2*i=0
Now all we have to do is equate all of the terms with 'i' and those without it, and solve for i in the usual algebraic way.

Is this more clear now? If not we'll go over it. I realize we jumped a little from nodal analysis to this other technique, but this technique is well worth learning because it comes up a lot. Really though it's just following the rule that the sum of voltage drops in a series circuit is zero.

If it is clear, we'll use that circuit again for the next example. Change every resistor by a factor of 2 and leave the sources the same.
That means R1=2, R2=14, and R3=4 ohms. Again solve for the current i using the same technique outlined above.
 
Last edited:
It's all clear now, you're explanations are always great. So:

14-R1i-5-R2i+1-R3i=0
14-2i-5-14i+1-4i=0
-20i+10=0
-20i=-10
20i=10
i=10/20
i=0.5A

:)
 
Hello again,


Oh yes, very good. I knew you would catch on quick :)

Now we'll go back to the dependent source circuit and do that one again. Use the same technique we just used. Note that when you write the expression for Vx it will simply be something like "2*Va" or "5*Va" with the sign according to how it appears in the circuit. The general form would be "N*Va" where N is some constant that is usually given.

In the attachment, Fig 10, for the first circuit let the components and sources take the following values:
Vs=10
R1=10
R2=5
Vx=5*Va (note Va polarity)
Solve for i in the direction coming up out of V1, so the current arrow would point left to right as the current flows through R1.

For the second circuit, let the components take the same values as before but this time flip Va so that the positive polarity is on top of R2 instead of on the bottom.
Solve for i again, flowing left to right through R1.
 

Attachments

  • EE3-0010.GIF
    EE3-0010.GIF
    3.5 KB · Views: 316
Last edited:
Basically exercise 8 and 10 are the same, am I right?

For the first exercise I have:
Vs-R1*i-5*Va+R2*i=0
Vs-R1*i-5*(R2*i)+R2*i=0
10-10i-25i+5i=0
10-30i=0
-30i=-10
30i=10
3i=1
i=1/3
i=0.333A <--- (Wrong result - SPICE give me 1A).

For the second exercise I have:
Vs-R1*i-5*Va-R2*i=0
Vs-R1*i-5*(R2*i)-R2*i=0
10-10i-25i-5i=0
10-40i=0
-40i=-10
40i=10
4i=1
i=1/4
i=0.250A <--- (Same result with SPICE)


So, where am I doing wrong?
 
Hi again,


The sign of Va gets a little confusing, so the best thing to do is take it step by step one little bit at a time as the following will illustrate. This is a very good example of what you find in real circuits because sometimes the input voltage to a dependent source is reversed from what it would 'normally' seem to be.

Start with the original circuit exactly as is. The assumed current direction
is out of the top of Vs. We get:
Vs-i*R1-Vx-i*R2=0

Note so far we treated Vx as an independent source so it just got included as per it's own polarity.

Next, substitute the defined value of Vx:
Vs-i*R1-(5*Va)-i*R2=0

Note there we just placed 5*Va into the equation where Vx was. We assume Va has normal polarity so far.
(If we wanted to we could use -Va here and just use i*R2 later, but either way works)

Next, since the voltage across R2 would be i*R2 and Va is opposite that,
that means Va=-i*R2 so substitute that next:
Vs-i*R1-(5*(-i*R2))-i*R2=0

Now simplify and solve for i:
i=-Vs/(4*R2-R1)

and then subsitute values (you could do this eariler to simplify things):
i=-10/(4*5-10)

so:
i=-10/(20-10)=-10/10=-1

and so i is -1, and note that the polarity is opposite to what we assumed,
so the current is really flowing into the top of Vs.

So the main point here is to take it very slowly, doing one little step at a time. That way we get the polarities correct.
Try it again and make sure you get the same result.
 
Last edited:
Ok, I tried it again and I get the same result :) ... I made a mistake with the polarity of Va :)
Thanks for your great explanation
Let's continue :)
 
Hi again,

Oh ok good, so now we are on to the more interesting circuit i talked about a while ago. I think you'll find this one interesting and useful eventually as well as other circuits like this one.

The circuit is shown in the attachment Fig. 11.
As shown, there is one constant voltage source Vs that is 3v, and one independent source. The independent source has "A=10000" written next to it. That "A" is sometimes called the "amplification factor" but there are other names for it we'll get to also eventually. In any case, it takes the input as shown (and with the polarity as indicated) and amplifies that by 10000 times. It's just a voltage controlled voltage source as before though, with the only difference is the multiplier is much larger than we used in the other circuits. No big deal though, as the theory is just the same.
So your job this time :) is to find the output voltage Vout, and the input current which is the current through R1.
This is a fairly important circuit so it deserves more care and attention than the other circuits we worked with so far, so if we take more time with it that's no problem.
 

Attachments

  • EE3-0011.GIF
    EE3-0011.GIF
    4 KB · Views: 296
Last edited:
Ok, I hope I did all well. I attached to this post my drawing.

So, I wrote down this equations:

Vs-iR1-iR2-Vx = 0
3-i-i-Vx = 0
3-2i-10000(-iR2) = 0
3-2i-10000(-i)=0
3-2i+10000i = 0
3+9998i = 0
9998i = -3
i = -3/9998
i = -0.0003A

Vout = Rout*Iout
Vout = R2*i
Vout = 1*(-0.0003A)
Vout = -0.0003V
i = -0.0003A

I hope it's correct

I did my calculations considering a value of 1 ohm for both resistors ... now i'm trying with 1k but for current I get a result in microA ... could you help me?

I think that what I wrote it's all wrong ... I'm thinking how I can properly do the exercise
 

Attachments

  • 11.gif
    11.gif
    4.5 KB · Views: 325
Last edited:
Hi again,


You were very close there! It is possible to do it that way, but it gets a little tricky with the polarities and you have to keep a very close eye on where you reference either one of the resistor voltage drops.

To start, you had it right:
Vs-i*R1-i*R2-Vx=0
where Vx is the dependent source voltage again. The tricky part comes in when we have to figure out how to express Vx this time. If we want to use R2 in the calculation for Vx then we would have to reference it to Vout, so we could multiply the result by A to get the proper Vx. However, if we instead make another reference to Vs that will avoid having to reference to something we dont know yet (Vx or Vout) so we can substitute Vx with:
Vx=A*(-(Vs-i*R1))
Note that Vs is positive because it is positive with reference to ground, and we have to subtract i*R1 in order to get the voltage at the minus (-) input terminal of Vx, but because it is the minus terminal we have to make that whole quantity negative (that's the first negative sign in the above for Vx), and lastly we can multiply this by A the amplification factor. Thus, we have an expression for the minus input of Vx so we can multiply it by A and use that for Vx, and at the same time we only have one unknown left and that is 'i'. We solve for 'i', and then we can easily compute the rest like Vout. The final equation before solving for 'i' is therefore:
Vs-i*R1-i*R2-(A*-(Vs-i*R1))=0
I left in all the minus signs so you can explore exactly where they all came from and why they are there. Solving this for 'i' we get the solution and then we can solve for Vout.
Note we could have used i*R2 instead of i*R1, but then we would have to subtract that from Vout and that would mean we might have to use superposition on the Vs and the Vout sources to compute what Vout is. It is interesting though if you want to try it that way too, the result is very interesting.

There is another way however, and it may be simpler for you. Note that we have one unknown node in the center, the junction of the two resistors. We can label that as "v1" and use that in a nodal equation.
Try using nodal analysis with the single unknown node as v1, which is the junction of R1 and R2.
Also, once you have the solution for Vout, compare the absolute value of Vout to Vs (ie subtract) and think about what that result means.

As i said before if we have to spend more time on this that's ok as this is an important circuit as you will soon see. You will probably use this circuit as is or very close to this form for the rest of your life in one form or another.
 
Last edited:
Regarding the first type of solution, I think I have to do some more exercises because I don't completely get it.
For the second resolutive method I wrote this equation (including a voltage divider):
(Vs-Vx)*(R1/(R1+R2)) = (3-Vx)*(1000/2000) -> Vx = 3 (V?)

I'll wait your kind reply to understand more of this circuit :)
 
Hi again,

Oh yes, doing it that way (recognizing the voltage divider formed by R1 and R2) is a very good idea and that really shows that you are starting to think along the lines required to understand some of these circuits. You might notice though that your equation does not contain the amplifier gain A. You got the right idea here though and that is very good, so lets go with that.

You started out very well with the (Vs-Vx)*(voltage divider of R1 and R2) but there is just one thing missing. When we do a voltage divider like that when one end is not connected to ground is we first have to find the "difference voltage" and you did that:
Vs-Vx
that is the difference voltage that appears directly across the two resistors. Recognizing that fact is very good. Just one little addition, and that is when we have to use a voltage difference we later have to add back the part that we subtracted. That part here is Vx. So what this leads to (and this is always the way it works with these voltage dividers):
vn=(Vs-Vx)*(voltage divider R1 and R2)+Vx (where vn is just the voltage at the center junction of R1 and R2).
Note the only thing we did differently is we also added Vx back to the total sum. That's because Vx acts as an offset to the voltage divider.
Since the voltage divider is just:
R2/(R1+R2)
[and note the LOWER resistor is on the top of this equation of the voltage divider]
we end up with:
vn=(Vs-Vx)*R2/(R1+R2)+Vx
and that is the voltage at the junction of the two resistors, and the input to the minus input of the amplifier.
Also note here that this is the very same equation we would have gotten if Vx was a constant source.

Now we also know that Vx is just Vout, and Vout is just -vn*A, so we can replace Vx with -vn*A. Doing that we get:
vn=(Vs-(-vn*A))*R2/(R1+R2)+(-vn*A)
[and we have to be very careful to get the signs right in there or the whole answer will be thrown way off]
So now all we have to do is substitute the values for the gain and resistors and Vs and we end up with an equation in one unknown, vn. Once we solve for vn we only have to multiply by -A to get the actual output voltage Vout.

Ok, so next you should look over the equation above and see how it makes sense, then solve for vn, then solve for Vout. Lastly, compare Vout with Vs and note exactly how they are different. You should use at least 6 digits to calculate the final output Vout.

We'll do some more of these too so you can get the hang of it.
 
Excuse me for my late replies, you are so kind, polite and generous that I'm so sorry for my so infrequent replies. :(. Internet should only be made by people like you :). My I can justify myself: I love electronics (even if I'm not a master), but I'm also studying for other six exams ... I'm going crazy :(. However I really appreciate your help, too bas that you are not my professor at University :).

However, we have thie equation:

vn=(Vs-(-vn*A))*R2/(R1+R2)+(-vn*A)

after the substitutions:

vn=(3-(-vn*10000))*1000/(1000+1000)+(-vn*10000)

right?

so vn = 0.0003V right?
 
Hello again,


Well sometimes i can not get back to a site right away either or else other people have asked me something before that person so i have to wait to answer that second question, or sometimes someone asks a more involved question that might require a complex worked out example while someone else asks a very simple question so i tend to answer the simple one first...not all the time but more or less so :)

With your result i think you are on the right track, but if you read back i was asking this time for 6 significant digits for this result and there's a good reason for that this time. Even though in real life it is very rare when we can hook up the voltmeter and get 5 or 6 full digits of accuracy in a measurement, when we are doing equations like this it is often of much more importance to get more accuracy if we can because then we can compare it to another result and see if we might have done something wrong.
For example, if the answer was 1.2345 volts and we got 1.235 volts, we may have done something just a little bit incorrectly or we just decided to round, but it's good to know what actually happened.
In the example we are working on, it will be a little different story too though...we will be able to notice something about the behavior of the circuit by looking at the fine details of the result...so we calculate a high precision result (even though we cant use this in real life in an actual circuit) and compare it to other results and then we can start to make some interesting conclusions about the circuit.

By higher precision, let me provide a few examples:
1.2345 (five significant figures or digits)
0.0012345 (five significant digits)
123.45 (five significant digits)
The number 123.456 rounded to 5 significant digits is: 1.2346
The number 123.456 rounded to 4 significant digits is: 1.235
The number 123.456 rounded to 3 significant digits is: 123 (note we rounded down because of the '4')
The number 123.456 rounded to 2 significant digits is: 120
You can see how this works now.
If we take the number 123.456 and round it to 3 significant figures as above, we note that we loose some precision because the 0.456 gets lost. Sometimes we need to compare this to another example and that's why we need more digits sometimes.

Im sure you will have no problem with this so see if you can get at least 6 digits of precision with your result and we'll go from there. You will quickly start to see why this is a little more important for this circuit once we compare it to some other results. In fact, the next circuit we would do is the very same circuit except change the gain A to 1000, then the same circuit again with a gain of 100. If you feel up to it, again with a gain of 100000. With 6 significant digits in each result you'll start to see a pattern when you compare all the results to each other and to the input voltage.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top