Menu English Ukrainian russian Home

Free technical library for hobbyists and professionals Free technical library


ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING
Free library / Schemes of radio-electronic and electrical devices

Microcontroller capacitor capacitance meter. Encyclopedia of radio electronics and electrical engineering

Free technical library

Encyclopedia of radio electronics and electrical engineering / Measuring technology

Comments on the article Comments on the article

The operation of the device is based on a well-known method for measuring the duration of charging and discharging a capacitor from a voltage source through a resistor of known resistance. The range of measured capacitance values ​​is from 1 nF to 12000 uF. It is divided into two sub-ranges, which are conventionally named "nF" and "uF". To measure the capacitance of capacitors without soldering them out of the board, a small amplitude of the voltage across the capacitor is necessary so that the p-n junctions of semiconductor devices do not interfere with this process, so the reference source has a voltage of 0,5 V.

The scheme of the device is shown in fig. one.

Microcontroller capacitor capacitance meter
Fig. 1

The main "work" is performed by the microcontroller DD1. Synchronization of the operation of its nodes is carried out from the built-in generator with an external quartz resonator ZQ1. The DD1 microcontroller has an analog comparator, which is used to control the charging and discharging voltage of the measured capacitor. The inputs of this comparator are connected to the PBO, PB1 ports. The measured capacitor is connected to the sockets XS1, XS2, and high or low voltages from the RVZ port through the resistive divider R1-R3R7R10 charge and discharge it. Switch contacts SA1.1 shunt resistor R2 at the "uF" limit, increasing the values ​​of both charging and discharging current. Switch contacts SA1.2 on the sub-range "nF" connect the lines PD1 and PD3 through the resistor R19, which is fixed by the DD1 microcontroller as the setting of this sub-range. Resistive divider R9R6 at a high level voltage on line PB2 generates a reference voltage of 6 V on resistor R0,316 for the inverting input of the built-in comparator (line PB1), which is the threshold for charging the measured capacitor.

When the PB2 line is transferred to a high-impedance state, the exemplary voltage is turned off and the comparator input will be connected through the resistor R6 and socket XS2 to the measured capacitor - this is the "common" output of the capacitor, which ensures that zero voltage is fixed on the capacitor when it is discharged. The voltage from the capacitor through the resistor R4 is fed to another input of the comparator (PBO line). The C3R5 circuit, connected in parallel with the comparator inputs, helps to reduce "digital" noise. The R8VD5 circuit will "help" the DD1 microcontroller determine whether a capacitor is connected to the XS1, XS2 sockets or they are closed.

Another source of exemplary voltage, relative to which measurements are made, is assembled on the op-amp DA2. The divider R27R29 generates a voltage of about 2,5 V, it goes to the DA2 op-amp, which acts as a buffer amplifier.

The microcontroller outputs the measurement results to the LED seven-element indicators HG1-HG3 in dynamic mode with a frequency of about 20 ms. The indicator anodes are switched by transistors VT1, VT3, VT4, and signals in the corresponding code are sent to their cathodes from the lines PD0-PD6 through resistors R12-R18. The codes are stored in the memory of the microcontroller DD1 and entered into it at the programming stage. "Ignition" on the decimal point indicators is carried out through the PB4 line and resistors R11, R21.

The same line is used to generate pulse signals 34, which are fed to the acoustic piezo-radiator HA1 through the resistor R24.

The device is powered by a battery consisting of two AA Ni-Cd batteries with a total voltage of 2,4 V, which is increased by the DA1 converter to a stabilized 5 V to power the DD1 microcontroller and the exemplary voltage source on the DA2 op-amp. Capacitor C7 - smoothing, resistive divider R23R25 sets the lower battery voltage limit. When it drops to 2 ... 2,1 V, a low-level voltage is formed at the LBO output (pin 2) of the DA1 converter, which is fed through resistors R33 and R12 to the PD0 line (pin 2) of the DD1 microcontroller. At the next poll of this line, the DD1 microcontroller, having detected a low level, stops the main program, turns off the LED indicator, generates a continuous signal that arrives at the acoustic emitter HA1, and goes into a "sleep" economical mode, from which it exits only when the supply voltage is turned off and subsequent connection.

To protect the microcontroller and other elements of the device from the voltage of the charged measured capacitor, an active protection unit was used, consisting of a diode bridge VD6, a transistor VT2 and an LED HL1. When a charged capacitor is connected, the voltage on which exceeds 4 ... 5 V, a current flows through the HL1 LED, which opens the transistor VT1. In this case, most of the capacitor voltage is applied to the resistors R3, R7 - this capacitor is discharged. Diodes VD1, VD3 and resistor R4 are used as additional protection for the RVZ line of the DD10 microcontroller, and VD1, VD2 and R4 are used for the RVO lines. To program the microcontroller, a programmer is connected to the XP1 plug.

The device uses resistors MLT, OMLT with a tolerance of not more than 5%, oxide capacitors - K53-16, the rest - K10-17, KM, KD, a quartz resonator - NS-49, chokes L1, L2 - ELC06D from Panasonic. The XP1 plug is the counterpart of the YUS-10 socket. Such plugs are sold in radio parts stores in the form of rulers, the required number of contacts is separated from them. The SA1 switch is any small-sized slide switch in two directions and two positions, preferably in a metal case, for example B1561, which will allow you to fix it on the board by soldering. Piezo emitter HA1 - piezoceramic FML-15T-7.9F1-50 with a resonant frequency of about 8 kHz. As XS1-XS3, contacts with an inner diameter of 1,5 mm are used (they are soldered to the contact pads on the board) from the disassembled RG4T connector. For measurements of individual capacitors, crocodile clips are used, which are soldered to plugs connected to sockets XS1, XS2 "Cx", and for measuring soldered capacitors, connecting shielded wires are used, the screens of which are connected to the plug connected to socket XS3 "Common". It must be remembered that the measuring cable introduces an additional error when measuring capacitors with a small capacitance.

For the device, a plastic case from the BZ-26 calculator was used, its power compartment was reduced to accommodate two batteries. On the inside, the case is pasted over with a screen made of thin aluminum foil. For contact with this screen, elastic silver-plated plates are used, which are soldered to a common wire on the board. The regular power switch of the calculator is used to turn on the power of the device, and the power supply socket is used to connect the charger. The power supply unit BP2-1M from the calculator has been converted into a battery charger. To do this, two resistors and an LED are installed in the positive power line (Fig. 2). By the brightness of this LED, you can judge the degree of charge of the battery.

Microcontroller capacitor capacitance meter
Fig. 2

Drawings of a printed circuit board made of double-sided foil fiberglass are shown in fig. 3-5. It was not possible to do without the use of vias, especially near digital indicators. Therefore, during installation, first of all, wire jumpers should be installed and soldered into the vias, and then the remaining elements should be mounted. The pins of some elements are also used as transition jumpers, so they need to be soldered on both sides of the board. On the installation side of most elements (Fig. 4), a piece of foil is left connected to a common wire, which complicates the soldering of the elements, but increases the reliability of the device. The holes for the leads of elements that are not connected to a common wire are countersinked in this area (countersinking is not shown in Fig. 4).

Microcontroller capacitor capacitance meter
Fig. 3

Microcontroller capacitor capacitance meter
Fig. 4

Microcontroller capacitor capacitance meter

The connection of the elements R4, C3, VD1, VD2 and output 12 of the microcontroller DD1 must be done by surface mounting. When installing the microcontroller on the board, this pin should be bent, the resistor R4 should be installed perpendicular to the board, soldering its pin from the installation side of the XS1 socket, solder a tinned wire jumper to the other pin of the resistor that goes to pin 12 of the DD1 microcontroller, and only then solder the pins of the elements to this jumper C3, VD1 and VD2.

For measurement, the capacitor is connected to the sockets "Cx". The microcontroller, having detected the connected capacitor, will begin the process of measuring its capacitance, while the decimal point on the HG3 indicator will light up. At the end of the process, the result is displayed on the LED indicators, then the symbols of the units of measurement are displayed. With a capacitor connected, the measurement process will be repeated periodically. In order to save the energy of the battery, which is consumed as much as possible when indicating the results, it is necessary to turn off the measured capacitor in a timely manner. If, when the device is turned on or during operation, a long beep sounds without turning on the indication, you need to charge the battery.

Symbols are used to display units of measurement: "nF" - nanofarads; "nF" - microfarads; "nnF" - thousands of microfarads.

To display various situations requiring the performance of any actions, together with sound indication, the following symbols are used:
"cc" - the measured capacitor has a residual charge, it must be disconnected and completely discharged before re-measurement;
"ygg" - short circuit in the measuring circuit, it is necessary to make sure that there is no accidental short circuit of the measuring sockets (wires) or check the measured capacitor for breakdown;
"ppp" - the capacitance of the capacitor is out of the measurement range, it is necessary to select another subrange or make sure that the expected capacitance of the measured capacitor corresponds to the measuring capabilities of the device;
"---" - loss of values ​​of correction factors, reloading is required.

When a charged capacitor with a voltage of more than 4 ... 5 V is connected, the protection system turns on and the HL1 LED flashes. The microcontroller will detect a charged capacitor and report it with a light and sound indication, but with some delay. Therefore, when connecting a measured capacitor, it is necessary to monitor the protection indicator and immediately turn off such a capacitor. When carrying out measurements, it must be remembered that a capacitor charged to a voltage of more than 100 V cannot be connected to the device.

The device does not have a self-calibration mode. Therefore, a more time-consuming, but, according to the author, more reliable procedure for setting correction factors using a programmer was used, which can be performed both at the manufacturing stage and after its repair or in the event of a large measurement error. For this work, you can use any available ATMEL microcontroller programming tool.

First of all, using, for example, the Notepad program in WINDOWS OS, open the cmetr.eep file and make sure that the third line looks like

:0C002000FFFF00FFFF00FFFF00FFFF00DC

Here, the first byte indicates the number of data bytes per line. The next two bytes are the address of the memory cell in which the first byte of the row data is stored, the fourth byte is the service one. Then twelve bytes of data follow, and the last byte is the checksum. Now you can load the cmetr.hex and cmetr.eep files into the microcontroller memory using the available software and hardware. If everything is done correctly, when the device is turned on, a short beep will sound and the test of digital LED indicators will pass - the shift of the number 8 in all digits. Then the indicators will turn off and the meter will wait for the capacitor to be connected, giving short beeps with a repetition period of about 4 s.

After checking the operability of the device, it is necessary to determine the correction factors for the two subranges. This will require exemplary capacitors (Cobr). preferably with low losses. For example, for the "uF" subrange, a 100 uF capacitor will do. If this is not possible, then a non-polar capacitor with a capacitance of at least 10 microfarads should be selected.
Suppose that when a reference capacitor with a capacity of 100 microfarads is connected, the instrument readings are 106 microfarads (Cx). The value of the correction factor is determined by the formula K \u106d Cx / (Col - Cx) \u100d 106 / (17,66 - 18) \u71d -73. We accept the value K = -0,1. In the "nF" subrange, more affordable capacitors K0,1, K99,7 with a capacity of about 99,7 μF can be used as reference ones. Suppose that the value of the reference capacitance (100 μF) measured by the device is 99,7 nF, then the correction factor will be: K \u332,3d 332 / / (XNUMX - - XNUMX) \uXNUMXd XNUMX. We accept K = XNUMX.

The obtained values ​​of the coefficients are translated into hexadecimal form, they will be 12H and 14CH, respectively. There is no contradiction in the fact that the smaller the measurement error, the greater the correction factor, it's just the algorithm for calculating the correction. Now you need to return to the description of the programming process and in the file cmetr.eep in the third line, replace the values ​​​​of twelve bytes of data so that the line looks like

:0C0020001200FF1200FF4C01004C010064

The first six bytes of data contain the duplicated coefficient information for the "uF" subrange, followed by six bytes (also duplicated) for the "nF" subrange. Moreover, the first two bytes are the numerical value of the coefficient, and the third indicates its sign. For example, a negative value of the coefficient is received on the "µF" subrange, therefore the third and sixth data bytes contain the number FF, which "informs" the microcontroller about the need to subtract the correction factor. For the "nF" subrange, the coefficient is positive, so the ninth and twelfth bytes contain the number 00, which means that the correction factor must be added.

Now you should calculate the checksum value in this line. This can be done using specialized programs or the WINDOWS engineering calculator in Hex mode. To do this, you need to add all the bytes of this string, including the number of data bytes in the string byte, the two bytes of the cell address, and all the data bytes, then determine what number to add to this sum so that the low byte of the result is zero. This number will be the checksum, in the example above, 64n will be obtained. Then you should erase the information in the memory of the microcontroller and reload the cmetr hex and cmetr.eep files. By measuring exemplary capacitors, make sure that the correction factors are set correctly.

When measuring, it must be taken into account that in the "nF" subrange, the capacitance of the measured capacitor should not exceed 12 μF, in the "μF" subrange - 12000 μF, and the measurement of capacitors with a capacitance of less than 1000 pF is approximate, since the capacitance of the measuring circuit affects.

Capacitance meter microcontroller program can be downloaded hence.

Author: A. Dymov, Orenburg; Publication: radioradar.net

See other articles Section Measuring technology.

Read and write useful comments on this article.

<< Back

Latest news of science and technology, new electronics:

Machine for thinning flowers in gardens 02.05.2024

In modern agriculture, technological progress is developing aimed at increasing the efficiency of plant care processes. The innovative Florix flower thinning machine was presented in Italy, designed to optimize the harvesting stage. This tool is equipped with mobile arms, allowing it to be easily adapted to the needs of the garden. The operator can adjust the speed of the thin wires by controlling them from the tractor cab using a joystick. This approach significantly increases the efficiency of the flower thinning process, providing the possibility of individual adjustment to the specific conditions of the garden, as well as the variety and type of fruit grown in it. After testing the Florix machine for two years on various types of fruit, the results were very encouraging. Farmers such as Filiberto Montanari, who has used a Florix machine for several years, have reported a significant reduction in the time and labor required to thin flowers. ... >>

Advanced Infrared Microscope 02.05.2024

Microscopes play an important role in scientific research, allowing scientists to delve into structures and processes invisible to the eye. However, various microscopy methods have their limitations, and among them was the limitation of resolution when using the infrared range. But the latest achievements of Japanese researchers from the University of Tokyo open up new prospects for studying the microworld. Scientists from the University of Tokyo have unveiled a new microscope that will revolutionize the capabilities of infrared microscopy. This advanced instrument allows you to see the internal structures of living bacteria with amazing clarity on the nanometer scale. Typically, mid-infrared microscopes are limited by low resolution, but the latest development from Japanese researchers overcomes these limitations. According to scientists, the developed microscope allows creating images with a resolution of up to 120 nanometers, which is 30 times higher than the resolution of traditional microscopes. ... >>

Air trap for insects 01.05.2024

Agriculture is one of the key sectors of the economy, and pest control is an integral part of this process. A team of scientists from the Indian Council of Agricultural Research-Central Potato Research Institute (ICAR-CPRI), Shimla, has come up with an innovative solution to this problem - a wind-powered insect air trap. This device addresses the shortcomings of traditional pest control methods by providing real-time insect population data. The trap is powered entirely by wind energy, making it an environmentally friendly solution that requires no power. Its unique design allows monitoring of both harmful and beneficial insects, providing a complete overview of the population in any agricultural area. “By assessing target pests at the right time, we can take necessary measures to control both pests and diseases,” says Kapil ... >>

Random news from the Archive

Rectal joystick 11.05.2020

Now a person can control robots and other devices with his sphincter. You can, of course, laugh at the rectal joystick, but it will allow some people who do not have the ability to control electronic devices with voice or gestures to interact with them anyway.

"B-hind (consonant with English. Behind - behind) offers a unique solution in the field of the Internet of Things (IoT) - the integration of sphincter muscles into everyday life," the technology description says. based on voice and gestures, providing digital control based on the muscles inside the body."

The first (and so far only) device of its kind, the B-hind, designed by designer Dani Ploeger, is based on the Anuform anal electrode, used to "stimulate the anal sphincter and pelvic floor muscles to strengthen them. The designer has studied muscle contractions and translated them into commands for a robot.

Other interesting news:

▪ Online learning is more effective than traditional

▪ Crystal that purifies the air of carbon dioxide

▪ Loon by Google - global Internet access system

▪ Human genome cleared of HIV

▪ Tonometer works by touch

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ site section Lightning protection. Article selection

▪ article Don't think down the seconds. Popular expression

▪ article When did the Middle Ages begin and end? Detailed answer

▪ article Galaganiya odorous. Legends, cultivation, methods of application

▪ article Control unit for semi-automatic welding with thyristor regulator. Encyclopedia of radio electronics and electrical engineering

▪ article Coins across. Focus secret

Leave your comment on this article:

Name:


Email (optional):


A comment:





All languages ​​of this page

Home page | Library | Articles | Website map | Site Reviews

www.diagram.com.ua

www.diagram.com.ua
2000-2024