Opamp alternative node sequence

The NJM4580DD has an operational amplifier “A” and an operational amplifier “B”.

In the model text file for device "A", the pins are defined as follows:
1 --Non-inverted input
2 --Inverted input
3-Positive power supply
4-Negative power supply
5-Output
Kicad NJM4580 "A" pin
3-Non-inverted input
2 --Inverted input
8-Positive power supply
4-Negative power supply
1 --Output
Kicad NJM4580 "A" Alternate Node Sequence
3 2 8 4 1
In the model text file for device "B", the pins are defined as follows:
5 --Non-inverted input
6 --Inverted input
7 --Output

What is the alternative node sequence for “B” in Kicad NJM4580?
NJM4580_KiCadフォーラム.pptx (468.1 KB)Preformatted text

Please see KiCad Eeschema as GUI for ngspice, tutorial for setting up the simulation for a solution.

2 Likes

holger, thank you for your answer.
See the tutorial, create njm-dual.lib,
I put it in the same folder as NJM4580.lib.

[njm4580-dual.lib]
.SUBCKT NJM4580 OUT1 -IN1 + IN1 V- + IN2 -IN2 OUT2 V +
.include njm4580.lib
X1 + IN1 -IN1 V + V- OUT1 njm4580
X2 + IN2 -IN2 V + V- OUT2 njm4580
.ENDS NJM4580
[njm4580.lib]
* PSpice Model Editor --Version 10.5.0
* $
* PART NUMBER: NJM4580
* BIPOLAR OPAMP
* Version: 2
* Please note that the inaccuracy is involved to it when you use this model.
* Please refrain from the model's resale.
********************************************
* Model Generated by NEW JAPAN RADIO CO., LTD *
* All Rights Reserved *
* Commercial Use or Resale Restricted *
********************************************
.SUBCKT NJM4580 OUT1 -IN1 + IN1 V- + IN2 -IN2 OUT2 V +
X1 + IN1 -IN1 V + V- OUT1 njm4580
X2 + IN2 -IN2 V + V- OUT2 njm4580
.ENDS NJM4580
* $
* connections: non-performing input
* |
* | | positive power supply
* | | | negative power supply
* | | | | output
* | | | | |
* | | | | |
.subckt njm4580_s 1 2 3 4 5
C1 11 12 {C1}
C2 15 16 {C2}
CE 10 0 {CE}
RE 10 0 {RE}
D1 16 17 DMOD1
D2 17 16 DMOD1
D3 5 18 DMOD2
D4 19 5 DMOD2
D5 10 20 DMOD2
VTL 3 20 {VTL}
GB 16 0 15 0 {GB}
GA 15 0 11 12 {GA}
GC 0 17 5 0 {GC}
GCM 0 15 10 0 {GCM}
ITL 3 10 {ITL}
Q1 11 2 13 PNP1
Q2 12 1 14 PNP2
RO1 16 5 {RO1}
RC 17 0 {RC}
RO2 16 0 {RO2}
R2 15 0 100 E3
RC1 11 21 {RC1}
RC2 12 22 {RC1}
VRC1 21 4 {VRC}
VRC2 22 4 {VRC}
RE2 10 14 {RE1}
RE1 10 13 {RE1}
ICE 3 4 {ICE}
RP 3 4 {RP}
VE 19 4 DC {VE}
VC 3 18 DC {VC}

.MODEL DMOD1 D (T_MEASURED = 25 IS = 1.14E-30)
.MODEL DMOD2 D (T_MEASURED = 25 IS = 8.00E-16)

.MODEL PNP1 PNP (TREF = 25 IS = 8.00E-16 BF = 4853.398058)
.MODEL PNP2 PNP (TREF = 25 IS = {ISM2} BF = {BFM2})

.PARAM
+ C1 = 1.42E-10
+ C2 = 1.98E-10
+ CE = 0.00E + 00
+ GCM = 6.06E-08
+ GA = 1.92E-02
+ GB = 3.24
+ GC = 1.69E + 04
+ ITL = 1.00E-03
+ RC1 = 52.20
+ RC = 5.93E-05
+ RE1 = 0.81
+ RE = 2.00E + 05
+ RO1 = 24
+ RO2 = 51
+ RP = 3.25E + 04
+ VC = 2.32411
+ VE = 2.32411
+ VTL = 1.50E + 00
+ VRC = 1.85
+ ICE = 1.3E-3
+ ISM2 = 8.0926305E-16
+ BFM2 = 5153.608247

.ends njm4580_s
* $

If you put the transient response parameters in the simulation and execute it,
I get the following error:

Note: Compatibility modes selected: ps lt
warning, can't find model'nc' from line
u2 nc unconnected-_u2-pad5_ unconnected-_u2-pad6_ nc nc njm4580
Circuit: KiCad schematic
Too few parameters for subcircuit type "njm4580" (instance: xx1)
Too few parameters for subcircuit type "njm4580" (instance: xx2)
Error: there aren't any circuits loaded.

By the way, the alternative node sequence is not entered.

Please tell me what is wrong with my operation.

Please mark all texts stemming from or dedicated to the simulator (Netlist, simulator output, models) as pre-formatted text. Otherwise it may not be readable.

Your new sub circuit should get a different name than the model sub circuit:

[njm4580-dual.lib]

.SUBCKT NJM4580 OUT1 -IN1 +IN1 V- +IN2 -IN2 OUT2 V+
.include njm4580.lib
X1 +IN1 -IN1 V+ V- OUT1 njm4580
X2 +IN2 -IN2 V+ V- OUT2 njm4580
.ENDS NJM4580

The name should become for example

.SUBCKT NJM4580_DUAL OUT1 -IN1 +IN1 V- +IN2 -IN2 OUT2 V+
...
.ends NJM4580_DUAL

You don’t need to enter any alternate node sequence, if you have made the sequence in the new subcircuit correspond already to the PIN number sequence.

1 Like
Mark all simulator-specific text as formatted text.

How do you do that?

We become indebted to.
You can now simulate KiCad.
However, the output voltage becomes 0V as shown in the attached figure.
I reviewed the circuit, but it only seems to match.
Is the simulation method wrong?
I would appreciate it if you could tell me.

「njm4580_dual.lib」

.SUBCKT NJM4580_DUAL OUT1 -IN1 +IN1 V- +IN2 -IN2 OUT2 V+
.include "C:\Users\i5351\OneDrive\ドキュメント\KiCad\6.0\projects\non-inverted\njm4580_s.lib"
X1 +IN1 -IN1 V+ V- OUT1 njm4580_s
X2 +IN2 -IN2 V+ V- OUT2 njm4580_s
.ends NJM4580_DUAL
「njm4580_s.lib」

* PSpice Model Editor - Version 10.5.0
*$
*PART NUMBER:NJM4580
*BIPOLAR OPAMP
*Version:2
*Please note that the inaccuracy is involved to it when you use this model.
*Please refrain from the model's resale.
********************************************
*Model Generated by NEW JAPAN RADIO CO.,LTD*
*            All Rights Reserved           *
*   Commercial Use or Resale Restricted    *
********************************************
.SUBCKT NJM4580 OUT1 -IN1 +IN1 V- +IN2 -IN2 OUT2 V+
X1 +IN1 -IN1 V+ V- OUT1 njm4580_s
X2 +IN2 -IN2 V+ V- OUT2 njm4580_s
.ENDS NJM4580
*$
* connections:     non-inverting input
*                  | inverting input
*                  | | positive power supply
*                  | | | negative power supply
*                  | | | | output
*                  | | | | |
*                  | | | | |
.subckt njm4580_s 1 2 3 4 5
C1 11 12 {C1}
C2 15 16 {C2}
CE 10 0 {CE}
RE 10 0 {RE}
D1 16 17 DMOD1
D2 17 16 DMOD1
D3 5 18 DMOD2
D4 19 5 DMOD2
D5 10 20 DMOD2
VTL 3 20 {VTL}
GB 16 0 15 0 {GB}
GA 15 0 11 12 {GA}
GC 0 17 5 0 {GC}
GCM 0 15 10 0 {GCM}
ITL 3 10 {ITL}
Q1 11 2 13 PNP1 
Q2 12 1 14 PNP2 
RO1 16 5 {RO1}
RC 17 0 {RC}
RO2 16 0 {RO2}
R2 15 0 100E3
RC1 11 21 {RC1}
RC2 12 22 {RC1}
VRC1 21 4 {VRC}
VRC2 22 4 {VRC}
RE2 10 14 {RE1}
RE1 10 13 {RE1}
ICE 3 4 {ICE}
RP 3 4 {RP}
VE 19 4 DC {VE}
VC 3 18 DC {VC}

.MODEL DMOD1 D(T_MEASURED = 25 IS = 1.14E-30)
.MODEL DMOD2 D(T_MEASURED = 25 IS = 8.00E-16)

.MODEL PNP1 PNP(TREF = 25 IS = 8.00E-16 BF = 4853.398058)
.MODEL PNP2 PNP(TREF = 25 IS = {ISM2} BF = {BFM2})

.PARAM
+ C1   = 1.42E-10
+ C2   = 1.98E-10
+ CE   = 0.00E+00
+ GCM  = 6.06E-08
+ GA   = 1.92E-02
+ GB   = 3.24
+ GC   = 1.69E+04
+ ITL  = 1.00E-03
+ RC1  = 52.20
+ RC   = 5.93E-05
+ RE1  = 0.81
+ RE   = 2.00E+05
+ RO1  = 24
+ RO2  = 51
+ RP   = 3.25E+04
+ VC   = 2.32411
+ VE   = 2.32411
+ VTL  = 1.50E+00
+ VRC  = 1.85
+ ICE  = 1.3E-3
+ ISM2 = 8.0926305E-16
+ BFM2 = 5153.608247

.ends njm4580_s
*$

KiCadフォーラム回路図.pptx (120.6 KB)

Please edit your post, use pre-formatted text where appropriate (Ctrl+E).

1 Like
Please edit your post, use pre-formatted text where appropriate (Ctrl+E).

I have corrected it.
Thank you for your advice.
I am Japanese, so I may not be able to communicate well, but please do not hesitate to give me advice.

Instead of sending pptx files (which some people do not like to read) it would be better to zip and post the KiCad/Eeschema project here.

What is the ngspice netlist of your circuit?
Eeschema → File → Export → Netlist… → Spice → Export Netlist

1 Like
Instead of sending pptx files (which some people do not like to read) it would be better to zip and post the KiCad/Eeschema project here.

Thank you, holger.

What is the ngspice netlist of your circuit?
Eeschema → File → Export → Netlist… → Spice → Export Netlist

I will send you a Netlist
non-inverted.cir (267 Bytes)

Sorry for making you go to all this trouble.
If you make a mistake, please point it out again.

With this netlist you are calling a single OpAmp as a non-inverting amplifier. But you are including
njm4580_dual.lib.

The single amplifier however is defined in njm4580_s.lib, which has to be attached to the symbol, and you have to consider the alternate node sequence.

So may I suggest that you get this single amplifier up and running first. Only after that you may consider using the dual amplifier.

1 Like

Thank you, holger.
The circuit was successfully simulated.
Thank you very much.
Upload the netlist.
non-inverted.cir (356 Bytes)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.