Category : Science and Education
Archive   : EEPUB06.ZIP
Filename : SWITCHIN.BAS

 
Output of file : SWITCHIN.BAS contained in archive : EEPUB06.ZIP
10 J=0
20 NEWL=0
30 NEWC=0
40 FIRST=0
50 FOR X = 1 TO 3
60 READ TR(X),TF(X),TS(X)
70 NEXT X
80 DIM C(15)
90 DIM ESR(15)
100 FOR X = 1 TO 14
110 READ C(X),ESR(X)
120 NEXT X
130 FOR X = 1 TO 3
140 READ G(X),H(X),V(X),Z(X)
150 NEXT X
160 CLS
170 PRINT
180 PRINT
190 PRINT TAB(5) "BUCK (STEP-DOWN) AND MULTIPLE OUTPUT BUCK SWITCHING";
200 PRINT " CONVERTER DESIGN"
210 PRINT TAB(4) "___________________________________________________";
220 PRINT "__________________"
230 PRINT
240 PRINT TAB(10) "SWITCHING REGULATOR DESIGN AID FOR THE LH1605,"
250 PRINT TAB(7) " HS7067, AND HS7107."
260 PRINT
270 PRINT TAB(10) " NATIONAL SEMICONDUCTOR"
280 PRINT TAB(10) " HYBRID SYSTEMS PRODUCTS"
290 PRINT TAB(10) " REV 0.1 9/6/84"
300 PRINT TAB(10) " COPYWRITE 9/6/84"
310 PRINT
320 PRINT
330 PRINT" THIS PROGRAM IS A TOOL FOR THE DESIGN OF SWITCHING CONVERTERS USING"
340 PRINT" NATIONAL'S LH1605, HS7067, AND HS7107 HYBRID SWITCHING REGULATORS. "
350 PRINT" IT RELIES ON USER INPUTS FOR CIRCUIT PARAMETERS ( Vin, Vout, ETC. )"
360 PRINT" AND CALCULATES VALUES FOR ALL REQUIRED CAPACITORS, INDUCTORS, AND"
370 PRINT" RESISTORS. IT ALSO ALLOWS THE USER TO EXPERIMENT BY CHANGING EACH"
380 PRINT" PARAMETER INDIVIDUALLY TO SEE HOW IT AFFECTS THE FINAL CIRCUIT";
390 PRINT" DESIGN."
400 PRINT
410 PRINT
420 PRINT" ( HIT RETURN TO CONTINUE )";
430 INPUT G
440 CLS
450 PRINT
460 PRINT
470 PRINT" TO OPTIMIZE THE SWITCHING CONVERTER TO A SPECIFIC APPLICATION, THE"
480 PRINT" FOLLOWING TRADE-OFFS BETWEEN PARAMETERS SHOULD BE CONSIDERED:"
490 PRINT
500 PRINT
510 PRINT" INCREASED OPERATING FREQUENCY - DECREASED OUTPUT FILTER SIZE"
520 PRINT" - FASTER TRANSIENT RECOVERY"
530 PRINT" - LOWER MINIMUM OUTPUT CURRENT"
540 PRINT" - INCREASED POWER DISSIPATION"
550 PRINT" (LOWER EFFICIENCY,LARGER HEATSINK)"
560 PRINT
570 PRINT" INCREASED INPUT VOLTAGE - INCREASED OUTPUT HOLD-UP TIME"
580 PRINT" - HIGHER MINIMUM OUTPUT CURRENT"
590 PRINT" - INCREASED OUTPUT FILTER SIZE"
600 PRINT" - INCREASED POWER DISSIPATION"
610 PRINT
620 PRINT" LOWER MINIMUM OUTPUT CURRENT - DECREASED OUTPUT RIPPLE VOLTAGE"
630 PRINT" - SMALLER OUTPUT FILTER CAPACITOR"
640 PRINT" - LARGER OUTPUT FILTER INDUCTOR"
650 PRINT" - INCREASED OPERATING FREQUENCY"
660 PRINT
670 PRINT
680 PRINT" ( HIT RETURN TO CONTINUE )";
690 INPUT G
700 PRINT
710 CLS
720 FIRST=0
730 NEWC=0
740 NEWL=0
750 PRINT
760 PRINT
770 PRINT" WHILE ALL THREE HYBRID SWITCHING REGULATORS WILL FUNCTION IN A BUCK"
780 PRINT" OR MULTIPLE OUTPUT BUCK CONVERTER, ONE MAY BE MORE SUITED TO A"
790 PRINT" PARTICULAR APPLICATION THAN ANOTHER. THE FOLLOWING TABLE SHOWS THE"
800 PRINT" RELATIVE CAPABILITIES OF EACH TO AID IN CHOOSING A SWITCHER FOR THIS DESIGN."
810 PRINT
820 PRINT
830 PRINT
840 PRINT" RELATIVE CHARACTERISTICS:"
850 PRINT
860 PRINT" LH1605 - 1
870 PRINT" HS7067 - 2
880 PRINT" HS7107 - 3
890 PRINT
900 PRINT" LOW . . . . . . . . . HIGH"
910 PRINT" EFFICIENCY ............................1....3.2......"
920 PRINT" INPUT VOLTAGE ...............1.........2...............3"
930 PRINT"OUTPUT CURRENT .....................1.......3.2.........."
940 PRINT" SPEED ...............1.......................3.2"
950 PRINT
960 PRINT
970 PRINT
980 J=D
990 PRINT" SPECIFY THE DEVICE TO BE USED IN THIS DESIGN (1,2,OR 3)";
1000 INPUT D
1010 IF D=1 GOTO 1090
1020 IF D=2 GOTO 1090
1030 IF D=3 GOTO 1090
1040 IF FIRST =0 GOTO 1080
1050 IF D<>0 GOTO 1080
1060 D=J
1070 GOTO 1090
1080 GOTO 990
1090 PRINT
1100 IF FIRST = 1 GOTO 1140
1110 PRINT " ENTER VALUES FOR THE FOLLOWING DESIGN PARAMETERS:"
1120 PRINT" EXPRESS ALL VOLTAGES IN VOLTS AND ALL CURRENTS IN AMPS."
1130 PRINT
1140 PRINT TAB(5) "INPUT VOLTAGE"
1150 J=I(1)
1160 PRINT TAB(10) "MAXIMUM =";
1170 INPUT I(1)
1180 IF I(1) <= V(D) GOTO 1230
1190 PRINT
1200 PRINT" THIS VOLTAGE IS TOO HIGH FOR THIS DEVICE."
1210 PRINT
1220 GOTO 1140
1230 IF FIRST = 0 GOTO 1260
1240 IF I(1)<>0 GOTO 1260
1250 I(1)=J
1260 J=I(2)
1270 PRINT TAB(10) "MINIMUM =";
1280 INPUT I(2)
1290 IF FIRST=1 GOTO 1360
1300 IF I(2)>= 10 GOTO 1350
1310 PRINT
1320 PRINT" MINIMUM INPUT VOLTAGE FOR THIS DEVICE IS 10 VOLTS."
1330 PRINT
1340 GOTO 1270
1350 IF FIRST = 0 GOTO 1380
1360 IF I(2)<>0 GOTO 1380
1370 I(2)=J
1380 PRINT TAB(10) "NOMINAL =";
1390 J=I(3)
1400 INPUT I(3)
1410 IF FIRST=0 GOTO 1440
1420 IF I(3)<>0 GOTO 1440
1430 I(3)=J
1440 IF I(1) 1450 IF I(2)>I(3) GOTO 1140
1460 PRINT
1470 IF FIRST=1 GOTO 1730
1480 PRINT TAB(5) "PRIMARY OUTPUT"
1490 PRINT TAB(10) "OUTPUT VOLTAGE =";
1500 INPUT PO(1)
1510 IF PO(1)>=2.5 GOTO 1580
1520 PRINT
1530 PRINT" THIS PROGRAM DOES NOT DISCUSS THE CIRCUIT MODIFICATIONS NECESSARY"
1540 PRINT" TO OPERATE THIS DEVICE WITH A PRIMARY OUTPUT VOLTAGE OF LESS"
1550 PRINT" THAN 2.5 VOLTS."
1560 PRINT
1570 GOTO 1490
1580 IF PO(1)<=I(2)-3 GOTO 1640
1590 PRINT
1600 PRINT" THIS VIOLATES THE Vo < Vin-3 DESIGN CRITERIA GIVEN IN THE DATA"
1610 PRINT" SHEET FOR THE PRIMARY OUTPUT."
1620 PRINT
1630 GOTO 1140
1640 PRINT TAB(10) "OUTPUT RIPPLE VOLTAGE =";
1650 INPUT PO(2)
1660 IF PO(2)>0 GOTO 1720
1670 PRINT
1680 PRINT" THERE WILL BE SOME OUTPUT RIPPLE VOLTAGE. PLEASE SPECIFY"
1690 PRINT" THE MAXIMUM ALLOWABLE."
1700 PRINT
1710 GOTO 1640
1720 PRINT
1730 J=PO(3)
1740 PRINT TAB(10) "MINIMUM OUTPUT CURRENT =";
1750 INPUT PO(3)
1760 IF FIRST=0 GOTO 1790
1770 IF PO(3)<>0 GOTO 1790
1780 PO(3)=J
1790 IF PO(3)>0 GOTO 1840
1800 PRINT
1810 PRINT" TO MAINTAIN REGULATION, THESE SWITCHING REGULATORS REQUIRE"
1820 PRINT" A REAL MINIMUM OUTPUT CURRENT."
1830 GOTO 1720
1840 IF FIRST=1 GOTO 1920
1850 PRINT TAB(10) "MAXIMUM OUTPUT CURRENT =";
1860 INPUT PO(4)
1870 IF PO(4)>0 GOTO 1920
1880 PRINT
1890 PRINT" OUTPUT CURRENT MUST BE POSITIVE."
1900 PRINT
1910 GOTO 1850
1920 IF PO(3) + PO(4) <= Z(D) GOTO 1980
1930 PRINT
1940 PRINT" THE SUM OF THE MAXIMUM OUTPUT CURRENT AND THE RIPPLE CURRENT,"
1950 PRINT" MINIMUM OUTPUT CURRENT, IS TOO HIGH FOR THAT DEVICE."
1960 PRINT
1970 GOTO 1720
1980 IF FIRST=1 GOTO 2010
1990 PRINT TAB(10) "NOMINAL OUTPUT CURRENT =";
2000 INPUT PO(5)
2010 IF PO(2) -( PO(3)*.0026 ) > 0 GOTO 2110
2020 IF PO(2)-(PO(3)*ER)>0 GOTO 2110
2030 PRINT" THIS PROGRAM DOES NOT INCLUDE THE DATA FOR A CAPACITOR GOOD"
2040 PRINT" ENOUGH TO PROVIDE";
2050 PRINT PO(2);
2060 PRINT"VOLTS OUTPUT RIPPLE WITH";
2070 PRINT PO(3);
2080 PRINT"AMPS"
2090 PRINT" RIPPLE CURRENT."
2100 GOTO 1640
2110 IF PO(3)>PO(5) GOTO 1720
2120 IF PO(4) 2130 IF FIRST=1 GOTO 2520
2140 PRINT
2150 PRINT" HOW MANY SECONDARY OUTPUTS DO YOU REQUIRE";
2160 INPUT A
2170 IF A = 0 GOTO 2520
2180 PRINT
2190 PRINT" ALL SECONDARY VOLTAGES ARE TAKEN IN ABSOLUTE VALUE. THE"
2200 PRINT" UNCOMMITTED OUTPUTS MAY LATER BE REFERENCED AS EITHER"
2210 PRINT" POSITIVE OR NEGATIVE TO THE SYSTEM GROUND."
2220 FOR X = 0 TO A-1
2230 PRINT
2240 PRINT TAB(5) "SECONDARY OUTPUT #";
2250 PRINT X+1
2260 PRINT TAB(10) "MINIMUM OUTPUT VOLTAGE =";
2270 INPUT SEC(X,1)
2280 SEC(X,1)=ABS(SEC(X,1))
2290 PRINT TAB(10) "MAXIMUM OUTPUT VOLTAGE =";
2300 INPUT SEC(X,2)
2310 SEC(X,2)=ABS(SEC(X,2))
2320 PRINT TAB(10) "NOMINAL OUTPUT VOLTAGE =";
2330 INPUT SEC(X,3)
2340 SEC(X,3)=ABS(SEC(X,3))
2350 IF SEC(X,1)>SEC(X,3) GOTO 2230
2360 IF SEC(X,2) 2370 PRINT
2380 PRINT TAB(10) "MINIMUM OUTPUT CURRENT =";
2390 INPUT SEC(X,4)
2400 IF SEC(X,4)>0 GOTO 2450
2410 PRINT" WITHOUT A REAL MINIMUM LOAD, THE SECONDARY WILL ACT AS A PEAK"
2420 PRINT" HOLDING CIRCUIT, AND THE OUTPUT VOLTAGE WILL RISE TO THE VALUE"
2430 PRINT" OF THE SWITCHING TRANSIENTS. AN RC SNUBBER ACROSS THE"
2440 PRINT" SECONDARY WILL HELP DEFEAT THIS."
2450 PRINT TAB(10) "MAXIMUM OUTPUT CURRENT =";
2460 INPUT SEC(X,5)
2470 PRINT TAB(10) "NOMINAL OUTPUT CURRENT =";
2480 INPUT SEC(X,6)
2490 IF SEC(X,4)>SEC(X,6) GOTO 2370
2500 IF SEC(X,5) 2510 NEXT X
2520 PRINT
2530 J=F
2540 PRINT" DESIRED OPERATING FREQUENCY (KHz)";
2550 INPUT F
2560 IF F>G(D) GOTO 2640
2570 IF FIRST=0 GOTO 2600
2580 IF F<>0 GOTO 2600
2590 F=J/1000
2600 F = F*1000
2610 IF F<=0 GOTO 2520
2620 IF PO(1)/(I(1)*F)<= H(D) GOTO 2680
2630 GOTO 2850
2640 PRINT
2650 PRINT" THAT OPERATING FREQUENCY IS TOO HIGH FOR THAT DEVICE."
2660 PRINT
2670 GOTO 2540
2680 PRINT
2690 PRINT" TO PRODUCE A";
2700 PRINT PO(1);
2710 PRINT "VOLT PRIMARY OUTPUT WITH ";
2720 PRINT I(1);
2730 PRINT " VOLTS MAXIMUM INPUT "
2740 PRINT " AT ";
2750 PRINT F/1000;
2760 PRINT "KHz WILL REQUIRE A SWITCH DUTY CYCLE SHORTER THAN THE"
2770 PRINT " TYPICAL SWITCHING DELAY TIME OF ";
2780 PRINT H(D)*1E+09;
2790 PRINT "nSEC. THIS WILL RESULT IN PULSE SKIPPING"
2800 PRINT " THAT APPEARS AS AN OUTPUT VOLTAGE OSCILLATION."
2810 PRINT " MAXIMUM OPERATING FREQUENCY SHOULD BE ";
2820 PRINT PO(1)/(I(1)*H(D)*1000);
2830 PRINT "KHz."
2840 GOTO 2520
2850 IF FIRST=1 GOTO 3020
2860 PRINT
2870 PRINT " OUTPUT HOLD-UP TIME AT MAXIMUM POWER OUTPUT (mSEC)";
2880 INPUT HU
2890 PRINT
2900 PRINT " MAXIMUM AMBIENT OPERATING TEMPERATURE (C)";
2910 INPUT T
2920 IF T < 150 THEN GOTO 3010
2930 IF T < 175 GOTO 2980
2940 PRINT" THATS A BIT TOO HOT. TRY AGAIN."
2950 PRINT
2960 GOTO 2900
2970 PRINT
2980 PRINT" THAT ALLOWS FOR NO POWER DISSIPATION IN THE SWITCHING REGULATOR."
2990 PRINT
3000 GOTO 2900
3010 L = ( I(1) - PO(1) )*( PO(1)/I(1) )/( 2 * F * PO(3) )
3020 VSM = 1 + PO(4)/20
3030 IF D = 1 THEN VSM = VSM + .04*PO(4)
3040 VFM = .9 + PO(4)/20
3050 DC = ( PO(1) + VFM )/( I(1) + VFM - VSM )
3060 DCN=(PO(1)+VFM)/(I(3)+VFM-VSM)
3070 PS = 0
3080 FOR X = 0 TO A-1
3090 PS = PS + SEC(X,3)*SEC(X,5) + .9*SEC(X,5)
3100 NEXT X
3110 IX = PS/( ( I(1) - VSM )*DC )
3120 IM = PO(4) + PO(3) + IX
3130 IF IM<=Z(D) GOTO 3280
3140 PRINT
3150 PRINT" THE ADDITION OF FULL SECONDARY LOADING WILL CAUSE THE PRIMARY"
3160 PRINT" CURRENT TO EXCEED THE ";
3170 IF D=1 THEN G$="LH1605"
3180 IF D=2 THEN G$="HS7067"
3190 IF D=3 THEN G$="HS7107"
3200 PRINT G$;
3210 PRINT"'S MAXIMUM CURRENT RATING."
3220 PRINT
3230 PRINT" WOULD YOU LIKE TO TRY AGAIN (Y/N)";
3240 INPUT G$
3250 IF G$="Y" GOTO 710
3260 GOTO 6030
3270 GOTO 710
3280 EM = .5*L*IM*IM
3290 IF FIRST =1 GOTO 3410
3300 X=1
3310 M=PO(2)-(PO(3)*ESR(X))
3320 IF M>0 GOTO 3350
3330 X=X+1
3340 GOTO 3310
3350 IF (PO(3)/(4*F*M))-C(X) <= 0 GOTO 3380
3360 X=X+1
3370 GOTO 3310
3380 B=X
3390 CMIN=C(X)
3400 ER=ESR(B)
3410 CLS
3420 PRINT
3430 PRINT
3440 PRINT " SWITCHING CONVERTER COMPONENT VALUES:"
3450 IF FIRST=0 GOTO 3870
3460 IF NEWL=0 GOTO 3520
3470 IF L>=(I(1)-PO(1))*(PO(1)/I(1))/(2*F*PO(3)) GOTO 3530
3480 PRINT
3490 PRINT" THE INDUCTOR YOU GAVE IS NOT SUFFICIENT AT THIS FREQUENCY FOR"
3500 PRINT" CONTINUOUS-MODE OPERATION AT THIS MINIMUM OUTPUT CURRENT."
3510 GOTO 5410
3520 L=(I(1)-PO(1))*(PO(1)/I(1))/(2*F*PO(3))
3530 PRINT" MINIMUM PRIMARY OUTPUT CURRENT ...........";
3540 IF NEWL=0 GOTO 3580
3550 PO(3)=(I(1)-PO(1))*(PO(1)/I(1))/(2*F*L)
3560 BAD=0
3570 IF PO(4)+PO(3)+IX > Z(D) THEN BAD=1
3580 PRINT PO(3);
3590 PRINT"AMPS"
3600 IF BAD=0 GOTO 3680
3610 IF A=0 GOTO 3630
3620 PRINT" FULL SECONDARY LOADING PLUS"
3630 PRINT" THE SUM OF MAXIMUM PRIMARY OUTPUT CURRENT AND THE"
3640 PRINT" RIPPLE CURRENT ( MINIMUM OUTPUT CURRENT ) EXCEEDS"
3650 PRINT" THIS DEVICES PEAK CURRENT RATING."
3660 PRINT
3670 BAD=0
3680 IF NEWC=1 GOTO 3800
3690 X=1
3700 M=PO(2)-(PO(3)*ESR(X))
3710 IF M>0 GOTO 3740
3720 X=X+1
3730 GOTO 3700
3740 IF (PO(3)/(4*F*M))-C(X)<=0 GOTO 3770
3750 X=X+1
3760 GOTO 3700
3770 B=X
3780 CMIN=C(B)
3790 ER=ESR(B)
3800 IF (PO(2)-(PO(3)*ER))<=0 GOTO 3830
3810 IF CMIN<(PO(3)/(4*F*(PO(2)-(PO(3)*ER)))) GOTO 3830
3820 GOTO 3870
3830 PRINT
3840 PRINT" THE PRIMARY OUTPUT FILTER CAPACITOR IS INSUFFICIENT FOR THE"
3850 PRINT" OUTPUT RIPPLE VOLTAGE YOU WANT."
3860 GOTO 5410
3870 REM
3880 PRINT
3890 PRINT" OUTPUT FILTER INDUCTOR, L .................";
3900 PRINT L*1000000!;
3910 PRINT"uH"
3920 PRINT" MAX MAGNETIC ENERGY IN CORE, 1/2*LI(2) ....";
3930 PRINT EM*1000;
3940 PRINT"mJ"
3950 PRINT" OUTPUT FILTER CAPACITOR, C ................";
3960 PRINT CMIN*1000000!;
3970 PRINT"uF"
3980 PRINT" EFFECTIVE SERIES RESISTANCE OF C, ESR .....";
3990 PRINT ER;
4000 PRINT"OHMS"
4010 RF = 2*((PO(1)-2.5)/2.5)
4020 IF D<>1 THEN RF=RF*2
4030 PRINT" FEEDBACK RESISTOR, Rf .....................";
4040 PRINT RF;
4050 PRINT"kOHMS"
4060 IF D=1 GOTO 4180
4070 RC=200/I(1)
4080 IF NEWC =0 GOTO 4110
4090 CC=SQR(L*CMAX*10)/(RC*1000)
4100 GOTO 4120
4110 CC=SQR(L*C(B)*10)/(RC*1000)
4120 PRINT" COMPENSATION RESISTOR, Rc .................";
4130 PRINT RC;
4140 PRINT"kOHMS"
4150 PRINT" COMPENSATION CAPACITOR, Cc ................";
4160 PRINT CC*1000000!;
4170 PRINT"uF"
4180 CT=1/(10000*F)
4190 IF D=1 THEN CT=CT/4.7
4200 PRINT" TIMING CAPACITOR, Ct ......................";
4210 PRINT CT*1E+12;
4220 PRINT"pF"
4230 PRINT" REFERENCE VOLTAGE CAPACITOR, Cref ......... 10 uF"
4240 VSM= 1+PO(4)/20
4250 IF D=1 THEN VSM=VSM+ .04*PO(4)
4260 VFM=.9+PO(4)/20
4270 DC=(PO(1)+VFM)/(I(1)+VFM-VSM)
4280 PT=VSM*PO(4)*DC
4290 PSW=(I(1)+VFM)*PO(4)*(TR(D)+TF(D)+(2*TS(D)))*F*.5
4300 PDD=VFM*PO(4)*(1-DC)
4310 IF D=1 GOTO 4340
4320 DL=I(1)*.02*DC
4330 GOTO 4350
4340 DL=I(1)*I(1)*DC/300
4350 PD=PT+PSW+PDD+DL
4360 PTTL=PS+(PO(1)*PO(4))+PD
4370 IF PO(1)+5>10 THEN DELV=PO(1)+5 ELSE DELV=10
4380 CIN=(HU*PTTL*2)/(1000*((I(3)*I(3))-(DELV*DELV)))
4390 PRINT" INPUT CAPACITOR, Cin ......................";
4400 PRINT CIN*1000000!;
4410 PRINT"uF"
4420 THCA=((150-T)/PD)-4
4430 IF D=1 THEN THCA=THCA - 1
4440 IF THCA < 35 GOTO 4490
4450 PRINT
4460 PRINT" ******** NO HEAT SINKING IS REQUIRED ********"
4470 PRINT
4480 GOTO 4610
4490 PRINT" MAX THERMAL RESISTANCE CASE-TO-AMBIENT ....";
4500 PRINT THCA;
4510 PRINT"C/WATT"
4520 IF THCA>0 GOTO 4610
4530 PRINT CHR$(7);
4540 PRINT CHR$(7);
4550 PRINT CHR$(7)
4560 PRINT" ************ SAFE OPERATING AREA HAS BEEN EXCEEDED ************"
4570 PRINT
4580 PRINT" INTERNAL POWER DISSIPATION IS";
4590 PRINT PD;
4600 PRINT"WATTS. REFER TO POWER DERATING CURVE IN DATA SHEET."
4610 PW=PD
4620 POUT=0
4630 FOR X = 0 TO A-1
4640 PW=PW+.9*SEC(X,5)
4650 POUT=POUT+SEC(X,3)*SEC(X,5)
4660 NEXT X
4670 POUT=POUT+PO(1)*PO(4)
4680 EFF=POUT/(POUT+PW)
4690 PRINT
4700 PRINT" EFFICIENCY AT MAX POWER OUTPUT ............";
4710 PRINT EFF*100;
4720 PRINT"%"
4730 PRINT
4740 PRINT
4750 PRINT
4760 PRINT
4770 PRINT
4780 PRINT
4790 PRINT" ( HIT RETURN TO CONTINUE )";
4800 INPUT G
4810 IF A=0 GOTO 5230
4820 PRINT
4830 PRINT
4840 PRINT
4850 PRINT" MINIMUM PRIMARY OUTPUT CURRENT FOR FULL SECONDARY OUTPUT"
4860 PRINT" POWER IS ..........";
4870 PRINT PS/PO(1);
4880 PRINT"AMPS"
4890 PRINT
4900 PSMN=0
4910 PSN=0
4920 FOR X=0 TO A-1
4930 PSMN=PSMN+(SEC(X,3)+.7)*SEC(X,4)
4940 PSN=PSN+(SEC(X,3)+.8)*SEC(X,6)
4950 NEXT X
4960 FOR X=0 TO A-1
4970 RNN=(SEC(X,1)+.9)/(PO(1)+.9)
4980 RNX=(SEC(X,2)+.7)/(PO(1)+VFM-PSMN/((I(1)-VSM)*(1-DC)))
4990 IF RNN 5000 PRINT" SECONDARY #";
5010 PRINT X+1;
5020 PRINT"CANNOT BE MADE TO FALL BETWEEN ITS MIN/MAX LIMITS"
5030 PRINT" IN WORST CASE CONDITIONS WITHOUT A POST REGULATOR."
5040 GOTO 5190
5050 RN=(SEC(X,3)+.8)/(PO(1)+(VFM-(PSN/((I(3)-VSM)*(1-DCN)))))
5060 VPR=(I(1)-PO(1))*RN+SEC(X,2)
5070 CSEC=(SEC(X,5))/(F*((SEC(X,3)-SEC(X,1))*.1))
5080 PRINT" SECONDARY #";
5090 PRINT X+1
5100 PRINT" TURNS RATIO, Ns/Np .........................";
5110 PRINT RN
5120 PRINT" DIODE PEAK REVERSE VOLTAGE, Vpr ............";
5130 PRINT VPR;
5140 PRINT"VOLTS"
5150 PRINT" MIN. OUTPUT FILTER CAPACITANCE, Csec .......";
5160 PRINT CSEC*1000000!;
5170 PRINT"uF"
5180 PRINT
5190 NEXT X
5200 PRINT
5210 PRINT" ( HIT RETURN TO CONTINUE )";
5220 INPUT G
5230 PRINT
5240 IF FIRST=1 GOTO 5420
5250 CLS
5260 PRINT
5270 PRINT" THE PRIMARY OUTPUT FILTER CAPACITOR GIVEN AS A SOLUTION TO THIS"
5280 PRINT" DESIGN WAS CHOSEN FROM A TABLE OF 14 TYPICAL ALUMINUM ELECTROLYTIC"
5290 PRINT" CAPACITORS. EACH IS ASSUMED TO BE A +-20% TOLERANCE AND TO HAVE"
5300 PRINT" THE ASSOCIATED ESR FOR FREQUENCIES ABOVE 10KHz. OTHER CAPACITORS"
5310 PRINT" MAY HAVE WIDER TOLERANCES AND/OR DIFFERENT VALUES OF ESR. THE"
5320 PRINT" NEXT SEGMENT OF THIS PROGRAM WILL ALLOW THE USER TO ENTER THE"
5330 PRINT" VALUE OF CAPACITANCE, MIN. AND MAX., AND THE ESR OF ANY OTHER"
5340 PRINT" CAPACITOR HE MAY WISH TO USE."
5350 PRINT
5360 PRINT" THE USER IS ALSO GIVEN THE OPPORTUNITY TO SEE THE AFFECT OF"
5370 PRINT" CHOOSING A DIFFERENT VALUE OF INDUCTANCE, L. HE MAY ALSO CHANGE"
5380 PRINT" THE OPERATING FREQUENCY, F, THE MAXIMUM INPUT VOLTAGE, THE"
5390 PRINT" MINIMUM PRIMARY OUTPUT CURRENT, AND THE SWITCHING REGULATOR"
5400 PRINT" TO BE USED."
5410 PRINT
5420 PRINT" AT THIS POINT, THE USER MAY CHOOSE TO DO ANY OF THE FOLLOWING:"
5430 PRINT
5440 PRINT" CHANGE PARAMETERS ........ 1"
5450 PRINT" ALL NEW DESIGN ........... 2"
5460 PRINT" QUIT ..................... 3"
5470 PRINT
5480 PRINT" WHAT WOULD YOU LIKE TO DO";
5490 INPUT LTD$
5500 IF LTD$="1" GOTO 5590
5510 IF LTD$="2" GOTO 700
5520 IF LTD$="3" GOTO 6030
5530 PRINT
5540 PRINT" THIS PROGRAM IS NOT EQUIPPED TO LET YOU ";
5550 PRINT LTD$
5560 PRINT"."
5570 PRINT" NOW,";
5580 GOTO 5480
5590 PRINT
5600 FIRST=1
5610 PRINT" TO CHANGE A PARAMETER, TYPE IN THE NEW VALUE WHEN PROMPTED."
5620 PRINT" TO LEAVE THE PARAMETER UNCHANGED, SIMPLY HIT RETURN."
5630 PRINT
5640 J=L
5650 PRINT" L (uH)=";
5660 INPUT L
5670 IF L=0 GOTO 5710
5680 L=L/1000000!
5690 NEWL=1
5700 GOTO 5730
5710 L=J
5720 NEWL=0
5730 PRINT" Cmax (uF)=";
5740 J=CMAX
5750 INPUT CMAX
5760 IF CMAX=0 GOTO 5790
5770 CMAX=CMAX/1000000!
5780 GOTO 5800
5790 CMAX=J
5800 PRINT" Cmin (uF)=";
5810 J=CMIN
5820 INPUT CMIN
5830 IF CMIN=0 GOTO 5870
5840 CMIN=CMIN/1000000!
5850 NEWC=1
5860 GOTO 5890
5870 NEWC=0
5880 CMIN=J
5890 PRINT" ESR (ohms)=";
5900 J=ER
5910 INPUT ER
5920 IF ER=0 GOTO 5950
5930 NEWC=1
5940 GOTO 5960
5950 ER=J
5960 GOTO 970
5970 PRINT
5980 DATA 600E-9,600E-9,320E-9,100E-9,100E-9,100E-9,100E-9,100E-9,100E-9
5990 DATA 33E-6,.772,68E-6,.374,150E-6,.17,220E-6,.116,330E-6,.0772
6000 DATA 470E-6,.0542,680E-6,.0374,.001,.0255,.0015,.017,.0022,.0116
6010 DATA .0033,.0078,.0047,.0054,.0068,.0037,.01,.0026
6020 DATA 100,1200E-9,40,6,300,600E-9,65,8,300,600E-9,105,8
6030 END


  3 Responses to “Category : Science and Education
Archive   : EEPUB06.ZIP
Filename : SWITCHIN.BAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/