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.

Opamp schematic problem

Status
Not open for further replies.

Jeffrey Zhu

New Member
Hello, I`m trying to confirm my answer for a homework problem and simulate it, but I ran into an issue. I don`t know how to solve this. I`m rather new to this. Any help is appreciated!! :)
 

Attachments

  • 1.asc
    1.4 KB · Views: 301
Welcome to ETO!
What was the homework problem? We're not mind-readers.
 
Add this directive to your LTSpice schematic:

.lib opamp.sub


See, I'm a mind reader...
 
I`m trying to determine the currents going out of the two opamps, but when I try to simulate it, it doesn`t work.

``Add this directive to your LTSpice schematic:

.lib opamp.sub ``


How do I do this?
 
Move the mouse cursor over .op (at the top banner), and left mouse click.
Type .lib opamp.sub into the text box. and click OK
Place the text box anywhere in the schematic.

You might want to label some nodes.
1c.gif


Your circuit has an unintended problem. Note that V(x) is half V(y).

Why is I(R3) = ~3mA instead of two mA?
 
Last edited:
Hi, I am trying to work this by hand as well, I seemed to get -2 and +2 v for the output of the opamp. From the post above, you can see the outputs are 1.9996 ~ 2 and -.99998~ -1. My answer for the second part of the opamp seemed correct, but my first is wrong... Here is what I did;


(Vin - 0)/1000 = -(Vo-0)/1000 and since there is a voltage drop along the feedback resistor and the resistor directly straight out from the output of the opamp, you would use voltage division

(Vin - 0)/1000 = -(Vo-0)/1000(1000/1000+1000)
which results in Vo = -2, but in LTSPICE simulation I got around -1.... any ideas?
 
The left hand opamp is a simple inverter where V(x) = - (R5/R1)*V(in) = -1*V(in).

The right hand opamp is in the non-inverting configuration where V(y) = [1 + (R3/R2)]*V(in) = 2*V(in).

If you want to make the gain of the left amp = -2, then adjust the gain by making R5=2*R1.

Do you understand where the two gain equations come from?

Do you understand why you had to add the .lib statement to make the simulation run?
 
Last edited:
Oh, I made a mistake. From my equation, I thought that the node voltage at Vo, you would have to consider the voltage drops along R3 and R5... No, why do you need the .lib statement?
 
Oh, I made a mistake. From my equation, I thought that the node voltage at Vo, you would have to consider the voltage drops along R3 and R5...

For the inverting configuration : since the current into the inverting input is assumed to be zero, I(R1) = I(R5)

I(R1) = [V(in) -0]/R1
I(R5) = [o-V(x)]/R5

so, V(in)/R1 = -V(x)/R(5), or V(x) =-V(in)*R5/R1 = -V(in)*1

No, why do you need the .lib statement?

The opamp symbol is generic; it could be used to represent lots of different opamps. The .lib statement tells the simulator to associate the symbol with a specific (in this case idealized) opamp model whose definition is in the file ../lib/sub/opamp.sub

Here is the idealized model:

* Copyright © Linear Technology Corp. 1998, 1999, 2000. All rights reserved.
*
.subckt opamp 1 2 3
G1 0 3 2 1 {Aol}
R3 3 0 1.
C3 3 0 {Aol/GBW/6.28318530717959}
.ends opamp

It is a voltage-controlled current-source followed by an RC to simulate gain-bandwidth. Very simple opamp model.

Its default open loop gain is 100K. Its gain-bandwidth product is 10meg. These attributes are settable.

224.gif
 
Last edited:
..................
``Add this directive to your LTSpice schematic:

.lib opamp.sub ``


How do I do this?
A simple way is to just hit the "s" key (for Spice directive) when in the schematic window.
Type .lib opamp.sub in the resulting window, hit OK, and then place the text anywhere in the schematic window.
 
How cum the opamps in LTspice work when they have no power supply but my opamps do not do anything when they have no power supply??
 
How cum the opamps in LTspice work when they have no power supply but my opamps do not do anything when they have no power supply??
If you had read the thread, you would know...
 
How cum the opamps in LTspice work when they have no power supply but my opamps do not do anything when they have no power supply??

Many circuit simulation programs assume power supplies are connected. Op-amps, gates, and many ICs automatically connect the virtual power pins to their respective sources.
 
JoeJester, why the dislike? I was stating a fact..... :p
 
That must have been an accidental activation of a switch while using my phone..........let me change it......

I do know that LT Spice does things a little different than other Spices. From shunting current sources, adding series resistances to voltage sources, etc, little "tricks" to speed up the simulation.

Mike ... I would have thought there would be infinite GBW product of an IDEAL opamp.
 
Last edited:
Hi,


For example, one op amp model might let us only change the open loop gain, while another will allow us to change the gain bandwidth product too. This second option requires additional passive components while the former only requires a voltage controlled voltage source.
There are a lot more options here though. Another model might let us change the input offset on either input terminal, using two constant voltage sources or may be even more complex to follow some function of the power supply voltage.
It is interesting that a voltage controlled voltage source does not require a power supply of any kind, neither plus nor minus, and it can still generate a plus or minus voltage. This is like magic though and must be dealt with when doing a power study where the efficiency might come into question with a real op amp when with a simulated one it might not. If this is important, then a more sophisticated model should be used.

A really ideal op amp would really have infinite gain and infinite bandwidth, so maybe it is just better to call these other ones "behavioral" and each added option mimics an additional behavior.
 
Status
Not open for further replies.

Latest threads

Back
Top