This is only a preview of the Electronics TestBench issue of Silicon Chip. You can view 34 of the 128 pages in the full issue, including the advertisments. For full access, purchase the issue for $20.00. |
By RICK WALTERS
Build A Digital
Capacitance Meter
Got a junk box with a stack of capacitors with the
values rubbed off? Maybe you are building a filter
& need to match some capacitors closely.
Or maybe you just can’t read the capacitor
labels. This neat little Capacitance Meter will
soon let you check their values. It measures
capacitors from a few picofarads up to 2µF.
Every multimeter will read resistance values but few will read capacitance or if they do, they don’t read
a wide enough range. This unit can
be built in several forms. It can be a
self-contained unit with its own digital
display or it can be built as a capacitance adaptor to plug into your digital
22
multimeter. And you can run it from
batteries or an AC or DC plugpack.
Our preferred option is to build it
as a self-contained instrument running
from a DC plugpack. Batteries are OK
but we prefer to do without them
wherever possible. If you only use
the item on infrequent occasions, the
Silicon Chip’s Electronics TestBench
batteries always seem to be flat.
Our new Digital Capacitance Meter
is a simple instrument with no-frills
operation. It is housed in a small
plastic utility box with an LCD panel
meter and a 3-position switch labelled
pF, nF and µF. There are two terminal
posts for connection of the capacitor
to be checked and no On/Off switch.
To turn it on, you plug in your 12V
plugpack.
The unit will measure capacitance
values from just a few picofarads up
to 2µF. Its accuracy depends on calibration but it should be within ±2%.
Theory of operation
The theory of operation of the capacitance meter is simple and is illustrated in Fig.1. We apply a square wave to
Parts List
1 main PC board, code
04101991, 89 x 48mm
1 switch PC board, code
04101992, 44 x 30mm
1 plastic case, 130 x 68 x 41mm,
Jaycar HB-6013 or equivalent
1 front panel label, 120 x 55mm
1 3-pole 4-position rotary switch
1 knob to suit switch, Jaycar HK7020 or equivalent
1 power input socket, 2.1mm x
5.5mm, Jaycar PS-0522 or
equivalent
1 red binding post
1 black binding post
2 3mm x 10mm countersunk
head screws
4 3mm nut
2 3mm star washer
1 20kΩ multi-turn top adjust
trimpot (VR1)
1 2kΩ multi-turn top adjust
trimpot (VR2)
1 100kΩ vertical trimpot (VR3)
Semiconductors
1 74HC132 quad NAND Schmitt
trigger (IC1)
one input of an exclusive-OR gate and
feed the same square wave through a
resistor to charge the capacitor we are
measuring. The voltage on the capacitor is fed to the other input of the XOR
gate. While the capacitor’s voltage is
below the input switching threshold
the output of the gate will be high
(+5V). An XOR gate’s output is low
when both inputs are the same (low
or high) and high when they differ.
The larger the value of the capacitor the longer it will take to reach the
threshold and consequently the higher
the duty cycle of the output pulse
waveform (ie, wide pulses). Putting it
another way, if the capacitor is small,
it won’t take long for it to charge and
so the resulting pulses will be very
narrow. This pulse waveform is integrated (filtered) and fed to a voltmeter.
The circuit time constants are arranged
to make the voltage reading directly
proportional to capacitance.
How it works
Of course, like all theory, the practical realisation is a lot more complicat-
1 74HC86 quad exclusive-OR
gate (IC2)
1 TL071, FET-input op amp
(IC3)
1 2N2222, 2N2222A NPN
transistor (Q1)
1 78L05 5V 100mA regulator
(REG1)
2 1N914 signal diodes (D1,D2)
Capacitors
4 100µF 25VW PC electrolytic
1 1µF 25VW PC electrolytic
1 0.1µF MKT polyester
2 .01µF MKT polyester
1 12pF NPO ceramic
Resistors (0.25W, 1%)
1 1.5MΩ
2 20kΩ
3 100kΩ
4 10kΩ
1 39kΩ
1 1kΩ
1 100kΩ vertical trimpot (VR4)
Battery Option
1 SPST toggle switch (S2)
1 9V battery (216)
1 battery clip to suit
Plugpack Option
1 12VDC or 9VAC plugpack
1 panel mounting socket to suit
plugpack
1 78L05 5V 100mA regulator
(REG2)
1 3.9V 400mW/500mW zener
diode (ZD1)
1 1N4004 1A power diode
(D3)
1 470µF 25VW PC electrolytic
capacitor
1 2.2kΩ resistor (0.25W, 1%)
Resistors (0.25W, 1%)
1 8.2MΩ
1 15kΩ
1 820kΩ
1 10kΩ
2 220kΩ
1 8.2kΩ
1 20kΩ
1 1.5kΩ
Panel Meter Option
1 panel meter, Jaycar QP5550 or
equivalent
1 TL071 FET-input op amp (IC4)
1 0.1µF MKT polyester capacitor
Miscellaneous
Hookup wire, machine screws &
nuts, solder.
ed. The circuit of the Capacitance Meter
is shown in Fig.2 and you may find
difficulty in seeing any resemblance
between it and the simple circuit of
Fig.1. Never fear; we will explain it all.
First, IC1a is a Schmitt trigger oscillator and it oscillates at a rate determined
by the switched resistors and the .01µF
capacitor. IC1a has an output frequency of 16kHz on the pF range, 160Hz
on the nF range and 16Hz on the µF
range. The (approximate) square wave
output is buffered and inverted by
gates IC2b, IC2c and IC2d which have
their outputs wired in parallel. These
outputs are fed directly to pins 9 and
12 of IC1 and through trimpot VR2 and
the 15kΩ resistor to the capacitor we
are measuring (CUT).
The XOR gate IC2a corresponds to
the single XOR gate shown in Fig.1.
Note that Q1, the transistor that discharges the ca
pacitor at the end of
each charge cycle, is a 2N2222. This
has been specified instead of the more
common varieties such as BC547 or
BC337, in order to get sufficiently fast
switching times.
Fig.1: this is the
principle of the
Digital Capacitance
Meter. A square wave
is fed to an XOR gate
and the time delay in
charging the
capacitor produces a
pulse waveform with
its duty cycle
proportional to the
capacitance.
Silicon Chip’s Electronics TestBench 23
Fig.2: this circuit can be built as a
capacitance adaptor for a digital
multimeter or as a self-contained
instrument with its own LCD panel
meter. It can be powered from a 9V
battery or a DC plugpack, in which
case the circuit involving REG2 is
required.
We use two of the Schmitt NAND
gates of IC1 (74HC132) as the inputs
to IC2a and this has been done to
ensure that these inputs make very
fast transitions between low and high
and vice versa. Without the Schmitt
trigger inputs, the XOR gate circuit of
Fig.1 tends to have an indeterminate
performance and the pulse output can
be irregular.
The “capacitor under test” (CUT)
charges via VR2 and the 15kΩ resistor and eventually the voltage at the
input of IC1c (pin 10) will reach its
switching threshold and pin 8 will go
low. The capacitor is then discharged
by transistor Q1 which is driven from
the output of oscillator IC1a. The cycle
then repeats, with the capacitor being
charged again. The waveforms of Fig.3
illustrate the circuit operation.
This output pulse from IC2a is integrated by a 220kΩ resistor and a 1µF
capacitor to provide a DC potential to
the pin 3 input of op amp IC3, which
is connected as a voltage fol
lower.
Trimpot VR3 is used to set the output
at pin 6 to zero when the input is zero.
This “offset adjust” is most important
as an offset as low as 1mV is equivalent to a reading of 1pF on the most
sensitive range.
Since the output of IC3 must be able
to swing to zero, IC3 needs a negative
supply rail and this is provided by
IC1b which is connected as a 10kHz
oscillator. Its square wave output is
rectified by diodes D1 & D2 in a diode
pump circuit. The resulting DC supply
is about -3V.
Stray capacitance
Even with no external capacitor connected, the stray capacitance on the PC
boards and the interconnecting-wiring
will have to charge and discharge. This
stray capacitance will thus be seen by
the rest of the circuit as a capacitor
connected across the terminals. In effect, the stray capacitance will slightly
slow the charging and discharging of
the real capacitor under test.
24
Silicon Chip’s Electronics TestBench
To compensate for the stray capacitance, we’ve added a delay circuit to
the pin 13 input of IC1d. The idea is to
provide the same delay to IC1d as the
stray capacitance causes to pin 10 of
IC1c. Then both delays will cancel out.
The delay circuit consists of a variable
resistor (VR1) and a 12pF capacitor.
VR1 can be adjusted so that with no
external capacitor connected, the output of IC2a (pin 11) always stays low.
So far then we have described all
the circuit you need if you plan to use
your multimeter as the readout. The
output of IC3 is can be fed directly to
a digital multimeter and the reading in
mV corresponds to the capacitance in
pF, nF or µF. So if the reading is 0.471V
and you are switched to the pF range,
the capacitance is 471pF.
Digital panel meter
Unfortunately, we can’t simply
feed the output of IC3 to a digital
panel meter to make the instrument
self-contained. This is because currently available digital panel meters
appear to take their reference from
their 9V supply rail and so their input
voltage needs to be offset with respect
to the 0V line. That means that the
panel meter usually needs a separate
isolated 9V power supply which could
be a big drawback.
Fortunately, John Clarke has figured out an elegant way to solve the
problem.
As the negative input of the panel
meter sits around 2.6-2.8V below the
positive rail (say 6.3V for a 9V supply),
we need an op amp to shift the output
of IC3 from a 0-1.999V range to a 6.38.2999V range. IC4 does this for us.
The output of IC3 is attenuated by
a factor of 4 by the two 20kΩ resistors
and the 10kΩ resistor connected to pin
3 of IC4, while the gain of 2 is determined by the 10kΩ feedback resistors
connected to pin 2. The 1.5MΩ resistor
has a negligible effect.
Thus, the 0-1.999V variation at the
output of IC3 is translated to a 1V
swing at the input of the digital panel
meter. Resistors RA and RB are chosen
to be 10kΩ and 39kΩ respectively for
the meter’s attenuator, which gives
it a full scale sensitivity of 1V for a
display of 1999.
Trimpot VR4 sets the panel meter’s
readout to zero when the output of
IC3 is zero. The decimal points on
the display are all tied to the OFF
connection through 100kΩ resistors.
Fig.3: these waveforms show the operation of XOR gate IC2a. The bottom
trace is the oscillator square wave while the top trace is the output with
a small capacitor under test. The middle trace shows the output
waveform for a larger capacitor. The output waveform is then integrated
(filtered) to produce a DC voltage which is proportional to capacitance.
To illuminate a decimal point it is
connected to the ON terminal by S1b,
the second pole of the range switch.
Power supply
As already noted, the Capacitance
Meter can be run from a 9V battery
or from a DC or AC plugpack. If you
plan to use a 9V battery, then you will
have to fit an on/off switch instead of
the plugpack socket. The 9V battery
then feeds the panel meter, IC3 and
IC4 directly and the 3-terminal 5V
regulator REG1.
REG1 supplies CMOS gates IC1 and
IC2. This is necessary to ensure that
the meter’s calibration does not vary
with changing supply voltage.
If you plan to use a plugpack, more
circuitry is required and this involves
diode D3 and the additional 3-terminal regulator REG2.
Diode D3 ensures that a DC plug
pack cannot cause any damage if it
is connected with the wrong lead
polarity. It then feeds REG2 which is
jacked up by 3.9V zener diode ZD1 so
that it delivers 8.9V to IC3, IC4 and
the digital panel meter. REG2 also
supplies REG1.
PC board assembly
The Digital Capacitance Meter uses
two PC boards as well as the digital
panel meter. The main PC board
houses most of the circuitry while
there is a smaller board for the range
switch. Before starting assembly,
check each PC board for defects such
as shorted or broken copper tracks
or undrilled holes. The diagram of
Fig.4 shows the details of the two PC
boards and all the interconnecting
wiring.
You can begin by assembling the
switch board which mounts just the
3-position switch and three resistors.
Note that the specified switch is a
3-pole 4-position rotary type and it
will have to be changed to give just
three positions. This is done by removing the switch nut and washer,
then prising up the flat washer which
has a tongue on it. Move the tongue
to the next anticlockwise hole and
refit the washer and nut. It may sound
complicated but once you are actually doing it, it will be straightforward.
Make sure the switch provides three
positions before you solder it to the
board.
Next, fit and solder the links, resistors and diodes into the main board,
then mount the trimpots, capacitors,
3-terminal regulators and transistor.
By the way, the 78L05 regulators
Silicon Chip’s Electronics TestBench 25
Fig.4: this is the complete wiring
of the Digital Capacitance Meter.
The LCD panel meter is shown
as well as the optional regulator
(REG2) required for plugpack
operation.
Fig.5: this diagram shows the
connections and formulas to be
used when calculating a
capacitor’s value for the
calibration method. The digital
multimeter used is assumed to
have a typical accuracy of 2%.
Once everything fits OK, wire the
boards together following Fig.4 carefully. Make the leads long enough to
be able to test the unit on the bench
but not too long or they will be a nuisance when assembling the boards
into the case.
When all the wiring is complete,
check your work carefully and then
apply power to the unit. The display should light and you should be
able to make some measurements
on capacitors although the readings
probably won’t be too close to the
mark at this stage. It will be need to
be calibrated.
Calibration procedure
look like ordinary plastic TO-92 transistors because they have the same
encapsulation. They don’t work like
transistors though, so don’t confuse
them with the TO-18 metal-encapsulated 2N2222 transistor.
Finally, mount the op amps and
lastly, the two CMOS ICs.
Once the two PC boards are assembled, it is time to work on the plastic
case which needs the cutout for the
26
LCD panel meter and the other holes
drilled. The specified panel meter
comes with a bezel surround so you
don’t need to be ultra-neat when
making the cutout for it.
It is easier to drill all the holes
in the plastic case and check that
everything fits before wiring the units
together. If you don’t intend to use
the LCD panel meter you may be able
to use a slightly smaller case.
Silicon Chip’s Electronics TestBench
Now that you have a working capacitance meter how do you calibrate
it? We have used 1% resistors on
the range switch, so range-to-range
accuracy should be within 1%. The
basic accuracy of the instrument
is set by the .01µF capacitor at the
input of IC1a, along with VR2 and
the associated 15kΩ resistor. The
input thresholds of IC1 also affect
the accuracy. These input thresholds
can have a variation in excess of 1V
from device to device, when using a
5V supply.
If we could get a precise .01µF
capacitor we could specify an exact
resistor value to replace the 15kΩ
resistor and trimpot VR2. Unfortunately, this would not solve the
input threshold variation problem.
These two photos show how the PC
boards and the LCD module all fit
inside the plastic case. Note that the
LCD module is optional – see text.
As well, virtually all MKT capacitors
have 10% tolerance (K), so we accept
the supplied value of the capacitor
and adjust the trimpot to calibrate
the meter.
Having said all this, we still need
an accurately known value of capacitor to carry out the calibration.
One way is to obtain five or more of
the same value (preferably .015µF or
.018µF) and measure them all using
the uncalibrated meter. Having measured them, add up the values and
calculate the average and then use
the capacitor which is closest to the
average as the calibration unit. The
problem with this method is that the
whole batch could have its tolerance
in the same direction.
If you have a digital multimeter
there is a much better way. Power up
an AC plugpack and set your DMM
to read AC volts. Connect a 150kΩ
resistor and a .015µF or .018µF capacitor in series across the AC output.
Measure the AC voltage across each.
We then use the formula shown in
Fig.5 to calculate the capacitor value.
By measuring the voltage across
the resistor we can calculate the
current through the capacitor and
Silicon Chip’s Electronics TestBench 27
on the panel meter’s PC board until
the correct reading is displayed.
Fault finding
F
F
F
Digital Capacitance Meter
SILICON
CHIP
Fig.6: this actual size artwork for the front panel can be used as a drilling
template for the switch and the display cutout.
we then divide the capacitor voltage by the capacitor current to find
its impedance. This method should
give you an accuracy better than
2%, depending on your multimeter’s
AC performance, although it does
assume that the mains frequency is
exactly 50Hz.
Testing
Once you know the capacitor’s
value you can use it to do the calibration. Firstly, with power applied
and nothing connected to the input
terminals, connect your multimeter
to pins E & F on the main PC board.
Adjust trimpot VR1 until the DC
voltage at pin 11 of IC2 is a minimum
(5-10mV depending on the setting of
VR3). Note that it dips to a minimum
then rises again. Then adjust VR3
until the meter reading is 0mV.
Connect the known capacitor
to the input terminals and, on the
appropriate range, adjust trimpot
VR2 for the correct reading. If you
get close but cannot reach the value,
add an extra capacitor in parallel
with the .01µF capacitor on pin
2 of IC1, as explained in the fault
finding section.
If you elected to use the Digital
Panel Meter, carryout the calibration described above, then adjust
VR4 for a zero reading with no capacitor connected. This done, connect the standard capacitor across
the terminals and adjust the trimpot
Fig.7: the actual size
artworks for the two PC
boards. Check your boards
carefully before installing
the parts.
The first check to make, if the circuit is not working, is to measure the
DC voltages. Check that the input to
REG1 is around 9V with either battery
or plugpack supply. Its output should
be 5V ±5%. If any of these voltages
are missing, you will have to trace
from where they are present along the
track (or tracks) to where they vanish.
Obviously, if the 9V battery supply
measures low or 0V, disconnect it
quickly as you may have a short and
the battery will be rapidly flattened.
For this reason, it is wise to use a
bench power supply with an ammeter, if you have one, to do the initial
testing.
Next, check the negative voltage at
pin 4 of IC3. This voltage will vary depending on the current drawn by IC4
but it should be somewhere around
-3V. If there is no negative voltage, it
is likely that IC1b is not oscillating,
so check the soldering and tracks
around this device and the polarities
of D3 and D4. When it is oscillating
the DC voltage at pin 6 should be
about +2.3V. The AC voltage should
be around 2.75V.
Similar DC and AC readings should
be present at pins 3 and 12 of IC1 and
pins 3, 6 & 8 of IC2. If you discover
any voltages that are wildly different
then you have found one (or all) of
your faults.
If you cannot adjust trimpot VR2
to get the meter reading high enough
then add a 470pF or .001µF capacitor
in parallel with the .01µF capacitor at
pin 2 of IC1. Provision has been made
on the PC board for this additional
capacitor. The value will depend
on all the component tolerances, as
previously explained.
Using it
Always start from the pF range
and turn the switch clockwise if the
readout indicates over-range.
The pF range covers from 1-1999pF;
the nF range covers 0.1nF to 199.9nF
(or if you prefer .0001µF to .1999µF);
and the last range covers .001µF to
1.999µF. If you don’t like nanofarads,
and would like the middle range to
display µF, disconnect the P1 decimal
point wire from S1b. Of course, you
will have to alter the label lettering to
SC
agree with this modification.
28
Silicon Chip’s Electronics TestBench
|