home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1991 June
/
1991-06.d64
/
inductor
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
5KB
|
134 lines
0 clr
5 rem copyright 1991 compute publications intl ltd - all rights reserved
100 rem * * initialize * * *
110 hd$="inductor design[146]"
120 dimtn(40):fori=8to40:readtn(i):next
130 deffnpu(x)=3*val(cd$)*in+9*in*(x):deffnnn(x)=tn(ga)^2*.2*val(cd$)^2*x^2
140 poke53280,0:poke53281,0:poke646,7
150 rem * * menu page * * *
160 print"[147]"hd$
170 print"parameters for a single-layer,":
180 print"air-core inductor using enamel wire."
190 print"select: 1- inductance unknown";
195 print spc(59)"2- "chr$(34)" known"
200 input"choice: 1[157][157][157]";a$
210 ifa$<>"1"anda$<>"2"then200
220 ifa$="1"then260
230 print"enter the value of inductance"
240 input"(in microhenries)";in$
250 goto390
260 rem * * calculate inductance required*
270 print"[147]"hd$
280 print"determine inductance required:-"
290 print"select 1-inductance of an existing coil"
300 print"2-inductance of a tuned inductor"
310 input"choice 1[157][157][157]";b$:ifb$<>"1"andb$<>"2"then310
320 ifb$="1"then400
330 print"[147]"hd$
340 input"enter freq. in khzs";fr$
350 input"enter capacitance in mmfds";ca$
360 in$=str$(int(100*25330*10^6/(val(ca$)*val(fr$)^2)+.5)/100)
370 print"inductance reqired is:":print""in$" microhenries"
380 gosub1310
390 in=val(in$)
400 rem * * calculate inductor size * *
410 print"[147]"hd$:ifb$="2"ora$="2"then430
420 print"for an existing inductor enter all":print"parameters.":goto440
430 print"to determine an inductor size enter":print"any two parameters.
440 fl[178]0:co[178]5:ro[178]6:[141]1270:[153]"wire size (awg 8-40):"
450 ro[178]8:[141]1270:[153]"coil diameter (inches):"
460 ro[178]10:[141]1270:[153]"coil length (inches):"
470 co[178]30:ro[178]6:[141]1270:[133]ga$:ga[178][197](ga$):[139]ga$[178]""[167]fl[178]fl[170]1:[137]490
480 [139]ga[179]8[176]ga[177]40[167][141]1300:[137]440
490 ro[178]8:[141]1270:[133]cd$:[139]cd$[178]""[167]fl[178]fl[170]1
500 [139]in[177]0[175]fl[178]0[167]520
510 ro[178]10:[141]1270:[133]cl$:[139]cl$[178]""[167]fl[178]fl[170]1
520 [139]fl[175]in$[178]""[167][141]1280:[137]440
530 [139]fl[177]1[167][153]"require two parameters!":[137]440
540 [139]in$[178]""[167]580
550 [139]ga$[178]""[167]650
560 [139]cd$[178]""[167]720
570 [139]cl$[178]""[167]820
580 in[178][181](100[172].2[172][197](cd$)[174]2[172](tn(ga)[172][197](cl$))[174]2)
585 in[178][181](in[173]((3[172][197](cd$))[170](9[172][197](cl$)))[170].5)
590 in[178]in[173]100
600 [153]"a inductor with the above parameters"
610 [153]"will have an inductance of:":[153]""in"microhenries"
620 [153]"with close spacing of"tn(ga)[172][197](cl$)"turns."
630 [137]1040
640 [143] * * calculate awg# * * *
650 n[178][181](10[172][186]((3[172][197](cd$)[170]9[172][197](cl$))[172][197](in$)[173](.2[172][197](cd$)[174]2))[170].5)[173]10
660 [129]i[178]8[164]40:[139][180](tn(i)[179]n[173][197](cl$))[167][130]
670 [153]"an inductance of"in"microhenries"
680 [153]"will require"n"turns."
690 [153]"awg#"i"has"tn(i)"per inch, close spaced"
700 [153]"or use smaller awg, loosely spaced."
710 ga[178]i:[137]1060
720 [143] * * calculate diameter * * *
730 n1[178]tn(ga)[172][197](cl$)
740 mf[178]n1[174]2[172].2[173]in
750 cd[178][181](100[172](3[170][186](9[170]4[172]mf[172]9[172][197](cl$)))[173](2[172]mf)[170].5)[173]100:cd$[178][200]([196](cd),5)
760 [153]"for an inductance of "in$" microhenries"
770 [153]"and the above parameters, the diameter"
780 [153]"required is: "cd$" inches."
790 [153]"with"tn(ga)[172][197](cl$)"turns over "cl$" inch.":cl[178][197](cl$):[141]1240
800 [153]"tolerance "[181](1000[172](l[173][197](in$)[171]1)[170].5)[173]10"%"
810 [137]1060
820 [143] * * calculate length * *
830 ro[178]12:co[178]10:[141]1270:[153]"doing the calculation!":co[178]1:[141]1270
840 [139][165]nn(1)[177][165]pu(1)[167]940
850 [129]i[178]1[164]4[169].1
860 [139][180]([165]nn(i)[171][165]pu(i))[178][171]1[167]df[178][182]([165]nn(i)[171][165]pu(i)):[130]:[137]980
870 [139]df[179][182]([165]nn(i)[171][165]pu(i))[167]i[178]i[171].1
880 [153]"for an inductance of "in$" microhenries"
890 [153]"and the above parameters, coil length"
900 [153]"required is:"i" inches,":n1[178][181](10[172]tn(ga)[172]i[170].5)[173]10:cd[178][197](cd$):cl[178]i
910 [141]1240:[153]"with"n1"turns."
920 [153]"tolerance "[181](1000[172](l[173][197](in$)[171]1)[170].5)[173]10"%"
930 [153]"for better accuracy try custom design":[137]1060
940 [129]i[178]1[164].05[169][171].05
950 [139][180]([165]nn(i)[171][165]pu(i))[178]1[167]df[178][165]nn(i)[171][165]pu(i):[130]:[137]1010
960 [139]df[179][182]([165]nn(i)[171][165]pu(i))[167]i[178]i[170].05
970 i[178][181](100[172]i[170].5)[173]100:[137]880
980 [153]"for these parameters the length is":[153]" greater than 4 inches. ";
990 [153]"try a larger":[153]" diameter";
995 [139]ga[179]40[167][153]", and/or smaller ga."
1000 [141]1310:[137]400
1010 [153]"for these parameters the length is":[153]" less than .05 inches. ";
1020 [153]"try a smaller":[153]" diameter";
1025 [139]ga[177]8[167][153]", and/or larger ga."
1030 [141]1310:[137]400
1040 [143] * * custom * * *
1050 [153]"for loose spacing of fewer turns select":[153]"custom!"
1060 [153]"shiftwait to end. . . ctrlwait custom design"
1070 [145][194](653)[137]1260,1070,1070,1090
1080 [137]1070
1090 [153]"loadcustom "hd$
1100 [153]"an inductor with:"
1110 [153]"# of turns of awg#"ga
1120 [153]"coil diameter of ":[153]"coil length of "
1130 co[178]25:ro[178]4:[141]1270:[133]n1:ro[178]ro[170]2:[141]1270:[133]cd
1140 ro[178]ro[170]2:[141]1270:[133]cl
1150 [139]tn(ga[170]gc)[172]cl[179]n1[167]gc[178]gc[170]1
1160 [139]tn(ga[170]gc[171]1)[172]cl[178][177]n1[167]gc[178]gc[171]1
1170 [139]n1[177]tn(ga)[172]cl[170].0001[167][153]"more turns/inch!wait - awg# now"ga[170]gc
1180 cd[178]cd[170][181](100[172]1[173]tn(ga)[170].5)[173]100:l[178][181](100[172].2[172]cd[174]2[172]n1[174]2[173](3[172]cd[170]9[172]cl)[170].5)[173]100
1190 [153]"inductance is"l"uh"
1200 [153]"change :";
1210 [153][181](1000[172](l[173]in[171]1)[170].5)[173]10"%"
1220 [137]1060
1230 [143] * calculate l * * *
1240 cd[178]cd[170][181](100[172]1[173]tn(ga)[170].5)[173]100:l[178][181](100[172].2[172]cd[174]2[172]n1[174]2[173](3[172]cd[170]9[172]cl)[170].5)[173]100
1250 [142]
1260 [128]
1270 [151]783,[194](783)[175]254:[151]782,co:[151]781,ro:[158]65520:[142]
1280 [153]"with inductance unknown all parameters ":co[178]16:ro[178][194](214)
1290 [141]1270:[153]"onrequired!":[142]
1300 [153]"wire gauge is outside range! ":[142]
1310 [153]"shiftwait to continue!":[146]653,1:[142]
1320 [143] * * data statements * * *
1330 [131]7.6,8.6,9.6,10.7,12,13.5,15,16.8
1340 [131]18.9,21.2,23.6,26.4,29.4,33.1,37,41.3
1350 [131]46.3,51.7,58,64.9,72.7,81.6,90.5,101
1360 [131]113,127,143,158,175,198,224,248,282