Digital capacitance meter. DIY capacitor capacitance meter. Description and configuration of the device Algorithm for measuring the capacitance of capacitors on the AVR

This capacitance meter can measure the capacitance of capacitors with 1 pF resolution at the low end of the range. The maximum measured capacitance is 10000 µF. The actual accuracy is unknown, but the linear error is within a maximum of 0.5%, and usually less than 0.1% (obtained by measuring several capacitors connected in parallel). The greatest difficulties arise when measuring large-capacity electrolytic capacitors.

The capacitance meter operates in the mode of automatic selection of measurement limits, or in the lower or upper capacitance range forcibly. The device has two different measurement limits, realizing two measurements for the same capacitor. This makes it possible to check the accuracy of the measurement and find out whether the part being measured is really a capacitor. With this method, electrolytes exhibit their characteristic nonlinearity, giving different values ​​at different measurement limits.

The capacitance meter has a menu system that, among other things, allows you to calibrate the zero value and 1 µF capacitance. The calibration is stored in EEPROM.

One of the smallest chips, Atmega8, was chosen for the project. The circuit is powered by a 9V battery through a 7805 linear regulator.

The device can operate in three modes: measurement in the lower range, in the upper range, and in discharge mode. These modes are determined by the state of the controller pins PD5 and PD6. During discharge, PD6 has a log. 0 and the capacitor is discharged through resistor R7 (220 Ohm). In the upper measurement range, PD5 has a log. 1, charging the capacitor through R8 (1.8K) and PD6 is in the Z-state to allow the analog comparator to compare the voltage. In the lower measurement range, PD5 is also in the Z-state, and the capacitor is charged only through R6 (1.8MΩ).

Any 16x2 character display on the HD44780 controller can be used as an indicator. The display connector layout is shown in this figure:

The device is assembled on a breadboard and housed in a simple rectangular plastic case. The housing cover has holes cut out for the indicator, button and LED, which are secured with hot-melt adhesive:

Capacitance meter program

The device can use atmega8 and atmega48/88/168 family controllers. When replacing a controller in the program, you need to change the line responsible for the timer configuration of a specific controller.

This is a simple capacitance meter. There are several methods for measuring capacitance, for example using a resistance bridge or measuring the deflection of a magnetic needle. Recently, typical capacitance meters measure capacitance and some additional characteristics by measuring the current vector by applying an alternating voltage to the measured capacitance. Some simple capacitance meters use the integration method, measuring the short-term transient response of the RC circuit. There are ready-made kits for assembling capacitance meters that implement this method.

This project uses the integration method. The advantage of this method is that the result can easily be obtained immediately in digital form, because the method is based on measuring time intervals, an accurate analog circuit is not required, the meter can easily be calibrated using a microcontroller. Thus, the integration method is most suitable for a hand-built capacitance meter.

Transition process

A phenomenon that occurs until the state of the circuit stabilizes after a change in state is called a transient process. The transient process is one of the fundamental phenomena in pulse circuits. When the switch in Figure 1a opens, capacitor C will charge through resistor R and the voltage Vc will change as shown in Figure 1b. To change the state of the circuit in Figure 1a, it is also possible to change the emf E, instead of using a switch, the two methods will be equivalent. The dependence of voltage Vc on time t is expressed by the formula.

(1)

Dimensions of quantities: t - seconds, R - Ohms, C - Farads, number - e, approximately 2.72. when the voltage Vc reaches a certain value Vc1, the time t1 can be expressed by the formula:

(2)

This means that the time t1 is proportional to C. Thus the capacity can be calculated from the charging time and other fixed parameters.

Hardware

To measure charge time, you only need a voltage comparator, a counter, and some connection logic. However, the microcontroller (AT90S2313) used in this project makes this easier to implement. At first I thought that the analog comparator in AVR controllers was useless, but I discovered that the signal from the output of the comparator can be applied to the input of the TC1 flip-flop. This is a great opportunity for our case.

The integrating circuit can be simplified as shown in the device diagram. The reference voltage is created by a resistive divider. At first glance, it seems that the use of a divider makes the result unstable to changes in the supply voltage, but the charging time does not depend on the supply voltage. Using formula (2), you can find that the voltage can generally be replaced by the parameter Vc1/E, which depends only on the ratio of the divider resistances. This advantage is exploited by the NE555 timer IC. Of course, the supply voltage must be stable during measurement.

Due to fundamental principles, only one reference voltage can be used when measuring capacitance. However, using an input voltage close to zero is problematic for the following reasons.

  • The voltage will never drop to zero volts. The voltage across the capacitor cannot drop to 0 volts. It takes time to discharge the capacitor to a low enough voltage level to allow measurements. This will increase the measurement interval. The voltage drop across the discharge switch will also increase this effect.
  • There is a time between the start of the charge and the start of the timer. This may cause measurement error. This can be ignored on AVRs because they only require one clock cycle to do this. On other controllers you may need to solve this problem.
  • Leakage current in an analog circuit. According to the AVR specification, the leakage current at the analog inputs increases when the voltage across them is close to zero. This may cause measurement error.

To avoid using a voltage close to zero, two reference voltages Vc1(0.17 Vcc) and Vc2(0.5 Vcc) are used and the difference in time intervals t2-t1 (0.5RC) is measured. This avoids the above problems and the comparator delay is also compensated. The circuit board of the device must be kept clean to minimize surface current leakage.

The supply voltage is generated by a converter powered by a 1.5 volt battery. The key power supply is not applicable for the measurement circuit, although in appearance it seems that the circuit is not subject to voltage fluctuations, since two filters are used in the power circuit . I recommend using a 9 volt battery with a 5 volt stabilizer 78L05 instead, and do not disable the BOD function or you will suffer from data corruption in the controller's non-volatile memory.

Graduation

To calibrate the low range: First of all, set 0 with the SW1 button. Then connect a 1nF precision capacitor, short-circuit pins #1 and #3 of P1 and press the SW1 button.

To calibrate the high range: connect a precision capacitor with a capacity of 100 nF, close pins #4 and #6 of connector P1, press the SW1 button.

“E4” when turned on means that the calibration value in the non-volatile memory is damaged. This message will never be shown if calibration has already been performed. As for setting the zero, this value is not written to non-volatile memory and must be reset each time it is turned on and before each measurement.

Usage

Automatic range switching

The measurement process starts at intervals of 500 milliseconds from the moment the measured capacitance is connected. The measurement starts from the lower range (3.3 mOhm). If the capacitor voltage does not reach 0.5 Vcc within 130 milliseconds (>57 nF), the capacitor discharges and the measurement restarts at the high range (3.3 kOhm). If the capacitor voltage does not reach 0.5 Vcc within 1 second (>440 µF), the measurement is canceled and the message “E2” is displayed. In case the valid time value is measured, the capacitance is calculated and displayed. The capacity value is displayed in such a way that only the first three digits from the left are shown on the display. This automatically selects two measuring ranges and three display ranges.

Various types of capacitors are used in electrical circuits. First of all, they differ in capacity. In order to determine this parameter, special meters are used. These devices can be produced with different contacts. Modern modifications are distinguished by high measurement accuracy. In order to make a simple capacitor capacitance meter with your own hands, you need to familiarize yourself with the main components of the device.

How does the meter work?

The standard modification includes a module with an expander. The data is displayed on the display. Some modifications operate on the basis of a relay transistor. It is capable of operating at different frequencies. However, it is worth noting that this modification is not suitable for many types of capacitors.

Low precision devices

You can make a low-precision ESR meter of capacitor capacitance with your own hands using an adapter module. However, the expander is used first. It is more expedient to select contacts for it with two semiconductors. With an output voltage of 5 V, the current should be no more than 2 A. Filters are used to protect the meter from failures. Tuning should be carried out at a frequency of 50 Hz. In this case, the tester should show a resistance of no higher than 50 Ohms. Some people have problems with cathode conductivity. In this case, the module should be replaced.

Description of high precision models

When making a capacitor capacitance meter with your own hands, the accuracy calculation should be made based on the linear expander. The overload indicator of the modification depends on the conductivity of the module. Many experts advise choosing a dipole transistor for the model. First of all, it is able to operate without heat loss. It is also worth noting that the presented elements rarely overheat. A contactor for the meter can be used with low conductivity.

To make a simple, accurate capacitor capacitance meter with your own hands, you should take care of a thyristor. The specified element must operate at a voltage of at least 5 V. With a conductivity of 30 microns, the overload in such devices, as a rule, does not exceed 3 A. Filters are used of different types. They should be installed after the transistor. It is also worth noting that the display can only be connected via wired ports. To charge the meter, 3 W batteries are suitable.

How to make an AVR series model?

You can make a capacitor capacitance meter with your own hands, AVR, only on the basis of a variable transistor. First of all, a contactor is selected for modification. To set up the model, you should immediately measure the output voltage. The negative resistance of the meters should not exceed 45 ohms. With a conductivity of 40 microns, the overload in the devices is 4 A. To ensure maximum measurement accuracy, comparators are used.

Some experts recommend choosing only open filters. They are not afraid of impulse noise even under heavy load. Pole stabilizers have recently been in great demand. Only grid comparators are not suitable for modification. Before turning on the device, a resistance measurement is made. For high-quality models, this parameter is approximately 40 ohms. However, in this case, much depends on the frequency of modification.

Setting up and assembling a model based on PIC16F628A

Making a capacitor capacitance meter with your own hands using the PIC16F628A is quite problematic. First of all, an open transceiver is selected for assembly. The module can be used as an adjustable type. Some experts do not recommend installing high conductivity filters. Before soldering the module, the output voltage is checked.

If the resistance is increased, it is recommended to replace the transistor. In order to overcome impulse noise, comparators are used. You can also use conductor stabilizers. Displays are often of the text type. They should be installed through channel ports. The modification is configured using a tester. If the capacitance parameters of the capacitors are too high, it is worth replacing transistors with low conductivity.

Model for electrolytic capacitors

If necessary, you can make a capacitance meter for electrolytic capacitors with your own hands. Store models of this type are distinguished by low conductivity. Many modifications are made on contactor modules and operate at a voltage of no more than 40 V. Their protection system is RK class.

It is also worth noting that meters of this type are characterized by a reduced frequency. Their filters are only of the transition type; they are able to effectively cope with impulse noise, as well as harmonic oscillations. If we talk about the disadvantages of modifications, it is important to note that they have low throughput. They perform poorly in high humidity conditions. Experts also point out incompatibility with wired contactors. The devices cannot be used in alternating current circuits.

Modifications for field capacitors

Devices for field capacitors are characterized by reduced sensitivity. Many models are capable of operating from straight-line contactors. Devices are most often used of the transitional type. In order to make the modification yourself, you need to use an adjustable transistor. Filters are installed in sequential order. To test the meter, small capacitors are first used. In this case, the tester detects a negative resistance. If the deviation is more than 15%, it is necessary to check the performance of the transistor. The output voltage on it should not exceed 15 V.

2V devices

At 2 V, a DIY capacitor capacitance meter is quite simple to make. First of all, experts recommend preparing an open transistor with low conductivity. It is also important to choose a good modulator for it. Comparators are usually used with low sensitivity. The protection system of many models is used in the KR series on mesh-type filters. To overcome impulse oscillations, wave stabilizers are used. It is also worth noting that the assembly of the modification involves the use of a three-pin expander. To set up the model, you should use a contact tester, and the resistance should not be lower than 50 Ohms.

3V modifications

When folding a capacitor capacitance meter with your own hands, you can use an adapter with an expander. It is more expedient to select a linear type transistor. On average, the conductivity of the meter should be 4 microns. It is also important to secure the contactor before installing the filters. Many modifications also include transceivers. However, these elements are not capable of working with field capacitors. Their maximum capacitance parameter is 4 pF. The protection system of the models is RK class.

4V models

It is allowed to assemble a capacitor capacitance meter with your own hands only using linear transistors. The model will also require a high-quality expander and adapter. According to experts, it is more advisable to use transitional type filters. If we consider market modifications, they can use two expanders. Models operate at a frequency of no more than 45 Hz. At the same time, their sensitivity often changes.

If you assemble a simple meter, then the contactor can be used without a triode. It has low conductivity, but is able to work under heavy load. It is also worth noting that the modification should include several pole filters that will pay attention to harmonic oscillations.

Modifications with a single junction expander

Making a capacitance meter with your own hands based on a single-junction expander is quite simple. First of all, it is recommended to select a module with low conductivity for modification. The sensitivity parameter should be no more than 4 mV. Some models have a serious conductivity problem. Transistors are usually used of the wave type. When using mesh filters, the thyristor heats up quickly.

To avoid such problems, it is recommended to install two filters on mesh adapters at once. At the end of the work, all that remains is to solder the comparator. To improve the performance of the modification, channel stabilizers are installed. It is also worth noting that there are devices based on variable contactors. They are capable of operating at a frequency of no more than 50 Hz.

Models based on two-junction expanders: assembly and configuration

It is quite simple to assemble a digital capacitor capacitance meter on two-junction expanders with your own hands. However, only adjustable transistors are suitable for normal operation of the modifications. It is also worth noting that during assembly you need to select pulse comparators.

The display for the device is of the line type. In this case, the port can be used for three channels. To solve problems with distortion in the circuit, low sensitivity filters are used. It is also worth noting that modifications must be assembled using diode stabilizers. The model is configured with a negative resistance of 55 Ohms.

On a microcontroller, but after some discussions with fellow radio amateurs and a series of experiments, thoughts came to mind about its further improvement. The new device has increased accuracy and a wider range. It is based on the PIC16F90 controller.

Capacitance and inductance meter circuit

Characteristics of LCR meter

Capacitors:

  • 1pF to 1nF - resolution: 0.1 PF, accuracy: 1%
  • from 1nF to 100nF - resolution: 1pF, accuracy: 1%
  • from 100nF to 1uF - resolution 1nF, error: 2.5%

Electrolytes:

  • from 100 NF to 100,000uF - resolution 1nF, accuracy: 5%

Inductance:

  • from 10nH to 20H - resolution 10nH, accuracy: 5%

Resistance:

  • 1 mOhm to 0.5 Ohm - 1 mOhm resolution, accuracy: 5%

Here you need to get better - the device works more like a milliohmmeter. It almost does not measure resistors larger than one ohm. The printed circuit board for the instrument is designed in such a way that an LCD display can be connected on the top. To adjust the display contrast, use trimming resistor R10.

All resistors are metal film, 1%. Two 1nF capacitors also with a deviation of 1%. Capacitance CX1 - 33nF, is also critical - it must be polypropylene with a high operating voltage of the capacitor (several hundred volts). The throttle should be low Rdc. The meter has a connector for a separate network adapter, which bypasses the power button.

If the device works with an external power adapter, you can increase the brightness of the screen backlight by decreasing the value of resistor R11. Consult your display documentation to select the correct resistor value.

Keep in mind that electrolytic capacitors must be discharged before measurement, otherwise there is a danger of burning the controller. All files for assembling the circuit (several firmware options, printed circuit boards) are in the archive. .

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.