* Z:\home\khalils\Downloads\files\data\raw_asc\ce839a6ac70d_Programmable_power_supply_protection.asc
* Generated by LTspice 26.0.1 for Windows.
* LDO Dropout Voltage Clamp - When dropout exceeds 7.5V M1 turns off \nand Q3 turns on resulting in voltage drop across R30 to protect LDO.
* LDO output feedback to buck \nconverter to maintain ~2V dropout
* Constant Voltage (CV) Mode Setpoint Control DAC & Amplifier
* Constant Current Mode Setpoint Control DAC and Error Amplifier
* Vout = 10*CV_DAC
* I_LIMIT = 1A/V * CC_DAC
* ORing diodes to select \nbetween CV and CC mode
* Power Supply Switches from CV mode \nto CC mode when load current exceeds \ncurrent limit setpoint
* Library below included based on ModelFile attribute of instance XU4, XU5 (C:\users\khalils\AppData\Local\LTspice\lib\sym\OpAmps\ADA4091.asy)
* Library below included based on ModelFile attribute of instance XU2, XU3 (C:\users\khalils\AppData\Local\LTspice\lib\sym\PowerProducts\LT3081.asy)
* Library below included based on ModelFile attribute of instance XU1 (C:\users\khalils\AppData\Local\LTspice\lib\sym\PowerProducts\LT8609.asy)
C4 BUCK_OUT 0 33 x3 V=6.3 Irms=0 Rser=0.002 Lser=0
R20 LDO_OUT N014 10m
R26 N026 0 1k
R5 N030 0 1k
R17 N007 BUCK_OUT 1m
VCV_DAC N033 0 2
C8 IMON VSET 1n
VCC_DAC N036 0 3
R28 N020 0 5k
R10 LDO_OUT N006 10m
C1 N021 0 .001
M1 N001 N026 N007 N007 FDS4685
R6 IMON 0 5K
C5 BUCK_OUT N022 1nF
R14 BUCK_OUT N029 1k
R1 N028 0 20k
XU2 N005 VSET IMON N004 N003 N002 LT3081 ;pnba Ilim)SET)Imon)OUT)Temp)IN
XU3 N019 VSET IMON N014 N013 N008 LT3081 ;pnba Ilim)SET)Imon)OUT)Temp)IN
R18 N014 N019 10k
R23 N035 N034 100
D2 VSET N032 1N5819
R25 N007 N015 10k
R16 LDO_OUT N023 100k
V1 IN 0 24 Rser=1m
R32 N026 N025 1m
D3 N024 N015 STZ6_8N
R24 N024 LDO_OUT 5k
R7 N004 N005 10k
R22 N032 N031 1
L1 N016 BUCK_OUT 2.2 Rser=3m
C2 N009 0 1
R12 N008 N001 1m
XU1 N011 N016 N009 N028 N010 N022 N021 NC_01 IN IN 0 LT8609 ;pnba BST)SW)INTVCC)RT)SYNC)FB)TR/SS)PG)VIN)EN/UV)GND
R9 LDO_OUT N004 10m
S1 0 LDO_OUT N012 0 SW
Q1 N022 N023 N029 0 2N3906
R31 N027 N026 1m
R11 0 N006 10k
V2 N012 0 PWL(0 0 1.29m 0 1.3m 5)
R13 N022 0 4k
R2 N013 0 1k
R21 N002 N001 1m
D1 VSET N035 1N5819
D4 N018 N001 1N5819
R3 N030 N031 9k
C6 N030 N031 100p
Q3 N017 N020 N025 0 2SCR562F3
C3 N011 N016 .1
Q2 N020 N015 N007 0 2SA2071P5
R30 N018 N027 2
XU5 N033 N030 IN 0 N031 ADA4091 ;pnba In+)In-)V+)V-)OUT
XU4 N036 IMON IN 0 N034 ADA4091 ;pnba In+)In-)V+)V-)OUT
R27 N007 N017 10m
R4 N003 0 1k
R15 N023 BUCK_OUT 100k
.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 10m startup
.model SW SW(Ron = 1 Roff = 100 Vt = 0.5 Vh = -.4)
.lib ADA4091.lib
.lib LT3081.sub
.lib LT8609.sub
.backanno
.end

* LTspice schematic (.asc):
Version 4.1
SHEET 1 5252 1796
WIRE 2880 -704 2672 -704
WIRE 3136 -704 2960 -704
WIRE 3136 -640 3136 -704
WIRE 3008 -576 2848 -576
WIRE 3328 -576 3264 -576
WIRE 3456 -576 3328 -576
WIRE 3696 -576 3536 -576
WIRE 3328 -560 3328 -576
WIRE 2960 -480 2944 -480
WIRE 3008 -480 2960 -480
WIRE 3328 -480 3264 -480
WIRE 2848 -464 2848 -576
WIRE 3568 -416 3520 -416
WIRE 3696 -416 3696 -576
WIRE 3696 -416 3648 -416
WIRE 3520 -400 3520 -416
WIRE 3136 -384 3136 -416
WIRE 3168 -384 3136 -384
WIRE 2848 -352 2848 -384
WIRE 304 -304 208 -304
WIRE 464 -304 304 -304
WIRE 3520 -304 3520 -320
WIRE 208 -288 208 -304
WIRE 464 -288 464 -304
WIRE 928 -288 848 -288
WIRE 1008 -288 928 -288
WIRE 1120 -288 1008 -288
WIRE 1632 -288 1200 -288
WIRE 1824 -288 1632 -288
WIRE 2000 -288 1824 -288
WIRE 2176 -288 2000 -288
WIRE 2464 -288 2272 -288
WIRE 2672 -288 2672 -704
WIRE 2672 -288 2464 -288
WIRE 2928 -288 2672 -288
WIRE 3136 -288 3008 -288
WIRE 1008 -272 1008 -288
WIRE 304 -240 304 -304
WIRE 320 -240 304 -240
WIRE 624 -240 608 -240
WIRE 704 -240 688 -240
WIRE 1632 -224 1632 -288
WIRE 3696 -224 3696 -416
WIRE 4048 -224 3696 -224
WIRE 4128 -224 4048 -224
WIRE 208 -192 208 -208
WIRE 1008 -176 1008 -208
WIRE 2000 -176 2000 -288
WIRE 2464 -176 2464 -288
WIRE 3136 -176 3136 -288
WIRE 4128 -160 4128 -224
WIRE 320 -144 304 -144
WIRE 640 -144 608 -144
WIRE 1824 -144 1824 -288
WIRE 4272 -144 4176 -144
WIRE 640 -128 640 -144
WIRE 3008 -112 2848 -112
WIRE 3328 -112 3264 -112
WIRE 3456 -112 3328 -112
WIRE 3696 -112 3696 -224
WIRE 3696 -112 3536 -112
WIRE 4272 -112 4272 -144
WIRE 1632 -96 1632 -144
WIRE 1760 -96 1632 -96
WIRE 3328 -96 3328 -112
WIRE 1632 -64 1632 -96
WIRE 640 -48 640 -64
WIRE 640 -48 608 -48
WIRE 688 -48 640 -48
WIRE 848 -48 848 -288
WIRE 848 -48 768 -48
WIRE 2000 -32 2000 -96
WIRE 2464 -32 2464 -112
WIRE 2960 -16 2944 -16
WIRE 3008 -16 2960 -16
WIRE 3328 -16 3264 -16
WIRE 4128 -16 4128 -80
WIRE 4176 -16 4176 -96
WIRE 4176 -16 4128 -16
WIRE 4272 -16 4272 -32
WIRE 4272 -16 4176 -16
WIRE 2848 0 2848 -112
WIRE 4128 0 4128 -16
WIRE 1824 16 1824 -48
WIRE 1936 16 1824 16
WIRE 240 48 208 48
WIRE 320 48 304 48
WIRE 688 48 608 48
WIRE 736 48 688 48
WIRE 848 48 848 -48
WIRE 848 48 800 48
WIRE 896 48 848 48
WIRE 1008 48 976 48
WIRE 1040 48 1008 48
WIRE 1216 48 1120 48
WIRE 1472 48 1216 48
WIRE 1632 48 1632 0
WIRE 1632 48 1552 48
WIRE 1824 64 1824 16
WIRE 3136 80 3136 48
WIRE 3168 80 3136 80
WIRE 2000 96 2000 64
WIRE 2064 96 2000 96
WIRE 2192 96 2192 -240
WIRE 2192 96 2144 96
WIRE 2304 96 2192 96
WIRE 2464 96 2464 48
WIRE 2464 96 2384 96
WIRE 2848 112 2848 80
WIRE 848 128 848 48
WIRE 2192 128 2192 96
WIRE 224 144 208 144
WIRE 320 144 304 144
WIRE 624 144 608 144
WIRE 1824 160 1824 144
WIRE 848 240 848 208
WIRE 2192 240 2192 208
WIRE 1008 288 1008 48
WIRE 1008 288 912 288
WIRE 688 352 688 48
WIRE 848 352 848 336
WIRE 848 352 688 352
WIRE 1216 352 1216 48
WIRE 1296 352 1216 352
WIRE 1344 352 1296 352
WIRE 848 368 848 352
WIRE 848 496 848 448
WIRE 1040 784 944 784
WIRE 1200 784 1120 784
WIRE 1408 784 1200 784
WIRE 1504 784 1408 784
WIRE 1408 832 1408 784
WIRE 1504 848 1504 784
WIRE 1200 928 1200 784
WIRE 1264 928 1200 928
WIRE 1408 944 1408 912
WIRE 1408 944 1328 944
WIRE 1504 944 1504 912
WIRE 1504 944 1408 944
WIRE 1632 944 1504 944
WIRE 1808 944 1712 944
WIRE 1952 944 1872 944
WIRE 1264 960 1008 960
WIRE 1008 1008 1008 960
WIRE 1008 1104 1008 1088
WIRE 1952 1120 1952 944
WIRE 2048 1120 1952 1120
WIRE 2096 1120 2048 1120
WIRE 1328 1296 1232 1296
WIRE 1952 1296 1952 1120
WIRE 1952 1296 1392 1296
WIRE 1056 1392 1008 1392
WIRE 1232 1392 1232 1296
WIRE 1232 1392 1056 1392
WIRE 1280 1392 1232 1392
WIRE 1456 1408 1344 1408
WIRE 1808 1408 1536 1408
WIRE 1952 1408 1952 1296
WIRE 1952 1408 1872 1408
WIRE 1280 1424 1152 1424
WIRE 1008 1456 1008 1392
WIRE 1152 1472 1152 1424
WIRE 1008 1568 1008 1536
WIRE 1152 1568 1152 1552
RECTANGLE Normal 1424 272 2544 -448 2
RECTANGLE Normal 1376 528 656 -16 2
RECTANGLE Normal 1600 1136 864 688 2
RECTANGLE Normal 1600 1680 864 1232 2
RECTANGLE Normal 1984 1488 1744 880 2
SYMBOL res 1216 -304 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R17
SYMATTR Value 1m
SYMBOL res 320 128 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R1
SYMATTR Value 20k
SYMBOL sw 4128 -64 R180
SYMATTR InstName S1
SYMBOL cap 624 -224 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName C2
SYMATTR Value 1ľ
SYMBOL voltage 1008 992 M0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName CV_DAC
SYMATTR Value 2
SYMBOL res 1616 -240 R0
SYMATTR InstName R25
SYMATTR Value 10k
SYMBOL npn 1936 -32 R0
SYMATTR InstName Q3
SYMATTR Value 2SCR562F3
SYMBOL res 2400 80 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R31
SYMATTR Value 1m
SYMBOL res 1136 32 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R16
SYMATTR Value 100k
SYMBOL OpAmps\\ADA4091 1296 880 R0
SYMATTR InstName U5
SYMBOL res 2976 -720 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R21
SYMATTR Value 1m
SYMBOL res 1568 32 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R24
SYMATTR Value 5k
SYMBOL cap 992 -272 R0
WINDOW 123 24 36 Left 2
SYMATTR Value2 x3
SYMATTR InstName C4
SYMATTR Value 33ľ
SYMATTR SpiceLine V=6.3 Irms=0 Rser=0.002 Lser=0
SYMBOL res 992 1440 R0
SYMATTR InstName R6
SYMATTR Value 5K
SYMBOL PowerProducts\\LT3081 3136 -64 R0
SYMATTR InstName U3
SYMBOL res 2176 112 R0
SYMATTR InstName R26
SYMATTR Value 1k
SYMBOL diode 1616 0 M180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D3
SYMATTR Value STZ6_8N
SYMBOL voltage 4272 -128 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value PWL(0 0 1.29m 0 1.3m 5)
SYMBOL res 2832 -16 R0
SYMATTR InstName R2
SYMATTR Value 1k
SYMBOL res 1392 816 R0
SYMATTR InstName R3
SYMATTR Value 9k
SYMBOL res 992 32 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R15
SYMATTR Value 100k
SYMBOL res 2832 -480 R0
SYMATTR InstName R4
SYMATTR Value 1k
SYMBOL res 3312 -576 R0
SYMATTR InstName R7
SYMATTR Value 10k
SYMBOL res 3552 -592 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R9
SYMATTR Value 10m
SYMBOL res 3024 -304 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R12
SYMATTR Value 1m
SYMBOL cap 304 32 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C1
SYMATTR Value .001ľ
SYMBOL pnp 912 336 R180
SYMATTR InstName Q1
SYMATTR Value 2N3906
SYMBOL pnp 1760 -48 M180
SYMATTR InstName Q2
SYMATTR Value 2SA2071P5
SYMBOL cap 1488 848 R0
SYMATTR InstName C6
SYMATTR Value 100p
SYMBOL res 3312 -112 R0
SYMATTR InstName R18
SYMATTR Value 10k
SYMBOL voltage 208 -304 R0
WINDOW 123 0 0 Left 0
WINDOW 39 24 44 Left 2
SYMATTR SpiceLine Rser=1m
SYMATTR InstName V1
SYMATTR Value 24
SYMBOL cap 624 -128 R0
SYMATTR InstName C3
SYMATTR Value .1ľ
SYMBOL ind 672 -32 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 5 56 VBottom 2
SYMATTR InstName L1
SYMATTR Value 2.2ľ
SYMATTR SpiceLine Rser=3m
SYMBOL cap 800 32 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C5
SYMATTR Value 1nF
SYMBOL res 3664 -432 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R10
SYMATTR Value 10m
SYMBOL diode 2480 -112 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D4
SYMATTR Value 1N5819
SYMBOL diode 1872 928 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName D2
SYMATTR Value 1N5819
SYMBOL res 1136 768 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R5
SYMATTR Value 1k
SYMBOL PowerProducts\\LT8609 464 -48 R0
SYMATTR InstName U1
SYMBOL res 1728 928 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R22
SYMATTR Value 1
SYMBOL res 2448 -48 R0
SYMATTR InstName R30
SYMATTR Value 2
SYMBOL pmos 2272 -240 M270
SYMATTR InstName M1
SYMATTR Value FDS4685
SYMBOL diode 1872 1392 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName D1
SYMATTR Value 1N5819
SYMBOL res 1808 48 R0
SYMATTR InstName R28
SYMATTR Value 5k
SYMBOL res 3552 -128 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R20
SYMATTR Value 10m
SYMBOL res 1552 1392 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R23
SYMATTR Value 100
SYMBOL cap 1328 1312 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName C8
SYMATTR Value 1n
SYMBOL res 3536 -304 R180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R11
SYMATTR Value 10k
SYMBOL res 832 112 R0
SYMATTR InstName R14
SYMATTR Value 1k
SYMBOL voltage 1152 1456 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName CC_DAC
SYMATTR Value 3
SYMBOL res 1984 -192 R0
SYMATTR InstName R27
SYMATTR Value 10m
SYMBOL res 832 352 R0
SYMATTR InstName R13
SYMATTR Value 4k
SYMBOL res 2160 80 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R32
SYMATTR Value 1m
SYMBOL PowerProducts\\LT3081 3136 -528 R0
SYMATTR InstName U2
SYMBOL OpAmps\\ADA4091 1312 1344 R0
SYMATTR InstName U4
FLAG 208 144 0
FLAG 208 48 0
FLAG 208 -192 0
FLAG 704 -240 0
FLAG 1008 -176 0
FLAG 208 -304 IN
FLAG 624 144 0
FLAG 2848 -352 0
FLAG 3520 -304 0
FLAG 848 496 0
FLAG 2848 112 0
FLAG 4128 0 0
FLAG 928 -288 BUCK_OUT
FLAG 3168 -384 VSET
FLAG 1312 1440 0
FLAG 1312 1376 IN
FLAG 1152 1568 0
FLAG 1008 1568 0
FLAG 2960 -480 IMON
FLAG 2960 -16 IMON
FLAG 1056 1392 IMON
FLAG 1296 976 0
FLAG 1296 912 IN
FLAG 1008 1104 0
FLAG 944 784 0
FLAG 2048 1120 VSET
FLAG 1296 352 LDO_OUT
FLAG 2192 240 0
FLAG 1824 160 0
FLAG 4048 -224 LDO_OUT
FLAG 3168 80 VSET
TEXT 312 264 Left 2 !.tran 10m startup
TEXT 3968 96 Left 2 !.model SW SW(Ron = 1 Roff = 100 Vt = 0.5 Vh = -.4)
TEXT 1440 -504 Left 2 ;LDO Dropout Voltage Clamp - When dropout exceeds 7.5V M1 turns off \nand Q3 turns on resulting in voltage drop across R30 to protect LDO.
TEXT 928 -64 Left 2 ;LDO output feedback to buck \nconverter to maintain ~2V dropout
TEXT 864 664 Left 2 ;Constant Voltage (CV) Mode Setpoint Control DAC & Amplifier
TEXT 864 1208 Left 2 ;Constant Current Mode Setpoint Control DAC and Error Amplifier
TEXT 1104 1096 Left 2 ;Vout = 10*CV_DAC
TEXT 1248 1584 Left 2 ;I_LIMIT = 1A/V * CC_DAC
TEXT 1744 824 Left 2 ;ORing diodes to select \nbetween CV and CC mode
TEXT 2016 1200 Left 2 ;Power Supply Switches from CV mode \nto CC mode when load current exceeds \ncurrent limit setpoint