LC Meter ( pic based ) - advice please.

Thread Starter

teutonic

Joined Dec 29, 2009
4
Hello friends

Years late as usual, but I've just completed the pic based LC meter 2.0
http://electronics-diy.com/lc_meter.php

Although the device works as it should, current consumption is running at 100 mA , not 10 mA as spec.

'Scoping the crystal oscillator suggests its running at 20 MHz, not the stated 4 MHz.

And my third puzzlement is no cCal ( 1000pf +/-1% ) is fitted or required to be fitted. The assembly instruction states in black and white 'no component in c4 position' and parts list 'C4 - no component.'

To my dissapointment a 1 percent tolerance silver mica capacitor of 1500 pf reads as 1619 pf, well outside the tolerance band of 15pf either way.

Any tips/suggestions/advice to get it more accurate appreciated


 

AlexR

Joined Jan 16, 2008
732
Do you have the back-light connected on the LCD panel? If you do that will draw about 70mA-80ma which would account for the extra current that you are seeing.

If the clock frequency is wrong you will get wrong readings. I would try it with a new 4MHz crystal. Also the values of the capacitors across the crystal as shown in the circuit (10pF) seem a bit on the low side. The usual value for capacitors across a PIC crystal is 22pF. In fact try changing the capacitors before you go out and buy a new crystal, they could be your problem.

But as the Stg. says you would be be far better off building the PIC16F628 version of the meter. Not only is it a simpler circuit with fewer components but it also has a built-in calibrate function that allows you you to fine fine-tune the meter calibration. I built one a couple of years ago and it works very well.
 

Thread Starter

teutonic

Joined Dec 29, 2009
4
I'm wondering why you built the PIC16F84 version when the PIC16F628 version is more modern, and does not require the LM311 comparator?

http://ironbark.bendigo.latrobe.edu.au/~rice/lc/index2.html

Anyway, your test leads are rather long, and your test clips rather large. They will add parasitic inductance and capacitance.
Hi I'll check that link out

Thanks for the connector advice. I've puzzled over what to do for the best connector wise. I will want rapid removal for matching low value L and C from batches of 20 to 50. Ive got some spring loaded speaker connectors coming but they're quite chunky too.

I bought the thing as a kit. I'm not au fait with pic wizardry but I couldnt resists trying this as Im desperate for an accurate lc meter . My last homebrew projects were back in the days of the 555 741 and BC109 and 2N3918 :) So this looked great for its simpleness but its too inaccurate if my silver mica test was anything to go by
 

Thread Starter

teutonic

Joined Dec 29, 2009
4
Do you have the back-light connected on the LCD panel? If you do that will draw about 70mA-80ma which would account for the extra current that you are seeing.

If the clock frequency is wrong you will get wrong readings. I would try it with a new 4MHz crystal. Also the values of the capacitors across the crystal as shown in the circuit (10pF) seem a bit on the low side. The usual value for capacitors across a PIC crystal is 22pF. In fact try changing the capacitors before you go out and buy a new crystal, they could be your problem.

But as the Stg. says you would be be far better off building the PIC16F628 version of the meter. Not only is it a simpler circuit with fewer components but it also has a built-in calibrate function that allows you you to fine fine-tune the meter calibration. I built one a couple of years ago and it works very well.
Thanks for the advice. Yes the backlights on and that'lll be the current draw then - thanks for confirming.

Well again, I bought this thing as a kit. I dont no fuffin about pics except they seem ever so clever for a little dil package :)

Is there a circuit anywhere for this updated one ?

cheers again
 

SgtWookie

Joined Jul 17, 2007
22,230
Hi I'll check that link out
The entire project is available on that link; schematic, board layout, parts list, source code, .HEX file, and calibration instructions. You may need to do a bit of research to locate a reed switch that will fit the existing board layout. Note that the schematic shows a 100uH inductor, but an 82uH inductor is preferred.

Thanks for the connector advice. I've puzzled over what to do for the best connector wise. I will want rapid removal for matching low value L and C from batches of 20 to 50. Ive got some spring loaded speaker connectors coming but they're quite chunky too.
Keep in mind that a straight piece of wire 10mm (about 0.4") long has an inductance of about 15nH. If there are kinks or loops in the wire, the inductance increases. Your test leads' capacitance is accounted for, but not the inductance (your leads are "open") during the zero calibration. Therefore, the leads' inductance adds to the reactance of the DUT (device under test).

It's hard to estimate from the photo what your total test lead length actually is, but I'll make a stab at it and say 2" each from the board to the tip of the clip, for 4" total. At 15nH per 0.4", that will be very roughly about 150nH added to the reactance. If you're measuring capacitance, the inductance will show up as capacitance.

Note that since your test leads can bend/flex/kink/flopping around all over the place at will, your calibration would need to be updated any time they moved. Otherwise, you introduce an unaccounted-for variable. Your solution is going to be fixed terminals that are as short as possible. If you look at the original photos, the project has two round terminals for insertion of DUTs.

Remember how I mentioned that inductance contributes to the total reactance of the device? It looks like you're measuring the cap at the ends of the untrimmed leads. Keep in mind that 15nH per 10mm figure, as unless you'll be installing the cap with the full length of the leads, your test results will be off. Take the measurement right at the base of the device.

I bought the thing as a kit. I'm not au fait with pic wizardry but I couldnt resists trying this as Im desperate for an accurate lc meter . My last homebrew projects were back in the days of the 555 741 and BC109 and 2N3918 :) So this looked great for its simpleness but its too inaccurate if my silver mica test was anything to go by
The basic kit is probably OK.
I don't know how you tested the xtal with your scope to get 20MHz, but if you touched the probe to either of the xtal connections, you added quite a bit of capacitance to the circuit, and that will throw the timing way off. Try holding the probe near, but not touching. The added capacitance will be minimized, but you should still be able to see a low-level clock.
 

SgtWookie

Joined Jul 17, 2007
22,230
One way to reduce the effects of test lead length is to use a flat plane. An infinite plane has no inductance.

A side benefit of using a flat plane is that it makes testing of SMT/SMD capacitors and inductors very easy, if the plane for each test terminal are designed so that there is a "V" groove between them.

What is the exact distance between the test points on the PCB?

[eta]
Here is the basic idea for a PCB test plate "infinite" plane:



Flat copper or brass stock is added to the plane to create a deeper "V", so that SMT/SMD components can be wedged into it for a solid connection.

The + and - connect to your LC meter's PCB via screws or very short standoffs. It is preferable to solder the connections.

The Tn's are test points where you can insert leaded components that have various spacings. It is preferable to use gold plated hollow cylinders. You might make some from "D"-type connector female pins, trimming off the closed end with a cutoff tool, perhaps a Dremel with an abrasive disk mounted. Solder the test points in place.

Since the test plate is not actually an infinite plane, a small amount of inductive reactance will be added; however the error will be orders of magnitude smaller than your current arrangement.
 

Attachments

Last edited:

AlexR

Joined Jan 16, 2008
732
I'm afraid I'm not as optimistic about your kit as the Sgt is. The fact that they are using lower than normal crystal load capacitors and the fact that they omit Ccal from the circuit suggests to me that their board layout is having problems with stray capacitance.
If there are stray capacitance issues and if they are (as I suspect) caused by the proximity of the LCD display to the PIC circuit then you may be able to fix it by moving the LDC display off the circuit board, connect it via a ribbon cable. You would then have up the crystal capacitors to 22pF and install Ccal plus mount the circuit in a bigger box to keep the display away from the rest of the circuit.
The other option (or possibly not an option in your case) is to build the version described in the site the Sgt mentioned but you would need to be able to make your own board and burn the software into the PIC.
 

SgtWookie

Joined Jul 17, 2007
22,230
I'm not going to disagree with you, AlexR. The PIC16F628 is certainly much better than the project our OP built.

The caps need to be matched to the particular type of crystal used. While 22pF may be typical, we really don't know what the crystal they used is. Besides, we don't know how our OP sampled the frequency; if they loaded it with the probe using a low bandwidth 'scope, they could have easily mistaken what would be an acceptable clock for one that was much too high in frequency.

However, I think that if our OP makes and tries out the LC test plate that I described and illustrated above, they will see a very large improvement in the accuracy of the readings. It would not require any modification to the circuit as it currently exists, besides removing the long wires & alligator clips, which are a root cause of the problem observed and need to be removed anyway.
 

Thread Starter

teutonic

Joined Dec 29, 2009
4
thanks again all for these tips and suggestions.

I have replaced the xtal with a known good 4mhz one, and upped those two caps from 10pf to 22pf. Oh and shortened the test croc clips to 10mm stiff wire.

Results ? The silver mica 1% 1500 pf 'standard' capacitor still
reads at 1619 pf !

I cannot understand why the ccal is omitted. I believe it was for calibrating the L circuit, as opposed to the C circuit. This kit has CAL button for C only. It calibrates to zero against 'air' plus the test leads , and instructions state once calibrated using the C range its 'good to go' on both L and C ranges.

Finally as you saw its not 'boxed' yet untill im happy with the accuracy and commited to what i'll use for component connectors

regards all round and thanks too

edit - more here - http://forum.allaboutcircuits.com/showthread.php?t=14163
 
Last edited:
Top