* Z:\home\khalils\Downloads\files\data\raw_asc\04987d013199_inverter_P-channel.asc
* Generated by LTspice 26.0.1 for Windows.
* Non inverting switch
* D
* S
* G
* 5~0
* Inverting switch
* D
* S
* G
* 5~0
* En hancement type - is ENabled. Just means its normally OFF.\nThis one is P channel like PNP where N has more electrons and positive voltage\nremoves them. So GND will open it and Positive voltage will increase resistance.\nZero V on signal closes NPN transistor, Gate voltage rizes which closes mosfet.\nThis setup is called "High side driver" in order to be able to block current at the \npositive terminal of the appliance, rather then switching the negative terminal.\nSwitching negative terminal is easy with NChannel mosfet, because the load is on the\npositive side. Putting load on the S terminal would cause NChannel mosfet to not fully open
M1 N007 N004 N002 N002 AO6407
V2 N008 0 SINE(2.5 2.5 3 0)
R2 N010 N011 1Meg
M2 N006 N003 N001 N001 AO6407
Q3 N005 N011 0 0 BC547B
Q1 P001 N009 0 0 BC547B
Q4 N003 N005 0 0 BC547B
Rspeaker2 N006 0 8
R5 N005 N001 1Meg
R6 N003 N001 1Meg
Rspeaker1 N007 0 8
Rtest N004 P001 1m
V4 N010 0 SINE(2.5 2.5 3 0)
V3 N001 0 12
R3 N008 N009 1Meg
R4 N004 N002 1Meg
V1 N002 0 12
.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 0 0.44 0.09s 100m
.backanno
.end

* LTspice schematic (.asc):
Version 4.1
SHEET 1 1508 916
WIRE 1200 48 1088 48
WIRE 1328 48 1328 -32
WIRE 1328 48 1200 48
WIRE 304 64 304 -16
WIRE 304 64 176 64
WIRE 1088 64 1088 48
WIRE 1200 64 1200 48
WIRE 176 80 176 64
WIRE 1328 144 1328 48
WIRE 304 160 304 64
WIRE 1200 160 1200 144
WIRE 1280 160 1200 160
WIRE 176 176 176 160
WIRE 256 176 176 176
WIRE 176 224 176 176
WIRE 1200 224 1200 160
WIRE 1088 272 1088 144
WIRE 1136 272 1088 272
WIRE 1088 304 1088 272
WIRE 1328 304 1328 240
WIRE 1376 304 1328 304
WIRE 1488 304 1456 304
WIRE 304 320 304 256
WIRE 352 320 304 320
WIRE 464 320 432 320
WIRE 1488 320 1488 304
WIRE 464 336 464 320
WIRE 0 352 -16 352
WIRE 112 352 80 352
WIRE 912 352 896 352
WIRE 1024 352 992 352
WIRE 1200 368 1200 320
WIRE 176 432 176 400
WIRE 1088 432 1088 400
SYMBOL res 1360 320 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName speaker2
SYMATTR Value 8
SYMBOL voltage 0 352 R90
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 0 24 16 Invisible 2
WINDOW 3 24 96 Invisible 2
SYMATTR InstName V2
SYMATTR Value SINE(2.5 2.5 3 0)
SYMBOL voltage 912 352 R90
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 0 24 16 Invisible 2
WINDOW 3 24 96 Invisible 2
SYMATTR InstName V4
SYMATTR Value SINE(2.5 2.5 3 0)
SYMBOL voltage 1328 -16 R180
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 0 24 16 Invisible 2
WINDOW 3 7 6 Left 2
SYMATTR InstName V3
SYMATTR Value 12
SYMBOL pmos 1280 240 M180
SYMATTR InstName M2
SYMATTR Value AO6407
SYMBOL res 896 368 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R2
SYMATTR Value 1Meg
SYMBOL res 1216 160 R180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R6
SYMATTR Value 1Meg
SYMBOL npn 1136 224 R0
SYMATTR InstName Q4
SYMATTR Value BC547B
SYMBOL npn 1024 304 R0
SYMATTR InstName Q3
SYMATTR Value BC547B
SYMBOL res -16 368 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R3
SYMATTR Value 1Meg
SYMBOL npn 112 304 R0
SYMATTR InstName Q1
SYMATTR Value BC547B
SYMBOL voltage 304 0 R180
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 0 24 16 Invisible 2
WINDOW 3 7 6 Left 2
SYMATTR InstName V1
SYMATTR Value 12
SYMBOL res 336 336 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName speaker1
SYMATTR Value 8
SYMBOL pmos 256 256 M180
SYMATTR InstName M1
SYMATTR Value AO6407
SYMBOL res 1104 160 R180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R5
SYMATTR Value 1Meg
SYMBOL res 192 176 R180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R4
SYMATTR Value 1Meg
SYMBOL res 160 208 R0
SYMATTR InstName test
SYMATTR Value 1m
FLAG 304 -96 0
FLAG 464 336 0
FLAG 176 432 0
FLAG -96 352 0
FLAG 1328 -112 0
FLAG 1488 320 0
FLAG 1088 432 0
FLAG 816 352 0
FLAG 1200 368 0
TEXT -360 -48 Left 2 !.tran 0 0.44 0.09s 100m
TEXT -40 -48 Left 2 ;Non inverting switch
TEXT 312 152 Left 2 ;D
TEXT 312 256 Left 2 ;S
TEXT 240 208 Left 2 ;G
TEXT -80 400 Left 2 ;5~0
TEXT 984 -64 Left 2 ;Inverting switch
TEXT 1336 136 Left 2 ;D
TEXT 1336 240 Left 2 ;S
TEXT 1264 192 Left 2 ;G
TEXT 832 400 Left 2 ;5~0
TEXT -160 472 Left 2 ;En hancement type - is ENabled. Just means its normally OFF.\nThis one is P channel like PNP where N has more electrons and positive voltage\nremoves them. So GND will open it and Positive voltage will increase resistance.\nZero V on signal closes NPN transistor, Gate voltage rizes which closes mosfet.\nThis setup is called "High side driver" in order to be able to block current at the \npositive terminal of the appliance, rather then switching the negative terminal.\nSwitching negative terminal is easy with NChannel mosfet, because the load is on the\npositive side. Putting load on the S terminal would cause NChannel mosfet to not fully open