Answers to some occasional questions about Version 2

Was it your own idea?

No. Definitely not. I stole it from AADE's web site. It looked like a fun project to build one - and it certainly was! There is some evidence that the idea was described by Dr. Hegewald in the (East) German magazine Funkamateur in 1988
( ps: I did write most (but not all) of the code for this meter myself. Microchip supplied the Floating Point +, -, / & *  ;-)


Can I use different values of L and C in the oscillator?

Certainly. The program completely compensates for "errors" in L and C. It is quite OK to use, for example L = 100uH and C = 820pF. The only requirement is that the combination have a resonant frequency about 10% to 15 % below 655360Hz.


Can I replace the relay with a 2N7000 FET?

This should be possible (with a "slight" change to the program and a "slight" loss of accuracy).

My attempt at this resulted in a "zero error" of up to 0.5pF and an initial drift of several pF per minute.
A relay, gives a zero error of 0 or 0.1pF and much lower drift.


Can I use a different Ccal?

Yes, but why bother. All that is required is for Ccal to be somewhere near 1000pF (+/- 20% should be quite OK).

The software calibration handles any inaccuracies in its value.


Which version PIC do I use?

Any 16F628 will work. It can be an "A" variant and 4 or 10 or 20MHz clock speed - but always use a 4.000MHz crystal.


I want to assemble your source code but can't find the FP.TXT file!

I didn't want to upset Microchip over copyright of the file, so that's why you won't find a copy on this site.

Go to the Microchip Web Site - http://www.microchip.com find the file FP24.A16 (and/or search for Application Note AN575). Take out the subroutines FLO1624 and INT2416, which aren't used.


Where can I get a Programmed Chip?

Everyone should have their own PIC programmer! Here is a very simple design that has worked well for me.
OOPs, someone broke that link. Must fix it when I get time.


How accurate is it?

  1. At best, +/- 1% or reading +/- "one least significant digit" More likely accuracy +/- 2% or reading +/- "one least significant digit".
    It is not as good as an RLC bridge. Poor "Q" components will be measured inaccurately.

  2. Claimed measuring range: (But see point 1 - small measurements are inaccurate, because of quantising error)
    1. Capacitors:
      0.0pF to about 0.1uF
      The upper limit is set by the "quality" of the comparators and by the "Q" of the capacitor being measured and by the inductor "Q". The amplitude of the oscillator gets pretty low for "big Cs". This leads to erratic oscillation.
    2. Inductors:
      0.0uH to somewhere over 10mH.
      The upper limit here seems to be set by stray capacitance in the inductor being measured. The meter cannot compensate for this.

How stable is it's reading supposed to be!

As a rough guide, the prototype showed a "zero drift" of about 3 to 5 pF in the first minute after switch on.

After 5 minutes "warm up", you can expect the "zero drift" to be about 0.1pF in 30 seconds.

For best stability, C & Ccal should be polystyrene, mica or MKT capacitors (+/- 10 to 20% capacitors are fine, they don't need to be 1% capacitors ;-)
Avoid ceramic capacitors as some can cause bad drift.

If the reading varies "wildly", then the relay may not be applying Ccal. See below for a cure.
Also, check that your DC power supply is "filtered". The 7805 regulator will clean this up OK. An unfiltered supply may cause very poor stability.


I can't open the source or hex files on my PC!

Some people have reported problems getting various assemblers &/or programmers to accept the asm or hex codes. This may be because of @#$%^&*! MS compatible software being confused by "line endngs". As I use the evil Mac & Linux operating systems for all my real work, files end up with a variety of "line endings" - most common are "line feeds" as used in all Unix based operating systems (Macs included), also, "carriage returns" on their own may be used. Sometimes, I also use "carriage return line feeds" as used by the evil empire. I do try to make all stuff "M$" compatible before giving it to others, but I sometimes forget. In any case, opening the files in a web browser, then cutting & pasting into your favourite text editor and saving usually fixes things.


Help. It does not work!

This part is a work in progress. I will add some more stuff here as problems are reported!

A lot of these have been built now, sufficient for me to think the design is "reasonably correct". This means that most problems will be incorrect wiring.
You have re-checked your wiring I hope.

The remaining problems will usually be components that aren't working properly.

A number of people have reported erratic oscillation and/or bad drift in the indicated value.

  • The relay may not be applying the Ccal capacitor. (This is the most common cause of really bad drift.)
    Check the "Test Mode" frequencies F1 and F2 as per the calibration instructions. F2 should be about 71% of F1. If the two frequencies are "close" (within 2%), then the relay is almost certainly NOT applying the calibration capacitor.
     
    You can use an ohm meter to check that the relay is operating correctly by:
    • Applying "Test Link 2" to Select Test Frequency F1
      (Yes, I know it is confusing, but that is the way I accidentally designed it ;-)
      Use the ohm meter to measure the contact resistance of the relay. It should NOT be ZERO. The ohm meter may get "upset" by the LC meter's oscillator and display some random value, but that is OK.
    • Applying "Test Link 1" to Select Test Frequency F2
      Use the ohm meter to measure the contact resistance of the relay. It should BE ZERO - or certainly less than one ohm.

    Possible causes of "relay faults" are:
    • A wiring fault or "dry joint". Check your wiring, yet again.
    • A "dirty" relay contact.
    • Insufficient voltage from the PIC to energise the relay. Expect about 4.4 volt when using a 500 Ohm "5 volt relay.
      If this is insufficient then this circuit
      can be used to apply a higher voltage to the relay. Select "R" to get the desired voltage across the coil.
      The unregulated supply voltage needs to be a volt or two higher than the "pull in" voltage of the relay.
    • A faulty Ccal capacitor.

  • If you have used "recycled" tantalum capacitors, then replace them with new ones! A surprisingly large number of them are "bad" (low capacitance and/or high internal resistance).

  • Poor Quality inductors can cause bad errors, erratic readings and drifting readings. It is a hard one to prove without a "Q" meter. Check the DC resistance (with any old Ohm meter). The resistance should be less than an ohm or two.

  • One case of unstable readings was traced to spurious high frequency oscillations on the comparator output. This was cured by connecting a 4.7pF capacitor across the 100K feedback resistor.

  • Your programmer may not be loading the whole program into the PIC. The program has three sections:
    • Program Code about 1053 words.
    • Configuration 1 word.
    • Data (strings, calibration constant) 62 bytes.
Please try the following tests:
  1. Adjust the "contrast" potentiometer (connects to pin 3 of the LCD). See if any characters appear on the display.

  2. Remove the PIC, disconnect the LCD display. Measure the power supply current. It should be al most "several milli-amp". Check that the voltage regulator is delivering 5.00 volt +/- 0.25 volt. This tests the voltage regulator and the power wiring.
  3. If steps 1 and 2 are OK, remove power, insert the PIC, re-apply power. Check the power supply current. It should be around 5 to 7 mA (maybe a bit more or less). Anything over 20mA indicates a faulty PIC chip.
  4. Press and release the "zero" push button. This resets the PIC. The PIC should then briefly operate the relay (about 0.2 second). If it does not, then the PIC may be faulty. But check the power, ground, reset and relay wiring anyway. Also check that the PIC oscillator is working.
  5. If it is all OK so far, the PIC is probably OK. Connect the LCD display and check the power supply current again. It should be about 16 to 20mA. if it is much higher the LCD display may be faulty. It is most likely OK. Double check that you are connecting the power to the correct part of the display.

Why do I get "Overrange" messages?

The "Overrange" message is displayed when the oscillator frequency exceeds 655350Hz or falls below 2560Hz.

This can mean that:

  1. The basic free running frequency of the oscillator is too high. Probably the 100uH (or 82uH) inductor is just a bit too much on the low side.
  2. The oscillator isn't running under the control of the LC "tank" due to a wiring fault around the L/C switch. (it will then turn into an RC oscillator of some sort and typically oscillates about 2 to 5Hz.)
  3. You are trying to measure an unknown component of too high a value. The upper limit is about 0.1 to 0.22uF for capacitors and 50 mH for inductors (but stray capacitance makes anything over 10mH rather inaccurate).
Note: When "zeroing" the meter:
  • In capacitance mode, leave the terminals "open".
  • In inductance mode, "short" the terminals.

Why can I only see 8 characters on the display?

There are at least two varieties of 16 character by one line LCD displays.

One version is logically an 8 character by two line display, but with all the characters displayed on the one line. To cater for this, one version of the PIC program inserts a "move to the second line" command (set Display Ram address to 40 hexadecimal) after the eigth character.

Note that the LC Meter can also use a 16 character 2 line display. Everything should be displayed on the first line. If the last 8 of your characters appear on the second line, then use the "other" hex file.


What is your #%$@! Email Address?

Sorry to be a bit secretive about this, but it is my anti-spam measure. If you have got this far, it is obvious you are keen.

I have a gmail account. It is just my ham radio callsign - all lower case.