Version 4 SHEET 1 2392 680 WIRE -208 -1088 -208 -1104 WIRE -432 -1040 -528 -1040 WIRE -528 -992 -528 -1040 WIRE -512 -992 -528 -992 WIRE -432 -976 -432 -1040 WIRE -432 -976 -448 -976 WIRE -384 -976 -432 -976 WIRE -336 -976 -384 -976 WIRE -208 -976 -208 -1008 WIRE -208 -976 -256 -976 WIRE -192 -976 -208 -976 WIRE -624 -960 -656 -960 WIRE -512 -960 -544 -960 WIRE -208 -944 -208 -976 WIRE -624 -848 -656 -848 WIRE -528 -848 -544 -848 WIRE -208 -848 -208 -864 FLAG -384 -976 Vout FLAG -656 -960 0 FLAG -192 -976 0 FLAG -480 -1008 V+ FLAG -480 -944 V- FLAG -656 -848 0 FLAG -208 -1104 V+ FLAG -208 -848 V- SYMBOL Misc\\signal -528 -960 R90 WINDOW 0 -32 56 VBottom 2 WINDOW 3 32 56 VTop 2 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName Vsine SYMATTR Value SINE(0 1 {Freq} 0) SYMBOL res -352 -960 R270 WINDOW 0 32 56 VTop 2 WINDOW 3 0 56 VBottom 2 SYMATTR InstName Load SYMATTR Value 1k SYMBOL Misc\\signal -528 -848 M270 WINDOW 0 -32 56 VBottom 2 WINDOW 3 32 56 VTop 2 WINDOW 123 -4 56 VBottom 2 WINDOW 39 -4 56 VBottom 2 SYMATTR InstName Vsquare SYMATTR Value PULSE(.1 -.1 0 10n 10n {.5/Freq-10p} {1/Freq}) SYMBOL Misc\\battery -208 -1104 R0 SYMATTR InstName V1 SYMATTR Value 18 SYMBOL Misc\\battery -208 -960 R0 SYMATTR InstName V2 SYMATTR Value 18 SYMBOL Opamps\\UniversalOpamp2 -480 -976 R0 SYMATTR InstName U2 TEXT -1304 -720 Left 2 !;ac dec 100 .001 1000meg TEXT -1304 -1056 Left 2 !.options plotwinsize=0\n.options method=gear\n.options numdgt=7\n.param Freq=1k\n.param numcyc=10\n.param dlycyc=0\n.param FFT=32786\n.param simtime=(dlycyc+numcyc)/Freq\n.param dlytime=dlycyc/Freq\n.param numsampl=simtime/Freq/((simtime/numcyc)*FFT)\n.four {Freq} V(Vout) TEXT -1304 -744 Left 2 !.tran 0 {simtime} {dlytime} {numsampl} TEXT -1192 -648 Left 2 ;The first 3 lines set simulation to best accuracy.\nPlotwinsize turns off compression\nMethod=gear is important for realistic RF.\nNumdgt sets internal accuracy to double. Set to 6 for normal accuracy.\nFreq is the test frequency.\nNumcyc is the number of test cycles plotted.\nDlycyc is the number of "warm-up" cycles before the waveform is plotted. \nIncrease this if your FFT shows a too high noise floor.\nFFT is the number of data points used in simulation. This should equal the number \nof points used when you do an FFT. The more points, the higher the bandwidth of \nthe FFT. This won't directly impact accuracy unless your number of points is not \nvery high. TEXT -1192 -296 Left 2 ;If your amp has trouble simulating, set dlycyc to 0 so you can see the warm-up \nbehavior. If your circuit latches or oscillates you may never get usable output. \nFor this reason I usually leave numcyc=0 while setting up the circuit and making \nsure it works properly.\nFor some circuits, if the input signal is present during warm-up, it will latch the circuit.\nTo prevent this, put "{dlytime}" in the "Tdelay" field of the input voltage source.\nThis will mute the input until the warm-up period is over. TEXT -1192 -88 Left 2 ;To simulate square response, switch the signal sources. The risetime for the \nsquare source is 10nS, fast enough to reveal problem/latching behavior. A \nrisetime of several uS is more common, but is not always enough. TEXT -760 -728 Left 2 ;BTW, this opamp will have no distortion, don't bother!