100% found this document useful (2 votes)
345 views6 pages

Pico C (English) - Part1

This document discusses the Pico C, a small and low-cost device that can measure very small capacitances down to fractions of a picofarad. This provides a much finer resolution than typical digital multimeters when measuring small capacitors important for applications like radio frequency circuits. The document outlines the features of the Pico C and includes pictures of various small capacitors ranging from 0.2 to 1000 picofarads.

Uploaded by

René
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
345 views6 pages

Pico C (English) - Part1

This document discusses the Pico C, a small and low-cost device that can measure very small capacitances down to fractions of a picofarad. This provides a much finer resolution than typical digital multimeters when measuring small capacitors important for applications like radio frequency circuits. The document outlines the features of the Pico C and includes pictures of various small capacitors ranging from 0.2 to 1000 picofarads.

Uploaded by

René
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

730333

test & measurement

Pico C
Please welcome
ATtiny & The Low Picofarads
By Vladimir Mitrovic (Croatia)

Even upmarket digital multimeters


boasting a built-in capacitance meter
are useless if you want to check
out tiny capacitances like 2.7 pF or
5.6 pF. Usually, you’re tied to a lowest
measuring range of 2000 pF, which
is a good laugh to RF designers and
radio amateurs. Although at 3.5
digits the DMM’s resolution is 1 pF,
any measurement below 200 pF or so
will produce coarse if not ridiculous
results. Pico C does a far better job.
Beating many DMMs hands down,
this little instrument easily measures
capacitances down to fractions of a
picofarad.

Small capacitances like in the sub-10- free to do the


picofarad (pF) range are often invisible but maths; they’re ugly).
by no means insignificant. The seasoned Small capacitors are a radio
RF designer will know not just where to amateur’s and radio repairman’s delight
sniff them out but also explain to the CPU oscillator fails to operate because it and your Editor could not resist scavenging
more DC-minded just how a few stray sees a significant reactance (feel free to his vintage component drawer and show
pF in a circuit may decide between wild do the maths; they’re no fun). Likewise, a you a few specimens in Figure 1. We’ve also
oscillation and controlled behaviour, EMC 10 cm long PCB track carrying pulses in the seen relatively small polystyrene capacitors
Go/No-Go, volume production in China nanoseconds range across a cheapo 4-layer — say, in the 500 pF range — used in high-
or ‘forever-a-prototype’. Here’s a solder board: easily 5 pF, causing ringing and end audio circuits and these you might also
blob with a residue of blackish dried resin other unwanted effects like resonances want to check for accuracy and drift due
around it: 1.5 pF and no wonder the 2 GHz upsetting digital logic at the far end (feel to ageing. Specifically in active (opamp)

Features
• range: <1 pF to 2000 pF (guaranteed); • low-cost, no SMD parts capacitor
2500 pF possible • ATtiny2313 DIP20 microcontroller • microcontroller, board and kit available
• resolution: 0.1 pF • free source and hex code from Elektor
• readout: 2-line LCD • easy calibration with 1000pF 1% reference

24 04-2011 elektor

WorldMags
730333

test & measurement

(a) Philips ‘beehive’ trimmers. Low loss. (b) Ceramic capacitors, lead pitch 5 mm. (c) Ceramic tubular capacitors. High
Ingenious construction ensures linear Pushing the limits of Elektor photography. working voltage (250 V typ.).
response across range(!) The rotor (moving Note the print to indicate value. 12 pF, 39 pF, 320 pF.
part) is usually connected to ground 0.82 pF and 120 pF.
(why?). 5–30 pF adjustable.

(d) Feedthrough capacitors. Low stray (e) Coffin and disc capacitors. Low loss (f) Ceramic trimmer capacitor.
inductance. Ideal for RF decoupling. factor, zero stray inductance. On-PCB 3.5–10 pF adjustable.
200 pF, 470 pF, 1 nF. coupling and decoupling. Fragile devices!
Connect straight to a PCB track and copper
earth plane. 27 pF, 820 pF.

(g) Tubular trimmer capacitors. Unless in (h) Silvered mica capacitor. 500 V working (i) ‘Twister’ is the cheapest ultra-small C
series, the rotor is best grounded. voltage, 1966 NOS. Ebay-able. you can make. Twist the wires to increase
0.3–3 pF, 1-6.5 pF. 470 pF. capacitance, stop and cut off approaching
target value. Okay for use up to 200 VDC.
0.2-1.5 pF adjustable.

Figure 1. Small capacitance does not necessarily equate to small size or small importance.
Here’s a showcase of rare-bird, vintage and DIY capacitors ranging from 0.2 to 1000 pF.

elektor 04-2011 25

WorldMags
730333

test & measurement

LCD1
IC1 +5V
D1 7805
1 3
2 x 16 (DEM16217)
K1 1N4004
2
C1 C2
9V...12V

LED+A
LED-C
VDD
VSS

R/W
RS
VL

D0
D1
D2
D3
D4
D5
D6
D7
E
10u 100n
63V

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
P1

10k
C3
JP1 R2
100n 5R6

20
VCC
1
PA2/RESET
R1 12
2 IC3 (AIN0) PB0 13
PD0 (RxD) (AIN1) PB1
1M

3 14
PD1 (TxD) (OC0A) PB2
1% 8 4 6 15
PD2 (INT0) (OC1A) PB3
VCC R 7 16
7 PD3 (INT1) (OC1B) PB4
DIS 8 17
PD4 (T0) (MOSI/SDA) PB5
IC2 9 18
6 3 PD5 (OC0B/T1) (MISO) PB6
THR OUT 11 19
PD6 (ICP) (UCSK/SCL) PB7
2 TLC555
TR ATtiny2313
CV GND XTAL2 XTAL1 GND
K2 5 1 4 5 10
X1
Cx S1

C7 C4 CALIBRATE C5 20MHz C6

220p 100n 15p 15p


1%
100823 - 11

Figure 2. Smart and utterly efficient is one way of describing this circuit, fully realising of course that all the measuring is actually carried
out by firmware running inside the ATtiny microcontroller.

filters, capacitor values really matter and and so determine the value of C x . Fair How it works
specifications like 1% suddenly make sense. enough, but if you want to measure Let’s take a tour of the circuit diagram in
So, for all measurements below 1000 pF very low capacitances, you’re bound to Figure 2. There’s old cronies to be found:
(1 nF) forget about your 3.5 digit DMM and be confronted with parasitic (or ‘stray’) a TLC555, an ATtiny, a 7805 and an LCD
use Pico C instead. capacitances in unexpected corners, as well so this should be fun. Together with R1
as electrical disturbances and many other and C7, the CMOS type TLC555 timer
Devil in the details factors that may affect the measurement. (IC2) forms a 50% duty cycle oscillator
The measurement principle applied in And that’s where commercial multimeters generating a frequency of around 3.2 kHz.
Pico C is well-known and widely used in often fail miserably despite their apparent Do not attempt to use the bipolar (NE)555
other similar instruments: an unknown 1 pF resolution. By contrast, Pico C solves here, you will shoot yourself in the foot. If
capacitance Cx determines the frequency these problems with a simple but carefully you connect your unknown capacitor C x
of an oscillator. Next, a microcontroller designed bit of hardware and cleverly to K2, effectively it’s in parallel with C7 so
goes about measuring the frequency written software. the oscillator frequency will be lowered.

Elektor Products & Services • Firmware and source code (free download): # 100823-11.zip
• PCB artwork: #100823-1.pdf
• Printed circuit board: # 100823-1
• Hyperlinks in article
• Programmed ATtiny-20PU: # 100823-41
• Kit of parts, including Project Case, programmed controller, LCD * First 100 kits with 1000 pF 1% polypropylene capacitor included.

and PCB: # 100823-71* Items accessible through www.elektor.com/100823

26 04-2011 elektor

WorldMags
730333

test & measurement

COMPONENT LIST
Resistors Miscellaneous
R1 = 1MΩ 1% K1 = 2-way PCB screw terminal block,
R2 = 5.6Ω lead spacing 5mm
P1 = 10kΩ trimpot, horizontal K2 = 2-way pinheader and receptacle,
lead spacing 0.1 in. (2.54mm)
Capacitors JP1 = jumper, 0.1 in. (2.54mm)
C1 = 10µF 63V, axial, lead spacing 2.5mm S1 = pushbutton, SPNO, 6mm
C2,C3,C4 = 100nF 50V ceramic, lead X1 = 20MHz quartz crystal, CL=18pF,
spacing 0.2 in (5.08mm) 50ppm, solder wires
C5,C6 = 15pF 100V ceramic, lead spacing LCD = DEM16217, 2x16 characters with
0.2 in. (5.08mm) backlight, e.g. Elektor # 030451-72
C7 = 220pF 63V 1%, polystyrene, lead LCD connector = 16-way (14+2) SIL
spacing 7.18mm, e.g. LCR Components Figure 3. All the components except the LCD pinheader and socket, right angled, lead
# EXFS/HR 220PF +/- 1% go on this simple, double-sided circuit board. spacing 0.1 in. (2.54mm). See text for
Optional: 1000pF 1% reference capacitor, The LCD is hooked up vertically or horizontally connection of DEM16217 LCD.
polystyrene or polypropylene using the 16-pin connector set. Here, horizontal 20-pin DIP socket for IC3
8-pin DIP socket for IC2
Semiconductors
mounting is used to allow the two boards to be PCB, Elektor # 100823-1
D1 = 1N4004 fitted in an Elektor Project Case. Kit of parts, including Project Case, PCB,
IC1 = 7805 LCD and programmed microcontroller;
IC2 = TLC555 8-pin DIP, e.g. Texas Elektor # 100823-71.
Instruments TLC555CP
IC3 = ATtiny2313-20PU, programmed, Elektor Shop # 100823-41, see [1]

Arguably, to ensure this frequency change and form a unique 25-bit binary counter, LCD backlight disabled — the instrument
is substantial (i.e. measurable) even if Cx has which in turn ensures a high resolution. alone consuming about 20 mA. Diode
just a few pFs to throw in, C7’s capacitance D1 affords a degree of protection against
should be kept low. The rest of the circuit is conventional. The polarity reversal of the DC input source.
ATtiny2313 micro ticks at 20 MHz thanks to Replacing the diode with a wire link, and
However, contrary to this reasoning a rather quartz crystal X1 and loading capacitors C5 the 7805 with a low-drop regulator allows
high value was chosen for C7 (220 pF, 1%) and C6 (see inset). The ATtiny2313 micro Pico C to be powered from four 1.5 V dry
for the following reasons: directly drives an LCD with two lines of 16 cells in series.
characters and LED backlighting you can
• parasitic capacitances around K2 and Cx (optionally) turn on by fitting jumper JP1. Assembly
now have less influence on the oscillator R2 if necessary defines the brightness. The little instrument is built on a printed
frequency; Be sure to adapt its value to match the circuit board designed by Elektor Labs.
• the relation between capacitance and requirements of the LCD you’re using. The component mounting plan appears in
oscillator duty-cycle is not linear for The Elektor supplied DEM16217 LCD Figure 3 and the associated copper track
capacitances under 100 pF. module has an internal series resistor and artwork as usual is a free download from

Free 1000 pF 1% reference capacitor included


with first 100 Pico C kits
In order to compensate for the disadvantage its backlight normally consumes 33 mA the project page on the Elektor website [1],
of C7’s relatively high capacitance, several at 5 volts. The LCD contrast setting is where you will also find the ATtiny source
measures were taken at the microcontroller adjustable on trimpot P1. code and hex files. Those of you with no
side: Pushbutton S1 when pressed pulls the access to an ATtiny programmer will like
PD0 line low triggering the start of the to hear that ready-programmed micros are
• instead of only one, it measures the time instrument’s calibration mode — more available from the Elektor Shop [1]. Even
period of 24 cycles; about this further on. better, a kit of parts is available, this includes
• thanks to the ATtiny’s high clock signal A totally traditional power supply around the printed circuit board, an Elektor Project
of 20 MHz, 680 counts are available to IC1 completes the design. The instrument Case, LCD and the programmed micro.
resolve a change of 1 pF, which is a solid is powered from a DC source with an output All parts are through-hole and fitted at
basis for accurate measurements even in voltage between 9 and 12 volts and capable the component side of the board. A good
the case of a 0.1 pF capacitance change; of doing about 200 mA if a backlit LCD quality 20-pin IC socket is recommended
• by configuration Timer0 and Timer1 is used. A cheap wallwart will do the job for position IC3 (note orientation). If you
are linked via their common PD5 pin admirably, but a 9 V battery may also be work neatly and copy-cat the lab prototype
(Timer0 OC0B output; Timer1 input pin) used for short measurement and with the pictured here you stand the best chances of

elektor 04-2011 27

WorldMags
730333

test & measurement

When a zero is not 0


C5 and C6, there you have them — tiny capacitors of just which you may also find printed as ‘n15’ (0.15 nF). Whichever,
15 picofarads! Small as they may be, if you get them wrong, the whatever, it’s not suitable for the Pico C circuit. And no, the print
entire circuit won’t work. These capacitors provide the required ‘150’ does not mean 15 with zero zeroes behind it, it actually stands
load on the quartz crystal. Let’s eavesdrop on Elektor labs for 150 pF; 15 pF is normally printed as … ‘15p’. Thank you, happy to
answering a tech phone call from a reader (a programmer, very assist.”
likely) complaining his microcontroller-based circuit doesn’t’ work
(because of a stalled CPU oscillator).
A can of worms to the Youtube generation; a chuckle from the old
hand at electronics from the radio days. Now try ‘p82’ and ‘n12’
“No Sir, the print ‘151’ on the ceramic capacitor from XYZ Corp. Inc. (Figure 1b) and all of you should be forever happy to have Pico C
does not mean 151 pF but 15 with one zero behind it. That’s 150 pF, handy on your workbench!

success. separate pin connections and wires shown time and can be repeated at will if you press
Care should be taken to prevent the quartz in Figure 4. When in doubt, consult the pushbutton S1 and keep it pressed until the
crystal case from touching the solder pads LCD’s datasheet. message “Cal:” appears on the LCD (this will
underneath it. That’s why the crystal is take 2-3 seconds). The microcontroller will
mounted either .1 of a millimetre above the Practical use and calibration guide you through the calibration process.
board surface, or with a piece of thin plastic First off, always connect the capacitor under As the first step, you will be prompted to
sheet or tape inserted. test directly to the Pico C test terminals, remove any capacitor from K2 and only then
briefly press S1:
Location C7 on the board
allows capacitors with various Cal: C=0pF (S1)
lead pitches and lead positions
(relative to the case) to be In the second step, you are
mounted. For the prototype prompted to connect the
a bright orange Siemens 1% 1nF/1% reference capacitor and
polystyrene device was used. briefly press S1:

Many options are available for Cal: C=1nF (S1)


housing the board in a small
enclosure and this is left to This ends the calibration
the constructor’s preferences, procedure. The message
insights and PayPal account
status. One prototype Calibrated
was fitted in an
Elektor Project Case is briefly displayed, whereupon Pico C enters
(# 100500-71), which its normal measuring mode. In measuring
is also included in the mode, the microcontroller measures the
kit you can buy for period of 24 consecutive cycles of the
the project. By now, it oscillator output signal, compares the
should be obvious that result with the values memorised during
the stray capacitance calibration, and then calculates and displays
at the TLC555’s input the capacitance of the currently measured
must remain as small as capacitor. For example, if the reference
possible. Consequently capacitor is still inserted, the display will
it is paramount that the board be mounted or, if that’s not possible, using the shortest show the message:
in such a way that the capacitors under possible leads. Remember, you’re dealing
test get connected with the shortest with tiny capacitances here and two test Cx= 1000.0pF
possible lead lengths. Remember, all leads of say 30 cms easily represent 50 pF
wiring — also of the fixed type — represents or more, especially if crossed or twisted. Or, if there is no capacitor inserted, the
a parasitic capacitance that adds to your Pico C requires calibration in order to display will show
measurements. work correctly and a 1000 pF (1 nF) 1%
As compared to other 2x16 character polystyrene, polypropylene, silver mica or Cx= 0.0pF
LCDs on the market the DEM16217 has other high precision capacitor is required
its L+ and L– connections at the ‘wrong for the job. The calibration routine in the You can measure capacitances up to
end’ of the 14-way connector row, so ATtiny’s firmware is called automatically 2,000pF or even a bit higher — the actual
a workaround was devised using two when Pico C is switched on for the first upper limit lies between 2400 and 3000

28 04-2011 elektor

WorldMags
730333

test & measurement

pF depending upon IC2’s free running


frequency. There are internal hardware and
software controls that detect overflows
produced by the counters and variables.
Overflows may cause wrong calculation
results or even a program lock-up. If you
insert a capacitor with a too high value, an
overflow will be detected at some level of
calculation and the message

Error: C>>
will be displayed. If this happens in
measuring mode, normal measurements
will be restored as soon as the large
capacitor is removed. If you use an
inappropriate reference capacitor, the same Figure 4. Inconveniently the DEM16217 LCD has its connections for the backlight LED(s)
at the pin-1 side of the connector row, forcing the use of two wires and pin connectors to
message can appear during calibration,
connect to the Pico C board.
which will be interrupted for repeating with
a proper reference capacitor.

Accuracy and stability period, without a capacitor attached the and measuring routines are written in
The accuracy of the little instrument readout was seen to vary between –0.1 pF assembler, to have better control over
depends primarily on the accuracy of and 0.1 pF. timing. BascomAVR is pretty wasteful when
your reference capacitor. Immediately If you notice persistent inaccuracies in your it comes to arithmetic with long variables

For all measurements below 1000 pF forget about your


DMM and use Pico C instead
after calibration you may expect 1%, measurements, like a readout other than and it was a challenging task to fit the whole
±1 digit accuracy or better, if you can get 0.0 pF without a test capacitor, or an error program into the ATtiny2313’s 2 KB of flash
your hands on a more precise reference clearly exceeding 0.1% when measuring the memory. That’s why some calculations
capacitor. Although the output frequency reference capacitor, you may repeat the and conditional branching are written in
of the TLC555 timer is only slightly calibration as explained before. Calibration the assembler, too, as you will be able to
temperature and voltage dependent, even values are written in the EEPROM inside the discover for yourself in the source code
small fluctuations become visible due microcontroller and will be reused the next file that’s available free from the Elektor
to the instrument’s high resolution. For time Pico C is switched on. If used at room website [1].
example, if you measure the same capacitor conditions with no significant temperature (100823)
for several minutes, some change in the changes, Pico C normally won’t require
measurement results may be observed. calibration each time it is used. However,
In the Elektor labs, on testing the stability with the microcontroller’s EEPROM allowing Internet Links
with a high-spec 1 nF polypropylene 100,000 write cycles (sez the Atmel sales
[1] www.elektor.com/100823
reference capacitor it was found that the rep), there should not be a problem if
measured value had a tendency to change you calibrate Pico C whenever you think [2] Bascom AVR Course, parts 1–6,
a few tenths of a pF upwards in the first two appropriate. Elektor September 2008 through
minutes or so after calibration. After several February 2009.
hours, the measured value may be seen to Software development
change to 1001 pF or 999 pF. This might The ‘EE_pico_C.bas’ program was written
seem inaccurate, but actually represents in BascomAVR programming language [2],
a deviation of only 0.1%. During the same with several assembler routines. Interrupt

elektor 04-2011 29

WorldMags

You might also like