 |
|
|
|
| |
|
Using a PIC micro device to measuring LC
16-June-2005
www.sixca.com
This tip demonstrate how to use a PIC micro devices measure L/C
with internal comparator module .
Theory of Series and Parallel resonance

Figure 1.
in figure 1. use a LC parallel circuit to generate resonance frequency
and we can obtain the frequency with following equation.
 --------------------(1)
Measure inductor(L)

Figure 2.
To measure an unknown inductor(Lx), Lx is connected in series with
L1
as figure 2 and oscillate the new resonance frequency(fx) and
we
can obtain a new
fx
(lower than f1) by :
 ----------------(2)
from Equation 1 and 2 ,Then Lx can obtain from :
 --------------------(3)
Measure capacitor(C)

Figure 3.
To measure an unknown Cx we connect Cx in parallel with C1 as figure 3,new
resonance frequency(fx) calculate from :
 -----------(4)
from equation 1 and 4 we obtain Cx from :
 -----------------(5)
Measure Resonance frequency
When we known how the resonance freqency cause by L and C we
can use any frequency counter to measure it but in the article we
want to use a PIC microcontroller to be this function.
To measure frequency we use the circuit as in figure 4, the
comparator with positive feedback to make a parallel LC oscillator with digital output
and take in to 8-bit or 16-bit counter input to
count number of pulse per second.

Figure 4.

Figure 5.
Comment
In practice, the circuit traces on the PCB, the switches , and the test leads all contribute a small amount of "Stray" inductance (Ls) and capacitance (Cs).These stray values add to the values of Lx or Cx.
To avoid these stray, you should be implement a "Zero" function in
your
hardware and software .
For an inductor mode, just short the
leads
and store measured Ls in memory. For a capacitor, zero it with the leads open and store measured Cs in memory when we
measure Lx or Cx we must subtracts measured values from stored values of stray inductance or capacitance in memory.
Other PIC projects
2.3 " Digital thermometer.PIC Microcontroller base project
3 Channel IR remote control the RC5 protocol IR remote
Control stepping motor via USB interface with PIC18F4550
ICD2 Clone Programmer and debugger for PIC Microcontroller
USB Data Acquisition with PIC18F4550
50 MHz frequency counter with LCD display + PIC16F84
|
|
|
|
|