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.

gianx80

New Member
Hi, I have to do this exercise in preparation for my first and only exam about electronics. This is the scan of the exercise (the first one):

**broken link removed**

Uploaded with ImageShack.us

and this is the scan of the proposed solution:

**broken link removed**

Uploaded with ImageShack.us

I have to find the "transfer function" Vo/Vi (is this the correct English name?), Bode plot. For point 2, I can't translate it into English, sorry.

I'm a total newbie, so I can't understand the proposed solution. Why, for example, Vx/Vi = 1+sRC1? Can you explain me the solution step by step?

Thanks in advance!

EDIT

I added the scans as an attachment to this post. Added complete traduction.

TRADUCTION INTO ENGLISH

Exercize 1
In this circuit we have a real diode and a real operation amplifier.
Io = 1 microAmpere, C1 = C2 = 10 picoFarad, R = 10 kilo Ohm.

1) Find the transfer function Vo/Vi and draw the related Bode plot.
2) I can't translate this point, so I'm not searching any kind of advise about this point

SOLUTION

In the small-signal model the diode acts like a resistor with this value:
rd = Vt/Id = 26mV/1microAmprere = 26 kilo Ohm.
In order do find the tansfer function we use this equivalent circuit:

[DRAWING]

We find that:

Vx/Vi = 1 + R/(1/sC1) = 1+ sRC1

Vo/Vx = (1/sC2)/(rd + (1/sC2)) = 1/(1 + srdC2)

From this we obtain:

Vo/Vi = Vo/Vx*Vx/Vi = (1 + sRC1)/(1 + srdC2)

[The final part of the solution is about point 2].

Now you have all the exercise in English. Could you help me?
 

Attachments

  • scans.zip
    2.4 MB · Views: 348
Last edited:
Hi there,

We can start by finding the expression for Vx.
Have you done circuits with resistors and capacitors before, finding their frequency domain equations? How about with op amps too?

We can start by noting that the op amp is connected as a non inverting amplifier. The gain is Zf/Zg+1, where in this case Zf is the feedback resistor R and Zg is the cap impedance C1 which equals 1/(s*C1) as you should already know.
From that gain equation Zf/Zg and we substitute R and 1/(s*C1) we get:
R/(1/(s*C1))
and simplified that comes out to:
R*s*C1
so the entire gain equation looks like this:
1+s*R*C1
All we have to do now is multiply by Vin and we get:
Vx=Vin*(1+s*R*C1)

Are you following this so far or do you want a more general procedure?
 
For now I understood your kind explanation. You can go on!
However I'm not so familiar with the frequency domain equations (they were covered in another course that I didn't attend for a long series of reasons). I'm pretty new to op amp.

P.S.
It would be great if you could also explain to me a general procedure for non inverting amplifier :)
 
Last edited:
Hello again,


Well if you havent done any significant work with frequency domain equations im not sure how you are ever going to get this. You're going to have to cover that either in your course or on your own. For example:
H(s)=1/(s+1)
does that equation make any sense to you?

Have you worked with resistor networks, in trying to find the response at a certain node or in a certain branch?
For an example, a voltage divider circuit made from two resistors both in series with a battery, do you know how to analyze this circuit for the output voltage at the junction of the two resistors?

One way to simplify the op amp circuit is to calculate the voltage at the non inverting terminal (vp) and the inverting terminal (vn) and then equate that to Vout after using:
Vout=(vp-vn)*Aol
where
Aol is the assumed internal open loop gain of the op amp.
That would give an implicit equation in Vout that you would then solve for Vout explicitely. If you dont want to worry about what Aol might be then you can solve for the more theoretical result (typical in coursework) by taking the limit of the function of Vout as Aol approaches infinity. The result will be the theoretical response of the op amp.
For your circuit, we would have calculated Vx by first calculating vp and vn and then using the above procedure. We would end up with the same result. In the end we test the result for its limits that get applied to a real life op amp circuit.
This technique views the op amp as a dependent voltage controlled voltage source.

In the frequency domain, the capacitor is viewed by its complex impedance 1/(s*C) and the inductor impedance is s*L. Thus if we have a capacitor C1 for example we replace it with 1/(s*C1) and continue, and if an inductor L1 we replace it with s*L1 and continue.

We can try a couple of small circuits if you want to start there.
 
Last edited:
Thanks again for your appreciated help :). I've already studied some notes about frequency domain equations ... so, I can't master them so well, but with some effort and in most cases I can understand them. The equation that you wrote is a transfer function with one pole, am I right?
I've started working with circuits, resistors and capacitors only for this exam due to a bureaucratic problem that didn't allow me to attend another course called (I'm translating from Italian) "Circuits Theory". So I know what is a voltage divider, but I can't always made a correct analysis of a node or a branch (I'm working hard on it). However we don't use inductors in our circuits, only resistors, capacitors, diodes, opamps, transistors.
You said that we can find Vx using Vout=(vp-vn)*Aol ... but with this equation we find Vo ... so, Are Vx and Vo the same?
However it would be useful to try together some small circuits :).
Thanks again, you are saving me!
 
Hello again,


Well i am glad that i can help. You are going to have to study a little more but im sure you know that already and it seems that you are doing pretty well and you are determined so that's a good sign :)

First, yes, with the equation for the op amp i gave Vout=Vx for your circuit. Also, Aol can be taken as very large like 100000 or even more unless you want to make it infinity which requires finding the limit...it's up to you and you'll see the difference if you take it as both and compare results.

Anyway, we should start with a simple circuit with just resistors and then work from there moving to resistors and capacitors, then go from there.
Do you know what nodal analysis is or have you ever used it? We can start with that if not as i think that will help you quite a bit.

We can start with this circuit:
Code:
Vin  o---R1---+---o  Vout
              |
              R2
              |
GND  o--------+---o  GND

If you have any trouble reading that circuit let me know.

You are given Vin(s) and you are to calculate Vout(s) knowing also R1 and R2.
 
Last edited:
I have a "superficial" knowledge about nodal analysis, however I'm here in order to learn!
In the circuit that you proposed there is a voltage divider (we call it "partitore di tensione"), so Vout should be: (R2/(R1+R2))*Vin. Am I right?

P.S.
Thanks again ;-)
 
Hello again,


Oh yes that is correct, i am happy that you got that one so we know you have some exposure to electrical equations. The divider circuit is good to know because it comes up so much in many circuits.

Using nodal analysis you would be able to analyze many more circuits to almost any complexity, but it will take a little while to learn...you think you are up to it?
Depending on how much math you had in the past it could be quick though.

A few more questions then...
1. Have you learned to calculate the equivalent total resistance of series and parallel resistances?
2. Have you had (math) simultaneous equations yet?
3. Any trig or calculus in your past?
4. Any hands on lab experience with say resistors and maybe batteries or other voltage sources?
5. Have you downloaded and actually used any electronic circuit simulators in the past?

The answers to these questions will help me learn where you are in your studies so far.
 
Last edited:
1. The parallel of two resistors is (R1*R2)/(R1+R2). For more than 2 resistors I can use this expression: 1/R1 + 1/R2 + 1/R3 etc. Regarding series, I have so add all the resistors: R1 + R2 + R3 etc.
2. What do you mean? Something like an equations system? If yes, I know how to solve a given system of equations.
3. I did some trig and calculus ... I'm not a genius, but I have surely all the bases. I know what is a derivative function, an integral (even if I'm not so good at solving them xD), a series etc.
4. I had only a couple of lab experiences: we used a multimeter to measure a resistor and the oscilloscope to study a filter (resistor+capacitor).
5. I've already tried to use some simulators, but I don't know how tu use them.

I think that I have to learn nodal analysis ... even if it could be long and difficult.
Did I fully answered your questions?

Thanks
 
Last edited:
Hi again,

Oh yes i think you answered them all, and the simultaneous equations system is a set of linear equations in N unknowns such as this:
a*3+b*6=9
a*1.2+b*8=25
and solve for variables a and b.

It is a good idea to get a simulator like the one from Linear Tech (it's totally free) and take a little time to learn it. The reason for this is because you can then check all of your math results after doing a circuit so you know if you get the right (or at least close) results.

We can start with nodal analysis as that's a pretty general method and we'll start with resistors. I think you will pick this up pretty quick actually.
After we do a few of these we can move to capacitors, then if you like inductors, but you'll see how easy it is to do inductor circuits if you know capacitor circuits, and you'll also see how easy it is to go from resistors to capacitors, so i think you'll soon understand this stuff and be able to analyze many circuits without too much difficulty.

If you would like to do a couple hands-on labs we can do that too but you'd have to purchase some resistors, and once we move to capacitors you'd have to buy a few of them. Unfortunately when we do capacitor circuits in AC analysis the labs would require some signal generator and a good meter and even better yet a scope. We can get by without the scope for a lot of it though. Sometimes you can find audio generators cheaper or else maybe you can build one with the help of people from this forum.
Alternately, we could do a couple simulator labs if you like, once you get the LT simulator and start using it. It's not that hard to use really. This should be the least that we do in conjunction with the nodal analysis.

So would you like to start with nodal analysis then?
 
Last edited:
Yes, I can solve that system ;-).

For the simulator, are you referring to LTSpice IV? Linear Technology - Design Simulation and Device Models I've already tried it, but with no success :-(.

I'd love to do some lab, but we are not allowed to freely use our laboratory ... we can use it only if our professor decides to do so (and we can only do the experiments that our professor planned). It's a shame because our lab is fully equipped with good instruments. I think that a better option is to use the simulator :).

So, let's start with nodal analysis :)
 
Hello again,

Oh that's not good to hear...both the simulator and the lab use.
So i guess then you already downloaded the simulator? What happened when you tried using it?
We should get you going with that if we can so that you can verify your analysis of the circuits we look at.

Ok so nodal analysis is up next. I'll get a pic or two up here later (possibly tomorrow morning though) with some circuits we can look at.

In the mean time you can take a look at this pic. You can ignore the inductor for now if you wish.
Note how the voltage and current arrows are drawn. The voltage arrows are drawn ACROSS the element, while the current arrows are drawn showing the direction of conventional current flow THROUGH the element. Also notice that when the current flows in the direction shown the voltage appears across the element as shown by the arrow, with the arrow head being positive and the arrow tail being negative.
Does this make sense to you?
 

Attachments

  • EE_FIG-00001.gif
    EE_FIG-00001.gif
    9.1 KB · Views: 400
Last edited:
Yes, I've already donwloaded and installed it. I managed to draw one of the circuits, but I have no idea how can I set the program to retrieve all the infos that I need. I mean, I draw my circuit and then? Have I to put a virtual voltmeter to obtain, for example, the voltage on a resistor?
Yes, I can understand the picture you kindly posted. The current flows from a "zone" with more potential to a "zone" with less potential.
 
Last edited:
Hello again,


Ok then let me fire up my LT simulator and set up a simple circuit and see how we can get you going here. I think you'll find it's very easy to use.
Be back here in a few minutes or so in case you are still on line...I'll edit this post with more info.

Yes you may find it easier to label the components of a circuit with those arrows to make the writing of the equations simpler. That's the approach we will take.

MORE INFO:

Here is a step by step procedure for doing a simple analysis using the LT Spice simulator. It's not hard to do really and you'll see that once you get going. You can try this step by step if you want to follow the exact procedure for the first time. You'll understand it a lot more after this initial use so you'll probably want to experiment.

Click File/New Schematic
Toolbar: Click little 'AND' gate symbol takes me to "Select Component Symbol", scroll to "voltage" and select that and put it into the schematic to the left side somewhat.
Right click on it after dropping it, entered 10 for DC value and 0 for ohms.
Clicked on little "resistor" symbol and dropped it into the circuit in a position above the voltage source but to the right to make room for another resistor that will go parallel to the voltage source.
Right click the resistor (R1) and enter 1k for the resistance.
Do another resistor same way (R2), put it directly under R1. Right click and enter 1k for resistance.
So now we have two resistors and one voltage source, now i connect them together with lines (little pencil symbol) so that all three are in series.
Then i click on the little triangle with a vertical line above it (ground symbol) and place it under the circuit, then connect it to the bottom of the circuit with a short line. I see a small square appear where the line meets the other line which indicates a node.
I now have the circuit with three components and one ground connected to the bottom (-) of the voltage source and the bottom of the lower (R2) resistor.
Next i click on the junction between R1 and R2 and draw a little line from that junction to the right, about 1/2 inch long. After i do that i see a square appear at the junction of R1 and R2 and that shows the node there a little clearer.
So far we see two squares drawn, one at the bottom and one at the junction of R1 and R2. We dont see a square at the top node of the circuit though but that is a node also.

Now for the simulation...

I click "Simulate" and a tab control box comes up with "Transient" already selected.
I enter:
Stop time [1ms]
Time to start saving data [0]
Maximum Timestep [1us]
(in the bottom box of the tab box some text appears that reads ".tran 0 1ms 0 1us")
I click "OK" and a black background window comes up along with the schematic but smaller now.
I have to make the main window larger and make the black window larger and the schematic larger for better viewing.
Nothing shows up in the black window, but then i left click on the node between the two resistors and all of a sudden a green line appears in the black window drawn from left to right. That is the response wave. This is DC so we see a flat horizontal line, and the y axis indicates that the line is at 5.000v (5 volts) and the time scale (x axis) runs from 0.0ms to 1.0ms.
Thus, i have done a simple DC analysis using the transient analysis feature of the software.
If we want to change the type of analysis we are doing we can click Simulate/Edit Simulation Cmd.

Let me know how this works out for you and if it starts to make sense.
 
Last edited:
Thanks, thanks, thanks ... wow, I understand it, wow :)! I have only a question: could you give me a quick explanation of the other analysis methods?
Thanks again, I think we can go on :)
 
Thanks, thanks, thanks ... wow, I understand it, wow :)! I have only a question: could you give me a quick explanation of the other analysis methods?
Thanks again, I think we can go on :)


Hello again,

You're welcome, and im happy to see someone so interested in this stuff too :)

The AC analysis is for looking at the frequency response of a circuit. It's often required to look at the amplitude and/or phase with frequency being on the x axis instead of time. It's the "frequency domain".
DC sweep is for when you want to look at a circuit over a range of dc input values. For example, if you connect a voltage source to a resistor (or two resistors like we did before) you can make that voltage source 'sweep' or 'ramp' from some value (like zero) to some other value (like 10 volts) and you will see the response for every dc voltage input.
Noise i havent used too much yet, i suppose that would be for looking at the noise content in a signal.
DC Transfer Function would be to compute the transfer function (looks like DC only however) so for our previous circuit it would give 0.5.
DC op point is to calculate the DC operating point, which is usually done with caps as open circuits and inductors as shorts (because they behave that way for DC).

Oh yeah one little note here:
Before you do the simulation you should try to analyze the circuits yourself first and come up with the required solutions, at least when possible. You can then compare results and if there are differences find out why.
 
Last edited:
Ok, I understood. I tried to build a circuit with an nmos transistor. The exercise give me k and vth transistor parameters, but when I insert a nmos transistor in spice I can't find k and vth between the parameters (I see vds, rds, qgate). Could you help me?
However, I'm ready to analyze some small circuits, so, I'll wait your new post
 
Ok, I understood. I tried to build a circuit with an nmos transistor. The exercise give me k and vth transistor parameters, but when I insert a nmos transistor in spice I can't find k and vth between the parameters (I see vds, rds, qgate). Could you help me?
However, I'm ready to analyze some small circuits, so, I'll wait your new post

Hi again,

Ok i'll take a look. I cant promise though that all the models in LT Spice will work the way you want them too, unless you accept some compromises sometimes. It's still a very valuable tool though as you will find out.

One more question before we start:
1. Do you know Ohm's Law?
2. Do you know and understand Kirchhoff Laws KCL and KVL ?
One is the algebraic sum of currents flowing into a junction equals zero, and the other is the sum of voltage drops around a closed circuit is zero.
Have you used these yet at all?

A LITTLE LATER:
Ok what i did was pasted a MOSFET into the schematic we did yesterday and looked at the parameters and sure enough, they dont list all the parameters there in that little window. However, if you click "Pick New Mosfet" a window will come up where you can find a bunch of models already available. If you make the window wider, you'll find the spice listing where you can change parameters or maybe make your own model, and that means you can alter Vt and stuff like that. Take a look.
Warning: Dont get too carried away with this thing or you might not want to calculate any circuits using good ol'd math anymore :)

FIRST CIRCUIT: How many nodes in this circuit? Identify each node with a large black dot.
 

Attachments

  • EE3-0003d2.gif
    EE3-0003d2.gif
    3.1 KB · Views: 373
Last edited:
Yes, I know Ohm's Law. I also know Kirchoff equations, but I can't always write the correct ones for a node ... I mean, I understand the concept, but in real situations I often don't know how to correctly apply them.
I'd like to use SPICE only to check my calculations ;-). However I can't figure out how to make a new model ... when I select one of the presets, the program let me edit only vds, rds and qgate ... I instead need to set Vth (I can't find this parameter in any of the presets ... but it could be my fault) and k (that is, you know, calculated from W, L etc). I also need to leave empty all the other parameters provided by the SPICE model because I don't know them: I'm not using real transistors. If you can't help me on this specific topic, could you please redirect me to a place (site, forum, other section of this forum, user) where someone could know this specific thing?
However, let's start with the circuit. There are 3 nodes, am I right?
 

Attachments

  • EE3-0003d2.gif
    EE3-0003d2.gif
    3.1 KB · Views: 363
Last edited:
Hello again,


Yes that is right. Where we have two components meeting forms a node.
Next, as per one of my previous diagrams, you should draw a current arrow in the diagram. Since we are using conventional current flow theory, the current goes from the most positive to the most negative. Since this is a series circuit there will only be one current arrow. Can you draw the current arrow and make sure the direction is correct?
We might seem to be moving a little slow for now, but once we get past these basic things we'll pick up speed fast.

Let me take another look at the LT Spice. Dont forget that you can always start another thread too if you want to ask others here for their ideas on how to do something like that.
I'll be back in a few with additional comments...

LATER
Ok, that dialog box does not allow us to modify any parameters in the spice model, just view them. My mistake there.
What does allow modifying any MOSFET model is this:
navigate to the directory:
C:\...\LTC\LTspiceIV\lib\cmp
and open the file called:
"standard.mos"
When i double click on this file it opens in LT Spice and allows me to change any value in the spice model for any mosfet.
If double clicking it doesnt work you may have to open it from LT Spice directly.
This should allow you to change any values for any mosfet you want. Just be sure to keep a copy of the old mosfet model.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top