Home, design, renovation, decor.  Yard and garden.  With your own hands

Home, design, renovation, decor. Yard and garden. With your own hands

» Accurate lc meter on a microcontroller. LC Meter Instrument for measuring capacitance and inductance on PIC16F628A

Accurate lc meter on a microcontroller. LC Meter Instrument for measuring capacitance and inductance on PIC16F628A

  • 05.10.2014

    This preamplifier is simple and has good parameters. This circuit is based on the TCA5550, containing a dual amplifier and outputs for volume control and equalization, treble, bass, volume, balance. The circuit consumes very little current. Regulators must be located as close to the chip as possible to reduce interference, interference and noise. Element base R1-2-3-4=100 Kohms C3-4=100nF …

  • 16.11.2014

    The figure shows the circuit of a simple 2-watt amplifier (stereo). The circuit is easy to assemble and has a low cost. Supply voltage 12 V. Load resistance 8 Ohms. Amplifier circuit PCB drawing (stereo)

  • 20.09.2014

    Its meaning is different for different hard drive models. Unlike high-level formatting - creating partitions and file structures, low-level formatting means basic layout of disk surfaces. For early model hard drives that were supplied with clean surfaces, such formatting creates only information sectors and can be performed by the hard drive controller under the control of the appropriate program. ...

  • 20.09.2014

    Voltmeters with an error of more than 4% are classified as indicators. One of these voltmeters is described in this article. The voltmeter-indicator whose circuit is shown in the figure can be used to measure voltages in digital devices with a supply voltage of no more than 5V. LED voltmeter indication with a limit from 1.2 to 4.2V through 0.6V. Rin of the voltmeter...

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

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

Schematic diagram of a capacitance and induction meter

LC Meter Features:

  • Capacitance measurement of capacitors: 1pF - 0.3 µF.
  • Coil inductance measurement: 1uH-0.5mH.
  • Information output on LCD indicator 1×6 or 2×16 characters depending on the selected software

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

Tests from 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 displays the measurement result. The 1x16 character display shows the measurement result on the left, and the generator operating frequency on the right.

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

As with other well-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 1000pF reference capacitor with a deviation of 1%.

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

The measurements taken with this meter are surprisingly accurate, and the accuracy largely depends on the accuracy of the standard capacitor that is inserted into the circuit when you press the calibration button. The device calibration method simply involves measuring the capacitance of a reference capacitor and automatically recording its value into the microcontroller’s memory.

If you don't know the exact value, you can calibrate the meter by changing the measurement values ​​step by step until you get the most accurate capacitor value. For such calibration there are two buttons, please note that in the diagram they are designated as “UP” and “DOWN”. 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 “CAL” is pressed.

To reset in inductive mode, you must first short-circuit the input pins and then press “CAL”.

The entire installation is designed taking into account the free availability 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 used both discrete and surface mount components. Relay with operating voltage 5V. Quartz resonator - 8MHz.

We present the original design of an LC meter from our colleague R2-D2. Next, a word from the author of the diagram: In amateur radio, especially during repairs, it is necessary to have on hand a device for measuring capacitance and inductance - the so-called lc meter. Today, for repetition, you can find many diagrams of similar devices on the Internet, some complex and some not so complex. But I decided to create my own version of the device. Almost all circuits of LC meters using microcontrollers presented on the Internet look the same. The idea is to calculate the value of unknown components using the formula for the dependence of frequency on capacitance and inductance. To simplify my design, I decided to use the internal comparator of the microcontroller as a generator. The LCD from the phone is used to display information Nokia 3310 or something similar with a controller PCD8544 and resolution 84x48, for example Nokia 5110.

Lc meter circuit on a microcontroller

Setup and features


The heart of the device is the microcontroller PIC18F2520. For stable operation of the generator, it is better to use non-polar or tantalum capacitors as C3 and C4. You can use any relay that matches the voltage (3-5 volts), but preferably with the minimum possible contact resistance in the closed position. For sound, a buzzer without a built-in generator, or a regular piezoelectric element, is used.

When you first start the assembled device, the program automatically starts the display contrast adjustment mode. Use the 2/4 buttons to set an acceptable contrast and press the OK button (3). After completing these steps, the device should be turned off and on again. For some customization of the meter’s operation, there is a section in the menu “ Setup" In the submenu " Capacitor", you must indicate the exact value of the calibration capacitor used (C_cal) in pF. The accuracy of the specified value directly affects the accuracy of the measurement. You can monitor the operation of the generator itself using a frequency meter at control point “B”, but it is better to use the already built-in frequency control system in the submenu “ Oscillator».

By selecting L1 and C1, it is necessary to achieve stable frequency readings in the region of 500-800 kHz. A high frequency has a positive effect on the measurement accuracy; at the same time, as the frequency increases, the stability of the generator may deteriorate. The frequency and stability of the generator, as I said above, can be conveniently monitored in the menu section “ Oscillator" If you have an external calibrated frequency meter, you can calibrate the LC meter's frequency meter. To do this, you need to connect an external frequency meter to the control point “B” and use the +/- buttons in the “ Oscillator» select the constant “K” so that the readings of both frequency meters coincide. For the system to display the battery status to work correctly, you need to configure a resistive divider built on resistors R9, R10, then install jumper S1 and write the values ​​in the fields of the “Battery” section.

Setting procedure

  • - Measure the supply voltage of the microcontroller (pins 19 - 20). This is the reference voltage “V.ref”
  • - Measure the voltage up to the resistive divider = U1
  • - Measure the supply voltage after the divider = U2
  • - Calculate the coefficient. division “С.div” = U1/U2
  • - Enter the received numbers into the appropriate sections of the menu, saving them by pressing the “OK” button.

Also enter the voltage “V.max” - the maximum voltage of the battery (all segments of the displayed battery are filled) and, accordingly, “V.min” - the minimum voltage of the battery (all segments of the battery are extinguished, the device signals the necessary change or charge of the battery). The supply voltage values ​​for displaying intermediate segments on the battery icon will be calculated automatically after entering information about “V.max” and “V.min”.

The use of a stabilizer to power the circuit is mandatory, since the reference voltage must be stable and not change when the battery is discharged.

Working with the device

The lc meter menu also contains sections Light, Sound, Memory. In chapter Light It is possible to enable or disable the LCD backlight. Chapter Sound, to turn sound on/off. In chapter Memory you can see the results of the last 10 measurements, and also (for beginners) see the result obtained in different units of measurement. The purpose of the buttons is described by the icons located at the bottom of the screen.

  • (F) - “Function” go to the Setup menu
  • (M) - “Memory” saving measurement results in memory
  • () - “Light” on/off backlight
  • (C) - “Calibration” calibration

The main screen contains a conditional measurement error scale, which must be monitored and, if necessary, calibrated in a timely manner.

Capacitance measurement

1. Switch the device to capacitance measurement mode. Perform calibration. Make sure that the measurement error is within acceptable limits. In case of large deviations, repeat the calibration.

2. Connect the capacitor to be measured to the terminals. The measurement result will appear on the screen. To save the result in memory, press (M).

Inductance measurement

1. Switch the device to inductance measurement mode. Close the terminals. Perform calibration. Make sure that the measurement error is within acceptable limits. In case of large deviations, repeat the calibration.

2. Connect the measured inductance to the terminals. The measurement result will appear on the screen. To save the result in memory, press (M).

Video of the meter working

The body used was a Chinese tester who died heroically while repairing a TV.

All files - controller firmware, boards in Lay and so on can be found on the forum. Material provided - Savva. Author of the scheme R2-D2.

Discuss the article LC METER



A simple circuit diagram of a device for measuring capacitance of capacitors, inductance of coils and testing electrolytic capacitors for equivalent series resistance (ESR). In addition, the device generates a number of fixed frequencies (100 Hz, 1 kHz, 10 kHz, 100 kHz and 1 MHz) with adjustable output voltage, which can also be used to test and configure various radio equipment. The measurement accuracy, however, is limited to 5-10% and depends on the accuracy of the settings and the size of the dial indicator used. Nevertheless, such accuracy is quite sufficient for testing elements in amateur radio practice.

The circuit consists of a signal generator on the K561LA7 digital chip, a sinusoidal pulse shaper on transistor VT1, an “ESR” measurement unit and a voltage stabilizer on transistor VT2.

In the position of switch S3 shown in the diagram, the circuit measures the “ESR” of electrolytes (the signal from the generator goes to transformer T1 and then to the measuring device). Moreover, measurements can be made without soldering the capacitors from the board, which is convenient when troubleshooting. Acceptable values ​​of this parameter for various electrolyte ratings are given in the table:

When switching S3, the circuit works to measure other quantities - capacitance and inductance. In the position of switch S2 shown in the diagram, the inductance of the coils is measured, and in another position, the capacitance of the capacitors is measured and the signal from the generator is also supplied to the output “F” through a variable resistor R9, which can be used to regulate the level of the output signal. A low-power supply voltage stabilizer is assembled on transistor VT2. Its stabilized output voltage depends on the value of the zener diode VS1 and can be in the range of 5 ... 7 V. The circuit is powered by a Krona battery or any low-power adapter with an output voltage of 9 ... 12 V.

Details

Instead of the specified one, you can use the K176LA7, K564LA7, K561LE5 and similar microcircuits. The generation frequency is set by resistors R1 – R5 and capacitors C1, C2. Trimmer resistors can be of any type, preferably with a closed or even sealed housing, since the accuracy of the device settings depends on their quality.

Using switch S1, resistors and capacitors are connected in series in the frequency-setting circuit. As S1, you can use switches of the P2K type (of 5 buttons) with dependent fixation or a suitable biscuit switch with two groups of contacts for 5 or more positions. Switches S2 and S3 can also be P2K, respectively, with three and two groups of contacts, but with two positions. Transistor KT361 can be replaced with KT 502, and KT315 with KT503, KT 342. Zener diode VS1 can be of type KS156, KS162. Diodes VD1. VD2 and VD5 must be germanium; in addition to those indicated in the diagram, you can supply D2, D18, D310, D311 GD507. VD3, VD4 protect the pointer device from overload and can be any low-power ones. Variable resistor R9 (output level regulator) can have a resistance of up to 1.5 kOhm. Any suitable pointer device can be used as an indicator, for example, a recording level indicator from a tape recorder. An example of the use of such an indicator and a housing from a Chinese tester is shown in the photo.

Depending on the size of the case, you can use different types of switches:

You can use small-sized switches from various Chinese radios, etc., the main thing is that they have the required number of switching groups (contacts), are in good condition and provide reliable contact.

A printed circuit board was also developed for this case. To minimize the size, it is double-sided and made without drilling holes. The parts are soldered to the printed conductors on both sides, so the printed tracks are made wide. At the points of connection with the “common” wire (“-” power supply), through holes are drilled and through them a connection is made to the foil screen. The board was drawn with tsapon-varnish, which is sold in any radio store using an empty ballpoint pen refill (to do this, remove the ball from the writing unit in the refill using a thin needle).

Second side

Transformer T1 of the “ESR” measurement unit is wound on a ferrite ring from the computer motherboard. The ring size is not critical. Winding I contains 150 turns of PEL 0.15 wire, winding II contains 15 turns of PEL 0.5 wire. The windings are wound along the entire length of the ring. Depending on the sensitivity of the pointer instrument used, the number of turns of winding II can be increased to 30.

Setting up the meter

First, check the operation of the signal generator using an oscilloscope or frequency meter. monitoring the signal at the output of the generator (pin 11 D1), then at the output of the sine wave driver (collector VT1). The signal shape and pulse duration can be adjusted within small limits by selecting resistor R7. It should be borne in mind that the generator signal at the output of the entire device (terminal “F”) will be present when switching S2 to position “C” (in the diagram in this case it is in position “L”), and S3 to position “C/ L". When measuring "The ESR signal from the generator is supplied only to this unit, and the pointer device is also connected to it! This can be clearly seen from the diagram. Then we set switch S2 to position “C” and connect the frequency meter to terminal “F” (“Frequency”). We set switch S1 to the frequency position “100 Hz” and use trimmer R5 to set the frequency to 100 Hz, respectively. Then we switch S1 to the “1 kHz” position and use the R4 trimmer to set it to 1 kHz, and so on. Then we connect a model capacitor with a capacity of 1 μF to the “Cx” terminals (as shown in the diagram) and use the R11 trimmer to set the indicator arrow to the extreme right position. Then standard capacitors with capacities of 0.9 ... 0.1 μF are connected and the indicator is calibrated with the corresponding marks on the scale. On other ranges, the accuracy of the readings will depend only on the accuracy of the previously set frequency values. Switch S2 to position “L”, connect a reference coil with an inductance of 1 H to the “Lx” sockets and use the R10 trimmer to also set the device needle to the end of the scale. Then we set up the ESR measurement unit. Switch S3 – to the “ESR” position (in this case, S2 can be in any position) and S1 to the “100 kHz” position ( measurements are taken at this frequencyESR!). Using the R12 trimmer we also set the arrow to the end of the scale. Then we connect resistors with a resistance of 0.5 to the “ESR” terminals; 1; 2; 5 and 10 Ohms and make the corresponding marks on the scale of the device. This completes the setup.

Location of parts on the printed circuit board:

Notes

The meter must be set up and operated with the same test leads and connectors so that the resistances and capacitances of all connections are taken into account! After the final adjustment, it is advisable to replace all trimming resistors with constant ones; for this, the trimmers are carefully unsoldered, their resistance is measured with a digital tester, and then constant resistors are selected with exactly the same or as close values ​​as possible. This will eliminate future settings failure due to accidental impacts or oxidation of the moving contacts over time. Depending on the quality of installation and the specific instance of the D1 chip, the signal level in the 1 MHz range can be significantly reduced. This will make it impossible to measure capacitances less than 100 pF and inductances less than 100 µH. In all other respects, the device will work normally.

It should be borne in mind that when measuring the ESR of electrolytes, the device will show “norm” (zero resistance) even if there is a short circuit in the capacitor! Therefore, it is useful to check such capacitors with absolutely “zero” resistance with a conventional tester (a working capacitor should not conduct direct current).

Instead of a dial indicator, you can use a regular digital tester turned on in the DC current measurement mode, for example, 20 - 200 mA. But in this case, the tester readings will not exactly correspond to the measured values; it will be necessary to draw up a table of correspondence between the tester readings and the actual value of the element being measured.

The letter C. This is where the name of the device comes from. Or in other words, an LC meter is a device for measuring inductance and capacitance values.

In the photo it looks something like this:

The LC meter looks like a . It also has two probes to measure inductor and capacitance values. The capacitor leads can be pushed either into the holes for the capacitors, where Cx is written, or directly to the probes. It’s easier and faster to connect to the probes. Inductance and capacitance are measured very simply; we set the measurement limit by turning the knob and look at the designation on the display of the LC meter. As they say, even a small child can easily master this “toy.”

How to measure capacitance with an LC meter

Here we have four capacitors under test. Three of them are non-polar, and one is polar (black with a gray stripe)


Let's go


Let's understand the symbols on the capacitor. 0.022 µF is its capacitance, that is, 0.022 microfarads. Further +-5% is its error. That is, the measured value can be plus or minus 5% more or less. If it is more or less than 5%, then our capacitor is bad, and it is advisable not to use it. Five percent of 0.022 is 0.001. Therefore, the capacitor can be considered fully operational if its measured capacitance is in the range from 0.021 to 0.023. Our value is 0.025. Even if we take into account the measurement error of the device, this is not good. Let's throw it away. Oh yes, pay attention to the volts that are written after the percentages. It says 200 Volts - this means that it is designed for voltages up to 200 Volts. If it has a voltage of more than 200 Volts at the terminals in its circuit, then it will most likely fail.

If, for example, 220 V is indicated on the capacitor, then this is - maximum voltage value. Taking into account the fact that AC networks indicate , such a capacitor is not suitable for use at a network voltage of 220 V, since the maximum voltage value in this network = 220 V x 1.4 (that is, root of 2) = 310 V. The capacitor must be selected so that it is designed for a voltage much higher than 310 Volts.

The next Soviet capacitor


0.47 microfarads. Accuracy +-10%. This means 0.047 in either direction. It can be considered normal in the range of 0.423-0.517 microFarad. On the LC meter it is 0.489 - therefore, it is quite functional.

Next imported capacitor


It says 22 - that means 0.22 microfarads. 160 is the voltage limit. A completely normal capacitor.

And the next one is electrolytic or, as radio amateurs call it, electrolyte. 2.2 microfarads at 50 Volts.



All OK!

How to measure inductance with an LC meter

Let's measure the inductance of the inductor. We take the coil and cling to its terminals. 0.029 millihenry or 29 microhenry.


You can test other inductors in the same way.

Where to buy LC meter

Currently, progress has reached the point that you can buy a universal R/L/C/Transistor-meter, which can measure almost all parameters of radio-electronic components


Well, for aesthetes, there are still normal LC meters, which in one click can be purchased from China in the Aliexpress online store;-)

Here page on LC meters.

Conclusion

Inductors and capacitors are an indispensable thing in electronics and electrical engineering. It is very important to know their parameters, because the slightest deviation of the parameter from the value written on them can greatly change the operation of the circuit, especially for transceiver equipment. Measure, measure and measure again!