In Reply to: Re: Formula posted by Russ Kincaid on 12/16/01 at 7:42 PM:
Following Russ' correct statement, the solution can be taken from the following program. Although written in GWBASIC, it will run in Quick-Basic also:
10 CLS:SCREEN 9:COLOR 15,1:YSTART=50:XSTART=40:PI=3.14159265#
20 PRINT "save "+CHR$(34)+"dual_rc.bas"+CHR$(34):PRINT
30 PRINT "save "+CHR$(34)+"a:\dual_rc.bas"+CHR$(34):PRINT:PRINT
40 B$=" E1 E2":LOCATE 7,1:PRINT B$
50 C$=" #####.### #####.###":GOTO 90
70 CC=XSTART+X:DD=(320-Y-YSTART):IF KK0 THEN LINE (AA,BB)-(CC,DD)
90 READ R1,C1,R2,C2:DT=.00001/(R1*C1):DATA 10000,1e-6,1e6,1e-6
110 I2=(E1-E2)/R2:DE2=I2*DT/C2:E2=E2+DE2:LOCATE 8,1:PRINT USING C$;E1,E2
120 GOSUB 60:T=T+DT:IF E1>300 THEN GOTO 140
130 GOTO 100
The components are an input resistor to the integrator called R1, an integrator capacitor called C1, a resistor from the integrator's op-amp output called R2 feeding a shunt capacitor from the output end of R2 which we call C2.
The values shown are R1=10K, R2 = 1 Meg, C1 = 1 µF and C2 = 1 µF. The input voltage to R1 of the integrator is -1 volt.
The voltage at the integrator output is E1 and the voltage across C2 is E2.
This program will draw the output E2 versus time scaled to the integrator's 1/(R1 C1).
This kind of problem, by the way, can be solved using LaPlacian methods, but I kind of like haven't used LaPlace since 1972.(I still remember the incident!)
Give this code a try and if you have problems, please let me know.