*First amp design that worked a little

*  BJT Model for q2n5088 npn's
*               Collector
*               | Base
*               | | Emitter
*               | | |
.SUBCKT Q2N5088 3 2 1
Q1 3 2 1 M195
.MODEL M195 NPN BF=445,IS=2.14E-14,RB=1.46,RC=37.5,RE=.18,
+VA=44,IK=.113,C2=2.38,NE=1.387,TF=2.28E-9,CJE=4.9P,PE=.82,ME=.3,
+CJC=4.5P,PC=.78,MC=.3,EG=1.11
CJC0 2 3 .18E-12
CJE0 2 1 .1E-12
.ENDS Q2N5088

*  BJT model for pnp's
*               Collector
*               | Base
*               | | Emitter
*               | | |
.SUBCKT Q2N3906 3 2 1
Q1 3 2 1 M188
.MODEL M188 PNP BF=135, BR=4.55,IS=4.47E-15,RB=5.8,RC=25,RE=.8,
+VA=25,VB=10.8,IK=61.7M,C2=4.25,NE=1.394,IKR=.03,C4=100,NC=1.325,TF=.282N,
+CJE=5.67P,PE=.83,ME=.4,CJC=2.21P,PC=.43,MC=.5,EG=1.11
CJC0 2 3 1.4E-12
CJE0 2 1 .4E-12
.ENDS Q2N3906


* Diode Model for the shack's cheapies.
*
.MODEL D1N914 D( IS=2.90E-09 RS=2.000 N=1.8000 TT=4.68E-07
+ CJO=2.53E-11 VJ=0.90000 M=0.50000 )

Vcc 1 0 9v
vin 2 0 sin(0 .3 1k 0 0)
*vin 2 0 AC 1

* Rc1 and Rc2 are the bias resistors for the
* base of the driver stage.
r1 1 4 7.8k
r2 4 0 1.2k

* re1 sets the ac gain.
* re2 is the bypassed emitter resistor
* r5 is the bootstrap resistor. Rin =~ 1MEG
rc 1 6 4.7k 
re1 5 7 600
re2 5 0 600 
r5 3 4 4.7k

* ren and rep are the thermal stability
* resistors for the push pull stage.
ren 13 14 1
rep 14 15 1

* rp1 and rp2 are the bias resistors
* for the push pull stage.
rp1 1 8 15k
rp2 11 0 15k

rout 17 0 30

c1 2 3 1.5u
c2 4 5 80u
c3 7 0 133u
co 14 17 1m

d1 8 9 D1N914
d2 9 6 D1N914
d3 6 10 D1N914
d4 10 11 D1N914

xbjt1 6 3 5 Q2N5088
xbjt2 1 8 12 Q2N5088
xbjt3 1 12 13 Q2N5088 
xbjt4 0 16 15 Q2N3906
xbjt5 0 11 16 Q2N3906

*Analysis requests
.TRAN 25u 5m 0 25u 

*output requests
.PRINT TRAN V(2) V(17) 
*.PRINT AC Vdb(2) Vdb(17)
.end
