* SPICE netlist
V+VCC +VCC 0 {VCC}
V-VCC 0 -VCC {VCC}
Q9 N022 N023 N024 0 MJE340
R8 N024 -VCC_lim {rvas}
Q10 0 N021 N023 0 MPSA42
R11 N007 0 10k
R12 N006 0 10k
Q13 0 N003 N002 0 MPSA92
Q14 N004 N002 N001 0 MJE350
R13 +VCC_lim N001 {rvas}
C_comp_3 N007 0 4p
V+Vreg 0 -Vreg {Vreg}
Q_curr1 N009 N012 N015 0 MMPQ2222A
Q17 N005 N006 N009 0 MMPQ2222A
Q18 +Vreg N007 N009 0 MMPQ2222A
R_led1 0 N012 6.8k
RE_curr1 N015 -Vreg {rcurr}
D_1 N012 -Vreg LED18
RC1 +VCC_lim N003 {RC}
Q19 N003 +Vreg N005 0 MMPQ2222A
RE_curr2 +Vreg N013 {rcurr}
Q_curr2 N017 N014 N013 0 MMPQ2907A
Q20 N020 N006 N017 0 MMPQ2907A
Q21 N021 -Vreg N020 0 MMPQ2907A
RC2 N021 -VCC_lim {RC}
Q22 -Vreg N007 N017 0 MMPQ2907A
D_2 +Vreg N014 LED18
R_led2 N014 0 6.8k
RECC2 N023 -VCC_lim 1k
RECC1 +VCC_lim N002 1k
V-Vreg +Vreg 0 {Vreg}
V2 N025 0 SINE(0 71 50)
D7 N027 N025 D
D8 N025 N028 D
D9 N027 N029 D
D10 N029 N028 D
C8 N028 0 4.7m
V3 0 N029 SINE(0 71 50)
C9 0 N027 4.7m
S2 +VCC_real N028 N026 0 SW
V7 N026 0 PULSE(-1 1 {ton})
S5 N027 -VCC_connected N030 0 SW
V13 N030 0 PULSE(-1 1 {ton})
R24 +VCC_lim N008 25
R25 N010 +VCC_real 1k
Q27 N010 N008 N011 0 MPSA42
Q28 +VCC_real N010 N008 0 MJE340
R28 -VCC_lim N019 25
R29 N018 -VCC_connected 1k
Q29 -VCC_connected N018 N019 0 MJE350
Q30 N018 N019 N016 0 MJE350
D18 -VCC_lim N016 ZEN2
D19 P001 N016 LED18
R30 -VCC_lim P001 22
D20 P002 +VCC_lim LED18
R31 P002 N011 22
D1 +VCC_lim N011 ZEN2
R1 N004 0 300
R3 0 N022 300
;tran 0 20m 0
.fourier 1k 20 v(realim)
;tran 0 12m 1m 20n; distorsion
;ac oct 20 0.1 1g
.param VCC=70
.param Vreg=12
.param RC=2.4k
.param rvas=33
.tran 0 1500m 15m
.param ton=10m
;tran 0 62m 50m 100n
.param rcurr=560

* LTspice schematic (.asc)
Version 4
SHEET 1 5616 2432
WIRE 2696 -1200 2696 -1216
WIRE 2696 -1200 2584 -1200
WIRE 2808 -1200 2696 -1200
WIRE 2808 -1184 2808 -1200
WIRE 2584 -1152 2584 -1200
WIRE 1368 -1136 1368 -1200
WIRE 2808 -1088 2808 -1104
WIRE 2584 -1040 2584 -1072
WIRE 2744 -1040 2584 -1040
WIRE 1368 -1008 1368 -1056
WIRE 2296 -1008 1368 -1008
WIRE 2584 -992 2584 -1040
WIRE 1368 -944 1368 -1008
WIRE 2296 -944 2296 -1008
WIRE 2520 -944 2296 -944
WIRE 1512 -896 1512 -944
WIRE 1512 -896 1432 -896
WIRE 1640 -896 1512 -896
WIRE 2808 -896 2808 -992
WIRE 2584 -864 2584 -896
WIRE -2696 -816 -2744 -816
WIRE -2456 -800 -2664 -800
WIRE -2152 -800 -2456 -800
WIRE -2664 -784 -2664 -800
WIRE -2664 -784 -2744 -784
WIRE 2808 -704 2808 -816
WIRE 1368 -672 1368 -848
WIRE 1640 -672 1640 -896
WIRE 1304 -624 776 -624
WIRE 1784 -624 1704 -624
WIRE -1960 -560 -2088 -560
WIRE -1768 -560 -1864 -560
WIRE -1688 -560 -1768 -560
WIRE -1544 -560 -1608 -560
WIRE -1304 -560 -1304 -608
WIRE -1304 -560 -1544 -560
WIRE -2152 -544 -2152 -800
WIRE -2088 -544 -2088 -560
WIRE -2088 -544 -2152 -544
WIRE -1768 -544 -1768 -560
WIRE 1368 -544 1368 -576
WIRE 1512 -544 1368 -544
WIRE 1640 -544 1640 -576
WIRE 1640 -544 1512 -544
WIRE -2088 -480 -2088 -544
WIRE -2056 -480 -2088 -480
WIRE -1912 -480 -1912 -496
WIRE -1912 -480 -1976 -480
WIRE -1816 -480 -1912 -480
WIRE -1704 -480 -1720 -480
WIRE -1672 -480 -1704 -480
WIRE -1544 -480 -1544 -560
WIRE -1544 -480 -1608 -480
WIRE 2088 -480 2088 -512
WIRE 2088 -480 1992 -480
WIRE 1992 -448 1992 -480
WIRE 2088 -448 2088 -480
WIRE 1160 -432 1160 -464
WIRE 1160 -432 1000 -432
WIRE 1352 -432 1352 -480
WIRE -1704 -416 -1704 -480
WIRE -1544 -416 -1544 -480
WIRE -1544 -416 -1560 -416
WIRE 1160 -400 1160 -432
WIRE 1000 -384 1000 -432
WIRE 1512 -352 1512 -544
WIRE 1352 -304 1352 -352
WIRE 1448 -304 1352 -304
WIRE 776 -272 776 -624
WIRE 776 -272 696 -272
WIRE 1784 -272 1784 -624
WIRE 1992 -272 1992 -384
WIRE 1992 -272 1784 -272
WIRE 2088 -272 2088 -368
WIRE 2088 -272 1992 -272
WIRE -2632 -256 -2808 -256
WIRE 1160 -256 1160 -320
WIRE -2520 -224 -2808 -224
WIRE -2248 -224 -2520 -224
WIRE -2104 -224 -2248 -224
WIRE 1000 -208 1000 -320
WIRE 1096 -208 1000 -208
WIRE 1352 -208 1352 -304
WIRE 696 -192 696 -272
WIRE 1000 -176 1000 -208
WIRE 1512 -176 1512 -256
WIRE -2248 -80 -2248 -224
WIRE -1736 -80 -1752 -80
WIRE 696 -80 696 -112
WIRE 1000 -80 1000 -96
WIRE 1352 -80 1352 -144
WIRE 1512 -80 1512 -96
WIRE 1512 -80 1352 -80
WIRE 1512 -48 1512 -80
WIRE 1160 -16 1160 -160
WIRE 1160 -16 1032 -16
WIRE 1288 -16 1160 -16
WIRE -664 0 -712 0
WIRE -280 0 -280 -32
WIRE -712 16 -712 0
WIRE -2104 32 -2136 32
WIRE -1960 32 -2024 32
WIRE -1864 32 -1960 32
WIRE -1752 32 -1752 -80
WIRE -1752 32 -1768 32
WIRE -1688 32 -1752 32
WIRE -1592 32 -1592 -80
WIRE -1592 32 -1624 32
WIRE -1336 32 -1560 32
WIRE -2136 48 -2248 -80
WIRE -2136 48 -2136 32
WIRE -1960 48 -1960 32
WIRE -1592 48 -1592 32
WIRE -1560 48 -1560 32
WIRE -1560 48 -1592 48
WIRE -664 48 -664 0
WIRE 1032 48 1032 -16
WIRE 1288 48 1288 -16
WIRE 776 96 776 -272
WIRE 968 96 776 96
WIRE 1784 96 1784 -272
WIRE 1784 96 1352 96
WIRE -2136 112 -2136 48
WIRE -2008 112 -2136 112
WIRE -1816 112 -1816 96
WIRE -1816 112 -1912 112
WIRE -1736 112 -1816 112
WIRE -1592 112 -1592 48
WIRE -1592 112 -1656 112
WIRE -280 144 -280 80
WIRE -216 144 -280 144
WIRE 2808 144 2808 64
WIRE -216 160 -216 144
WIRE 1032 192 1032 144
WIRE -888 208 -936 208
WIRE 2584 224 2584 192
WIRE -888 240 -888 208
WIRE 1208 240 1096 240
WIRE 1288 240 1288 144
WIRE 1288 240 1208 240
WIRE -664 256 -664 128
WIRE -664 256 -712 256
WIRE -280 272 -280 144
WIRE 2520 272 2296 272
WIRE 1208 288 1208 240
WIRE 2808 352 2808 224
WIRE 1032 368 1032 288
WIRE 2296 368 2296 272
WIRE 2296 368 1032 368
WIRE -280 384 -280 352
WIRE 2584 400 2584 320
WIRE 2744 400 2584 400
WIRE -888 416 -888 320
WIRE 1032 416 1032 368
WIRE 2584 448 2584 400
WIRE 2808 464 2808 448
WIRE 1032 560 1032 496
WIRE 2584 560 2584 528
WIRE 2696 560 2584 560
WIRE 2808 560 2808 544
WIRE 2808 560 2696 560
WIRE 2696 576 2696 560
WIRE -1848 672 -2184 672
WIRE -1576 688 -1560 656
WIRE -1464 688 -1480 656
WIRE -1464 720 -1464 688
WIRE -1432 720 -1464 720
WIRE -1432 736 -1432 720
WIRE -1960 752 -1992 752
WIRE -1848 752 -1848 672
WIRE -1848 752 -1896 752
WIRE -1800 752 -1848 752
WIRE -1704 752 -1736 752
WIRE -1576 752 -1576 688
WIRE -1544 752 -1576 752
WIRE -1464 752 -1464 720
WIRE -1464 752 -1496 752
WIRE -1704 800 -1704 752
WIRE -1592 800 -1704 800
WIRE -1560 800 -1592 800
WIRE -1400 800 -1480 800
WIRE -2184 832 -2184 672
WIRE -1592 832 -1592 800
WIRE -1992 848 -1992 752
WIRE -1960 848 -1992 848
WIRE -1848 848 -1896 848
WIRE -1800 848 -1848 848
WIRE -1704 848 -1704 800
WIRE -1704 848 -1736 848
WIRE -1592 912 -1592 896
WIRE -1592 912 -1752 912
WIRE -2184 944 -2184 912
WIRE -2184 944 -2264 944
WIRE -1752 960 -1752 912
WIRE -1592 960 -1592 912
WIRE -2264 976 -2264 944
WIRE -2184 992 -2184 944
WIRE -1992 1072 -1992 848
WIRE -1592 1072 -1592 1024
WIRE -1592 1072 -1992 1072
WIRE -1544 1072 -1592 1072
WIRE -1400 1072 -1464 1072
WIRE -2184 1120 -2184 1072
WIRE -1848 1120 -1848 848
WIRE -1848 1120 -2184 1120
WIRE -1528 1120 -1560 1120
WIRE -1448 1120 -1480 1120
WIRE -1592 1152 -1592 1136
WIRE -1560 1152 -1560 1120
WIRE -1560 1152 -1592 1152
WIRE -1560 1184 -1560 1152
WIRE -1448 1184 -1448 1120
WIRE -1544 1216 -1560 1184
WIRE -1464 1216 -1448 1184
FLAG -216 160 0
FLAG -280 -32 +VCC
FLAG -280 384 -VCC
FLAG 696 -80 0
FLAG 2584 -864 0
FLAG 2584 192 0
FLAG -936 208 +Vreg
FLAG -712 256 -Vreg
FLAG 1512 -944 +Vreg
FLAG 1512 -48 -Vreg
FLAG 1160 -464 +Vreg
FLAG 1208 288 -Vreg
FLAG 1000 -80 0
FLAG 1352 -480 0
FLAG -888 416 0
FLAG -712 16 0
FLAG -2264 976 0
FLAG -1752 960 0
FLAG -1400 800 +VCC_real
FLAG -1400 1072 -VCC_real
FLAG -1432 736 0
FLAG -2456 -800 +VCC_connected
FLAG -2520 -224 -VCC_connected
FLAG -2744 -816 +VCC
FLAG -2744 -784 +VCC_real
FLAG -2808 -256 -VCC
FLAG -2808 -224 -VCC_real
FLAG -1592 1136 0
FLAG 1368 -1200 +VCC_lim
FLAG 1032 560 -VCC_lim
FLAG 2696 -1216 +VCC_lim
FLAG 2696 576 -VCC_lim
FLAG -1304 -608 +VCC_lim
FLAG -1336 32 -VCC_lim
FLAG 2088 -512 0
FLAG 2808 -704 0
FLAG 2808 64 0
SYMBOL voltage -280 -16 R0
SYMATTR InstName V+VCC
SYMATTR Value {VCC}
SYMBOL voltage -280 256 R0
SYMATTR InstName V-VCC
SYMATTR Value {VCC}
SYMBOL npn 2744 352 R0
SYMATTR InstName Q9
SYMATTR Value MJE340
SYMBOL res 2792 448 R0
SYMATTR InstName R8
SYMATTR Value {rvas}
SYMBOL npn 2520 224 R0
SYMATTR InstName Q10
SYMATTR Value MPSA42
SYMBOL res 2104 -352 R180
SYMATTR InstName R11
SYMATTR Value 10k
SYMBOL res 680 -208 R0
SYMATTR InstName R12
SYMATTR Value 10k
SYMBOL pnp 2520 -896 M180
SYMATTR InstName Q13
SYMATTR Value MPSA92
SYMBOL pnp 2744 -992 M180
SYMATTR InstName Q14
SYMATTR Value MJE350
SYMBOL res 2792 -1200 R0
SYMATTR InstName R13
SYMATTR Value {rvas}
SYMBOL cap 2008 -384 R180
SYMATTR InstName C_comp_3
SYMATTR Value 4p
SYMBOL voltage -664 32 R0
SYMATTR InstName V+Vreg
SYMATTR Value {Vreg}
SYMBOL npn 1448 -352 R0
SYMATTR InstName Q_curr1
SYMATTR Value MMPQ2222A
SYMBOL npn 1304 -672 R0
SYMATTR InstName Q17
SYMATTR Value MMPQ2222A
SYMBOL npn 1704 -672 M0
SYMATTR InstName Q18
SYMATTR Value MMPQ2222A
SYMBOL res 1336 -448 R0
SYMATTR InstName R_led1
SYMATTR Value 6.8k
SYMBOL res 1496 -192 R0
SYMATTR InstName RE_curr1
SYMATTR Value {rcurr}
SYMBOL LED 1336 -208 R0
SYMATTR InstName D_1
SYMATTR Value LED18
SYMBOL res 1352 -1152 R0
SYMATTR InstName RC1
SYMATTR Value {RC}
SYMBOL npn 1432 -944 M0
SYMATTR InstName Q19
SYMATTR Value MMPQ2222A
SYMBOL res 1144 -416 R0
SYMATTR InstName RE_curr2
SYMATTR Value {rcurr}
SYMBOL pnp 1096 -160 M180
SYMATTR InstName Q_curr2
SYMATTR Value MMPQ2907A
SYMBOL pnp 968 144 M180
SYMATTR InstName Q20
SYMATTR Value MMPQ2907A
SYMBOL pnp 1096 288 R180
SYMATTR InstName Q21
SYMATTR Value MMPQ2907A
SYMBOL res 1016 400 R0
SYMATTR InstName RC2
SYMATTR Value {RC}
SYMBOL pnp 1352 144 R180
SYMATTR InstName Q22
SYMATTR Value MMPQ2907A
SYMBOL LED 984 -384 R0
SYMATTR InstName D_2
SYMATTR Value LED18
SYMBOL res 984 -192 R0
SYMATTR InstName R_led2
SYMATTR Value 6.8k
SYMBOL res 2568 432 R0
SYMATTR InstName RECC2
SYMATTR Value 1k
SYMBOL res 2568 -1168 R0
SYMATTR InstName RECC1
SYMATTR Value 1k
SYMBOL voltage -888 224 R0
SYMATTR InstName V-Vreg
SYMATTR Value {Vreg}
SYMBOL voltage -2184 816 R0
SYMATTR InstName V2
SYMATTR Value SINE(0 71 50)
SYMBOL diode -1960 768 R270
SYMATTR InstName D7
SYMBOL diode -1800 768 R270
SYMATTR InstName D8
SYMBOL diode -1960 864 R270
SYMATTR InstName D9
SYMBOL diode -1800 864 R270
SYMATTR InstName D10
SYMBOL cap -1608 832 R0
SYMATTR InstName C8
SYMATTR Value 4.7m
SYMBOL voltage -2184 976 R0
SYMATTR InstName V3
SYMATTR Value SINE(0 71 50)
SYMBOL cap -1608 960 R0
SYMATTR InstName C9
SYMATTR Value 4.7m
SYMBOL sw -1464 800 R90
SYMATTR InstName S2
SYMBOL voltage -1576 656 R270
SYMATTR InstName V7
SYMATTR Value PULSE(-1 1 {ton})
SYMBOL sw -1560 1072 R270
SYMATTR InstName S5
SYMBOL voltage -1448 1216 R90
SYMATTR InstName V13
SYMATTR Value PULSE(-1 1 {ton})
SYMBOL res -1592 -576 R90
SYMATTR InstName R24
SYMATTR Value 25
SYMBOL res -1960 -496 R90
SYMATTR InstName R25
SYMATTR Value 1k
SYMBOL npn -1816 -544 M90
SYMATTR InstName Q27
SYMATTR Value MPSA42
SYMBOL npn -1960 -496 R270
SYMATTR InstName Q28
SYMATTR Value MJE340
SYMBOL res -1640 128 M270
SYMATTR InstName R28
SYMATTR Value 25
SYMBOL res -2008 48 M270
SYMATTR InstName R29
SYMATTR Value 1k
SYMBOL pnp -2008 48 M90
SYMATTR InstName Q29
SYMATTR Value MJE350
SYMBOL pnp -1864 96 R270
SYMATTR InstName Q30
SYMATTR Value MJE350
SYMBOL zener -1624 16 R90
SYMATTR InstName D18
SYMATTR Value ZEN2
SYMATTR Description Light Emitting Diode
SYMATTR Type led
SYMBOL LED -1672 -96 R90
SYMATTR InstName D19
SYMATTR Value LED18
SYMBOL res -1576 -96 R90
SYMATTR InstName R30
SYMATTR Value 22
SYMBOL LED -1624 -400 R270
SYMATTR InstName D20
SYMATTR Value LED18
SYMBOL res -1608 -432 R90
SYMATTR InstName R31
SYMATTR Value 22
SYMBOL zener -1608 -496 R90
SYMATTR InstName D1
SYMATTR Value ZEN2
SYMBOL res 2792 -912 R0
SYMATTR InstName R1
SYMATTR Value 300
SYMBOL res 2792 128 R0
SYMATTR InstName R3
SYMATTR Value 300