* Z:\home\khalils\Downloads\files\data\raw_asc\499da0c5053a_Draft60.asc
* Generated by LTspice 26.0.1 for Windows.
* plus
* input 0-3v3 square wave input.\nfrom mcu/ oscillator etc
* plus
* - still have issue of potential flux walk\n- consider add protective diodes, across output bjt.\n- consider remove 0.1R. emitter degenerators\n -consider series resistor with output of bjt.\n- advantage of op-amp, can also drive with pure sine-wave
* ie. inverter
* https://sound-au.com/articles/cmpd-vs-darl.htm
* need to try, with two inverter configuration, and bypass level.\n \nalso try lo nmos hi /pmos . should be possible with square wave. \nand diodes for fast switch off
* OK. this works to clamp. but needs +-3v3 to drive.\ncannot bias non inverting input at 1.6V.\nbecause also need the termination at resisotrs.
* Library below included based on ModelFile attribute of instance XU1, XU2 (C:\users\khalils\AppData\Local\LTspice\lib\sym\OpAmps\LT1006.asy)
R7 N012 PRIM1 8k
R6 VCC N002 1k
Q5 N003 N008 PRIM1 0 2N3904
R5 0 N012 10k
XU2 0 N015 VCC VEE N017 LT1006 ;pnba In+)In-)V+)V-)OUT
Q1 N008 N006 N002 0 2N3906
D7 NC_01 NC_02 1N750
Q8 N020 N017 PRIM2 0 2N3906
L2 0 N001 8m
R4 N019 VEE 270
Q3 N006 N002 VCC 0 2N3906
Q6 N019 N016 PRIM1 0 2N3906
D2 N013 N016 D
R14 N014 N010 10k
Q10 PRIM1 N003 VCC 0 MJE15035
D5 N010 N012 1N4148
R16 N001 0 200R
R13 VCC N004 270
XU1 N018 N010 VCC VEE N016 LT1006 ;pnba In+)In-)V+)V-)OUT
V1 VCC 0 6
Q9 PRIM2 N004 VCC 0 MJE15035
K L1 L2 0.99
R1 VCC N005 1k
C1 PRIM1 N010 1n
R3 VCC N003 270
R9 N011 PRIM1 8k
R8 N006 VEE 20k
R11 0 N011 10k
Q2 N009 N007 N005 0 2N3906
D3 N009 P001 D
Q11 PRIM1 N019 VEE 0 MJE15034
VIN2 N018 0 0
D1 N008 N013 D
VIN1 N014 0 PULSE(-3.3 3.3 0 100n 100n 0.2ms 0.4ms 14)
R2 N007 VEE 20k
R17 N015 PRIM1 5k
D4 P001 N017 D
V2 0 VEE 6
L1 PRIM2 PRIM1 1m
Q7 N004 N009 PRIM2 0 2N3904
R15 N020 VEE 270
Q12 PRIM2 N020 VEE 0 MJE15034
R10 PRIM2 N015 5k
Q4 N007 N005 VCC 0 2N3906
D6 N011 N010 1N4148
.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
.tran 6ms
.include standard.bjt
.lib LTC.lib
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 3300 1956
WIRE 608 -288 464 -288
WIRE 2720 -208 2496 -208
WIRE 1008 -192 832 -192
WIRE 1072 -192 1008 -192
WIRE 1200 -192 1072 -192
WIRE 1344 -192 1200 -192
WIRE 1872 -192 1728 -192
WIRE 1968 -192 1872 -192
WIRE 2064 -192 1968 -192
WIRE 2240 -192 2064 -192
WIRE 832 -160 832 -192
WIRE 1344 -160 1344 -192
WIRE 1728 -160 1728 -192
WIRE 2240 -160 2240 -192
WIRE 2496 -160 2496 -208
WIRE 2720 -160 2720 -208
WIRE 1008 -112 896 -112
WIRE 1280 -112 1200 -112
WIRE 1872 -112 1792 -112
WIRE 2176 -112 2064 -112
WIRE 944 -64 832 -64
WIRE 2240 -64 2128 -64
WIRE 2496 -16 2496 -80
WIRE 2720 -16 2720 -80
WIRE 2720 -16 2496 -16
WIRE 1200 48 1200 -112
WIRE 1872 48 1872 -112
WIRE 2720 64 2720 -16
WIRE 1008 96 1008 -16
WIRE 1136 96 1008 96
WIRE 2064 96 2064 -16
WIRE 2064 96 1936 96
WIRE 592 112 320 112
WIRE 688 112 656 112
WIRE 1344 144 1344 -64
WIRE 1344 144 1200 144
WIRE 1728 144 1728 -64
WIRE 1872 144 1728 144
WIRE 320 160 320 112
WIRE 384 160 320 160
WIRE 480 160 448 160
WIRE 1008 176 1008 160
WIRE 1344 224 1344 144
WIRE 1456 224 1344 224
WIRE 1504 224 1456 224
WIRE 1664 224 1584 224
WIRE 1728 224 1728 144
WIRE 1728 224 1664 224
WIRE 224 288 112 288
WIRE 320 288 320 160
WIRE 320 288 304 288
WIRE 384 288 320 288
WIRE 480 288 480 240
WIRE 480 288 448 288
WIRE 688 288 688 192
WIRE 688 288 480 288
WIRE 752 288 688 288
WIRE 2224 288 2208 288
WIRE 2352 288 2304 288
WIRE 2400 288 2352 288
WIRE 2592 288 2480 288
WIRE 2640 288 2592 288
WIRE 1344 368 1344 224
WIRE 1344 368 1200 368
WIRE 1728 368 1728 224
WIRE 1872 368 1728 368
WIRE 320 400 320 288
WIRE 352 400 320 400
WIRE 2352 400 2352 288
WIRE 2352 400 2320 400
WIRE 1008 416 1008 240
WIRE 1008 416 416 416
WIRE 1104 416 1008 416
WIRE 1136 416 1104 416
WIRE 1968 416 1936 416
WIRE 2064 416 2064 224
WIRE 2064 416 1968 416
WIRE 2256 416 2064 416
WIRE 352 432 320 432
WIRE 2432 432 2320 432
WIRE 320 480 320 432
WIRE 1104 496 1104 416
WIRE 1968 496 1968 416
WIRE 1344 512 1344 368
WIRE 1728 512 1728 368
WIRE 1200 560 1200 464
WIRE 1200 560 1104 560
WIRE 1280 560 1200 560
WIRE 1872 560 1872 464
WIRE 1872 560 1792 560
WIRE 1968 560 1872 560
WIRE 1056 640 1008 640
WIRE 1200 640 1056 640
WIRE 1344 640 1344 608
WIRE 1344 640 1200 640
WIRE 1728 640 1728 608
WIRE 1872 640 1728 640
WIRE 2000 640 1872 640
WIRE 2112 640 2000 640
SYMBOL voltage 464 -384 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 42 41 Left 2
SYMATTR Value 6
SYMATTR InstName V1
SYMBOL zener 64 -128 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName D7
SYMATTR Value 1N750
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL ind2 2512 -64 R180
WINDOW 0 36 80 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName L2
SYMATTR Value 8m
SYMATTR Type ind
SYMBOL npn 1936 48 M0
SYMATTR InstName Q7
SYMATTR Value 2N3904
SYMBOL res 1184 -208 R0
SYMATTR InstName R3
SYMATTR Value 270
SYMBOL npn 1792 512 M0
SYMATTR InstName Q12
SYMATTR Value MJE15034
SYMBOL res 464 64 R0
SYMATTR InstName R5
SYMATTR Value 10k
SYMBOL pnp 1280 -64 M180
SYMATTR InstName Q10
SYMATTR Value MJE15035
SYMBOL pnp 1136 464 M180
SYMATTR InstName Q6
SYMATTR Value 2N3906
SYMBOL pnp 896 -64 R180
SYMATTR InstName Q3
SYMATTR Value 2N3906
SYMBOL res 672 16 R0
SYMATTR InstName R11
SYMATTR Value 10k
SYMBOL voltage 320 464 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 49 86 Left 2
WINDOW 0 50 63 Left 2
SYMATTR Value 0
SYMATTR InstName VIN2
SYMBOL pnp 1936 464 R180
SYMATTR InstName Q8
SYMATTR Value 2N3906
SYMBOL res 2320 304 M270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R17
SYMATTR Value 5k
SYMBOL res 848 -80 M0
SYMATTR InstName R8
SYMATTR Value 20k
SYMBOL res 2048 -208 R0
SYMATTR InstName R1
SYMATTR Value 1k
SYMBOL diode 992 96 R0
SYMATTR InstName D1
SYMBOL voltage 464 -304 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 42 41 Left 2
SYMATTR Value 6
SYMATTR InstName V2
SYMBOL res 1024 -208 M0
SYMATTR InstName R6
SYMATTR Value 1k
SYMBOL pnp 944 -16 M180
SYMATTR InstName Q1
SYMATTR Value 2N3906
SYMBOL diode 992 176 R0
SYMATTR InstName D2
SYMBOL diode 656 96 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName D6
SYMATTR Value 1N4148
SYMBOL diode 2080 96 M0
SYMATTR InstName D3
SYMBOL res 464 144 R0
SYMATTR InstName R7
SYMATTR Value 8k
SYMBOL res 1888 544 M0
SYMATTR InstName R15
SYMATTR Value 270
SYMBOL ind2 1600 208 R90
WINDOW 0 4 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName L1
SYMATTR Value 1m
SYMATTR Type ind
SYMBOL res 1888 -208 M0
SYMATTR InstName R13
SYMATTR Value 270
SYMBOL pnp 1792 -64 R180
SYMATTR InstName Q9
SYMATTR Value MJE15035
SYMBOL res 2224 -80 R0
SYMATTR InstName R2
SYMATTR Value 20k
SYMBOL OpAmps\\LT1006 384 352 R0
SYMATTR InstName U1
SYMBOL cap 448 272 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C1
SYMATTR Value 1n
SYMBOL npn 1136 48 R0
SYMATTR InstName Q5
SYMATTR Value 2N3904
SYMBOL pnp 2128 -16 R180
SYMATTR InstName Q2
SYMATTR Value 2N3906
SYMBOL res 2496 304 M270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R10
SYMATTR Value 5k
SYMBOL npn 1280 512 R0
SYMATTR InstName Q11
SYMATTR Value MJE15034
SYMBOL res 1184 544 R0
SYMATTR InstName R4
SYMATTR Value 270
SYMBOL res 208 304 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R14
SYMATTR Value 10k
SYMBOL diode 384 176 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D5
SYMATTR Value 1N4148
SYMBOL pnp 2176 -64 M180
SYMATTR InstName Q4
SYMATTR Value 2N3906
SYMBOL res 672 96 R0
SYMATTR InstName R9
SYMATTR Value 8k
SYMBOL OpAmps\\LT1006 2288 352 M0
SYMATTR InstName U2
SYMBOL res 2736 -176 M0
SYMATTR InstName R16
SYMATTR Value 200R
SYMBOL voltage 112 272 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 -394 165 Left 2
WINDOW 0 -23 -10 Left 2
SYMATTR Value PULSE(-3.3 3.3 0 100n 100n 0.2ms 0.4ms 14)
SYMATTR InstName VIN1
SYMBOL diode 2080 160 M0
SYMATTR InstName D4
FLAG 464 -368 VCC
FLAG 1456 224 PRIM1
FLAG 112 368 0
FLAG 1072 -192 VCC
FLAG 752 288 PRIM1
FLAG 608 -288 0
FLAG 320 560 0
FLAG 384 384 VCC
FLAG 1664 224 PRIM2
FLAG 1968 -192 VCC
FLAG 2288 384 VCC
FLAG 2592 288 PRIM2
FLAG 2432 432 0
FLAG 2720 64 0
FLAG 464 -208 VEE
FLAG 1056 640 VEE
FLAG 2000 640 VEE
FLAG 384 448 VEE
FLAG 2288 448 VEE
FLAG 832 16 VEE
FLAG 2240 16 VEE
FLAG 688 32 0
FLAG 480 80 0
FLAG 2208 288 PRIM1
TEXT 688 -392 Left 2 !.tran 6ms
TEXT 240 392 Left 2 ;plus
TEXT -232 544 Left 2 ;input 0-3v3 square wave input.\nfrom mcu/ oscillator etc
TEXT 240 -88 Left 2 !.include standard.bjt
TEXT 2432 392 Right 2 ;plus
TEXT 984 -576 Left 2 ;- still have issue of potential flux walk\n- consider add protective diodes, across output bjt.\n- consider remove 0.1R. emitter degenerators\n -consider series resistor with output of bjt.\n- advantage of op-amp, can also drive with pure sine-wave
TEXT 2480 -312 Left 2 !K  L1 L2 0.99
TEXT 2280 192 Left 2 ;ie. inverter
TEXT 400 848 Left 2 ;https://sound-au.com/articles/cmpd-vs-darl.htm
TEXT 2048 -464 Left 2 ;need to try,  with two inverter configuration, and bypass level.\n \nalso try lo nmos hi /pmos . should be possible with square wave. \nand diodes for fast switch off
TEXT -416 104 Left 2 ;OK. this works to clamp. but needs +-3v3 to drive.\ncannot bias non inverting input at 1.6V.\nbecause also need the termination at resisotrs.