Thank, krypton2035
I read all the comments on Electro-Tech-Online.com writing that there were several bugs and they fixed their bugs.
It was a good idea, so I didn't know of these bugs.
I believed that this source code CAPMET790.ASM (version 4 or 5) belonged exactly to LCF Meter.
John Becker wrote:
"
Hi All,
These are the results of my findings when using different makes of 4011 in the LCF Meter when in Capacitance mode:
HEF4011BP no problems
HCF4011BE parasitic oscillation at about 6MHz
MC14011BCP parasitic oscillation at about 2MHz
RS4011B parasitic oscillation at about 4MHz
Whilst a 4093 NAND Schmitt trigger can be used for capacitance measuring, the inductance mode cannot work with a Schmitt because of its hysteresis preventing oscillation occurring with LC feedback.
The parasitic oscillations were cured by putting a 68p cap between 4011 pin 5 and 0V (e.g. pin 7).
Further investigation showed that increasing the value of R4 from 1k to 2k helped with those 4011s prone to parasitic oscillation in cap mode. This reduces the initial surge current from 5mA to 2.5mA into/out of C7 at the moment of IC3b's logic change. This beneficial effect was especially noticeable with high values of external capacitor being measured. However, the use of 2k affects the capacitance calculation and so would require a modification to the program to compensate. Those of you with PIC programming facilities can experiment with this. The formula for R4 = 1k as the program stands for calculating C is
C = 1/(pi x 1 x F), where pi is calculated as 22/7
For R4 = 2k, the formula becomes:
C = 1/(pi x 2 x F), therefore pi can now be taken as 44/7
Consequently the cap calc statement at line 580 (line count taken through DOS Edit) currently saying "movlw 22" should be changed to "movlw 44".
It should be noted, though, that increasing R2 to 2K will roughly halve the maximum capacitance that can be measured before the software's time-out routine is triggered. It would also require (ideally) that R3 should be increased to 20k to maintain the 10:1 ratio between R3 and R4.
In conclusion, if your 4011 is giving problems, simply adding a capacitor of about 68p across R3 seems to be the simplest workable option (I would also have tried 47p had I had some free. I did try 10p, but that was insufficient). Another option is to purchase an HEF4011BP as I use without problems in my own unit.
This situation, as I've already said, is highly unexpected, having never experienced it before in the countless times I've used this type of circuit, but in which I guess I have probably always used the HEF device. I can only conclude that there is a degree of hysteresis built into the input of HEF 4011s which the other manufacturers don't include.
An intriguing situation. Thanks to you all for your input.
Another point - a certain Mike here on CZ commented that he had removed a statement from the previously advised revision (done to correct an erratic frequency readout at about 16kHz). He was right to do so (thanks Mike!) - it was a statement I'd forgotten to remove following the addition of a test routine when looking into the erratic problem. I have now deleted it and the amended code has been sent Alan, who will put it onto our site when he gets the chance!
Best wishes
John
"
But there is a difference of 2 RC formulas for π (pi) and 2.2:
1
fo = ----------- for LCF Meter
π × R × C
1
fo = ------------- for Original Oscillator
2.2 × R × C
Why?
I replaced 4011 by 74HC00 (better than 4011), I recorded the latest version and I tested correctly.
Greetings.