OpenBCM V1.08-5-g2f4a (Linux)

Packet Radio Mailbox

IZ3LSV

[San Dona' di P. JN]

 Login: GUEST





  
PA3BNX > SOFT     29.03.08 08:30l 174 Lines 3609 Bytes #999 (0) @ WW
BID : 22528_PI8ZAA
Read: GUEST
Subj: Medium wave Loop Try out prg.
Path: IZ3LSV<IW2OHX<IR2UBX<IV3SCP<SR1BSZ<ON4HU<DB0RES<ON0AR<PI8ZAA
Sent: 080306/0927Z @:PI8ZAA.#NBO.NLD.EU #:22528 [Eindhoven] $:22528_PI8ZAA
From: PA3BNX@PI8ZAA.#NBO.NLD.EU
To  : SOFT@WW

Software for calculations for Magloop and range with varco
with switched parallel caps to lower (make greater the tune range)
In qb4.5
--------------------------Cut-------------------------------------
DECLARE SUB Basisscreen ()
DECLARE FUNCTION Round$ (x AS DOUBLE, y AS INTEGER)
DECLARE SUB Range (CMax1 AS DOUBLE, CMin1 AS DOUBLE, l1 AS DOUBLE)
DECLARE SUB Caparray (min AS DOUBLE, max AS DOUBLE)
DECLARE FUNCTION Capacity$ (l1 AS DOUBLE, f1 AS DOUBLE)
DECLARE FUNCTION Frequency$ (l1 AS DOUBLE, c1 AS DOUBLE)
DECLARE FUNCTION Henry$ (c1 AS DOUBLE, f1 AS DOUBLE)

''Float
DIM SHARED pi AS DOUBLE
DIM SHARED L AS DOUBLE
DIM SHARED c1 AS DOUBLE
DIM SHARED c2 AS DOUBLE
DIM SHARED c3 AS DOUBLE
DIM SHARED c4 AS DOUBLE

DIM Cmin AS DOUBLE
DIM Cmax AS DOUBLE
DIM F AS DOUBLE

''Array
DIM SHARED CAP(0 TO 17) AS DOUBLE

''Const
CONST ve$ = "V1.01"

''@27-02-2008
''@06-03-2008
''Probeersel  voor C's parallel aan de MW loopantenna.
''Om frequentie te verlagen.

pi = 4 * ATN(1)

''Put here the L, Cmin and Cmax values.
L = 180 * 10 ^ -6 ''200 uH
Cmin = 35 * 10 ^ -12 ''30 pF
Cmax = 860 * 10 ^ -12 ''1000 pF

'Put here the parallel to Varco's C's
c1 = 680 * 10 ^ -12
c2 = 1500 * 10 ^ -12
c3 = 3300 * 10 ^ -12
c4 = 5600 * 10 ^ -12

''----Main---------------------
CALL Basisscreen
CALL Range(Cmin, Cmax, L)

END
''-----------------------------

SUB Basisscreen

CLS
PRINT STRING$(80, CHR$(196))
PRINT "((C))PA3BNX Try out for MW Loop Antenna calculations.";
LOCATE CSRLIN, 80 - LEN(ve$)
PRINT ve$
PRINT STRING$(80, CHR$(196))

END SUB

FUNCTION Capacity$ (l1 AS DOUBLE, f1 AS DOUBLE)

IF f1 = 0 OR l1 = 0 THEN
 Capacity$ = " ?"
 EXIT FUNCTION
END IF

Capacity$ = STR$(1 / (4 * pi ^ 2 * f1 ^ 2 * l1))

END FUNCTION

SUB Caparray (min AS DOUBLE, max AS DOUBLE)
''Integer
DIM x AS INTEGER


''Min
CAP(0) = min
CAP(1) = max
CAP(2) = min + c1
CAP(3) = max + c1
CAP(4) = min + c2
CAP(5) = max + c2
CAP(6) = min + c1 + c2
CAP(7) = max + c1 + c2
CAP(8) = min + c1 + c3
CAP(9) = max + c1 + c3
CAP(10) = min + c3
CAP(11) = max + c3
CAP(12) = min + c1 + c3
CAP(13) = max + c1 + c3
CAP(14) = min + c2 + c3
CAP(15) = max + c2 + c3
CAP(16) = min + c1 + c2 + c3
CAP(17) = max + c1 + c2 + c3

'FOR X = 0 TO UBOUND(CAP)
' PRINT CAP(X)
'NEXT X

PRINT L; " Spoel in H"
PRINT min; max; " Cmin and Cmax varco F"
PRINT c1; c2; c3; c4; " C1-C4 in F (Parallel C's on Varco)"

END SUB

FUNCTION Frequency$ (l1 AS DOUBLE, c1 AS DOUBLE)

 IF l1 + 0 OR c1 = 0 THEN
  Frequency = " ?"
  EXIT FUNCTION
 END IF

 Frequency = Round((1 / (2 * pi * (l1 * c1) ^ .5 * 1000)), 2)

END FUNCTION

FUNCTION Henry$ (c1 AS DOUBLE, f1 AS DOUBLE)

 IF f1 = 0 OR c1 = 0 THEN
  Henry = " ?"
  EXIT FUNCTION
 END IF

 Henry = STR$(1 / (4 * pi ^ 2 * f1 ^ 2 * c1))

END FUNCTION

SUB Range (CMax1 AS DOUBLE, CMin1 AS DOUBLE, l1 AS DOUBLE)
''Integer
DIM x AS INTEGER
''Float
DIM y AS DOUBLE

CALL Caparray(CMin1, CMax1)

PRINT STRING$(80, CHR$(196))
PRINT "      F1 low   F2 high      Range (kHz)"
PRINT STRING$(80, CHR$(196))

FOR x = 0 TO UBOUND(CAP) - 1 STEP 2
 PRINT STR$(x) + SPACE$(3) + Frequency(CAP(x), l1) + SPACE$(3) + ">";
 PRINT Frequency(CAP(x + 1), l1) + SPACE$(3);
 PRINT Round(VAL(Frequency(CAP(x + 1), l1)) - VAL(Frequency(CAP(x), l1)), 2)
NEXT x

END SUB

FUNCTION Round$ (x AS DOUBLE, y AS INTEGER)
''ToDo
''x  To round input
''y  Figures behind the dot separator
''Give result back as as a string

 ''Integer
 DIM z AS LONG

 z = 10 ^ y
 Round = STR$((INT((x * z) + .5) / z))

END FUNCTION

--------------------------Cut-------------------------------------
73's from Lodewijk QTH Rhenen PA3BNX.


Read previous mail | Read next mail


 22.12.2024 20:27:45lGo back Go up