Version 4 SHEET 1 2560 916 WIRE 832 -256 720 -256 WIRE 864 -256 832 -256 WIRE 1072 -256 864 -256 WIRE 720 -240 720 -256 WIRE 832 -208 832 -256 WIRE 1072 -208 1072 -256 WIRE 720 -144 720 -160 WIRE 832 -80 832 -128 WIRE 832 -80 576 -80 WIRE 864 -80 832 -80 WIRE 1072 -80 1072 -128 WIRE 1104 -80 1072 -80 WIRE 1248 -80 1104 -80 WIRE 1360 -64 1312 -64 WIRE 1392 -64 1360 -64 WIRE 1248 -48 960 -48 WIRE 832 -32 832 -80 WIRE 1072 -32 1072 -80 WIRE 1392 -16 1392 -64 WIRE 1440 -16 1392 -16 WIRE 1584 -16 1536 -16 WIRE 1600 -16 1584 -16 WIRE 1440 32 1392 32 WIRE 576 64 576 -80 WIRE 832 80 832 48 WIRE 864 80 832 80 WIRE 960 80 960 -48 WIRE 960 80 864 80 WIRE 1072 80 1072 48 WIRE 1104 80 1072 80 WIRE 1248 80 1104 80 WIRE 1360 96 1312 96 WIRE 1392 96 1392 32 WIRE 1392 96 1360 96 WIRE 496 112 480 112 WIRE 512 112 496 112 WIRE 832 112 832 80 WIRE 960 112 960 80 WIRE 1248 112 960 112 WIRE 1072 144 1072 80 WIRE 576 224 576 160 WIRE 832 224 832 176 WIRE 832 224 576 224 WIRE 832 256 832 224 WIRE 1072 272 1072 224 WIRE 480 336 480 112 WIRE 528 336 480 336 WIRE 1600 336 1600 -16 WIRE 1600 336 608 336 FLAG 832 256 0 FLAG 864 -256 1 FLAG 864 -80 2 FLAG 720 -144 0 FLAG 864 80 3 FLAG 1072 272 0 FLAG 1104 -80 4 FLAG 1104 80 5 FLAG 1360 -64 11 FLAG 1360 96 12 FLAG 1584 -16 15 FLAG 496 112 6 SYMBOL cap 816 112 R0 WINDOW 0 -54 17 Left 2 WINDOW 3 -83 48 Left 2 SYMATTR InstName C1 SYMATTR Value 100pF SYMBOL res 816 -224 R0 WINDOW 0 -46 42 Left 2 WINDOW 3 -47 70 Left 2 SYMATTR InstName RA SYMATTR Value 1k SYMBOL res 816 -48 R0 WINDOW 0 -50 40 Left 2 WINDOW 3 -58 69 Left 2 SYMATTR InstName RB SYMATTR Value 10k SYMBOL voltage 720 -256 R0 WINDOW 0 -69 21 Left 2 WINDOW 3 -73 95 Left 2 WINDOW 39 0 0 Left 0 SYMATTR InstName VCC SYMATTR Value +5V SYMATTR Value2 AC 0V SYMBOL npn 512 64 R0 SYMATTR InstName Q1 SYMBOL res 1056 -224 R0 WINDOW 0 -46 42 Left 2 WINDOW 3 -47 70 Left 2 SYMATTR InstName R1 SYMATTR Value 5k SYMBOL res 1056 -48 R0 WINDOW 0 -50 40 Left 2 WINDOW 3 -47 67 Left 2 SYMATTR InstName R2 SYMATTR Value 5k SYMBOL res 1056 128 R0 WINDOW 0 -50 40 Left 2 WINDOW 3 -48 69 Left 2 SYMATTR InstName R3 SYMATTR Value 5k SYMBOL OpAmps\\opamp 1280 -128 R0 WINDOW 3 -13 107 Left 2 SYMATTR Value COMPA SYMATTR InstName U1 SYMATTR SpiceLine "" SYMATTR SpiceLine2 "" SYMBOL OpAmps\\opamp 1280 160 M180 WINDOW 0 -10 101 Left 2 WINDOW 3 -16 21 Left 2 SYMATTR InstName U2 SYMATTR Value COMPA SYMATTR SpiceLine "" SYMATTR SpiceLine2 "" SYMBOL Digital\\srflop 1488 -64 R0 WINDOW 3 -44 160 Left 2 SYMATTR Value Vhigh=5 SYMATTR InstName A1 SYMBOL res 624 320 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName RB0 SYMATTR Value 15k TEXT 1152 -456 Left 2 ;555 Timer Basic TEXT 1160 -408 Left 2 !.tran 5us uic TEXT 1160 -368 Left 2 !.IC V(3)=0V TEXT 1712 120 Left 2 !.SUBCKT COMPA 2 1 5\n* 1-IN+, 2-IN-, 5-OUT\n* DIFF AMP WITH HYSTERESIS\nEDIFF 3 0 VALUE = { V(1) - V(2) + V(5)*0.002}\n* LOW-PASS FILTER\nRP1 3 4 200\nCP1 4 0 100PF\n* LIMITER\nEOUT 5 0 TABLE {V(4)} = (-1MV 0V) (1MV, 5V) \n.ENDS TEXT 1136 64 Left 2 ;1/3 VCC TEXT 1136 -96 Left 2 ;2/3 VCC TEXT 696 -312 Left 2 ;External Parts RECTANGLE Normal 912 304 640 -288 3