PNP darlington transistor ngspice .SUBCKT syntax

I want to simulate a PNP darlington transistor in Kicad. Here is an example of the subcircuit.

*Si 625mW 30V 1.2A pkg:TO-92B 1,2,3
.SUBCKT XMPSA65 1 2 3
* TERMINALS: C B E
Q1 1 2 4 QPWR .1
Q2 1 4 3 QPWR
.MODEL QPWR PNP (IS=1.44P NF=1 BF=107 VAF=98.6 IKF=0.96 ISE=110P NE=2
+ BR=4 NR=1 VAR=40 IKR=1.44 RE=0.333 RB=1.33 RC=0.133 CJE=258P XTB=1.5
+ VJE=0.74 MJE=0.45 CJC=37.3P VJC=1.1 MJC=0.24 TF=60.3N TR=2.61U)
.ENDS XMPSA65

I have not used subcircuits in ngspice or indeed KiCad before. Are there any simple circuits that I can try that are similar to the one referred to here in the QSPICE forum (which I started)?

I have asked about using a BC516 in the QSPICE forum, but apart from the model parameters I’m hoping it should be similar.

Also, what does the .1 refer to in the line above?

Q1 1 2 4 QPWR .1

Thanks.

If you have an adequate symbol with three pins, attach the subcircuit model to this symbol.

KiCad Eeschema as GUI for ngspice, tutorial for setting up the simulation offers a description how to do that. Or watch https://www.youtube.com/watch?v=V6D6I4fwQGA, at about 4min plus…

Check the model (draw a circuit diagramm by connecting the pins of the 2 transistors). The sequence in the Q line (bipolar instance) is C B E. Is it a darlington?

Q1 1 2 4 QPWR .1

Concerning the .1, have a look at the ngspice manual, chapter 7.3.1 Bipolar Junction Transistors (BJTs), which tells us about the instance of a bipolar transistor:

QXXXXXXX nc nb ne <ns> <tj> mname <area=val> <areac=val>
+ <areab=val> <m=val> <off> <ic=vbe,vce> <temp=val>
+ <dtemp=val>

There is no mention of a single number only after the model name mname. So we have to guess (or you have to look it up in the QSPICE manual). I assume that this number is equivalent to our

m = 0.1

The transistor is scaled by this value. This scaling seems to be reasonable, as the input transistor of the darlington may be smaller than its output device.

Thanks for your reply. Yes, it is a PNP Darlington transistor.