Computers and modern gadgets

I somehow made this extremely useful and irreplaceable device for myself, because of the urgent need to measure capacitance and inductance. It has surprisingly very good measurement accuracy, while the circuit is quite simple, the basic component of which is the PIC16F628A microcontroller.

Scheme:

As you can see, the main components of the circuit are PIC16F628A, a character-synthesizing display (3 types of displays can be used 16x01 16x02 08x02), an LM7805 linear stabilizer, a 4 MHz quartz resonator, a 5V relay in a DIP package, a two-section switch (for switching measurement modes L or C ).

Firmware for the microcontroller:

Printed circuit board:

PCB file in sprint layout format:

The original board is wired for a relay in a DIP package.

I didn’t find this and I used what was, an old compact relay that was just the right size. I used soviet tantalum capacitors as tantalum capacitors. The measurement mode switch, the power switch and the calibration button were used, once taken from old scoop oscilloscopes.

Measuring wires:

Should be as short as possible.

During assembly and configuration, I was guided by this instruction:

Assemble the board, install 7 jumpers. Install the jumpers under the PIC and under the relay first, and the two jumpers next to the pins for the display.

Use tantalum capacitors (in the generator) - 2 pcs.
10uF.
The two 1000pF capacitors must be polyester or better (approx. 1% tolerance).

It is recommended to use a backlit display (approx. 50-100Ω limiting resistor, terminals 15, 16 are not indicated in the diagram).
Install the board in the case. The connection between the board and the display can be soldered as you wish, or made using a connector. Keep the wires around the L/C switch as short and rigid as possible (approx. to reduce "pickup" and to properly compensate for measurements, especially for the grounded L end).

Crystal should use 4.000MHz, can't use 4.1, 4.3 etc.

Verification and calibration:

  1. Check the installation of parts on the board.
  2. Check the settings of all jumpers on the board.
  3. Check the correct installation of the PIC, diodes and 7805.
  4. Don't forget to "flash" the PIC before installing it in the LC-meter.
  5. Turn on the power carefully. If possible, use a regulated power supply for the first time. Measure current as voltage increases. The current should be no more than 20mA. The sample consumed a current of 8mA. If nothing is visible on the display, turn the contrast adjustment variable resistor. The display should read " Calibrating”, then C=0.0pF (or C= +/- 10pF).
  6. Wait a few minutes (“warm-up”), then press the “zero” (Reset) button to recalibrate. The display should read C=0.0pF.
  7. Connect the "calibration" capacitor. On the display of the LC-meter you will see the readings (with +/- 10% error).
  8. To increase the capacitance reading, close the jumper "4" see the picture below (note 7 pin PIC). To decrease the capacitance reading, close the jumper "3" (approx. 6 PIC pin) see the picture below. When the capacitance value matches the "calibration" value, remove the jumper. The PIC will remember the calibration. You can repeat the calibration multiple times (up to 10,000,000).
  9. If there are problems with measurements, you can use jumpers "1" and "2" to check the frequency of the generator. Connect jumper "2" (ex. 8 PIC pin) check the frequency "F1" of the generator. Should be 00050000 +/- 10%. If the reading is too high (near 00065535), the instrument goes into "overflow" mode and displays an "overflow" error. If the reading is too low (below 00040000), you will lose measurement accuracy. Connect jumper "1" (Note 9 PIC pin) to check frequency calibration "F2". It should be about 71% +/- 5% of "F1" that you got by connecting jumper "2".
  10. To get the most accurate readings, you can adjust L to get F1 around 00060000. It is preferable to set "L" = 82 uH on the 100 uH circuit (you can not buy 82 uH;)).
  11. If the display reads 00000000 for F1 or F2, check the wiring near the L/C switch - this means the generator is not running.
  12. The inductance calibration feature is automatically calibrated when capacitance calibration occurs. (approx. Calibration occurs at the moment the relay is activated when L and C are closed in the device).

Testjumpers

  1. F2 check
  2. F1 check
  3. Decrease C
  4. Increase C

How to take measurements:

Capacitance measurement mode:

  1. We translate the measurement mode selection switch to position "C"
  2. Press the "Zero" button
  3. The message “Setting! .tunngu." wait until "C = 0.00pF" appears

Inductance measurement mode:

  1. Turn on the device, wait until it loads
  2. We translate the measurement mode selection switch to the “L” position
  3. Closing the test leads
  4. Press the "Zero" button
  5. The message “Setting! .tunngu." wait until "L = 0.00uH" appears

Well, like everything, leave questions and comments in the comments below the article.

Main technical characteristics of the device:

Sensitivity in range 1 (10Hz - 50MHz) from input A, mV not worse than 50 Input resistance in range 1, MΩ 1.0+0.1 Measurement method error in range 1, Hz +1 Sensitivity in range 2 (50MHz - 1100MHz) from input V, mV not worse than 50 Input resistance in the range of 2, Ohm 50+1 Measurement method error in the range of 2, Hz +64 Minimum measurable capacitance, pF 0.1 .0 Maximum measured inductance, H min 3
Structural diagram of the device

The block diagram of the device includes the following blocks:

  • amplifier-shaper frequency meter range 1 (10Hz - 50MHz) - Input A;
  • prescaler with limiter frequency meter range 2 (50MHz - 1100MHz) - Input B;
  • LC oscillator for measuring capacitance and inductance;
  • input signal switch (DD3);
  • control and indication unit (DD4 and H1).

We will consider the amplifier-shaper of the 1st range of the frequency meter in more detail, since usually radio amateurs do not pay due attention to this critical node, and as a rule they limit the amplification cascade on one transistor, and as a result they do not get the opportunity to even get close to industrial measuring instruments (Ch3-75, For example). The forifier circuit was based on the design (2) in which the transistors of the differential stage, as well as the output non-saturable switch, were replaced with an amplifier stage with OE, because the previous one showed a tendency to excite at frequencies above 40 MHz. The shaper consists of an input attenuator R3, R4, C3, a limiter VD3, VD4, an amplifier with a high input impedance VT1, a differential stage VT3, VT4, an amplifier VT6 and a TTL-level driver on the elements DD2.2 and DD2.5. A tuning resistor R9 is included in the drain of transistor VT1, with which the differential amplifier is balanced.

This circuit has low complexity, low consumption and high sensitivity.

Most PIC microcontrollers allow you to measure the frequency from the T0CKI input above the manufacturer's guaranteed 50 MHz, up to about 60 - 65 MHz.

The 2nd range of the frequency meter is represented by a prescaler (prescaler) Philips SA701D in a typical circuit for switching on a divider by 64. The presence of a built-in high sensitivity amplifier (5mV at a frequency of 1GHz) made it possible to abandon the external circuit and greatly simplify the design, other advantages include low current consumption (6mA at a frequency of 1GHz) and small dimensions. Elements VT5, DD2.1, DD2.6, R10, R16 and R17 are used to convert the signal to TTL levels.

The input impedance in this range is 50 Ohm, the standard for such devices (see, for example, the technical specifications of the CUB or SCOUT M40 frequency counters from Optoelectronics). Professional frequency meters (Ch3-75) have an input impedance of 1 MΩ to 1 GHz, but in amateur radio conditions this is usually not required, and therefore, it is irrational in this design.

To measure the capacitance and inductance, the frequency method is used, in which the measured element is included in the circuit of the LC generator, the resulting frequency is measured and knowing the reference element L or C, you can calculate the desired one by the formula that determines the oscillation frequency of the circuit: f = 1 / (2 * PI * SQR (L*C)).

The LC oscillator is assembled on the DA1 comparator, the idea of ​​​​such a design belongs to, and has practically not changed, with the exception of replacing the LM311 comparator with the K554CA3 in the DIP8 - IL311AN package (manufactured by INTEGRAL software), and turning on the buffer element DD2.4 at the output of the generator. This made it possible to expand the upper limit of L and C measurements from 150mH to 3H and from 1.5uF to 4uF, respectively. On the original LM311 manufactured by SGS-Thomson, the results were similar to those obtained in. So we recommend the use of a domestic comparator. (It works more fun in auto-generator mode :)

Elements L1 and C4 form the main oscillatory circuit to which the measured element is connected: inductance in series with L1, capacitance in parallel with C4. Switches S1 and S2 select the measurement mode L or C, if both switches are released, then the calibration mode is activated. In this mode, the input terminals are closed to each other, and with the help of a relay, a reference capacitor C5 is connected to the circuit of the elements L1, C4. According to the results of measurements of two frequencies (with and without C5), the true values ​​of exemplary elements are calculated, taking into account the constructive capacitances and inductances of the entire generator, as well as the temperature drift of the parameters of the elements. The calculated values ​​are used later to calculate the value of the measured parameter.

The microcontroller (PIC16C622 or PIC16F628) MICROCHIP (DD4) is engaged in frequency measurement and mathematical calculations. The measured frequency is converted by formulas into capacitance or inductance. Math libraries for floating point calculations are taken from . To measure the frequency, the counting method is used, which allows you to measure the frequency up to 50 MHz with an accuracy of + 1 Hz. The counting rate in all modes is one measurement per second. The microcontroller is clocked by a generator with an external quartz resonator with a frequency of 4 MHz. To improve the accuracy of measurements, it is recommended to use a reference oscillator from a cell phone as a clock, we used a frequency of 14.85 MHz - as the most common. In this case, it is necessary to use a microcontroller with the appropriate firmware to work with the new clock frequency.

The operating modes are switched using switches S1, S2 and buttons S3 - S5.

  • S3 - frequency display mode (Hz/kHz/MHz). Allows you to select the most convenient measurement result for perception. In the measurement mode "L/C" the selection of the limit occurs automatically.
  • S4 - device operation mode: frequency measurement from input A (10Hz - 50MHz), frequency measurement from input B (50MHz - 1000MHz), "L / C" measurement (what exactly is determined by the position of S1 and S2)
  • S5 - forced device calibration. Automatic calibration occurs the first time the instrument is switched from frequency measurement to L or C measurement.

The DD3 chip is used to switch input signals from different sources to the input of the T0CKI / RA4 microcontroller (pin 3 / DD4).

To display the operating modes and measurement results, a two-line alphanumeric LCD SC1602BULT (16 characters, 2 lines) SUNLIKE or compatible with it from other manufacturers (DataVision, Wintek, Bolumin) is used.

This model of the indicator, in terms of the number of displayed characters, is redundant for this application, but due to mass supplies for other consumers, it has the lowest price and is freely available for purchase even on the radio market. This model has built-in backlight LEDs that can be used when the device is powered from an external adapter. Resistors R23-R24 determine the contrast of the indicator, instead of them you can install a trimming resistor for adjustment, but as practice has shown, this is not required. To save the microcontroller ports used to control the indicator, a mode is used in which data is transmitted in nibbles through the DB4-DB7 inputs, unused DB0-DB3 inputs are left free. It should also be noted that the SUNLIKE pinout differs from all the others (Wintek, Bolumin, DataVision) in two pins: 1st + 5V, 2nd 0V, for all others it’s the other way around! Why so - it is not clear, you just need to remember.

Setting.

In the presence of exemplary or standard instruments, setting up the meter is quite simple.

Working with the device.

When the supply voltage is applied, the device is set to the frequency measurement mode from input A. The frequency indication is in hertz. By pressing S3, if necessary, the frequency display mode is selected.

9999999999 Hz 9999999.99 kHz 9999999.9 kHz 9999999 kHz 9999.99 MHz 9999.9 MHz 9999 MHz

The operating mode is selected by pressing S4. When the measurement mode "L/C" is selected, it is necessary to calibrate the device, which is indicated by the indicator with the inscription "NO CALIBRATED". To do this, both switches S1 and S2 are pressed, the display shows the inscription "CALIBRATION", the calibration process begins. After its completion, the message "CALIBRATION OK" appears. Now you can select the measurement mode L or C by pressing the appropriate switch S1 or S2. The LC-meter has 3 sub-ranges for each measured parameter with automatic switching between them.

Capacitance Inductance 0.0 - 999.9 pF 0 - 999 nH 1.00 - 999.99 nF 1.00 - 999.99 µH 1.00 - 999.99 µF 1.00 - 9999.99 mH

If the device works for a long time in the "L / C" mode, then forced calibration may be necessary due to the drift of the LC generator parameters. To carry out forced calibration, it is necessary to depress the switch S1 or S2 corresponding to the operating mode and press the button S5. After the appearance of the inscription "CALIBRATION OK", the switch S1 or S2 is pressed and measurements continue.

Construction and details.

The device is mounted on a single-sided printed circuit board measuring 145x80 mm.

Attention! There are 6 wire jumpers on the board and 3! "wired":

Between holes 13 and 14 on the front side of the board;
- between pin 11 DD4 and pin 14 DD3 (signal A0);
- between pin 12 DD4 and pin 2 DD3 (signal A1);

The last two parts are not shown in the drawing, they are soldered directly to the corresponding pins of the microcircuits from the print side. As practice has shown, the design does not work without them :) The device uses MLT-0.125 resistors, electrolytic capacitors of the K50-35 type, imported. Resistors R1-R2 type P1-12-0.125 (leadless). Capacitors C6-C7 type K10-17V (leadless). Capacitors C4 and C5 - type K73-9 or similar film, with stable parameters! Capacitor C17 - tuning type KT4-23 or similar. The remaining capacitors are type K10-17b, K10-19. The inductor L1 is a standard choke type DM, DPM for 60 μH. Transistor VT1 - KP305D, replacement with the same one with a different letter worsens the sensitivity. VT2 - any LF with a gain of at least 100, VT3 and VT4 - any high-frequency pnp, transistors VT5 and VT6 - any high-frequency npn with high gain. Diodes VD1, VD2 - KD409A9, or similar with a lower capacity. Diodes VD3, VD4 - KD409A1, you can use other RF with a minimum capacitance, for comparison - KD522 has twice the capacity, respectively, the sensitivity of the device will be worse. Diode VD5 - any pulse. Chip DD2 - KR1533TL2 replacement for series 1554, 1594 degrades sensitivity. Chip DD3 - KR1533KP2, KR1533KP12 replacement for series 1554, 1594 degrades noise immunity. Comparator DA1 - K554CA3 in the DIP8 (IL311AN) package, replacement with an imported one worsens the upper measurement range. Prescaler SA701D can be replaced with SA702D or any other prescaler can be used with adjustment of the circuit and printed circuit board. Switches S1 - S2 type PB-22E08 or PS580L according to the catalog "Chip and Dip". Buttons S3 - S5 type PKN with pusher length 12 - 16mm. XS1-XS2 - sockets СР-50-73ФВ or similar, XS3 - clamp for connecting acoustic systems. Relay P1 D1A050000 f.Cosmo (according to the catalog "Chip and Dip") or similar small-sized. You can also make your own :)

I am sure that this project is not new, but this is my own development and I want this project to be known and useful as well.

Scheme LC meter on ATmega8 simple enough. The oscillator is classic and is based on the LM311 operational amplifier. The main goal that I pursued when creating this LC meter was to make it inexpensive and affordable for every radio amateur to assemble.

Schematic diagram of the capacitance and induction meter

Features of LC Meter:

  • Capacitor capacitance measurement: 1pF - 0.3uF.
  • Measuring the inductance of coils: 1mkH-0.5mH.
  • Display of information on the LCD indicator 1×6 or 2×16 characters depending on the selected software

For this device, I developed software that allows you to use the indicator that the radio amateur has at his disposal, either a 1x16 character LCD display or 2x 16 characters.

Tests with both displays gave excellent results. When using a 2x16 character display, the top line displays the measurement mode (Cap - capacitance, Ind - ) and the generator frequency, and the bottom line shows the measurement result. On the display of 1x16 characters, the measurement result is shown on the left, and the frequency of the generator on the right.

However, in order to fit the measured value and the frequency on the same character line, I reduced the display resolution. This does not affect the accuracy of the measurement in any way, only visually.

As with other known options that are based on the same universal circuit, I added a calibration button to the LC meter. Calibration is carried out using a reference capacitor with a capacity of 1000pF with a deviation of 1%.

When you press the calibration button, the following is displayed:

The measurements taken with this instrument are surprisingly accurate, and the accuracy depends largely on the accuracy of the standard capacitor that is inserted into the circuit when you press the calibration button. The calibration method of the device consists only in measuring the capacitance of the reference capacitor and automatically writing its value to the memory of the microcontroller.

If you do not know the exact value, you can calibrate the instrument by changing the measurement values ​​step by step until you get the most accurate capacitor value. There are two buttons for such calibration, please note that they are marked as “UP” and “DOWN” in the diagram. By pressing them, you can adjust the capacitance of the calibration capacitor. This value is then automatically written to memory.

Before each capacitance measurement, the previous readings must be reset. Reset to zero occurs when you press "CAL".

To reset in inductive mode, you must first short the input pins, and then press "CAL".

The entire installation is designed taking into account the free accessibility of radio components and in order to achieve a compact device. The size of the board does not exceed the size of the LCD display. I have used both discrete and surface mount components. Relay with operating voltage 5V. Quartz resonator - 8MHz.

The device is designed to measure low resistance, inductance, capacitance and ESR of capacitors. Functionally, the scheme can be divided into 8 main modules:
- L/C generator
- Block of stable current sources (50mA/5mA/0.5mA)
- Block responsible for the discharge of the tested capacitor
- Block of voltage amplifiers
- Information display unit (Nokia LCD 3310)
- Control buttons
- Microcontroller PIC18F2520
- Switch (for switching tested components)

The principle of operation of the LC generator and, accordingly, the principle of measuring inductance and capacitance (1p - 1 uF) I see no reason to describe in detail. This is detailed in the descriptions for such devices, of which there are a lot on the Internet. I will note only some of the features that were applied in this scheme and calculation algorithm. To measure inductance and capacitance, different pairs of probes are used ... this approach has improved the measurement accuracy by organizing a constant, automatic, partial calibration. Those. frequency drift of the LC oscillator does not have such a significant effect on the measurement accuracy as it used to be. Also, a new approach to calculations made it possible to get rid of the influence of the interturn capacitance of the measured inductance on the measurement result (it is taken into account during calibration).

Measurement of the capacitance of electrolytic capacitors is organized according to the classical method - charging the capacitor with a stable current source to a certain voltage level (0.2v) with parallel calculation of the charge time. This is implemented in the diagram. way. The connected test capacitor is pre-discharged (Q1), after which a stable voltage is applied to it and the timer starts. At the moment the voltage reaches the level of 0.2v. the internal comparator is triggered and the timer time is fixed. The next step is to calculate the capacitance of the capacitor. To reduce the measurement time in the menu, you can select the maximum limit for measuring the capacitance of the tested capacitor (100/300/600 thousand microfarads).

Measurement of the ESR (ESR) of the capacitor and the measurement of low resistances are performed according to the next. principle. A short voltage pulse generated by a stable current source is applied to the capacitor under test. This causes a voltage spike, the magnitude of which is proportional to the ESR of the capacitor. Two op amps connected in series increase this signal to the required level. Further, the microcontroller connected to the output of the op-amp registers the peak of the pulse and performs an analog-to-digital conversion for further calculation of the voltage value. Knowing the value of the pulse current and voltage, the ESR is calculated.

When measuring the ESR of small capacitances (<10uF) происходит незначительное завышение показаний измерителя. Не смотря на то, что длительность импульса всего 1-2uS этого достаточно для того, чтобы конденсатор успел немного зарядиться, тем самым слегка завысив значение измеряемого напряжения.

Some design features that should be considered when repeating. It is better to replace the tuning resistors in the stable current source block (2. I_source) with constant ones, after selecting their approximate value during the setup process (described below).

Trimmer resistors R3 and R8 in the amplifier block (4. Amp) are recommended to use multi-turn. This will allow you to fine-tune the coefficients. amplification on the value of which the accuracy of the device depends (especially critical for
ESR).

Instead of two MCP601 op amps, one MCP602 can be used.
The relay in the switching unit (8. Switch) must be bistable with two windings rated for 5v.

Capacitors C2 and C5 are tantalum or non-polar "ceramics". Throttle L1 - type "dumbbell". It is even better if this "dumbbell" is in a ferrite "glass".

The "S1 optional" block is a control block for supplying voltage to the LC generator. Optionally, it is possible to turn off the generator in the "electrolite" measurement mode to reduce the power consumption of the circuit. Block S1 can be omitted by simply connecting the LC generator to power.

To avoid damage to the microcontroller, the Jmp jumper should only be installed after adjusting the voltage at point "B" with the resistor "R_Vbat" (described below).

The circuit does not have a frequency counter module (prescaler and buffer), although the frequency counter itself is implemented in software. The measured frequency (with the "correct" amplitude) should be applied to the 6th output of MK (F). It must be understood that for the operation of the capacitance and inductance meter modes, a signal from the output of the LC generator must be supplied to the 6 MK input. For this purpose, the diagram shows a switch. One of the possible options for the schematic solution of the frequency counter module (prescaler/buffer, switching) is still under development. If necessary, switching can be organized on ordinary switches, and one of the many circuits available on the Internet can be used as input circuit diagrams (divider / buffer).

Setting up and working with the device.

When you turn on the device for the first time, you should reset all settings to the default settings. To do this, press button 3 and turn on the power of the device. In the future, this operation can be performed from the "Function" menu, the "Reset" section. After the reset, it is desirable to turn off and on the device. By default, after resetting the settings, the “Contrast” contrast value is set to 200. This value can be changed in the settings menu or turn the device off and on by holding down button 4. In this case, after turning on the device, it will immediately go to the contrast adjustment menu. Further, button 4 increases the contrast, and button 3 decreases it.

Setting stable current sources.

The measurement accuracy is significantly affected by the accuracy of setting stable current sources. To configure, go to the "Function" menu and then select the "I_50" section with the "OK" button. Then connect a milliammeter to the C/ESR measurement terminals. The milliammeter will show the current value of the future pulse to measure the ESR. With the help of a trimmer resistor (R3) it is necessary to set this current as close as possible to the value of 50mA. After that, remember the readings and turn off the milliammeter. Then, using the +/- buttons, set the value displayed earlier on the milliammeter with an accuracy of tenths in the device menu and save it by pressing the OK button. The same procedure must be performed for current sources 5 and 0.5mA ... sections "I_5" and "I_05", adjusting the current with the corresponding trimmer resistors, while the measured value must be entered in the device menu with
Accurate to hundredths/thousandths.

It is important to remember that switching between sections should be done with the milliammeter turned off. In the future, it is recommended to replace the tuning resistors with constant ones and repeat the tuning procedure.

OS setup.

The op amp tuning process boils down to adjusting the K gain of each op amp to the value specified in the Ampl and Amp2 sections. To do this, select the measurement mode ESR / C / R and then:

1. Connect an electrolyte with a known capacity to the terminals (it is better to take a capacitor with a small capacitance of 10-50uF) and using the trim resistor R3 and the value of the Amp1 variable (~ 6.0) in the setup menu, achieve the appropriate readings on the device screen.
2. Then connect a known resistance to the terminals (preferably 1 - 10 Ohm) and using the R8 resistor and the Amp2 variable (~ 6.0) in the setup menu, achieve the appropriate readings on the device screen.

The accuracy of readings when measuring resistance will be affected by the accuracy of setting the current value for current sources
0.00 -1.00 Om - section "I_50"
1.00 -10.0 Om - section "I_5"
10.0 -100 Om - section "I_05"

Setting up the LC generator.

Setting up the LC oscillator comes down to selecting the inductance L1 and capacitor C1 so that the oscillator frequency, which can be controlled using the "Oscillator" mode, is in the range of 900 kHz. C2 and C5 must be tantalum or non-polar "ceramics". The calibration capacitor can be anything in the range of 500-1200 pF. The main thing is that it should be a capacitor with a minimum TKE and with a capacitance value known to you. It is very good if it is possible to preliminarily measure its real capacity on some calibrated meter. The value of the total capacity of C_cal and C3 must be entered in the "6.Ccal" section. C3 can not be installed (.... spied in one similar solution as a possible option to reduce the total TKE).

Battery charge indicator.

Setting the charge indicator is reduced to setting at point "B" a voltage equal to approximately 1/3 of the battery voltage. To do this, it is necessary to measure the battery voltage at point "A" (with the device turned on) U1. Then connect a voltmeter to point "B" to achieve by adjusting the resistor "R_Vbat" the readings of the voltmeter U2 equal to about 1/3 of U1. Next, calculate the division factor K_div = U1/U2 and write the values ​​in the menu to the appropriate sections of the settings. Also specify in the settings the voltage value of a fully charged battery "V_bat" and the minimum battery voltage level at which the device will signal the need to replace/charge the battery.

Also, to improve the accuracy of the ADC, it is desirable to specify the exact microcontroller supply voltage V_ref in the menu (default is 5v) by measuring it with the device turned on at the V_ref point.

Measurement of ESR / C / R (C 0.1 - 600,000 uF)

To measure it is necessary:

2. Switch the device using the "Mode" button (hereinafter M) to the ESR / C / R mode

(C)

It should be noted that the capacitance of the measured capacitor affects the speed of the measurement. The maximum measurement limit can be selected in the "Function" menu (C_max) (indicated in thousand microfarads)

Calibration in ESR/C/R mode.

Calibration is used to compensate for the influence of the length of the terminal wires, etc. on the result of measuring the internal resistance. To carry out the calibration, it is necessary to press the “Calibration” button (hereinafter referred to as C) while in the ESR/C/R mode. When the "Close probes" menu appears, you must close the probes of the device before the end of the countdown on the screen. After completing the calibration process, information about the settings will be automatically saved in the non-volatile memory of the device, which will allow you not to perform calibration in the future each time you turn on the device.

Measurement C (C< 1uF)

To measure it is necessary:
1. Turn on the device (terminals for connecting the measuring component are free)
2. Switch the device with the "M" button to the C-meter mode
3. Perform calibration if necessary (described below)
4. Connect the component to be measured to the terminals
5. The device screen will display the measurement result.

Calibration in C mode

Calibration is used to compensate for the influence of the length of the terminal wires, etc. on the result of measuring the capacitance of the capacitor. To carry out calibration, being in mode C (terminals for connecting the measuring component are open, the measured capacitor is disconnected), press the "C" button.

Measurement L

To measure it is necessary:
1. Turn on the device (terminals for connecting the measuring component are free)
2. Switch the device with the "M" button to the L-meter mode
3. Perform calibration if necessary (described below)
4. Connect the component to be measured to the terminals
5. The device screen will display the measurement result.
6. When measuring inductance (especially small values), in order to obtain a higher measurement accuracy, you can calibrate during the measurement process (without turning off the measured inductance) by pressing the "C" button. In this case, the device will calibrate and the screen will display the value of the connected inductance as close as possible to the real one.

class="eliadunit">

Calibration in L mode

Calibration is used to compensate for the influence of the length of terminal wires, etc. on the inductance measurement result. There are two types of calibration - "deep" for calculating the inductance of the probes and "normal" for correcting the drift of the generator. Normal calibration is performed by pressing the "C" button in the L-meter mode. Calibration can be performed with a measurable inductance connected to the probes of the device.

To perform a "deep" calibration, press the "C" button and hold it down until the inscription "Close probes and take away hand" (close the probes and take away hand) then close the measuring probes until the countdown ends on the device screen, remove your hands and wait for the calibration process to finish. After calibration, open the probes. Deep calibration may not be carried out all the time. after performing a "deep" calibration, the values ​​of the inductance of the connection probes are stored in the non-volatile memory of the microprocessor.

Dimension F

To measure the frequency, you need:
1. Turn on the device
2. Switch the device with the "M" button to the F-meter mode
3. Select the operating mode (with or without prescaler) using the "/" button
4. Apply the measured frequency to the input "F" (the 6th output of the MK).

You can change the division factor of the applied prescaler using the "K" button. After setting the coefficient and saving the “OK button”, the value will be saved in the non-volatile memory of the device. The device circuit does not contain frequency counter modules (prescaler and buffer).

Sound signal "Reminder"

If measurements are not taken for more than ~1 minute, the device starts emitting an intermittent sound signal. In the future, the signal is repeated every ~20 sec. The sound signal "reminder" will not turn on if the device is set to the "Silent" mode.

Frequency meter, capacitance and inductance meter - FCL-meter

A high-quality and specialized tool in skillful hands is the key to successful work and satisfaction from its result.

In the laboratory of a radio amateur designer (and especially a shortwave one), in addition to the already “ordinary” digital multimeter and oscilloscope, there are also more specific measuring instruments - signal generators, frequency response meters, spectrum analyzers, RF bridges, etc. Such devices, as a rule, are purchased from among those written off for relatively little (compared to new) money and occupy a worthy place on the designer's table. Making them yourself at home is practically impossible, at least for an ordinary amateur.

At the same time, there are a number of devices, the independent repetition of which is not only possible, but also necessary due to their rarity, specificity, or requirements for overall weight indicators. These are all kinds of prefixes for multimeters and GIRs, testers and frequency meters, LC meters and so on. With the increasing availability of programmable components and PIC - microcontrollers in particular, as well as a huge amount of information on their use in Internet , independent design and manufacture of a home radio laboratory has become a very real thing accessible to many.

The device described below makes it possible to measure the frequencies of electrical oscillations, as well as the capacitance and inductance of electronic components, with high accuracy over a wide range. The design has a minimum size, weight and energy consumption, which allows it to be used when working on roofs, supports and in the field.

Specifications:

Frequency meter Meter LC

Supply voltage, V: 6…15

Current consumption, mA: 14…17 15*

Limits of measurement, in the mode:

F 1, MHz 0.01…65**

F 2, MHz 10…950

С 0.01 pF…0.5 µF

L 0.001 µH…5 H

Measurement accuracy, in the mode:

F 1 +-1 Hz

F2+-64Hz

C 0.5%

L 2…10 %***

Display period, sec, 1 0.25

Sensitivity, mV

F 1 10…25

F2 10…100

Dimensions, mm: 110x65x30

* – in the self-calibration mode, depending on the relay type, up to 50 mA for 2 sec.

** - the lower limit can be extended to units of Hz, see below; upper depending on the microcontroller up to 68 MHz

Principle of operation:

In the frequency meter mode, the device operates according to the well-known measurement method PIC - a microcontroller for the number of oscillations per unit of time with the calculation of the preliminary divider, which ensures such high performance. In mode F 2, an additional external high-frequency divider by 64 is connected (with a slight correction of the program, it is possible to use dividers with a different coefficient).

When measuring inductances and capacitances, the device works according to the resonant principle, well described in. Briefly. The measured element is included in an oscillatory circuit with known parameters, which is part of the measuring generator. By changing the generated frequency according to the well-known formula f 2 \u003d 1/4 π 2 LC the desired value is calculated. To determine the circuit's own parameters, a known additional capacitance is connected to it, the inductance of the circuit and its capacitance, including the constructive one, are calculated using the same formula.

Schematic diagram:

The electrical circuit of the device is shown on rice. 1. The following main nodes can be distinguished in the circuit: a measuring generator on DA 1, mode input amplifier F 1 to VT 1, input divider (prescaler) mode F 2–DD 1, signal switch on DD 2, measurement and indication unit on DD 3 and LCD as well as a voltage stabilizer.

The measuring generator is assembled on a comparator chip LM 311. This circuit has proven itself as a frequency generator up to 800 kHz, providing a signal close to a meander at the output. To ensure stable readings, the generator requires an impedance-matched and stable load.

The frequency-setting elements of the generator are the measuring coil L 1 and capacitor C 1, as well as a microcontroller-switched reference capacitor C 2. Depending on the operating mode L 1 connects to terminals XS 1 in series or in parallel.

From the output of the generator, the signal through the decoupling resistor R 7 goes to the switch DD 2 CD 4066.

On transistor VT 1 frequency meter signal amplifier assembled F 1. The circuit has no features except for the resistor R 8, necessary to power a remote amplifier with a small input capacitance, which greatly expands the scope of the device. Its diagram is shown in rice. 2.

When using the device without an external amplifier, it must be remembered that its input is powered by 5 Volts, and therefore a decoupling capacitor is needed in the signal circuit.

Frequency meter prescaler F 2 is assembled according to a typical scheme for most of these prescalers, only limiting diodes are introduced VD 3, VD 4. It should be noted that in the absence of a signal, the prescaler is self-excited at frequencies of about 800-850 MHz, which is typical for high-frequency dividers. Self-excitation disappears when a signal is applied to the input from a source with an input impedance close to 50 ohms. The signal from the amplifier and prescaler is fed to DD 2.

The main role in the device belongs to the microcontroller DD 3 PIC 16 F 84 A . This microcontroller enjoys great and well-deserved popularity among designers due not only to good technical parameters and low price, but also to ease of programming and an abundance of various parameters for its use, both from the manufacturer, the company microchip , and everyone who used it in their designs. For those wishing to get detailed information, it is enough in any search engine. Internet and enter the words PIC, PIC 16 F 84 or MicroChip . You will like the search result.

Signal from DD 2 goes to the driver, made on a transistor VT 2. The output of the shaper is directly connected to the Schmidt trigger included in the microcontroller. The calculation result is displayed on an alphanumeric display with an interface HD 44780. The microcontroller is clocked at a frequency of 4 MHz, while its speed is 1 million. operations per second. The device provides the possibility of in-circuit programming via the connector ISCP (in circuit serial programming) ). To do this, remove the jumper XF 1, thereby isolating the power supply circuit of the microcontroller from the rest of the circuit. Next, we attach the programmer to the connector and “sew” the program, after which we do not forget to install the jumper. This method is especially convenient when working with microcontrollers in a surface mount package ( SOIC).

Modes are controlled by three pushbutton switches SA 1–SA 3 and will be described in detail below. These switches not only turn on the desired mode, but also de-energize the nodes that are not involved in this mode, reducing overall power consumption. On a transistor VT 3 assembled the control key of the relay that connects the reference capacitor C 2.

DA chip 2 is a high quality 5V regulator with low residual voltage and low battery warning. This IC was specifically designed for use in low current, battery powered devices. A diode is installed in the supply circuit VD 7 to protect the device from polarity reversal. Don't neglect them!!!

When using an indicator that requires a negative voltage, it is necessary according to the scheme rice. 3 collect a negative voltage source. The source provides up to -4 volts when used as a 3 VD 1, 3 VD 2 germanium diodes or Schottky barrier.

Programmer circuit JDM , modified for in-circuit programming, is shown on rice. 4. More details about programming will be discussed below in the corresponding section.

Details and construction:

Most of the parts used in the author's device are designed for planar mounting (SMD), and the printed circuit board is also designed for them. But instead of them, similar, more affordable domestic-made ones with “ordinary” conclusions can be used without degrading the parameters of the device and with a corresponding change in the printed circuit board. VT1, VT2 and 2VT2 can be replaced by KT368, KT339, KT315, etc. In the case of KT315, a slight drop in sensitivity should be expected in the upper part of the F1 range. VT3– KT315, KT3102. 2VT1 - KP303, KP307. VD1, 2, 5, 6 - KD522, 521, 503. As VD3, 4, it is desirable to use pin diodes with a minimum intrinsic capacitance, for example, KD409, etc., but KD503 can also be dispensed with. VD7 - to reduce the voltage drop, it is advisable to choose with a Schottky barrier - 1N5819, or the usual one from the above.

DA1 - LM311, IL311, K544CA3, preference should be given to IL311 from the Integral plant, as they work better in an unusual generator role. DA2- has no direct analogues, but it is possible to replace it with an ordinary KR142EN5A with a corresponding change in the circuit and the rejection of the low battery alarm. Conclusion 18 DD3 in this case must be left pulled up to Vdd through resistor R23. DD1 - many prescalers of this type are produced, for example SA701D, SA702D, which matches the pins with the applied SP8704. DD2–xx4066, 74HC4066, K561KT3. DD3 - PIC16F84A has no direct analogues, the presence of index A is mandatory (with 68 bytes of RAM). With some correction of the program, it is possible to use the more “advanced” PIC16F628A, which has twice the program memory and speed up to 5 million operations per second.

The author's device uses an alphanumeric two-line display, 8 characters per line, manufactured by Siemens, which requires a negative voltage of 4 volts and supports the HD44780 controller protocol. For such and similar displays it is necessary to load the program FCL2x8.hex. A device with a 2 * 16 format display is much more convenient to use. Such indicators are produced by many companies, such as Wintek, Bolumin, DataVision, and contain the numbers 1602 in their names. When using the available SC1602 from SunLike, you need to swap its pins 1 and 2 (1-Vdd, 2-Gnd). For such displays (2x16) the program FCL2x16.hex is used. Such displays usually do not require negative voltage.

Particular attention must be paid to the choice of relay K1. First of all, it should work confidently at a voltage of 4.5 volts. Secondly, the resistance of closed contacts (when the specified voltage is applied) should be minimal, but not more than 0.5 Ohm. Many small-sized reed relays with a consumption of 5-15 mA from imported telephones have a resistance of about 2-4 ohms, which is unacceptable in this case. In the author's version, the TIANBO TR5V relay is used.

As XS1, it is convenient to use acoustic clips or a line of 8-10 collet contacts (half of the socket for m / s)

The most important element, the quality of which determines the accuracy and stability of the readings of the LC meter, is the L1 coil. It should have a maximum quality factor and a minimum self-capacitance. Ordinary chokes D, DM, DPM with an inductance of 100-125 μH work well here.

The requirements for capacitor C1 are also quite high, especially in terms of thermal stability. It can be KM5 (M47), K71-7, KSO with a capacity of 510 ... 680 pF.

C2 should be the same, but within 820 ... 2200 pF.

The device is assembled on a double-sided board measuring 72x61 mm. The foil on the top side is almost completely preserved (see file FCL-meter.lay) with the exception of the surroundings of the contour elements (to reduce the structural capacity). Elements SA1–SA4, VD7, ZQ1, L1, L2, K1, an indicator and a pair of jumpers are located on the top side of the board. The length of the conductors from the XS1 test clamps to the corresponding pins on the printed circuit board must be as short as possible. The XS2 power connector is installed on the side of the conductors. The board is placed in a standard plastic case 110x65x30 mm. with a compartment for a battery type "Krona".

To expand the lower limit of frequency measurement to units of hertz, it is necessary to connect 10 micron electrolytic capacitors in parallel with C7, C9 and C15.

Programming and setup

It is not recommended to turn on the device with an installed but unprogrammed microcontroller!!!

It is necessary to start assembling the device by installing the elements of the voltage stabilizer and installing a trimmer R 22 voltages of 5.0 volts at pin 1 of the microcircuit DA 2. After that, you can install all other elements except DD 3 and indicator. Current consumption should not exceed 10-15 mA at various positions SA 1-SA 3.

To program the microcontroller, you can use the connector ISCP . Jumper during programming XF 1 is removed (the connector design does not allow otherwise). It is recommended to use a non-commercial program for programming IC - Prog , the latest version of which can be downloaded for free fromwww.icprog.com(about 600 kb). In the programmer settings ( F 3) you must choose JDM Programmer , remove all birds in the section communication and select the port to which the programmer is connected.

Before loading one of the firmware into the program FCL 2 x 8. hex or FCL 2 x 16. hex , you must select the type of microcontroller - PIC 16 F 84 A , the remaining flags will be automatically set after opening the firmware file and it is undesirable to change them. When programming, it is important that the common wire of the computer does not have contact with the common wire of the device being programmed, otherwise the data will not be written.

The shaping amplifier and the measuring generator do not need to be tuned. Resistors can be selected to achieve maximum sensitivity R9 and R14.

Further setup of the device is carried out with the installed DD 3 and LCD in the following order:

1. The consumption current should not exceed 20 mA in any mode (except for the moment the relay is activated).

2.Resistor R 16 sets the desired image contrast.

3. In frequency counter mode F 1 capacitor C22 achieves the correct readings on an industrial frequency meter or in another way. It is possible to use hybrid quartz oscillators from radio and cell phones (12.8 MHz, 14.85 MHz, etc.) as reference sources, or, in extreme cases, computer 14.318 MHz, etc. Location of power pins (5 or 3 volts) for modules standard for digital microcircuits (7-minus and 14-plus), the signal is taken from output 8. If the setting occurs at the extreme position of the rotor, then you will have to select the capacitance C23.

4. Next, you need to enter the constants setting mode (see below in the section “Working with the device”). Constant X 1 is set numerically equal to the capacitance of the capacitor C2 in picofarads. Constant X 2 is equal to 1.000 and can be adjusted later when setting up the inductance meter.

5. For further tuning, it is necessary to have a set (1-3 pieces) of capacitors and inductances with known values ​​(accuracy better than 1% is desirable). The self-calibration of the device must take into account the design capacity of the clamps (see the description of self-calibration options below).

6. In the capacitance measurement mode, we measure the known capacitance, then divide the capacitor value by the instrument readings, this value will be used to adjust the constant X 1. You can repeat this operation with other capacitors and find the arithmetic mean of the ratio of their ratings to the readings. The new value of the constant X 1 is equal to the product of the coefficient found above and its “old” value.This value must be recorded before proceeding to the next item.

7. In the inductance measurement mode, we similarly find the ratio of the nominal value to the readings. The found relation will be a new constant X 2 and is written to EEPROM similar to X 1. For tuning, it is desirable to use inductances from 1 to 100 μH (better a few from this range and find the average value). If there is a coil with an inductance of several tens to hundreds of millihenries with known values ​​​​of inductance and self-capacitance, then you can check the operation of the double calibration mode. Indications of own capacity, as a rule, are somewhat underestimated (see above).

Working with the device

Frequency counter mode . To enter this mode, press SA 1 "Lx" and SA 2 "Cx" ". Choice of limits F 1/F 2 is carried out by switch SA 3: pressed - F 1, pressed - F 2. With the firmware for the 2x16 character display, the display shows “ Frequency ” XX , XXX . xxx MHz or XXX , XXX . xx MHz . For a 2x8 display, respectively “ F =” XXXXXXxxx or XXXXXXxx MHz , instead of a decimal point, the symbol □ is used above the frequency value.

Self-calibration mode . To measure inductances and capacitances, the device must undergo self-calibration. To do this, after applying power, it is necessary to press SA 1 "Lx" and SA 2 "C x ”(which one - the inscription will tell L or C ). After that, the instrument will enter the self-calibration mode and display “ Calibration” or “WAIT” ". After that, you need to immediately press SA 2" C x ". This must be done quickly enough without waiting for the relay to operate. If you skip the last paragraph, then the capacitance of the terminals will not be taken into account by the device and the “zero” readings in the capacitance mode will be 1-2 pF. Similar calibration (with compression SA 2" Cx ”) allows you to take into account the capacity of remote probes-clamps with their own capacity up to 500 pF , however, use such probes when measuring inductances up to 10 mHit is forbidden.

“Cx” modecan be selected after calibration by pressing SA 2” Cx”, SA 1” Lx ” must be pressed. This displays “ Capacitance ” XXXX xF or “ C =” XXXX xF.

Mode "Lx"activated when pressed SA 1 ” Lx ” and pressed SA 2 ” Cx ". Entry into dual calibration mode (for inductances over 10 mH) occurs with any change in position SA 3” F 1/ F 2”, while in addition to the inductance, the self-capacitance of the coil is also displayed, which can be very useful. The display shows “ Inductance ” XXXX xH or ” L =” XXXX xH. This mode is exited automatically when the coil is removed from the clamps.

It is possible to switch in any sequence between the modes listed above. For example, first a frequency meter, then calibration, inductance, capacitance, inductance, calibration (required if the device has been turned on for a long time, and the parameters of its generator could “leave”), a frequency meter, etc. When releasing SA 1” Lx” and SA 2” Cx” before entering the calibration, a short (3 seconds) pause is provided to exclude unwanted entry into this mode when simply switching from one mode to another.

Constant setting mode . This mode is necessary only when setting up the device, so entering it requires connecting an external switch (or jumper) between pin 13 DD 3 and common, as well as two buttons between pins 10, 11 DD 3 and a common wire.

To write the constants (see above), it is necessary to turn on the device with the switch shorted. On the display depending on the position of the switch SA 3 ” F 1/ F 2” will display “ Constant X 1” XXXX or “ Constant X 2” X . XXX . The buttons can be used to change the value of the constants in increments of one digit. To save the set value, you must change the state SA 3. To exit the mode, open the switch and switch SA 3 or turn off the power. Recording in EEPROM occurs only when manipulating SA3.

Firmware and source files (. hex and. asm ): FCL -prog

Schematic diagram in ( sPlan 5.0): FCL-sch.spl

PCB (Sprint Layout 3.0 R):

03/22/2005. Improvements to the FCL meter
Buyevsky Alexander, Minsk.

1 . To expand the range of measured capacitances and inductances, it is necessary to connect pins 5 and 6 of DA1.

2 . Refinement of the input circuits of the microcontroller (see Fig.) will increase the stability of the frequency measurement. You can also use similar microcircuits of the 1554, 1594, ALS, AC, HC series, for example 74AC14 or 74HC132 with changes in the circuit.


If you notice an error, select a piece of text and press Ctrl + Enter
SHARE:
Computers and modern gadgets