* Z:\home\khalils\Downloads\files\data\raw_asc\6325d77f7771_Draft11.asc
* Generated by LTspice 26.0.1 for Windows.
Q1 N004 N003 N002 0 2N3906
Q3 N003 N002 N001 0 2N3906
R6 N001 N002 800R
V1 N001 0 200
V4 0 N021 200
R8 N003 N018 500k
D1 FCOM N004 Z19V
D2 N011 FCOM Z19V
Q2 N011 N018 N020 0 2N3904
R1 N020 N021 800R
Q4 N018 N020 N021 0 2N3904
Q5 FVCC N008 P001 0 2SC5200
Q6 FVEE N008 P002 0 2SA1943
R3 P001 FCOM 0.5R
R5 FCOM P002 0.5R
R7 FCOM N008 300R
M2 N006 N004 FVCC FVCC IRFP240
M4 N012 N011 FVEE FVEE IRFP9240
XU1 N010 N009 FVCC FVEE N008 LT1006 ;pnba In+)In-)V+)V-)OUT
C2 N004 FCOM 100n
C3 FCOM N011 100n
C5 FCOM N008 1p
R2 FCOM 0 1k
C7 FVCC FCOM 100n
D5 FCOM FVCC D
D6 FVEE FCOM D
D7 FVCC N004 D
D8 N011 FVEE D
D9 N007 N006 D
V2 N007 0 36
D10 N012 N013 D
V3 0 N013 36
M1 N001 N005 N006 N006 IRFP240
D11 N006 N005 D
D12 N004 N005 D
M3 N021 N015 N012 N012 IRFP9240
D13 N015 N012 D
D14 N015 N011 D
R4 FCOM N017 2k
R9 N017 0 18k
XU4 N017 N014 FVCC FVEE N014 LT1006 ;pnba In+)In-)V+)V-)OUT
C9 FCOM FVEE 100n
XU2 N019 N016 FVCC FVEE ERR LT1006 ;pnba In+)In-)V+)V-)OUT
R10 N016 N014 25k
R11 ERR N016 25k
C8 N008 N009 1n
R18 N009 ERR 100k
R12 N010 FCOM 10R
C1 N010 0 1n
R21 FCOM N019 25k
R22 N019 N022 25k
V6 N022 FCOM -1
.model D D
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.dio
.model NPN NPN
.model PNP PNP
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.bjt
.model NMOS NMOS
.model PMOS PMOS
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.mos
.tran 3ms
.include my.lib
.model Z19V ako: BZX84C33VL bv=19
.include standard.bjt
* 4W-HI
* see ad8479 for diff amp.
* Ok, this works for a short time. outputs -10V. in response to 1V set,
* differential integrator. eg. cap on the plus input to gnd.
* voltage feedback must be inverted.\nbecause it is now upside down.
* seems better when cap is smaller?
* and we can add the VSET voltage the same.
* Library below included based on ModelFile attribute of instance XU1, XU4, XU2 (C:\users\khalils\AppData\Local\LTspice\lib\sym\OpAmps\LT1006.asy)
.lib LTC.lib
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 3524 1344
WIRE 624 -544 448 -544
WIRE 1232 -544 624 -544
WIRE 1328 -544 1232 -544
WIRE 448 -512 448 -544
WIRE 624 -464 512 -464
WIRE 560 -416 448 -416
WIRE 1232 -416 1232 -544
WIRE 624 -336 624 -368
WIRE 1008 -336 624 -336
WIRE 1184 -336 1072 -336
WIRE 1232 -272 1232 -320
WIRE 1232 -272 1184 -272
WIRE 1232 -208 1232 -272
WIRE 1328 -208 1296 -208
WIRE 1232 -160 1232 -208
WIRE 624 -80 624 -336
WIRE 1184 -80 624 -80
WIRE 1680 -80 1536 -80
WIRE 1744 -80 1680 -80
WIRE 448 -16 448 -416
WIRE 1232 -16 1232 -64
WIRE 1232 -16 1184 -16
WIRE 1232 16 1232 -16
WIRE 1328 16 1232 16
WIRE 1232 48 1232 16
WIRE 1168 96 1088 96
WIRE 880 160 880 80
WIRE 960 160 880 160
WIRE 1040 160 1024 160
WIRE 624 176 624 -80
WIRE 672 176 624 176
WIRE 1088 176 1088 96
WIRE 1104 176 1088 176
WIRE 1200 176 1168 176
WIRE 880 208 880 160
WIRE 896 208 880 208
WIRE 1040 224 1040 160
WIRE 1040 224 960 224
WIRE 1072 224 1040 224
WIRE 1088 224 1088 176
WIRE 1088 224 1072 224
WIRE 1104 224 1088 224
WIRE 1200 224 1200 176
WIRE 1200 224 1184 224
WIRE 1232 224 1200 224
WIRE 1536 224 1232 224
WIRE 1552 224 1536 224
WIRE 1712 224 1552 224
WIRE 1728 224 1712 224
WIRE 336 240 160 240
WIRE 624 240 336 240
WIRE 672 240 624 240
WIRE 688 240 672 240
WIRE 784 240 688 240
WIRE 896 240 864 240
WIRE 864 288 864 240
WIRE 688 304 624 304
WIRE 1072 352 1072 224
WIRE 1168 352 1072 352
WIRE 1232 432 1232 400
WIRE 1328 432 1232 432
WIRE 1232 448 1232 432
WIRE 1232 448 1184 448
WIRE 1232 496 1232 448
WIRE 624 512 624 304
WIRE 1184 512 624 512
WIRE 1952 624 1888 624
WIRE 2304 624 1952 624
WIRE 1232 640 1232 592
WIRE 1344 640 1296 640
WIRE 1232 704 1232 640
WIRE 1232 704 1184 704
WIRE 1952 704 1952 624
WIRE 2160 704 2064 704
WIRE 1232 752 1232 704
WIRE 2064 752 2064 704
WIRE 2080 752 2064 752
WIRE 624 768 624 512
WIRE 1056 768 624 768
WIRE 1184 768 1120 768
WIRE 2160 768 2160 704
WIRE 2160 768 2144 768
WIRE 2272 768 2160 768
WIRE 2368 768 2352 768
WIRE 2448 768 2432 768
WIRE 2080 784 1952 784
WIRE 2448 784 2448 768
WIRE 2592 784 2448 784
WIRE 2640 784 2592 784
WIRE 624 816 624 768
WIRE 448 864 448 64
WIRE 560 864 448 864
WIRE 2352 864 2352 768
WIRE 2368 864 2352 864
WIRE 2448 880 2448 784
WIRE 2448 880 2432 880
WIRE 2368 896 2352 896
WIRE 624 912 512 912
WIRE 448 992 448 960
WIRE 624 992 448 992
WIRE 1232 992 1232 848
WIRE 1232 992 624 992
WIRE 1344 992 1232 992
WIRE 2272 992 2160 992
WIRE 2352 992 2352 896
FLAG 1328 -464 0
FLAG 1728 304 0
FLAG 1328 16 FVCC
FLAG 1328 432 FVEE
FLAG 1536 -144 FVCC
FLAG 1536 -16 FVEE
FLAG 1536 160 FVCC
FLAG 1552 288 FVEE
FLAG 1328 -128 0
FLAG 1344 560 0
FLAG 1344 912 0
FLAG 928 192 FVCC
FLAG 928 256 FVEE
FLAG 1712 224 FCOM
FLAG 1952 864 0
FLAG 2112 736 FVCC
FLAG 2112 800 FVEE
FLAG 1680 -80 FCOM
FLAG 1888 624 FCOM
FLAG 2400 848 FVCC
FLAG 2400 912 FVEE
FLAG 2432 992 FCOM
FLAG 336 240 FCOM
FLAG 2592 784 ERR
FLAG 800 80 ERR
FLAG 864 352 0
FLAG 2160 1072 FCOM
SYMBOL pnp 560 -368 M180
SYMATTR InstName Q1
SYMATTR Value 2N3906
SYMBOL pnp 512 -416 R180
SYMATTR InstName Q3
SYMATTR Value 2N3906
SYMBOL res 608 -560 R0
SYMATTR InstName R6
SYMATTR Value 800R
SYMBOL voltage 1328 -560 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 42 41 Left 2
SYMATTR Value 200
SYMATTR InstName V1
SYMBOL voltage 1344 896 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 0 36 39 Left 2
SYMATTR InstName V4
SYMATTR Value 200
SYMBOL res 432 -32 R0
SYMATTR InstName R8
SYMATTR Value 500k
SYMBOL zener 640 240 R180
WINDOW 0 24 64 Left 2
WINDOW 3 56 35 Left 2
SYMATTR InstName D1
SYMATTR Value Z19V
SYMBOL zener 640 304 R180
WINDOW 0 24 64 Left 2
WINDOW 3 54 30 Left 2
SYMATTR InstName D2
SYMATTR Value Z19V
SYMBOL npn 560 816 R0
SYMATTR InstName Q2
SYMATTR Value 2N3904
SYMBOL res 608 896 R0
SYMATTR InstName R1
SYMATTR Value 800R
SYMBOL npn 512 864 M0
SYMATTR InstName Q4
SYMATTR Value 2N3904
SYMBOL npn 1168 48 R0
SYMATTR InstName Q5
SYMATTR Value 2SC5200
SYMBOL pnp 1168 400 M180
WINDOW 3 85 0 Left 2
SYMATTR Value 2SA1943
SYMATTR InstName Q6
SYMBOL res 1216 128 R0
SYMATTR InstName R3
SYMATTR Value 0.5R
SYMBOL res 1216 208 R0
SYMATTR InstName R5
SYMATTR Value 0.5R
SYMBOL res 1200 208 R90
WINDOW 0 81 66 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R7
SYMATTR Value 300R
SYMBOL nmos 1184 -160 R0
SYMATTR InstName M2
SYMATTR Value IRFP240
SYMBOL pmos 1184 592 M180
SYMATTR InstName M4
SYMATTR Value IRFP9240
SYMBOL OpAmps\\LT1006 928 160 R0
SYMATTR InstName U1
SYMBOL cap 656 176 R0
SYMATTR InstName C2
SYMATTR Value 100n
SYMBOL cap 672 240 R0
SYMATTR InstName C3
SYMATTR Value 100n
SYMBOL cap 1168 160 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 -59 31 VTop 2
SYMATTR InstName C5
SYMATTR Value 1p
SYMBOL res 1712 208 R0
SYMATTR InstName R2
SYMATTR Value 1k
SYMBOL cap 1520 -144 R0
SYMATTR InstName C7
SYMATTR Value 100n
SYMBOL diode 1552 224 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D5
SYMBOL diode 1568 288 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D6
SYMBOL diode 1200 -16 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D7
SYMBOL diode 1200 512 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D8
SYMBOL diode 1296 -224 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName D9
SYMBOL voltage 1328 -224 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 42 41 Left 2
SYMATTR Value 36
SYMATTR InstName V2
SYMBOL diode 1232 656 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D10
SYMBOL voltage 1344 544 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 42 41 Left 2
SYMATTR Value 36
SYMATTR InstName V3
SYMBOL nmos 1184 -416 R0
SYMATTR InstName M1
SYMATTR Value IRFP240
SYMBOL diode 1200 -272 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D11
SYMBOL diode 1008 -320 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D12
SYMBOL pmos 1184 848 M180
SYMATTR InstName M3
SYMATTR Value IRFP9240
SYMBOL diode 1200 768 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D13
SYMBOL diode 1120 752 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName D14
SYMBOL res 1936 688 R0
SYMATTR InstName R4
SYMATTR Value 2k
SYMBOL res 1936 768 R0
SYMATTR InstName R9
SYMATTR Value 18k
SYMBOL OpAmps\\LT1006 2112 704 R0
SYMATTR InstName U4
SYMBOL cap 1520 -80 R0
SYMATTR InstName C9
SYMATTR Value 100n
SYMBOL OpAmps\\LT1006 2400 816 R0
SYMATTR InstName U2
SYMBOL res 2368 752 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R10
SYMATTR Value 25k
SYMBOL res 2448 752 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R11
SYMATTR Value 25k
SYMBOL cap 1024 144 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 -59 31 VTop 2
SYMATTR InstName C8
SYMATTR Value 1n
SYMBOL res 896 64 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R18
SYMATTR Value 100k
SYMBOL res 880 224 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R12
SYMATTR Value 10R
SYMBOL cap 848 288 R0
SYMATTR InstName C1
SYMATTR Value 1n
SYMBOL res 2448 976 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R21
SYMATTR Value 25k
SYMBOL res 2368 976 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R22
SYMATTR Value 25k
SYMBOL voltage 2160 976 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 0 36 39 Left 2
SYMATTR InstName V6
SYMATTR Value -1
TEXT -104 -288 Left 2 !.tran 3ms
TEXT -136 -176 Left 2 !.include my.lib
TEXT -192 -88 Left 2 !.model Z19V ako:  BZX84C33VL bv=19
TEXT -136 -144 Left 2 !.include standard.bjt
TEXT 1648 744 Left 2 ;4W-HI
TEXT 2400 408 Left 2 ;see ad8479 for diff amp.
TEXT 1920 328 Left 2 ;Ok, this works for a short time. outputs -10V. in response to 1V set,
TEXT 1920 -32 Left 2 ;differential integrator. eg. cap on the plus input to gnd.
TEXT 2216 1136 Left 2 ;voltage feedback must be inverted.\nbecause it is now upside down.
TEXT 1904 120 Left 2 ;seems better when cap is smaller?
TEXT 2200 1232 Left 2 ;and we can add the VSET voltage the same.