SC_Digital_LC_meter.pdf
(
6709 KB
)
Pobierz
Here's a handy piece of test gear you can
build for yourself - a Digital LC Meter for
measuring inductance and capacitance over
a wide range. It's based on an ingenious
measurement technique, delivers surprising
accuracy and is easy to build.
M
ANY MODERN DMM's (digital
multimeters) have capacitance
measuring ranges, especially the up
market models. So it's not hard to
measure the value of capacitors, as
long as their value is more than about
50pF or so.
Below that level, DMMs are not very
useful for capacitance measurements.
Dedicated digital capacitance meters
are available, of course, and they gen
erally measure down to a few pF or
so. But if you want to measure things
like stray capacitance, they too are of
limited use.
40
SILICON CHIP
It's even worse when it comes to
measuring inductors. Very few DMMs
have the ability to measure induct
ance, so in many cases you have to use
either an old-type inductance bridge or
a
'Q'
meter. Both of these are basically
analog instruments and don't offer
either high resolution or particularly
high accuracy.
It's different for professionals who
for the last 20 years or so have been
able to use digital LCR meters. These
allow you to measure almost any pas
sive component quickly and automati
cally, often measuring not just their
primary parameter (like inductance or
capacitance) but one or more second
ary parameters as well. However, many
of these you-beaut instruments also
carried a hefty price tag, keeping them
well out of reach for many of us.
Fortunately, thanks to microcon
troller technology, that situation has
changed somewhat in the last few
years with much more affordable dig
ital instruments now becoming avail
able. These include both commercial
and DIY instruments, along with the
unit described here.
Main features
As shown in the photos, our new
Digital LC Meter is very compact. It's
easy to build, has an LCD readout and
fits snugly inside a UB3 utility box. It
won't break the bank either - we esti
mate that you should be able to build
it for less than $75.
Despite its modest cost, it offers
automatic direct digital measurement
over a wide range for both capacitance
siliconchip.com.au
. - - - - - - - - - - - - _ +5V
c
HOW IT WORKS: THE EQUATIONS
(A) In calibration mode
(1) WithiustLl andCI:
(2) With C2 added to Cl:
Fl- _.;"l==
F2 _
lOOk
lOOk
t
L
Ll
ex/Lx
2.".
(IITT
2.".
..J
Ll.(Cl +C2)
;-~l;:;;:;::~i
I
>---+---..
47k
Foul
(3) From
(1)
and (2), we can Rnd C
1:
F2'
Cl· (Fl' _ F2') .C2
(4) Also from
(l)
and (2), we can Rnd Ll:
1
Ll -
4.,,~
Fl'.Cl
Cl
1
I
I "
,i
lO
'"
.~
(8) In measurement mode
(5)
When Cx is connected: F3 _
2.". " Ll.(Cl +Cx)
Fl'
)
so Cx - Clo ( F3' -
1
(6)
Or when Lx is connected:
;:,-~=;;1~"=""
Fig.l: the circuit uses a wide-range test oscillator, the frequency of which
varies when an unknown inductor (Lx) or capacitor (Cx) is connected. This
oscillator is in turn monitored using a microcontroller which accurately
calibrates the unit and measures the change in oscillator frequency. The
microcontroller then calculates the unknown component's inductance or
capacitance and displays the result on an LCD.
F3 _
1
2.".
..J
(Ll +Lx).Cl
so
Fl'
)
Lx - Ll. ( F3' - 1
NOTE: F2
&
F3 should always
be
lower than Fl
(C) and inductance (L) with 4-digit
resolution. In fact, it measures capaci
tance from just O.lpF up to 800nF and
inductance from 10nH to 70mH. Meas
urement accuracy is also surprisingly
good, at better than ±1
%
of reading.
It
also operates from 9-12V DC,
drawing an average current of less
than 20mA. This means that it can be
powered from either a 9V alkaline bat
tery inside the case or from an external
plugpack supply.
How it works
The meter's impressive performance
depends on an ingenious measure
ment technique which was developed
about 10 years ago by Neil Hecht, of
Washington state in the USA.
It
uses
a wide-range test oscillator whose
frequency is varied by connecting the
unknown inductor or capacitor you're
measuring. The resulting change in
frequency is measured by a micro
controller which then calculates the
component's value and displays it
directly on an LCD readout.
So there are basically only two key
parts in the meter: (1) the test oscilla
tor itself and (2) the microcontroller
which measures its frequency (with
and without the component being
measured) and calculates the compo
nent's value.
To achieve reliable oscillation over
a wide frequency range, the test oscil
lator is based on an analog comparator
siliconchip.com.8u
with positive feedback around it - see
Fig.l. This configuration has a natural
inclination to oscillate because of the
very high gain between the compara
tor's input and output.
When power (+5V) is first applied,
the comparator's non-inverting (+)
input is held at half the supply volt
age (+2.5V) by a bias divider formed
by two lOOW resistors. However, the
voltage at the inverting input is ini
tially zero because the IOIlF capacitor
at this input needs time to charge via
the 47kQ feedback resistor. So with
its non-inverting input much more
positive than its inverting input, the
comparator initially switches its out
put high (ie, to +5V).
Once it does so, the IOIlF capacitor
on the inverting input begins charging
via the 47kQ resistor and so the volt
age at this input rises exponentially.
As soon as it rises slightly above the
+2.5V level, the comparator's output
suddenly switches low.
This voltage low is fed back to the
comparator's non-inverting input via
a 100kQ feedback resistor.
It
is also
coupled through the IOIlF input ca
pacitor to a tuned circuit formed by
inductor L1 and capacitor Cl. This
makes the tuned circuit "ring" at its
resonant frequency.
As a result, the comparator and
the tuned circuit now function as an
oscillator at that resonant frequency.
In effect, the comparator effectively
functions as a "negative resistance"
across the tuned circuit, to cancel its
losses and maintain oscillation.
Once this oscillation is established,
a square wave of the same frequency
appears at the comparator's output
and it is this frequency (F
out)
that is
measured by the microcontroller. In
practice, before anything else is con
• Inductance Range:
from about 1OnH to over 70mH (4-digit resolution)
• Capacitance Range:
from about 0.1 pF to over 800nF (4-digit resolution)
• Range Selection:
automatic (capacitors must be non-polarised)
• Sampling Rate:
approximately five measurements per second
• Expected Accuracy:
better than ±1% of reading, ±0.1 pF or
±
1OnH
• Power Supply:
9-12V DC at less than 20mA (non-backlit LCD module).
Can be operated from an internal 9V battery or an external plugpack.
MAY 2008
41
1 PC board, code 04105081,
125 x 58mm
1 PC board, code 04105082, 36
x 16mm
1 PC board, code 04105083, 41
x21mm
1 US3 utility box, 130 x 68 x
44mm
1 16x2 LCO module (Jaycar OP
5515 or OP-5516 - see panel)
1 5V 10mA OIL reed relay
(Jaycar 8Y-4030)
1 100llH RF inductor (L1)
1 4.0MHz crystal, HC-49U
1 OPOT subminiature slider
switch (81)
1 8P8T momentary contact
pushbutton switch (82)
1 8POT mini toggle switch (83)
1 18-pin OIL IC socket
1 2.5mm PC-mount OC
connector
1 4x2 section of OIL header strip
1 7x2 section of OIL header strip
1 jumper shunt
1 binding posVbanana socket,
red
1 binding posVbanana socket,
black
2 PC terminal pins, 1mm
diameter
4 M3 x 15mm tapped spacers
4 M3 x 6mm csk head machine
screws
5 M3 x 6mm pan head machine
screws
1 M3 nut (metal)
2 M2 x 6mm machine screws
(for 81)
4 M3 x 12mm Nylon screws
8 M3 Nylon nuts
4 M3 Nylon nuts with integral
washers
1 9V battery snap lead
1 10kQ horizontal trimpot (VR1)
Semiconductors
1 PIC16F628A microcontroller
programmed with 0410508A.
hex (IC1)
1 7805 +5V regulator (REG 1)
llN4148 diode (01)
1 1N4004 diode (02)
value of the unknown component
using one of the equations shown in
the lower section of the equations box
- ie, the section labelled "In Measure
ment Mode".
From these equations, you can see
that the micro has some fairly solid
"number crunching" to do, both in the
calibration mode when it calculates
the values of Ll and Cl and then in
the measurement mode when it cal
culates the value of Cx or Lx. Each of
these values needs to be calculated to a
high degree of resolution and accuracy.
To achieve this, the micro's firmware
needs to make use of some 24-bit float
ing point m:aths routines.
Circuit details
How this ingenious yet simple meas
urement scheme is used to produce a
practical LC meter can be seen from the
full circuit diagram of Fig.2. It's even
simpler than you might have expected
because there's no separate comparator
to form the heart of the measurement
oscillator. Instead we're making use
of a comparator that's built into the
microcontroller (lCl) itself.
As shown, microcontroller ICl is a
PIC16F628A and it actually contains
two analog comparators which can be
configured in a variety of ways. Here
we are using comparator 1 (CMP1) as
the measurement oscillator. Compara
tor 2 (CMP2) is used only to provide
some additional "squaring up" of the
output from CMPl and its output then
drives the internal frequency counting
circuitry.
The oscillator circuitry is essentially
unchanged from that shown in Fig.l.
Note that the micro controls RLYl
(which switches calibrating capacitor
C2 in and out of circuit) via its I/O
port B's RB7 line (pin 13). Diode Dl
prevents the micro's internal circuitry
from being damaged by inductive
spikes when RLYl switches off.
In operation, ICl senses which po
sition switch Sl is in using RB6 (pin
12). This is pulled high internally
when Slb is in the "C" position and
low when Slb is in the "L" position.
Crystal Xl (4MHz) sets the clock fre
quency for IC1, while the associated
33pF capacitors provide the correct
loading to ensure reliable starting of
the clock oscillator.
The results of ICl 's calculations are
displayed on a standard 2x16 line LCD
module. This is driven directly from
the micro itself, via port pins RBO-RB5.
siliconchip.com.au
Capacitors
1 221lF 16V RS electrolytic
2 lOIlF 16V RS electrolytic
1 10llF 16V tantalum
1 100nF monolithic
2 1nF MKT or polystyrene (1
%
if possible)
2 33pF NPO ceramic
Resistors (O.25W,
1
%)
3100kQ
168kQ
147kQ
24.7kQ
41kQ
nected into circuit, F
out
simply cor
responds to the resonant frequency of
Ll, Cl and any stray capacitance that
may be associated with them.
When power is first applied to the
meter, the microcontroller measures
this frequency (Fl) and stores it in
memory. It then energises reed relay
RLY1, which switches capacitor C2
in parallel with Cl and thus alters the
oscillator frequency (ie, it lowers it).
The microcontroller then measures
and stores this new frequency (F2).
Next, the microcontroller uses these
two frequencies plus the value of C2
to accurately calculate the values of
both Cl and Llo Uyou're interested, the
equations it uses to do this are shown
in the top (Calibration Mode) section
of the box titled "How It Works: The
Equations".
Following these calculations, the
microcontroller turns RLYl off again
42
SIUCON CHIP
to remove C2, allowing the oscillator
frequency to return to Fl. The unit is
now ready to measure the unknown
inductor or capacitor (Cx or Lx).
As shown in Fig.l, the unknown
component is connected across the test
terminals. It is then connected to the
oscillator's tuned circuit via switch Slo
When measuring an unknown capaci
tor, Sl is switched to the "C" position
so that the capacitor is connected in
parallel with Clo Alternatively, for an
unknown inductor, Sl is switched to
the "L" position so that the inductor
is connected in series with Llo
In both cases, the added Cx or Lx
again causes the oscillator frequency
to change, to a new frequency (F3).
As with F2, this will always be lower
than Flo So by measuring F3 as before
and monitoring the position of Sl
(which'is done via the C/L-bar line),
the microcontroller can calculate the
Trimpot VRI allows the LCD contrast
to be optimised.
Firmware
&
link functions
The firmware in ICI is designed to
automatically perform the calibration
function just after initial start-up.
However, this can also be performed
at any other time using switch S2.
Pressing this switch simply pulls the
micro's MCLR-bar pin (4) down, so
that the micro is forced to reset and
start up again, recalibrating the circuit
in the process.
Links LKI-LK4 are not installed for
normal use but are used for the initial
setting up, testing and calibration. As
shown, these links connect between
RB3-RBO and ground respectively.
For example, if you fit LKI and then
press S2 to force a reset, the micro will
activate RLYI (to switch capacitor C2
into circuit) and measure oscillator
frequency F2. This is then displayed
on the LCD.
Similarly,
if
you fit LK2 and press
S2, the micro simply measures the
initial oscillator frequency (Fl) and
displays this on the LCD. This allows
you to not only make sure that the os
cillator is operating but you can check
its frequency as well. We'll have more
to say about this later.
LK3
&
LK4 allow you to perform
manual calibration "tweaks" to the
meter. This is useful if you have access
to a capacitor whose value is very ac
curately known (because it has been
measured using a full-scale LCR meter,
for example).
With LK3 fitted, the capacitance
reading decreases by a small amount
each time it makes a new measure
ment (which is about five times per
second). Conversely, if LK4 is fitted
instead, the microcontroller increases
the capacitance reading by a small
increment each time it performs a new
measurement.
Each time a change is made, the ad
justment factor is stored in the micro's
EEPROM and this calibration value is
then applied to future measurements.
Note also that although the calibration
is made using a "standard" capacitor,
it also affects the inductance measure
ment function.
In short, the idea is to fit the jumper
to one link or the other (ie, to LK3 or
LK4) until the reading is correct. The
link is then removed.
As mentioned above, links LKI-LK4
are all left out for normal operation.
siliconchip.com.au
JAYCAR 16x2 LCD MOOUIfQP-6515/QP-5516
1 - - - . - - - - - - - - - - - - - - - - - - - - - -...,
I
I
'--------1
1
I
I
Fig.3: follow this layout
diagram to build the Digital
LC Meter but don't solder
in the switches or the test
terminals until after these
parts have been mounted
on the front panel. The 2·
way pin headers for
links
LKt·LK4
are
installed on
the copper side of the board
- see text.
The PC
board
usembJy
Is
atbu:hed to the case lid using M3 x t5mm spacers
and M3 x
8JDm
csk·head
machine screws. Make sure that the assembly
is
secll1"8 before
IOIderJns
the
switch
lup and test terminals.
They're only used for troubleshooting
and calibration.
Power supply
Power for the circuit is derived from
an external 9-12V DC source. This can
come from either a plugpack supply
or from an internal 9V battery. The
switched DC input socket automati
cally disconnects the battery when the
plugpack supply is connected.
The incoming DC rail is fed via re
verse polarity protection diode D2 and
power switch 83 to regulator REG1 - a
standard 7805 device. The resulting
+5V rail at REG1's output is then used
to power ICl and the LCD module.
Const!-"uction
Because it uses so few parts, the unit
is very easy to build. All the parts, ex
cept for switches 81-83 and the Cx/Lx
input terminals, are mounted on a PC
board coded 04105081 and measur
ing 125 x 58mm. The LCD module
connects to a 7x2 DIL pin header at
one end of the board and is sup
ported at either end using M3
Nylon screws and nuts.
Fig.3 shows the parts layout
on the PC board. Here's the
suggested order of fitting the
components to the PC board:
(1). Fit DC power connec
tor CONl and the two Imm PC
board terminal pins for the internal
battery connections.
(2). Fit the six wire links, four of
which go under where the LCD mod
ule is later fitted. Don't forget the link
immediately below switch 81.
(3). Install the 4x2 DIL pin header
used for links LKI-LK4. Note that this
item must be mounted on the copper
side of the board (not on the top), so
that a jumper can later be fitted to any
of the links when the board assembly
is attached to the box lid).
To install this header, just push the
ends of the longer sides of the pins into
the board holes by 1-2mm, then solder
them carefully to the pads. That done,
push the plastic strip down the pins so
that it rests against the solder joints,
o
o
o
o
44
No.
3
1
1
Value
100kQ
68kQ
47kQ
4.7kQ
1kQ
4-Band Code (1%)
brown black yellow brown
blue grey orange brown
yellow violet orange brown
yellow violet red brown
brown black red brown
5·Band Code (1%)
brown black black orange brown
blue grey black red brown
yellow violet black red brown
yellow violet black brown brown
brown black black brown brown
2
4
SILICON CHIP
siliconchip. com.au
Plik z chomika:
gasma
Inne pliki z tego folderu:
UV_Light_Box_2.rar
(6417 KB)
UV_Light_box.rar
(4485 KB)
SC_Radar_Speed_Gun_Pt1.pdf
(5169 KB)
SC_Universal_Charger_Pt2.pdf
(6219 KB)
SC_Universal_Charger_Pt1.pdf
(5244 KB)
Inne foldery tego chomika:
1992
1993
1994
1995
1996
Zgłoś jeśli
naruszono regulamin