* Z:\home\khalils\Downloads\files\data\raw_asc\6325d77f7771_Draft11.asc
* Generated by LTspice 26.0.1 for Windows.
* 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)
C3 FCOM N011 100n
R8 N003 N018 500k
R6 N001 N002 800R
C5 FCOM N008 1p
M3 N021 N015 N012 N012 IRFP9240
R18 N009 ERR 100k
D13 N015 N012 D
V3 0 N013 36
Q1 N004 N003 N002 0 2N3906
D7 FVCC N004 D
R22 N019 N022 25k
D6 FVEE FCOM D
Q5 FVCC N008 P001 0 2SC5200
C7 FVCC FCOM 100n
XU4 N017 N014 FVCC FVEE N014 LT1006 ;pnba In+)In-)V+)V-)OUT
D1 FCOM N004 Z19V
Q4 N018 N020 N021 0 2N3904
R2 FCOM 0 1k
R5 FCOM P002 0.5R
C2 N004 FCOM 100n
Q6 FVEE N008 P002 0 2SA1943
D14 N015 N011 D
C8 N008 N009 1n
R10 N016 N014 25k
C9 FCOM FVEE 100n
R12 N010 FCOM 10R
R3 P001 FCOM 0.5R
D10 N012 N013 D
D12 N004 N005 D
Q2 N011 N018 N020 0 2N3904
M4 N012 N011 FVEE FVEE IRFP9240
Q3 N003 N002 N001 0 2N3906
V1 N001 0 200
V2 N007 0 36
V6 N022 FCOM -1
R9 N017 0 18k
R21 FCOM N019 25k
XU1 N010 N009 FVCC FVEE N008 LT1006 ;pnba In+)In-)V+)V-)OUT
C1 N010 0 1n
D2 N011 FCOM Z19V
D8 N011 FVEE D
R11 ERR N016 25k
R1 N020 N021 800R
D5 FCOM FVCC D
XU2 N019 N016 FVCC FVEE ERR LT1006 ;pnba In+)In-)V+)V-)OUT
D9 N007 N006 D
M1 N001 N005 N006 N006 IRFP240
M2 N006 N004 FVCC FVCC IRFP240
R7 FCOM N008 300R
V4 0 N021 200
D11 N006 N005 D
R4 FCOM N017 2k
.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
.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
SYMBOL zener 640 304 R180
WINDOW 0 24 64 Left 2
WINDOW 3 54 30 Left 2
SYMATTR InstName D2
SYMATTR Value Z19V
SYMBOL pmos 1184 592 M180
SYMATTR InstName M4
SYMATTR Value IRFP9240
SYMBOL diode 1120 752 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName D14
SYMBOL res 2368 976 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R22
SYMATTR Value 25k
SYMBOL diode 1232 656 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D10
SYMBOL OpAmps\\LT1006 2112 704 R0
SYMATTR InstName U4
SYMBOL cap 1520 -80 R0
SYMATTR InstName C9
SYMATTR Value 100n
SYMBOL res 1936 688 R0
SYMATTR InstName R4
SYMATTR Value 2k
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
SYMBOL res 1936 768 R0
SYMATTR InstName R9
SYMATTR Value 18k
SYMBOL diode 1200 -272 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D11
SYMBOL res 608 -560 R0
SYMATTR InstName R6
SYMATTR Value 800R
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 880 224 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R12
SYMATTR Value 10R
SYMBOL res 1216 128 R0
SYMATTR InstName R3
SYMATTR Value 0.5R
SYMBOL OpAmps\\LT1006 928 160 R0
SYMATTR InstName U1
SYMBOL diode 1200 -16 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D7
SYMBOL cap 656 176 R0
SYMATTR InstName C2
SYMATTR Value 100n
SYMBOL pnp 560 -368 M180
SYMATTR InstName Q1
SYMATTR Value 2N3906
SYMBOL nmos 1184 -160 R0
SYMATTR InstName M2
SYMATTR Value IRFP240
SYMBOL cap 672 240 R0
SYMATTR InstName C3
SYMATTR Value 100n
SYMBOL diode 1200 768 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D13
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 pnp 512 -416 R180
SYMATTR InstName Q3
SYMATTR Value 2N3906
SYMBOL res 2448 976 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R21
SYMATTR Value 25k
SYMBOL zener 640 240 R180
WINDOW 0 24 64 Left 2
WINDOW 3 56 35 Left 2
SYMATTR InstName D1
SYMATTR Value Z19V
SYMBOL cap 1168 160 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 -59 31 VTop 2
SYMATTR InstName C5
SYMATTR Value 1p
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 1296 -224 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName D9
SYMBOL res 608 896 R0
SYMATTR InstName R1
SYMATTR Value 800R
SYMBOL cap 1024 144 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 -59 31 VTop 2
SYMATTR InstName C8
SYMATTR Value 1n
SYMBOL diode 1552 224 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D5
SYMBOL diode 1008 -320 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D12
SYMBOL npn 1168 48 R0
SYMATTR InstName Q5
SYMATTR Value 2SC5200
SYMBOL cap 1520 -144 R0
SYMATTR InstName C7
SYMATTR Value 100n
SYMBOL npn 560 816 R0
SYMATTR InstName Q2
SYMATTR Value 2N3904
SYMBOL diode 1200 512 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D8
SYMBOL pnp 1168 400 M180
WINDOW 3 85 0 Left 2
SYMATTR Value 2SA1943
SYMATTR InstName Q6
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 res 2448 752 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R11
SYMATTR Value 25k
SYMBOL OpAmps\\LT1006 2400 816 R0
SYMATTR InstName U2
SYMBOL diode 1568 288 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D6
SYMBOL res 1200 208 R90
WINDOW 0 81 66 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R7
SYMATTR Value 300R
SYMBOL res 896 64 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R18
SYMATTR Value 100k
SYMBOL cap 848 288 R0
SYMATTR InstName C1
SYMATTR Value 1n
SYMBOL pmos 1184 848 M180
SYMATTR InstName M3
SYMATTR Value IRFP9240
SYMBOL nmos 1184 -416 R0
SYMATTR InstName M1
SYMATTR Value IRFP240
SYMBOL res 1216 208 R0
SYMATTR InstName R5
SYMATTR Value 0.5R
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 res 432 -32 R0
SYMATTR InstName R8
SYMATTR Value 500k
SYMBOL res 1712 208 R0
SYMATTR InstName R2
SYMATTR Value 1k
SYMBOL npn 512 864 M0
SYMATTR InstName Q4
SYMATTR Value 2N3904
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
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.