Trying to create Quad Op Amp Simulation

Hi Folks,

i am trying to simulate a circuit using a quad LT1058A Op Amp.

I have an LT Simulation up and it shows how the op amp goes into saturation and this is my reference.
I really would like to learn how to stay in KiCad with the simulation and get nearly the same results of simulation.
So i read my way through a lot of posts and set up / use two files below.I checked the pinning in the simulation and everything seems to be fine but I don’t get any useful results even similar to LTSpice! :frowning:

Any hints ?
Do you guys need more infos from me?

Thanks in advance

Tom

-------------------------------------------------------------Files-----------------------------------
LTC1058A-quad.lib

  • A dual opamp ngspice model
    .subckt LT1058A 1out 1in- 1in+ vcc+ 2in+ 2in- 2out 3out 3in- 3in+ vcc- 4in+ 4in- 4out
    .include LinearTech.lib
    XU1A 1in+ 1in- vcc+ vcc- 1out LT1057A
    XU1B 2in+ 2in- vcc+ vcc- 2out LT1057A
    XU1C 3in+ 3in- vcc+ vcc- 3out LT1057A
    XU1D 4in+ 4in- vcc+ vcc- 4out LT1057A
    .ends

and LinearTech.lib containing:


.SUBCKT LT1057A 3 2 7 4 6

  • INPUT
    VCM2 40 4 2.0000E+00
    RD1 40 80 1.0610E+03
    RD2 40 90 1.0610E+03
    J1 80 102 12 JM1
    J2 90 103 12 JM2
    CIN 2 3 4.0000E-12
    RG1 2 102 2.0000E+00
    RG2 3 103 2.0000E+00
    ** CM CLAMP
  • DCM1 107 103 DM4
  • DCM2 105 107 DM4
  • VCMC 105 4 4.0E+00
  • ECMP 106 4 103 4 1
  • RCMP 107 106 1E+04
  • DCM3 109 102 DM4
  • DCM4 105 109 DM4
  • ECMN 108 4 102 4 1
  • RCMN 109 108 1E+04
    ** END CM CLAMP
    C1 80 90 1.5000E-11
    ISS 7 12 5.6000E-04
    GOSIT 7 12 90 80 2.8000E-04
  • INTERMEDIATE
    GCM 0 8 12 0 9.4248E-09
    GA 8 0 80 90 9.4248E-04
    R2 8 0 1.0000E+05
    C2 1 8 3.0000E-11
    GB 1 0 8 0 3.8027E+01
    RO2 1 0 9.9000E+01
  • OUTPUT
    RSO 1 6 1.0000E+00
    ECL 18 0 1 6 2.0852E+01
    GCL 0 8 20 0 1.0000E+00
    RCL 20 0 1.0000E+03
    D1 18 20 DM1
    D2 20 18 DM1

D3A 131 70 DM3
D3B 13 131 DM3
GPL 0 8 70 7 1.0000E+00
VC 13 6 2.9595E+00
RPLA 7 70 1.0000E+04
RPLB 7 131 1.0000E+05
D4A 60 141 DM3
D4B 141 14 DM3
GNL 0 8 60 4 1.0000E+00
VE 6 14 2.9595E+00
RNLA 60 4 1.0000E+04
RNLB 141 4 1.0000E+05
*
IP 7 4 1.0400E-03
DSUB 4 7 DM2

  • MODELS
    .MODEL JM1 PJF (IS=6.5000E-12 BETA=7.9309E-04 VTO=-1.000000E+00)
    .MODEL JM2 PJF (IS=3.5000E-12 BETA=7.9309E-04 VTO=-9.998500E-01)
    .MODEL DM1 D (IS=1.0000E-15)
    .MODEL DM2 D (IS=8.0000E-16 BV=4.8000E+01)
    .MODEL DM3 D (IS=1.0000E-16)
    .MODEL DM4 D (IS=1.0000E-09)
    .ENDS LT1057A

…more stuff…


.SUBCKT LT1058A 3 2 7 4 6
X_LT1058A 3 2 7 4 6 LT1057A
.ENDS LT1058A
*


This is not a very precise error report.

What do you get? What do you expect?

Sure. Sorry. I get DC at the output and no voltage swing at all. I have a feeling i may have wired it up wrong but i cannot find it. I’ll post more details later.

I don’t know this OpAmp but for me it looks you have no DC supply for its (+) input. If it is typical OpAmp it should have at least big problems to work as it is not able to ensure the same potential at (-) input.

It is exactly what I would expect if (+) input is at one rail voltage (probably - one) and (-) input can’t reach the same potential ever.

If V3 ampl would be 18V (6+12) than it is possible that (+) input will reach a level when OpAmp will go into working range.

It is exactly what Piotr is suggesting: If you add a resistor between in+ and the middel voltage (6V), then you will have an adequate dc potential also at the in+ node, and you will get an approximate square wave output.

Only as an FYI… Can run Kicad’s schematic/circuit using LTspice from within Kicad.

Screenshots show same circuit run from NG and LT…

1 Like

Hi BlackCoffee et al,
i tried the export feature and it works nicely. Its just that LTSpice is so clumpsy I will not use it.
However comparison of my Circuit in LTSpice and export from KiCadto LTSpice showed the same error.
That means that something is wrong with my modeling.
I would really like to use the LTC.lib from LTSpice but if i use it this happens:
image
Any thoughts on how to prevent this error?
This error is why I started tinkering with a self-made model. (Besides it is a good thing to know how to set up a Spice model.)
Since I copied the subckts from the LTC.lib I thought it should work and give the same results as in LTSpice. But it did not.
Here is the exportet circuit:


and the LTSpice Circuit:

Both showing the same singal (Sine Voltage source and OpAmpOut)

Next I’m going to try the +/- input suggestions from above.

Thanks everybody!

Hmm,

it turns out that the hint with the resistor helped. (i added R4=100k)

But why do both simulators behave differently?
Which one is closer to reality?

Any thoughts?

Sorry for beeing so picky but i plan to dig deeper into simulation. It is essential for what i want do later.

have analog dreams,

Tom

Unfortunately, I’m only a smart enough about this stuff to know I’m not smart about it…

I see in the Error msg something about ‘expected newline’

To me, that suggest a line isn’t terminated properly for compatibility

Try the checkboxes, particularly ‘Use current sheet as root’ and ‘Save all voltages’ Do it one at a time and see what happens…

Beyond that, inspect your file for errors/typo/etc…

That is 100% correct but I would word it differently: Every op amp input requires some DC bias current. Your + input has no source for that. Old op amps such as the 741 might have 500 nA maximum input bias current. CMOS op amps might have only a few pA. But you need to have some DC current path to both op amp inputs.

Generally you should try to match the thevenin DC resistance connected to the two DC inputs. But matching requirements depend on the resistance and op amp bias current. So if your bias current is 100 pA maximum and the input resistances are mismatched by 10K ohms, that will cause only a 1 microvolt offset at the op amp inputs.

I didn’t wanted to search for datasheet. As OP have written that LT Simulation works with his schematic correct than I assumed that may be it is not 100% typical OpAmp and may be it is some construction I have never meet with for example integrated initial polarization (with GΩ resistors) or even it is not OpAmp but other amplifier.
So I wanted to write what I see surprising in schematic but I was not 100% sure of it (even 0.01% makes me not saying that it is such or such).

OK yes. Maybe some audio amplifier (for example) is biased internally so does not need an external DC bias current path.