A capacitance measurement circuit and method based on constant current source
Through the capacitance measurement circuit based on the constant current source and the use of constant current charging and discharging and frequency acquisition technology, the problems of large size, low accuracy and inability to measure the onboard capacitance of the capacitance measurement equipment in the existing technology have been solved, and a high level of capacitance has been achieved. Capacitance value measurement with high accuracy, strong anti-interference ability and low cost.
Patent Information
- Application Number
- CN202011100494.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-15
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2040-10-15
AI Technical Summary
Existing capacitance value measurement equipment is large in size, complex in operation, and low in accuracy. It cannot meet the needs of high-precision measurement, cannot measure on-board capacitance, and is susceptible to interference, resulting in a waste of resources.
A capacitance value measurement circuit based on a constant current source is designed, including a capacitor charging and discharging unit and a frequency acquisition unit. Through constant current charging and discharging and frequency acquisition, the constant current source and a microcontroller are used to calculate the capacitance value. The circuit is integrated into one The circuit board has strong anti-interference ability and wide measurement range.
It achieves capacitance value measurement with high precision and strong anti-interference ability, can measure single and on-board capacitance, reduces equipment volume and cost, and improves the flexibility and applicability of measurement.
Smart Images

Figure CN112180176B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of measurement, and in particular to a capacitance measurement circuit and method based on a constant current source. Background Art
[0002] With the development of the information age, various consumer electronic products are constantly updated, and the demand for equipment to measure consumer electronic products is also increasing. At present, the functions of electronic products are diversified, and the demand for product function testing is more comprehensive. For example, the demand for measuring capacitance is increasing. Nowadays, the equipment for measuring capacitance is generally carried out by large-volume LCR instruments. Although the use of large-volume LCR instruments to measure capacitance can ensure high measurement accuracy, it is large in size and requires a large space, and the measurement operation is complicated, the measurement time is long, and the price is expensive, easily reaching tens of thousands of yuan. At present, there are also small-volume test equipment on the market to measure capacitance, but it can only measure independent individual capacitors and cannot measure on-board capacitance, resulting in an extremely narrow measurement range, and its measurement accuracy is low, which is difficult to meet the needs of high-precision measurement. In addition, the principle of existing capacitance measurement is generally to use RC charging method for measurement. However, this method is easily interfered and cannot guarantee the test accuracy, resulting in invalid measurement results, and then repeated measurements are required, resulting in a waste of resources. Summary of the invention
[0003] The technical problem to be solved by the present invention is to overcome the deficiencies of the prior art and provide a capacitance measurement circuit and method based on a constant current source which has a simple structure, low cost, strong anti-interference ability and a wide measurement range.
[0004] The technical solution adopted by the constant current source based capacitance measurement circuit of the present invention is that it includes a standard power supply, the capacitance measurement circuit is integrated on a circuit board, and it also includes a capacitance charging and discharging unit and a frequency acquisition unit.
[0005] The capacitor charging and discharging unit performs constant current charging and constant current discharging on the capacitor to be tested.
[0006] The frequency acquisition unit is connected to both ends of the capacitor to be measured and performs frequency acquisition on the constant current charging process and the constant current discharging process of the capacitor charging and discharging unit, and obtains the capacitance value of the capacitor to be measured through the charging and discharging frequency;
[0007] The capacitor charging and discharging unit includes a constant current source charging circuit, a constant current source discharging circuit, a first switch and a second switch. The positive electrode of the constant current source charging circuit, the first switch, the second switch and the negative electrode of the constant current source discharging circuit are connected in sequence. The negative electrode of the constant current source charging circuit is connected to the positive electrode of the constant current source discharging circuit. One end of the capacitor to be measured is connected between the connection point of the first switch and the second switch, and the other end is connected between the negative electrode of the constant current source charging circuit and the positive electrode of the constant current source discharging circuit.
[0008] Furthermore, the constant current source charging circuit includes a tenth op amp and a second field effect transistor, the output pin of the tenth op amp is connected to the gate of the second field effect transistor, the source of the second field effect transistor is connected to the negative input pin of the tenth op amp, and the drain of the second field effect transistor is connected to one end of the capacitor to be measured through a third diode.
[0009] Further, the constant current source discharge circuit includes a thirteenth op amp, a twelfth op amp and a first field effect transistor, the output pin of the thirteenth op amp is connected to the positive input pin of the twelfth op amp, the output pin of the twelfth op amp is connected to the gate of the first field effect transistor, the source of the first field effect transistor is respectively connected to the negative input pin of the twelfth op amp, the output pin and the negative input pin of the thirteenth op amp, and the drain of the first field effect transistor is connected to one end of the capacitor to be measured through a fourth diode.
[0010] Furthermore, the frequency acquisition unit includes a first instrument amplifier, a comparator, a level conversion amplifier and an MCU, wherein two input pins of the first instrument amplifier are respectively connected to the two ends of the capacitor to be measured, the output pin of the first instrument amplifier is connected to the input end of the comparator, the output end of the comparator is connected to the level conversion amplifier, and the level conversion amplifier converts the level into a standard square wave signal and inputs it into the MCU.
[0011] In addition, a switch control circuit is connected to the output end of the comparator, and the output end of the switch control circuit is connected to the first switch and the second switch respectively.
[0012] Furthermore, the MCU is a single chip microcomputer of model STM32F103.
[0013] Furthermore, the switch control circuit is composed of an analog switch of model TS5A4594.
[0014] More specifically, the standard power supply is a standard 5V power supply, and a second instrument amplifier is provided at the output end of the standard power supply.
[0015] The method for measuring the capacitance value of a capacitor using the above-mentioned capacitance value measurement circuit based on a constant current source comprises the following steps:
[0016] a. First, the first switch is closed, and the constant current source charging circuit performs constant current charging on the capacitor to be measured;
[0017] b. When the charging voltage reaches the set voltage value, the comparator outputs a low level to the level conversion amplifier, and the level signal is converted into a standard square wave signal, which is input into the MCU;
[0018] c. The switch control circuit disconnects the first switch and closes the second switch to discharge the capacitor under test with a constant current;
[0019] d. When the discharge voltage reaches the set value, the comparator outputs a high level to the level conversion amplifier, and the level signal is converted into a standard square wave signal, which is input to the MCU for frequency acquisition during charging;
[0020] e. After the MCU obtains the charge and discharge frequency, the capacitance of the capacitor to be measured is calculated by the following formula:
[0021] U=(I / C)*T, C=I*(T / U), where,
[0022] U is the voltage across the capacitor to be measured, I is the charge and discharge current of the capacitor to be measured, C is the capacitance of the capacitor to be measured, and T is the charge and discharge frequency.
[0023] The beneficial effects of the present invention are as follows: the present invention charges the capacitor to be measured with a constant current through a capacitor charging and discharging unit, after the charged voltage reaches a set value, the capacitor to be measured is discharged with a constant current through switch control, after the discharged voltage reaches a set value, the frequency of constant current charging and discharging is collected through a frequency collection unit, and the capacitance of the capacitor to be measured can be obtained through a capacitor capacitance calculation formula; the present invention realizes capacitor charging and discharging through a constant current source, greatly improves the anti-interference ability of the entire measurement circuit, and ensures the measurement accuracy; in addition, the circuit of the present invention is integrated on a circuit board, and compared with the prior art, the volume is greatly reduced, so that it occupies a small space, has strong practicality, is flexible in use, has strong portability, and greatly reduces the cost; in addition, the circuit of the present invention can measure both single-cell capacitance and on-board capacitance, thereby realizing wide-range measurement and improving circuit applicability. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a principle block diagram of the present invention;
[0025] Figure 2 It is the principle diagram of the constant current source charging and discharging circuit of the present invention;
[0026] Figure 3 It is a circuit schematic diagram of frequency acquisition of the present invention;
[0027] Figure 4 3 is a frequency waveform diagram of the level conversion amplifier before and after conversion. DETAILED DESCRIPTION
[0028] The specific principles of the present invention are as follows.
[0029] The present invention includes a standard power supply. The standard power supply is a standard 5V power supply, and a second instrument amplifier U7 is arranged at the output end of the standard power supply. Here, the model of the second instrument amplifier U7 is OPA2277. The capacitance value measurement circuit is integrated on a circuit board, and it also includes a capacitance charging and discharging unit 1 and a frequency acquisition unit 2.
[0030] The capacitor charging and discharging unit 1 performs constant current charging and constant current discharging on the capacitor C25 to be measured, and the frequency acquisition unit 2 is connected to both ends of the capacitor C25 to be measured and performs frequency acquisition on the constant current charging process and the constant current discharging process of the capacitor charging and discharging unit 1, and obtains the capacitance of the capacitor C25 to be measured through the charging and discharging frequency. The capacitor charging and discharging unit 1 includes a constant current source charging circuit 11, a constant current source discharging circuit 12, a first switch K1 and a second switch K2, the positive electrode of the constant current source charging circuit 11, the first switch K1, the second switch K2 and the negative electrode of the constant current source discharging circuit 12 are connected in sequence, the negative electrode of the constant current source charging circuit 11 is connected to the positive electrode of the constant current source discharging circuit 12, one end of the capacitor C25 to be measured is connected between the connection point of the first switch K1 and the second switch K2, and the other end is connected between the negative electrode of the constant current source charging circuit 11 and the positive electrode of the constant current source discharging circuit 12.
[0031] The constant current source charging circuit 11 includes a tenth operational amplifier U10 and a second field effect transistor Q2B, wherein the output pin of the tenth operational amplifier U10 is connected to the gate of the second field effect transistor Q2B, the source of the second field effect transistor Q2B is connected to the negative input pin of the tenth operational amplifier U10, and the drain of the second field effect transistor Q2B is connected to one end of the capacitor C25 to be measured via a third diode D3. In this embodiment, the model of the tenth operational amplifier U10 is OPA2277; the model of the second field effect transistor Q2B is 2N7002. The constant current source discharge circuit 12 includes a thirteenth operational amplifier U13, a twelfth operational amplifier U12 and a first field effect transistor Q2A, the output pin of the thirteenth operational amplifier U13 is connected to the positive input pin of the twelfth operational amplifier U12, the output pin of the twelfth operational amplifier U12 is connected to the gate of the first field effect transistor Q2A, the source of the first field effect transistor Q2A is respectively connected to the negative input pin of the twelfth operational amplifier U12, the output pin and the negative input pin of the thirteenth operational amplifier U13, and the drain of the first field effect transistor Q2A is connected to one end of the capacitor C25 to be measured through a fourth diode D4. In this embodiment, the model of the thirteenth operational amplifier U13 is OPA2277; the model of the twelfth operational amplifier U12 is OPA2277; the model of the first field effect transistor Q2A is FDV301N.
[0032] The frequency acquisition unit 2 includes a first instrument amplifier U6, a comparator U9, a level conversion amplifier U8 and an MCU, wherein the two input pins of the first instrument amplifier U6 are respectively connected to the two ends of the capacitor C25 to be measured, the output pin of the first instrument amplifier U6 is connected to the input end of the comparator U9, the output end of the comparator U9 is connected to the level conversion amplifier U8, and the level conversion amplifier U8 converts the level into a standard square wave signal and then inputs it into the MCU. In this embodiment, the MCU selects a single-chip microcomputer of model STM32F103; the model of the first instrument amplifier U6 is AD8421; the model of the comparator U9 is LMV393ID; the model of the level conversion amplifier U8 is OPA2277.
[0033] The output end of the comparator U9 is also connected to a switch control circuit 21, and the output end of the switch control circuit is connected to the first switch K1 and the second switch K2 respectively. In this embodiment, the switch control circuit 21 is composed of an analog switch U11 of model TS5A4594.
[0034] The method for measuring the capacitance of a capacitor to be measured by using the above-mentioned capacitance measurement circuit based on a constant current source comprises the following steps:
[0035] a. First, the first switch K1 is closed, and the constant current source charging circuit 11 performs constant current charging on the capacitor C25 to be measured;
[0036] b. When the charging voltage reaches the set voltage value, the comparator U9 outputs a low level to the level conversion amplifier U8, and the level signal is converted into a standard square wave signal, which is input to the MCU for frequency acquisition during charging;
[0037] c. The switch control circuit disconnects the first switch K1 and closes the second switch K2 to discharge the capacitor C25 at a constant current;
[0038] d. When the discharge voltage reaches the set value, the comparator U9 outputs a high level to the level conversion amplifier U8, and the level signal is converted into a standard square wave signal, which is input to the MCU for frequency acquisition during charging;
[0039] e. After the MCU obtains the charge and discharge frequency, the capacitance of the capacitor to be measured is calculated by the following formula:
[0040] U=(I / C)*T, C=I*(T / U), where,
[0041] U is the voltage across the capacitor to be measured, I is the charge and discharge current of the capacitor to be measured, C is the capacitance of the capacitor to be measured, and T is the charge and discharge frequency.
[0042] In addition, in order to provide a stable and high-precision capacitance measurement circuit, the present invention adopts a calibration method to achieve this purpose, and compensates for the shortcomings of the circuit through circuit calibration. The calibration method is to use an LCR meter as a calibration standard, and then use the circuit to measure the capacitance value, and record the error value in the MCU's FLASH for compensation during testing. After compensation, after measuring the charge and discharge frequency of the capacitor, when calculating the capacitance value, the compensation value is calculated, and the capacitance measurement calibration can be achieved.
[0043] The present invention adopts a precise constant current source for charging and discharging, so that the charging slope and the discharging slope of the capacitor are consistent, thereby ensuring the frequency stability, and the accuracy can be achieved within 1‰; in addition, the use of high-bandwidth operational amplifiers and MCU processing greatly improves the response speed; the present invention integrates the circuit on a circuit board (PCB board), so that the circuit is stable and reliable, and can be installed on different devices for easy transplantation; in addition, the present invention has low cost, and the overall cost can be controlled within 100 RMB, which is much better than the expensive equipment used in the prior art.
[0044] It can be seen that the present invention can measure the on-board capacitance and independent capacitance capacity functions with high precision, has high circuit integration, is stable and reliable, and has a fast measurement time, and can be applied to the test equipment industry for consumer electronic products.
[0045] It should be noted that, if the cost allows, field programmable gate arrays (FPGAs), complex programmable logic devices (CPLDs), etc. can be used to measure the charging frequency (time). Low-precision power supplies, low-cost comparators, and different types of MOS tubes can also be replaced according to the accuracy requirements of actual applications.
Claims
1. A capacitance measurement circuit based on a constant current source, comprising a standard power supply, characterized in that: The capacitance value measurement circuit is integrated on a circuit board, and further comprises a capacitance charging and discharging unit (1) and a frequency acquisition unit (2). The capacitor charging and discharging unit (1) performs constant current charging and constant current discharging on the capacitor to be tested (C25). The frequency acquisition unit (2) is connected to both ends of the capacitor to be measured (C25) and performs frequency acquisition on the constant current charging process and the constant current discharging process of the capacitor charging and discharging unit (1), and obtains the capacitance value of the capacitor to be measured (C25) through the charging and discharging frequency; The capacitor charging and discharging unit (1) comprises a constant current source charging circuit (11), a constant current source discharging circuit (12), a first switch (K1) and a second switch (K2); the positive electrode of the constant current source charging circuit (11), the first switch (K1), the second switch (K2) and the negative electrode of the constant current source discharging circuit (12) are connected in sequence; the negative electrode of the constant current source charging circuit (11) is connected to the positive electrode of the constant current source discharging circuit (12); one end of the capacitor to be tested (C25) is connected between the connection point of the first switch (K1) and the second switch (K2), and the other end is connected between the negative electrode of the constant current source charging circuit (11) and the positive electrode of the constant current source discharging circuit (12); The constant current source charging circuit (11) comprises a tenth operational amplifier (U10) and a second field effect transistor (Q2B), the output pin of the tenth operational amplifier (U10) is connected to the gate of the second field effect transistor (Q2B), the source of the second field effect transistor (Q2B) is connected to the negative input pin of the tenth operational amplifier (U10), and the drain of the second field effect transistor (Q2B) is connected to one end of the capacitor to be measured (C25) via a third diode (D3); The constant current source discharge circuit (12) comprises a thirteenth operational amplifier (U13), a twelfth operational amplifier (U12) and a first field effect transistor (Q2A), the output pin of the thirteenth operational amplifier (U13) is connected to the positive input pin of the twelfth operational amplifier (U12), the output pin of the twelfth operational amplifier (U12) is connected to the gate of the first field effect transistor (Q2A), the source of the first field effect transistor (Q2A) is respectively connected to the negative input pin of the twelfth operational amplifier (U12), the output pin and the negative input pin of the thirteenth operational amplifier (U13), and the drain of the first field effect transistor (Q2A) is connected to one end of the capacitor (C25) to be measured via a fourth diode (D4); The frequency acquisition unit (2) comprises a first instrument amplifier (U6), a comparator (U9), a level conversion amplifier (U8) and an MCU, wherein two input pins of the first instrument amplifier (U6) are respectively connected to two ends of a capacitor (C25) to be measured, an output pin of the first instrument amplifier (U6) is connected to an input end of the comparator (U9), an output end of the comparator (U9) is connected to the level conversion amplifier (U8), and the level conversion amplifier (U8) converts the level into a standard square wave signal and then inputs it into the MCU.
2. The capacitance measurement circuit based on a constant current source according to claim 1, characterized in that: A switch control circuit (21) is also connected to the output end of the comparator (U9), and the output end of the switch control circuit is respectively connected to the first switch (K1) and the second switch (K2).
3. The capacitance measurement circuit based on a constant current source according to claim 1, characterized in that: The MCU is a single chip microcomputer of model STM32F103.
4. The capacitance measurement circuit based on a constant current source according to claim 2, characterized in that: The switch control circuit (21) is composed of an analog switch (U11) of model TS5A4594.
5. The capacitance measurement circuit based on a constant current source according to claim 1, characterized in that: The standard power supply is a standard 5V power supply, and a second instrument amplifier (U7) is arranged at the output end of the standard power supply.
6. A method for measuring the capacitance of a capacitor to be measured using the capacitance measurement circuit based on a constant current source as claimed in claim 1, characterized in that: The method comprises the following steps: a. First, the first switch (K1) is closed, and the constant current source charging circuit (11) performs constant current charging on the capacitor to be measured (C25); b. When the charging voltage reaches the set voltage value, the comparator (U9) outputs a low level to the level conversion amplifier (U8), and the level signal is converted into a standard square wave signal, which is input into the MCU for frequency acquisition during charging; c. The switch control circuit disconnects the first switch (K1) and closes the second switch (K2) to discharge the capacitor to be measured (C25) with a constant current; d. When the discharge voltage reaches the set value, the comparator (U9) outputs a high level to the level conversion amplifier (U8), and the level signal is converted into a standard square wave signal, which is input into the MCU for frequency acquisition during charging; e. After the MCU obtains the charge and discharge frequency, the capacitance of the capacitor to be measured is calculated by the following formula: U=(I / C)*T, C=I*(T / U), where, U is the voltage across the capacitor to be measured, I is the charge and discharge current of the capacitor to be measured, C is the capacitance of the capacitor to be measured, and T is the charge and discharge frequency.
