Author Topic: LTspice: when I turn a schematic into a subcircuit it behaves differently. Why?  (Read 1188 times)

0 Members and 1 Guest are viewing this topic.

Online czk9527Topic starter

  • Contributor
  • Posts: 13
  • Country: au
Hey guys, I ran into some trouble in LTSpice.

Basically the problem is that the circuit behaves different if I make it into a custom symbol(subcircuit).

I am simulating a TSMC018 CMOS op amp in ltspice, and need to test it using "gain of 2" non-inverting amplifier configuration. So I started by doing everything in one schematic sheet, which is shown in the attached "without using subcircuit.PNG". It worked fine as the simulation result shows, when the input is 100mV, the output is ~199.5mV.

Then I made it into a custom symbol(subcircuit), as shown in the attached "subcircuit.PNG" and "symbol.PNG". Then I hooked it up with the external components (power supply, feedback resistors, biasing current etc). Simulated it and the output was off. It is shown in the attached "using subcircuit.PNG", when the input is 100mV, the output is ~194.8mV.

I have no idea why this would happened. Can you guys please help me with that? Thanks.

 
« Last Edit: November 02, 2016, 06:17:55 am by czk9527 »
 

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2145
  • Country: fi
  • Embedded SW/HW.
Check the V2 and make it identical in both circuits. Otherwise the DC operating points may be different.
« Last Edit: November 02, 2016, 09:36:31 am by Kalvin »
 

Online czk9527Topic starter

  • Contributor
  • Posts: 13
  • Country: au
Check the V2 and make it identical in both circuits. Otherwise the DC operating points may be different.

Thanks for the reply. I went back to change both of the V2 to "none" and using the same ".dc V2 -0.45 0.45 0.001" for both of them. Still no luck.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf