-
Notifications
You must be signed in to change notification settings - Fork 11
/
A05_Trafoberekening.bc3
158 lines (157 loc) · 4.63 KB
/
A05_Trafoberekening.bc3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
1000 A=100:GOTO20:REM ### TRAFOBEREKENING / RIU ###
1010 HT=HO:VT=VE:MS=5:REM max. sekundaire wikkelingen
1020 DIMUS(MS),IS(MS),L(MS),Z(MS)
1030 GOSUB3000
1040 VE=3:GOSUB110
1050 PRINT" Geef eerst de secundaire"
1060 PRINT" spanningen en stromen:":PRINT
1070 PRINT" (Spanningen in [V])"
1080 PRINT" (Stromen in [A])":PRINT
1090 FORI=1 TOMS
1100 PRINT" Us ";I;:INPUT" = ";US(I)
1110 PRINT" Is ";I;:INPUT" = ";IS(I)
1120 IF(IS(I)>=0)AND(US(I)>=0)THEN1150
1130 PRINT:PRINT"Geen negatieve waarden !"
1140 GOSUB250:SD=10:GOSUB450:GOTO1100
1150 IFUS(I)=0 THENIS(I)=0:I=MS
1160 NEXTI
1170 GOSUB3500:GOSUB3000
1180 VE=4:GOSUB110
1190 PRINT" De wisselstroomfrekwentie":PRINT
1200 PRINT" (opgeven in Hertz)":PRINT
1210 INPUT" f [Hz]= ";BF:IFBF<=0 THEN1210
1220 PRINT
1230 PRINT:PRINT" De primaire spanning"
1240 PRINT:PRINT" (Opgeven in Volt)"
1250 PRINT:INPUT" Up [V]= ";PS:IFPS<=0 THEN1250
2000 GOSUB100
2010 X=0:FORI=1 TOMS:X=X+US(I)*IS(I):NEXTI
2020 GOSUB3000
2030 HO=1:VE=4:GOSUB110
2040 SR=X:CN=2:GOSUB4010
2050 PRINT"Het secundaire vermogen Ps = ";SR$;" VA"
2070 IFX<=0 THENSD=20:GOSUB450:GOTO1000
2080 I=6:IFX>4 THENI=5
2090 IFX>13 THENI=4
2100 IFX>26 THENI=3
2110 IFX>48 THENI=2
2120 IFX>65 THENI=1
2130 IFX<=125 THEN2230
2140 GOSUB250
2150 HO=5:VE=8:GOSUB110
2160 PRINT"Berekeningen tot maximaal 125 VA"
2170 HO=1:VE=12:GOSUB110
2180 PRINT"Wilt u meer berekeningen (J/N)?"
2190 GOSUB210
2200 IFIN=74 THEN1000:REM ja
2210 IFIN=78 THEN950:REM einde
2220 GOTO2190
2230 READX$,B2,C2,D2,E2,F2,G2,H2,K2
2240 I=I-1:IFI>0 THEN2230
2250 HO=1:VE=8:GOSUB110
2260 PRINT"Gebruik een ";X$;" kern"
2270 SR=X/B2:CN=2:GOSUB4010
2280 PRINT
2290 PRINT" Primair vermogen Pp = ";SR$;" VA"
2300 Y=(X/B2/PS)^2+C2^2
2310 S1=SQR(Y)
2320 SR=S1:CN=3:GOSUB4010
2330 PRINT
2340 PRINT" Primaire stroom Ip = ";SR$;" ";"Ampere"
2350 N1=(2+B2)/3*PS*K2/BF
2360 P1=1.13*SQR(S1/E2)
2370 SR=P1:CN=2:GOSUB4010
2380 PRINT
2390 PRINT" Prim. draaddiameter Dp = ";SR$;" mm"
2400 R1=N1*F2*2.72E-5/P1/P1
2410 SR=R1:GOSUB4010
2420 PRINT
2430 PRINT" Prim. weerstand Rp = ";SR$;" Ohm"
2440 N2=INT((PS-S1*R1)*K2/BF+0.5)
2450 PRINT
2460 PRINT" Prim. windingen Np = ";N2
2470 GOSUB3500:GOSUB3000
2480 HO=5:VE=4:GOSUB110
2490 PRINT"Isolatievoorschrift primair"
2500 UU=PS*H2/P1/N2
2510 SR=UU:CN=1:GOSUB4010
2520 HO=1:VE=8:GOSUB110
2530 PRINT"Spanning per laag : Ul = ";SR$;" Volt"
2540 QQ=INT(25/UU):IFUU>25 THENQQ=1
2550 FF=1:IFP1<=1 THENFF=0.06
2560 IFP1<0.2 THENFF=0.03
2570 HO=1:VE=12:GOSUB110
2580 PRINT"Na ";QQ;" la(a)g(en) moet geisoleerd"
2590 PRINT:PRINT" worden met ";FF;" mm lakpapier"
2600 GOSUB3500:GOSUB3000
2610 PRINT" Sekundaire draaddiameter:"
2620 VE=10:GOSUB110
2630 FORI=1 TOMS
2640 SR=1.13*SQR(IS(I)/E2):CN=2:GOSUB4010
2650 IFIS(I)=0 THEN2670
2660 PRINT:PRINT" Wikkeling ";I;" : ";SR$;" mm"
2670 NEXTI
2680 GOSUB3500:GOSUB3000
2690 PRINT" Sekundaire weerstand:"
2700 VE=10:GOSUB110
2710 FORI=1 TOMS
2720 IFIS(I)=0 THEN2770
2730 L(I)=1.13*SQR(IS(I)/E2)
2740 Z(I)=8.1E-5*G2*US(I)*K2/(BF*(2+B2)*L(I)*L(I))
2750 SR=Z(I):CN=2:GOSUB4010
2760 PRINT" Wikkeling ";I;" : ";SR$;" Ohm":PRINT
2770 NEXTI
2780 GOSUB3500:GOSUB3000
2790 PRINT" Sekundair aantal windingen:"
2800 VE=10:GOSUB110
2810 FORI=1 TOMS
2820 IFIS(I)=0 THEN2850
2830 Y=INT((US(I)+IS(I)*Z(I))*K2/BF)
2840 PRINT" Wikkeling ";I;" : ";Y;" windingen":PRINT
2850 NEXTI
2860 GOSUB3500
2870 HO=5:VE=10:GOSUB110
2880 SR$="Veel plezier bij het wikkelen !":GOSUB150
2890 SD=100:GOSUB450
2900 GOTO950
3000 SR$="++ TRAFOBEREKENING TOT 125 VA ++"
3010 HO=INT((HT-LEN(SR$))/2)-3:VE=0:GOSUB110
3020 GOSUB150
3030 HO=0:VE=6:GOSUB110
3040 RETURN
3500 HO=HT-14:VE=VT:GOSUB110
3510 SR$="<TOETS>":GOSUB150
3520 GOSUB210:GOSUB100
3530 RETURN
4000 REM opmaken
4010 IFSR<10 THENCT=CN+2:GOTO4030
4020 CT=INT(CN+2+LOG(SR)/LOG(10))
4030 GOSUB310
4040 RETURN
25000 DATA"M 102 A"
25010 DATA 0.88,0.07,1100,2.6,179,197,55, 170.62517
25020 DATA"M 85"
25030 DATA 0.86,0.045,850,3.0,155,186,45, 220.80904
25040 DATA"M 74"
25050 DATA 0.84,0.032,670,3.2,147,182,39, 280.13087
25060 DATA"M 65"
25070 DATA 0.80,0.022,480,3.8,127,155,33, 391.01601
25080 DATA"M 55"
25090 DATA 0.75,0.012,300,4.7,106,129,29, 625.6256
25100 DATA"M 42"
25110 DATA 0.65,0.006,160,6.0, 81,102,22,1173.048
30000 REM
30010 REM TRAFOBEREKENING TOT 125 VA
30020 REM --------------------------
30030 REM
32000 REM Oorspronkelijke auteur: ???
32010 REM Voor BASICODE bewerkt door:
32020 REM W. Koronowski; 10.12.89
32030 REM ATARI 800 XL
32040 REM Erstausstrahlung Radio DDR
32050 REM 891213
32060 REM
32070 REM Nederlandse vertaling:
32080 REM Stichting BASICODE
32090 REM TROS-RADIO dd 900418
32100 REM incl.corr. dd 900422