Consider the following tuning circuit connected to an antenna, where C is a vari
ID: 3888865 • Letter: C
Question
Consider the following tuning circuit connected to an antenna, where C is a variable capacitor whose capacitance ranges from Cmin to Cmax.
Write a Java program to design a tuning circuit for a given frequency, using a variable capacitor with given values for Cmin and Cmax. (A typical input is f = 16.7 MHz, Cmin = 14 pF, and Cmax = 365 pF.) The program should read in f (in Hz), Cmin and Cmax (in F), and print the required inductance value and the range of frequencies to which the circuit can be tuned by varying the capacitance.
AntennaExplanation / Answer
Assuming f = 1/(2*3.14*sqrt(L*C)) Hz
Hence L = (2*3.14*f)^2 * C
Java code :-
public class Tuning{
public static double inductance(double frequency, double capacitance){
return Math.pow((2*3.14*frequency),2) * capacitance;
}
public static void main(String args[]){
//Test data
double frequency = 16700000; //16.7 MHz
double cmin= 0.000000000014; //14pF
double cmax= 0.000000000365; //365pF
double Lmin= inductance (frequency, cmin);
double Lmax= inductance (frequency,cmax);
System.out.println("Lmin - Lmax: " + Lmin + "-" + Lmax);
}
}
Output: