* Z:\home\khalils\Downloads\files\data\raw_asc\0a4c0eb84d07_Draft56.asc
* Generated by LTspice 26.0.1 for Windows.
* output range clamp\nbottom bjt sets lower bound, top bjt the high bound\nthere's a bit of a stability issue in that common emitter has high gain on collector\nwhich pushes around the node.
* Library below included based on ModelFile attribute of instance XU1 (C:\users\khalils\AppData\Local\LTspice\lib\sym\OpAmps\LT1006.asy)
R2 N007 0 10k
Q1 N005 N008 N001 0 NPN
R4 N005 N004 2k
C2 N001 N003 0.5n
V5 N002 0 0V
V1 N006 0 0.5V
R1 N001 N007 12k
V2 VCC 0 5
V3 0 VEE 0
VIN N004 0 PULSE(0 5 2ms 10ns 10ns 0.5ms 1ms 7)
V4 N008 0 0.85V
Q2 N005 N002 N001 0 PNP
R3 N003 N005 8k
XU1 N006 N003 VCC VEE N001 LT1006 ;pnba In+)In-)V+)V-)OUT
.model NPN NPN
.model PNP PNP
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.bjt
.tran 10ms
.lib LTC.lib
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 1904 680
WIRE 496 -208 240 -208
WIRE 176 -160 128 -160
WIRE 400 -32 352 -32
WIRE 496 -32 496 -208
WIRE 496 -32 464 -32
WIRE -192 80 -272 80
WIRE 64 80 -80 80
WIRE 240 80 240 -112
WIRE 240 80 144 80
WIRE 352 80 352 -32
WIRE 352 80 320 80
WIRE 384 80 352 80
WIRE -272 96 -272 80
WIRE -192 96 -192 80
WIRE -80 96 -80 80
WIRE 496 96 496 -32
WIRE 496 96 448 96
WIRE 608 96 496 96
WIRE 384 112 336 112
WIRE 784 176 608 176
WIRE 240 272 240 80
WIRE 176 320 48 320
WIRE 496 368 496 96
WIRE 496 368 240 368
SYMBOL npn 176 272 R0
SYMATTR InstName Q1
SYMBOL res 592 160 R0
SYMATTR InstName R2
SYMATTR Value 10k
SYMBOL res 160 64 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 -50 55 VTop 2
SYMATTR InstName R4
SYMATTR Value 2k
SYMBOL voltage -80 80 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 -425 174 Left 2
SYMATTR Value PULSE(0 5 2ms 10ns 10ns 0.5ms 1ms 7)
SYMATTR InstName VIN
SYMBOL res 336 64 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 -50 55 VTop 2
SYMATTR InstName R3
SYMATTR Value 8k
SYMBOL voltage -272 -16 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 48 40 Left 2
SYMATTR Value 5
SYMATTR InstName V2
SYMBOL voltage 336 96 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 -51 73 Left 2
WINDOW 0 -67 50 Left 2
SYMATTR Value 0.5V
SYMATTR InstName V1
SYMBOL voltage 128 -176 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 -90 77 Left 2
WINDOW 0 -67 50 Left 2
SYMATTR Value 0V
SYMATTR InstName V5
SYMBOL voltage 48 304 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 -67 74 Left 2
WINDOW 0 -67 50 Left 2
SYMATTR Value 0.85V
SYMATTR InstName V4
SYMBOL pnp 176 -112 M180
SYMATTR InstName Q2
SYMBOL cap 464 -48 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C2
SYMATTR Value 0.5n
SYMBOL voltage -272 80 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 0 36 39 Left 2
SYMATTR InstName V3
SYMATTR Value 0
SYMBOL OpAmps\\LT1006 416 32 R0
SYMATTR InstName U1
SYMBOL res 592 80 R0
SYMATTR InstName R1
SYMATTR Value 12k
FLAG -80 176 0
FLAG -192 96 0
FLAG -272 0 VCC
FLAG -272 176 VEE
FLAG 416 64 VCC
FLAG 416 128 VEE
FLAG 336 192 0
FLAG 608 256 0
FLAG 48 400 0
FLAG 128 -80 0
TEXT -456 304 Left 2 !.tran 10ms
TEXT 584 -192 Left 2 ;output range clamp\nbottom bjt sets lower bound, top bjt the high bound\nthere's a bit of a stability issue in that common emitter has high gain on collector\nwhich pushes around the node.