This program is the first of three which deals with the design of active filters. The three cases will help you design a high pass, a low pass, and a bandpass active filter. In each case there is an operational amplifier in the circuit. Just which one you use is not critical. It is also not critical at what voltage you run the amplifier. However, if you do not want to change the circuits a bit, you should use a bipolar power supply (that is a power supply with equal + and – voltages). Anything between about 9 and 15 volts will do for the usual junk box op amp. Of course, if you have a specialized application such as a battery operated receiver, you will want to select your op amp carefully. Perhaps using a special low current, low voltage op amp.
The program will work, but perhaps not quite like you expect it to. There are some difficulties with the lines 200-250. See if you can get them into a form which gives you a result that you like. More will be said on this point in the next issue.
10 PRINT "HIGH PASS ACTIVE FILTER"
20 PRINT "THE STAGE GAIN SHOULD BE LESS THAN 10"
30 PRINT "ENTER STAGE GAIN
40 INPUT H
45 PRINT H
50 PRINT "ENTER CUTOFF FREQ IN HZ"
60 INPUT F
65 PRINT F
70 PRINT "ENTER DAMPING COEFFICIENT. USE"
80 PRINT "0.707 FOR BUTTERWORTH OR FLAT FILTER"
90 INPUT Z
100 PRINT "ENTER INPUT CAP (C2) IN UF"
110 INPUT C2
115 PRINT C2
120 LET C2 = C2/1000000
130 LET R1 = (2*H+1)/(4*PI*Z*F*C2)
140 LET R2 = Z/(PI*F*C2*92+1/H))
150 LET C1 = C2/H
160 LET C1 = C1*1000000
170 PRINT "R1 = ";R1;" OHMS"
180 PRINT "R2 = ";R2;" OHMS"
190 PRINT "C1 = ";C1;" UF"
200 PRINT "PRESS 1 TO CONTINUE"
210 IF INKEY$ = "" THEN GOTO 210
220 LET A$ = INKEY$
230 IF A$ = "1" THEN CLS
240 GOTO 10
250 IF A$ = "" THEN STOP
9998 SAVE HIGh
9999 GOTO 10