Automatic trimming of a PCB-based LC circuit
Apparatus and methods of automatically trimming a PCB-based LC circuit. The apparatus may comprise an interface to a printed circuit board (PCB). The PCB may include a PCB inductor and a PCB capacitor to form an LC circuit. The LC circuit may have an LC circuit frequency. The apparatus may comprise a variable capacitor communicatively coupled to the interface and configured to adjust an effective capacitance of the LC circuit.
1. An apparatus, including:
an interface to a printed circuit board (PCB), the PCB to include a PCB inductor and a PCB capacitor to form an LC circuit, the LC circuit to have an LC circuit frequency;
a variable capacitor communicatively coupled to the interface and configured to adjust an effective capacitance of the LC circuit; and
an adjustment circuit configured to adjust a capacitance of the variable capacitor to change the LC circuit frequency according to a reference frequency.
2. The apparatus of claim 1 , wherein the variable capacitor is connected in parallel to the PCB capacitor through the interface.
3. The apparatus of claim 1 , wherein the adjustment circuit is further configured to increase the capacitance of the variable capacitor to increase the effective capacitance of the LC circuit to decrease the LC circuit frequency.
4. The apparatus of claim 1 , wherein the adjustment circuit is further configured to decrease the capacitance of the variable capacitor to decrease the effective capacitance of the LC circuit to increase the LC circuit frequency.
5. The apparatus of claim 1 , wherein the adjustment circuit includes a frequency comparator circuit configured to compare the LC circuit frequency against a reference frequency, wherein the adjustment circuit is further configured to adjust the capacitance of the variable capacitor based upon the comparison of the LC circuit frequency and the reference frequency.
6. The apparatus of claim 5 , wherein the adjustment circuit further includes an up/down counter configured to increase or decrease a quantification of an adjustment for the capacitance of the variable capacitor based upon the comparison of the LC circuit frequency and the reference frequency.
7. The apparatus of claim 6 , wherein the variable capacitor is configured to adjust the effective capacitance of the LC circuit based upon the quantification of the up/down counter.
8. A method of trimming a capacitance of a printed circuit board (PCB), the PCB including a PCB inductor and a PCB capacitor to form an LC circuit, the LC circuit having an LC circuit frequency, comprising:
coupling a variable capacitor to, and in parallel with, a fixed capacitor wherein the variable capacitor is incorporated into an integrated circuit mounted to a PCB and the fixed capacitor is mounted to the PCB as part of an LC circuit,
comparing an LC circuit frequency of the LC circuit with a reference frequency,
increasing a capacitance of a variable capacitor if the LC circuit frequency is higher than the reference frequency, and
decreasing the capacitance of the variable capacitor if the LC circuit frequency is lower than the reference frequency.
9. The method of claim 8 , further comprising:
incrementing a counter if the LC circuit frequency is higher than the reference frequency,
decrementing the counter if the LC circuit frequency is lower than the reference frequency, and
setting the capacitance of the variable capacitor based on the value of the counter.
10. The method of claim 8 , further comprising:
terminating the method after both increasing and decreasing the capacitance.
11. The method of claim 8 , further comprising:
terminating the method after a predetermined amount of time has elapsed.
12. The method of claim 9 , further comprising:
determining an initial capacitance of the variable capacitor,
loading the counter with a value corresponding to the initial capacitance, and
setting the capacitance of the variable capacitor based on the value of the counter.
13. The method of claim 9 , wherein the variable capacitor comprises two terminals and a plurality of capacitor units, each capacitor unit selectively coupled to the terminals, wherein setting the capacitance of the variable capacitor further comprises selectively coupling a number of capacitor units equal to the value of the counter.
14. A microcontroller configured to trim a capacitance of a printed circuit board (PCB), the PCB including a PCB inductor and a PCB capacitor to form an LC circuit, the LC circuit having an LC circuit frequency, the microcontroller comprising:
a variable capacitor coupled to, and in parallel with, a fixed capacitor wherein the variable capacitor is incorporated into a microcontroller mounted to a PCB and the fixed capacitor is mounted to the PCB as part of an LC circuit,
the microcontroller programmed to:
compare an LC circuit frequency of the LC circuit with a reference frequency,
increase a capacitance of a variable capacitor if the LC circuit frequency is higher than the reference frequency, and
decrease the capacitance of the variable capacitor if the LC circuit frequency is lower than the reference frequency.
15. The microcontroller of claim 14 , the microcontroller further programmed to:
increment a counter if the LC circuit frequency is higher than the reference frequency,
decrement the counter if the LC circuit frequency is lower than the reference frequency, and
set the capacitance of the variable capacitor based on the value of the counter.
16. The microcontroller of claim 14 , the microcontroller further programmed to:
terminate the method after both increasing and decreasing the capacitance.
17. The microcontroller of claim 14 , the microcontroller further programmed to:
terminate the method after a predetermined amount of time has elapsed.
18. The microcontroller of claim 15 , the microcontroller further programmed to:
determine an initial capacitance of the variable capacitor,
load the counter with a value corresponding to the initial capacitance, and
set the capacitance of the variable capacitor based on the value of the counter.
19. The microcontroller of claim 15 , wherein the variable capacitor comprises two terminals and a plurality of capacitor units, each capacitor unit selectively coupled to the terminals, wherein the microcontroller is further programmed to selectively couple a number of capacitor units equal to the value of the counter.