Having found an article on the Internet Digital Capacitance Meter, I wanted to build this meter. However, the AT90S2313 microcontroller was not at hand and LED indicators with a common anode. But there were ATMEGA16 in a DIP package and a four-digit seven-segment liquid crystal indicator. The outputs of the microcontroller were just enough to connect it directly to the LCD. Thus, the meter has been simplified to just one microcircuit (in fact, there is a second one - a voltage regulator), one transistor, a diode, a handful of resistor-capacitors, three connectors and a button. The device turned out to be compact and easy to use. Now I have no questions about how to measure the capacitance of a capacitor. This is especially important for SMD capacitors with capacitances of several picofarads (and even fractions of picofarads), which I always check before soldering into any board. Many benchtop and portable meters are now being produced, the manufacturers of which claim a lower capacitance measurement limit of 0.1 pF and sufficient accuracy for measuring such small capacitances. However, in many of them, measurements are carried out at a rather low frequency (a few kilohertz). The question is, is it possible to obtain an acceptable measurement accuracy under such conditions (even if a larger capacitor is connected in parallel with the measured one)? In addition, on the Internet you can find quite a few clones of the RLC meter circuit on a microcontroller and an operational amplifier (the one with an electromagnetic relay and with a one- or two-line LCD). However, it is not possible to measure small capacitances “in a human way” with such devices. Unlike many others, this meter is specifically designed to measure small capacitance values.

As for the measurement of small inductances (units of nanohenry), I successfully use the RigExpert AA-230 analyzer, which is produced by our company.

Capacitance meter photo:

Capacitance Meter Parameters

Measurement range: 1 pF to approx. 470 µF.
Measurement limits: automatic switching limits - 0 ... 56 nF (lower limit) and 56 nF ... 470 μF (upper limit).
Indication: three significant digits (two digits for capacitances less than 10pF).
Operation: single button for zeroing and calibration.
Calibration: Single, using two reference capacitors, 100 pF and 100 nF.

Most of the microcontroller pins are connected to the LCD. Some of them also have a connector for in-circuit programming of the microcontroller (ByteBlaster). Four outputs are used in the capacitance measurement circuit, including the comparator inputs AIN0 and AIN1, the measurement limit control output (using a transistor), and the threshold voltage selection output. A button is connected to the only remaining output of the microcontroller.

The +5 V voltage regulator is assembled according to the traditional scheme.

The indicator is a seven-segment, 4-digit, direct segment connection (i.e. non-multiplex). Unfortunately, there was no marking on the LCD. The same pinout and dimensions (51 × 23 mm) are indicators of many companies, for example, AND and Varitronix.

The diagram is shown below (the diagram does not show a reverse polarity protection diode, it is recommended to connect the power connector through it):

microcontroller program

Since ATMEGA16 is from the "MEGA" series and not from the "tiny" series, it makes little sense to write an assembler program. In the C language, it is possible to make it much faster and easier, and a decent amount of flash memory of the microcontroller allows you to use the built-in library of floating point functions when calculating capacity.

The microcontroller performs capacitance measurement in two steps. First of all, the charge time of the capacitor through a resistor with a resistance of 3.3 MΩ (lower limit) is determined. If the required voltage is not reached within 0.15 seconds (corresponding to a capacitance of about 56 pF), the capacitor charge is repeated through the 3.3 kΩ resistor (upper limit of measurement).

In this case, the microcontroller first discharges the capacitor through a 100 Ohm resistor, and then charges it to a voltage of 0.17 V. Only after that is the charge time measured to a voltage of 2.5 V (half of the supply voltage). After that, the measurement cycle is repeated.

When the result is displayed, a voltage of alternating polarity (relative to its common wire) with a frequency of about 78 Hz is applied to the LCD outputs. A sufficiently high frequency completely eliminates the flickering of the indicator.

This scheme, despite its apparent complexity, quite easy to repeat, because it is assembled on digital circuits and in the absence of errors in installation and the use of known good parts, it practically does not require adjustment. However, the capabilities of the device are quite large:

  • measurement range - 0.01 - 10000 uF;
  • 4 subranges - 10, 100, 1000, 10,000 uF;
  • subrange selection – automatic;
  • result indication – digital, 4 digits with floating decimal point;
  • measurement error - unit of the least significant digit;

Consider the device circuit:

click to enlarge

On the DD1 chip, more precisely on its two elements, crystal oscillator, whose operation requires no explanation. Next, the clock frequency goes to the divider, assembled on microcircuits DD2 - DD4. Signals from it with frequencies of 1000, 100, 10 and 1 kHz are sent to the DD6.1 multiplexer, which is used as an automatic subband selection node.

The main measurement unit is a single vibrator assembled on elements DD5.3, DD5.4, the pulse duration of which directly depends on the capacitor connected to it. The principle of capacitance measurement is to count the number of pulses during the operation of a single vibrator. On the elements DD5.1, DD5.2, a node is assembled to prevent bounce of the contacts of the "Start measurement" button. Well, the last part of the circuit is a four-digit line of binary-decimal counters DD9 - DD12 with output to four seven-segment indicators.

Consider the algorithm of the meter. When the SB1 button is pressed, the DD8 binary counter is reset and switches the range node (DD6.1 multiplexer) to the lowest measurement range - 0.010 - 10.00 uF. At the same time, one of the inputs electronic key DD1.3 receives pulses with a frequency of 1 MHz. An enabling signal from a single vibrator passes to the second input of the same switch, the duration of which is directly proportional to the capacitance of the measured capacitor connected to it.

Thus, pulses with a frequency of 1 MHz begin to arrive on the counting decade DD9 ... DD12. If a decade overflow occurs, then the transfer signal from DD12 increases the DD8 counter by one and allows zero to be written to the DD7 trigger at input D. This zero turns on the DD5.1, DD5.2 shaper, and it, in turn, resets the counting decade, sets DD7 again to "1" and restarts the one-shot. The process is repeated, but a frequency of 100 kHz is now supplied to the counting decade through the switch (the second range has turned on).

If, before the end of the pulse from the one-shot, the counting decade is overflowed again, then the range changes again. If the single vibrator turned off earlier, then the count stops and you can read the value of the capacitance connected for measurement on the indicator. The final touch is the decimal point control block, which indicates the current measurement subrange. Its functions are performed by the second part of the DD6 multiplexer, which illuminates the desired point, depending on the included subband.

IV6 vacuum fluorescent indicators are used as indicators in the circuit, so the power supply of the meter must produce two voltages: 1 V for incandescence and +12 V for anode power supply of lamps and microcircuits. If the indicators are replaced by LCDs, then one source of + 9V can be dispensed with, while the use of LED matrices impossible due to the low load capacity of the DD9 ... DD12 microcircuits.

It is better to use a multi-turn resistor as a calibration resistor R8, since the measurement error of the device will depend on the accuracy of the calibration. The remaining resistors can be MLT-0.125. As for microcircuits, any of the K1561, K564, K561, K176 series can be used in the device, but it should be borne in mind that the 176 series is very reluctant to work with a quartz resonator (DD1).

Setting up the device is quite simple, but it should be done with great care.

  • Temporarily disable the SB1 button from DD8 (pin 13).
  • Apply to the connection point R3 with R2 rectangular pulses a frequency of approximately 50-100 Hz (any simple generator on a logic chip will do).
  • In place of the measured capacitor, connect an exemplary one, the capacitance of which is known and lies in the range of 0.5 - 4 μF (for example, K71-5V 1 μF ± 1%). If possible, it is better to measure the capacitance using a measuring bridge, but you can also rely on the capacitance indicated on the case. Here you need to keep in mind that how accurately you calibrate the device, so it will measure you in the future.
  • Using the trimmer resistor R8, set the indicator readings as accurately as possible in accordance with the capacitance of the reference capacitor. After calibration, it is better to lock the tuning resistor with a drop of varnish or paint.

Based on the materials of "Radio amateur" No. 5, 2001.

This article provides an elementary circuit of a capacitance meter on a logic chip. Such a classical and elementary circuit solution can be reproduced quickly and simply. Therefore, this article will be useful to a novice radio amateur who decided to assemble an elementary capacitor capacitance meter.

The operation of the capacitance meter circuit:


Figure No. 1 - Capacitance meter circuit

List of elements of the capacitance meter:

R1- R4 - 47 kΩ

R5 - 1.1 kOhm

C3 - 1500 pF

C4 - 12000 pF

C5 -0.1uF

C meas. - the capacitor whose capacitance you want to measure

SA1 - button switch

DA1 - K155LA3 or SN7400

VD1-VD2 - KD509 or equivalent 1N903A

PA1 - Pointer indicator head (total deflection current 1 mA, frame resistance 240 Ohm)

XS1-XS2 - alligator connectors

This version of the capacitor capacitance meter has four ranges that can be selected with the SA1 switch. For example, in position "1" you can measure capacitors with a capacitance of 50 pF, in position "2" - up to 500 pF, in position "3" - up to 5000 pF, in position "4" - up to 0.05 microfarads.

The elements of the DA1 chip provide sufficient current to charge the measured capacitor (C meas.). It is especially important for measurement accuracy to adequately select diodes VD1-VD2, they must have the same (most similar) characteristics.

Setting up the capacitance meter circuit:

Setting up such a circuit is quite simple, you need to connect C rev. with known characteristics (with a known capacitance). Select the required measurement range with the SA1 switch and turn the trim resistor knob until you reach the desired reading on the indicator head PA1 (I recommend calibrating it according to your readings, this can be done by disassembling the indicator head and gluing a new scale with new inscriptions)

With this capacitance meter, you can easily measure any capacitance from units of pF to hundreds of microfarads. There are several methods for measuring capacitance. This project uses the integration method.

The main advantage of using this method is that the measurement is time-based, which can be done quite accurately on the MCU. This method is very suitable for a homemade capacitance meter, and it is also easy to implement on a microcontroller.

The principle of operation of the capacitance meter

The phenomena that occur when the state of the circuit changes are called transients. This is one of the fundamental concepts digital circuits. When the switch in Figure 1 is open, the capacitor is charged through resistor R and the voltage across it will change as shown in Figure 1b. The ratio determining the voltage across the capacitor is:

Values ​​are expressed in SI units, t seconds, R ohms, C farads. The time it takes for the voltage on the capacitor to reach the value V C1 is approximately expressed by the following formula:

From this formula it follows that the time t1 is proportional to the capacitance of the capacitor. Therefore, the capacitance can be calculated from the charging time of the capacitor.

Scheme

To measure the charging time, a comparator and a microcontroller timer, and a digital logic chip are enough. It is quite reasonable to use the AT90S2313 microcontroller (the modern analogue is ATtiny2313). The output of the comparator is used as a trigger T C1 . The threshold voltage is set by a resistor divider. The charging time does not depend on the supply voltage. The charging time is determined by formula 2, therefore it does not depend on the supply voltage. the ratio in the formula VC 1 /E is determined only by the divisor coefficient. Of course, during the measurement, the supply voltage must be constant.

Formula 2 expresses the charging time of the capacitor from 0 volts. However, it is difficult to work with a voltage close to zero due to the following reasons:

  • The voltage does not drop to 0 volts. For full discharge capacitor needs time. This will increase the time and measurement.
  • Required time between startcharging and starting the timer. This will cause measurement error. For AVR, this is not critical. it only takes one beat.
  • Current leakage at the analog input. According to the AVR datasheet, current leakage increases when the input voltage is close to zero volts.

To prevent these difficulties, two threshold voltages VC 1 (0.17 Vcc) and VC 2 (0.5 Vcc) were used. Surface printed circuit board must be kept clean to minimize leakage currents. The necessary supply voltage for the microcontroller is provided by a DC-DC converter powered by a 1.5VAA battery. Instead of a DC-DC converter, it is advisable to use 9 Vbattery and converter 78 L05, preferablyalsodo not turn offBODotherwise there may be problems with EEPROM.

Calibration

To calibrate the lower range: With the SW1 button. Next, connect pin #1 and pin #3 on connector P1, insert a 1nF capacitor, and press SW1.

To calibrate the high range: Short pin #4 and #6 of connector P1, insert a 100nF capacitor and press SW1.

The inscription "E4" when turned on means that the calibration value was not found in the EEPROM.

Usage

Automatic range detection

Charging starts through a 3.3M resistor. If the voltage across the capacitor does not reach 0.5 Vcc in less than 130 mS (>57nF), the capacitor will discharge and new charger, but through a 3.3kΩ resistor. If the capacitor voltage does not reach 0.5 Vcc for 1 second (>440µF), write "E2". When the time is measured, the capacity is calculated and displayed. The last segment displays the measuring range (pF, nF, µF).

clamp

As a clamp, you can use part of a socket. When measuring small capacitances (units of picofarads), the use of long wires is undesirable.

DIY capacitor capacitance meter- below is a diagram and a description of how, without much effort, you can independently make a device for testing the capacitance of capacitors. Such a device can be very useful when buying containers in the electronic market. With its help, a low-quality or defective accumulation element is detected without any problems. electric charge. circuit diagram this ESR, as most electronics engineers usually call it, is nothing complicated and even a novice radio amateur can assemble such a device.

Moreover, the capacitor capacitance meter does not imply a long time and large financial costs for its assembly; it takes literally two to three hours to manufacture a probe of equivalent series resistance. Also, it is not necessary to run to the radio store - for sure, any radio amateur will have unused parts suitable for this design. All you need to repeat this circuit is a multimeter of almost any model, it is only desirable that it be digital and with a dozen parts. There is no need to make any alterations or modernization of the digital tester, all that needs to be done with it is to solder the leads of the parts to the necessary sites on its board.

Schematic diagram of the ESR device:

The list of elements required for the assembly of the meter:

One of the main components of the device is a transformer, which should have a ratio of turns 11/1. Ferrite ring core M2000NM1-36 K10x6x3, which must first be wrapped with insulating material. Then wind the primary winding on it, arranging the turns according to the principle - turn to turn, while filling the entire circle. The secondary winding must also be carried out with a uniform distribution around the entire perimeter. Approximate number of turns in primary winding for the K10x6x3 ring there will be 60-90 turns, and the secondary should be eleven times smaller.

You can use almost any silicon diode with a reverse voltage of at least 40v, if you don’t really need super accuracy in measurements, then the KA220 is quite suitable. For a more accurate determination of the capacitance, you will have to put a diode with a small voltage drop in the variant direct connection— Schottky. The protective suppressor diode D2 must be rated for reverse voltage from 28v to 38v. Low-power silicon p-n-p transistor: for example, KT361 or its equivalent.

Measure the EPS value in the voltage range of 20v. When the external meter connector is connected, the ESR add-on to the multimeter immediately enters the capacitance test operation mode. In this case, a reading of about 35v will be visually displayed on the device in the test range of 200v and 1000v (this depends on the use of a suppressor diode). In the case of a capacitance test at 20 volts, the reading will be displayed as “out of measurement limit”. When the connector of the external meter is disconnected, the EPS set-top box instantly switches to the mode of operation as an ordinary multimeter.

Conclusion

The principle of operation of the device - to start the device, you need to connect the adapter to the network, while the ESR meter turns on, when the ESR is turned off, the multimeter automatically switches to the standard functions. To calibrate the device, you need to select a constant resistor so that it matches the scale. For clarity, the picture is below:

When the probes are shorted, 0.00-0.01 will be displayed on the multimeter scale, this reading means the instrument's error in the measurement range up to 1 ohm.