* Z:\home\khalils\Downloads\files\data\raw_asc\07fce9b80e89_reverse_polarity.asc
* Generated by LTspice 26.0.1 for Windows.
* M1 and M2 form a current mirror
* The diode and the mosfets form the reverse polarity protection circuit
* The NPN transistor and drive circuit emulate an SPST switch connected to GND
* The load shown is simply the LED power indicator
D2 N001 0 D
D1 Vsw Vrpp DFLZ33
R3 Vrpp N002 100k
M2 Vin Vsw Vrpp Vrpp Si4425BDY
R1 Vout N001 20k
V2 N003 0 PULSE(0 3.3V 1m 1m 1m 300m 600m)
R5 0 N004 10k
V1 Vin 0 PULSE(0 -25.2V 1m 1m 1m 2 4)
M1 Vout Vsw Vrpp Vrpp Si4425BDY
R6 N004 N003 10k
R2 Vsw N002 100k
Q1 N002 N004 0 0 NPN
.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 5s
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 880 720
WIRE -464 -32 -624 -32
WIRE -224 -32 -368 -32
WIRE -80 -32 -224 -32
WIRE -48 -32 -80 -32
WIRE 160 -32 48 -32
WIRE 224 -32 160 -32
WIRE -224 -16 -224 -32
WIRE -624 16 -624 -32
WIRE 160 32 160 -32
WIRE -32 48 -32 16
WIRE 32 48 -32 48
WIRE -384 80 -384 16
WIRE -224 80 -224 48
WIRE -224 80 -384 80
WIRE 32 80 32 48
WIRE 32 80 -224 80
WIRE -224 96 -224 80
WIRE -80 96 -80 -32
WIRE 32 96 32 80
WIRE -624 176 -624 96
WIRE 160 176 160 112
WIRE -224 288 -224 176
WIRE -80 288 -80 176
WIRE -80 288 -224 288
WIRE -80 368 -80 288
WIRE 160 368 160 240
WIRE -320 416 -416 416
WIRE -176 416 -240 416
WIRE -144 416 -176 416
WIRE -416 432 -416 416
WIRE -176 432 -176 416
WIRE -176 512 -416 512
WIRE -80 512 -80 464
WIRE -80 512 -176 512
WIRE -80 528 -80 512
IOPIN 224 -32 Out
SYMBOL res -240 80 R0
SYMATTR InstName R2
SYMATTR Value 100k
SYMBOL pmos 48 16 M270
SYMATTR InstName M1
SYMATTR Value Si4425BDY
SYMBOL res 144 16 R0
SYMATTR InstName R1
SYMATTR Value 20k
SYMBOL voltage -416 416 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 24 96 Invisible 2
SYMATTR Value PULSE(0 3.3V 1m 1m 1m 300m 600m)
SYMATTR InstName V2
SYMBOL res -160 528 R180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R5
SYMATTR Value 10k
SYMBOL npn -144 368 R0
SYMATTR InstName Q1
SYMBOL pmos -464 16 R270
SYMATTR InstName M2
SYMATTR Value Si4425BDY
SYMBOL voltage -624 0 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 24 96 Invisible 2
SYMATTR Value PULSE(0 -25.2V 1m 1m 1m 2 4)
SYMATTR InstName V1
SYMBOL LED 144 176 R0
SYMATTR InstName D2
SYMBOL zener -208 48 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D1
SYMATTR Value DFLZ33
SYMBOL res -224 400 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R6
SYMATTR Value 10k
SYMBOL res -96 80 R0
SYMATTR InstName R3
SYMATTR Value 100k
FLAG -624 176 0
FLAG 160 368 0
FLAG -224 -32 Vrpp
FLAG -624 -32 Vin
FLAG 224 -32 Vout
FLAG 32 96 Vsw
FLAG -80 528 0
TEXT -704 392 Left 2 !.tran 5s
TEXT -360 -312 Left 2 ;M1 and M2 form a current mirror
TEXT -360 -272 Left 2 ;The diode and the mosfets form the reverse polarity protection circuit
TEXT -464 576 Left 2 ;The NPN transistor and drive circuit emulate an SPST switch connected to GND
TEXT 296 208 Left 2 ;The load shown is simply the LED power indicator