* SPICE netlist
R1 N001 0 1K
XU1 NC_01 N005 Imon N002 N001 IN LT3081 ;pnba Ilim)SET)Imon)OUT)Temp)IN
R3 N005 0 350K
Rload out 0 50
Rsense N003 N006 0.05
C2 N004 N006 4.7 V=50 Irms=0 Rser=0.0051 Lser=500p
R8 N010 0 1K
XU5 NC_02 N015 Imon N011 N010 IN LT3081 ;pnba Ilim)SET)Imon)OUT)Temp)IN
R10 N015 0 350K
V1 N014 0 20 Cpar=100uF
M2 out N004 N006 N006 FDS4953
M1 gate_drive N013 0 0 BSP89
V3 5V 0 6
R5 gate_drive IN 5k
R4 N011 N003 10m
R7 N002 N003 10m
M4 N008 N009 0 0 BSB012N03MX3
V4 N009 0 PULSE(0 5 1ms 1n 1n 25ms 50ms) Rser=100
R_short_circuit out N008 3
R6 N004 gate_drive 100
Vref N016 0 5 Rser=1k
XU3 N016 N012 5V 0 N013 AD8541 ;pnba In+)In-)V+)V-)OUT
R2 IN N014 0.5
Q1 N003 IN N014 0 2N4403
XU2 N006 0 0 N012 IN 0 N003 AD8410A ;pnba IN-)GND)REF2)OUT)VS)REF1)IN+
C1 N003 0 100F Rser=1 Lser=1nH
.tran 0 .6 0 10u startup

* LTspice schematic (.asc)
Version 4
SHEET 1 3088 1120
WIRE -1112 -560 -1128 -560
WIRE -792 -560 -1112 -560
WIRE -792 -528 -792 -560
WIRE -1016 -464 -1032 -464
WIRE -920 -464 -936 -464
WIRE -632 -464 -664 -464
WIRE -504 -464 -552 -464
WIRE -920 -368 -936 -368
WIRE -1544 -336 -1544 -384
WIRE 136 -336 72 -336
WIRE 280 -336 216 -336
WIRE 392 -336 280 -336
WIRE 280 -320 280 -336
WIRE -792 -288 -792 -304
WIRE 392 -272 392 -336
WIRE -1544 -240 -1544 -256
WIRE -504 -224 -504 -464
WIRE -392 -224 -504 -224
WIRE -248 -224 -392 -224
WIRE -200 -224 -248 -224
WIRE -72 -224 -120 -224
WIRE 280 -224 280 -256
WIRE 280 -224 -72 -224
WIRE 376 -224 280 -224
WIRE 1336 -224 472 -224
WIRE 1464 -224 1336 -224
WIRE 1544 -224 1464 -224
WIRE 1336 -208 1336 -224
WIRE -792 -192 -792 -208
WIRE 1544 -192 1544 -224
WIRE 392 -176 392 -192
WIRE 1336 -96 1336 -128
WIRE 1544 -96 1544 -112
WIRE -1128 -80 -1128 -560
WIRE -1128 -80 -1144 -80
WIRE -808 -80 -1128 -80
WIRE -808 -48 -808 -80
WIRE 552 -16 552 -64
WIRE 1288 -16 1128 -16
WIRE -1144 16 -1144 -80
WIRE -1144 16 -1352 16
WIRE -1032 16 -1048 16
WIRE -936 16 -952 16
WIRE -632 16 -680 16
WIRE -504 16 -504 -224
WIRE -504 16 -552 16
WIRE 1128 32 1128 -16
WIRE -1144 48 -1144 16
WIRE 552 80 552 64
WIRE 680 80 552 80
WIRE -1224 96 -1240 96
WIRE 552 96 552 80
WIRE -936 112 -952 112
WIRE -248 128 -248 -224
WIRE -8 128 -248 128
WIRE -1352 144 -1352 16
WIRE -1304 144 -1352 144
WIRE 1128 144 1128 112
WIRE 280 160 136 160
WIRE 504 176 344 176
WIRE -1144 192 -1144 128
WIRE -1144 192 -1240 192
WIRE -808 192 -808 176
WIRE -72 192 -72 -224
WIRE -8 192 -72 192
WIRE 280 192 232 192
WIRE -1144 208 -1144 192
WIRE 552 272 552 192
WIRE -808 288 -808 272
WIRE 232 288 232 192
WIRE -1144 304 -1144 288
WIRE 232 400 232 368
WIRE -1224 416 -1224 96
WIRE -408 416 -1224 416
WIRE -392 416 -392 -224
WIRE -392 416 -408 416
WIRE -408 464 -408 416
WIRE -408 560 -408 528
FLAG -1032 -464 0
FLAG -792 -192 0
FLAG 1544 -96 0
FLAG 232 400 0
FLAG 312 208 0
FLAG -1112 -560 IN
FLAG -1048 16 0
FLAG -808 288 0
FLAG -1144 304 0
FLAG 552 272 0
FLAG 552 -64 IN
FLAG 680 80 gate_drive
FLAG 72 -336 gate_drive
FLAG -1544 -240 0
FLAG -1544 -384 5V
FLAG 312 144 5V
FLAG 1336 0 0
FLAG 1128 144 0
FLAG 1464 -224 out
FLAG -936 -368 Imon
FLAG -952 112 Imon
FLAG 24 240 0
FLAG 56 240 0
FLAG 56 80 0
FLAG 24 80 IN
FLAG -408 560 0
SYMBOL res -920 -480 R90
SYMATTR InstName R1
SYMATTR Value 1K
SYMBOL PowerProducts\\LT3081 -792 -416 R0
SYMATTR InstName U1
SYMBOL res -808 -304 R0
SYMATTR InstName R3
SYMATTR Value 350K
SYMBOL res 1528 -208 R0
SYMATTR InstName Rload
SYMATTR Value 50
SYMBOL res -216 -208 R270
SYMATTR InstName Rsense
SYMATTR Value 0.05
SYMBOL cap 264 -320 R0
SYMATTR InstName C2
SYMATTR Value 4.7ľ
SYMATTR SpiceLine V=50 Irms=0 Rser=0.0051 Lser=500p
SYMBOL res -936 0 R90
SYMATTR InstName R8
SYMATTR Value 1K
SYMBOL PowerProducts\\LT3081 -808 64 R0
SYMATTR InstName U5
SYMBOL res -824 176 R0
SYMATTR InstName R10
SYMATTR Value 350K
SYMBOL voltage -1144 192 R0
SYMATTR SpiceLine Cpar=100uF
SYMATTR InstName V1
SYMATTR Value 20
SYMBOL pmos 472 -272 R90
SYMATTR InstName M2
SYMATTR Value FDS4953
SYMBOL nmos 504 96 R0
SYMATTR InstName M1
SYMATTR Value BSP89
SYMBOL voltage -1544 -352 R0
SYMATTR InstName V3
SYMATTR Value 6
SYMBOL res 568 80 R180
SYMATTR InstName R5
SYMATTR Value 5k
SYMBOL res -648 32 R270
SYMATTR InstName R4
SYMATTR Value 10m
SYMBOL res -648 -448 R270
SYMATTR InstName R7
SYMATTR Value 10m
SYMBOL nmos 1288 -96 R0
SYMATTR InstName M4
SYMATTR Value BSB012N03MX3
SYMBOL voltage 1128 16 R0
SYMATTR SpiceLine Rser=100
SYMATTR InstName V4
SYMATTR Value PULSE(0 5 1ms 1n 1n 25ms 50ms)
SYMBOL res 1320 -224 R0
SYMATTR InstName R_short_circuit
SYMATTR Value 3
SYMBOL res 232 -352 R90
SYMATTR InstName R6
SYMATTR Value 100
SYMBOL voltage 232 272 R0
SYMATTR SpiceLine Rser=1k
SYMATTR InstName Vref
SYMATTR Value 5
SYMBOL OpAmps\\AD8541 312 112 R0
SYMATTR InstName U3
SYMBOL res -1160 32 R0
SYMATTR InstName R2
SYMATTR Value 0.5
SYMBOL pnp -1304 96 R0
SYMATTR InstName Q1
SYMATTR Value 2N4403
SYMBOL OpAmps\\AD8410A 24 160 R0
SYMATTR InstName U2
SYMBOL cap -424 464 R0
SYMATTR InstName C1
SYMATTR Value 100ľF
SYMATTR SpiceLine Rser=1 Lser=1nH