Capacitive proximity sensor measuring circuit
By using a capacitive proximity sensor measurement circuit in capacitance measurement, the integrated capacitor and differential amplifier convert the charge into voltage, combined with high-frequency and low-frequency signal control, the problem of long charge accumulation time in capacitance measurement is solved, and fast response and high-frequency Capacitance measurement of accuracy.
Patent Information
- Application Number
- CN202421068230.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2034-05-15
AI Technical Summary
The existing capacitance measurement technology cannot achieve high-speed measurement, resulting in limited real-time and accuracy in application scenarios that require rapid response, especially due to the small capacity of the measured capacitance and long charge accumulation process time, which limits the real-time and application range of measurement. .
The capacitive proximity sensor measurement circuit is adopted to convert the charge into voltage by detecting capacitor Cs, equivalent inherent capacitor C3, integral capacitor C2, differential amplifier AMP, accumulated voltage capacitor C1, charge and discharge control switch SW1 and electronic switch SW2. It also uses a differential amplifier and accumulated voltage capacitor to reduce the influence of the system's inherent capacitance, and combines high-frequency and low-frequency signals to control charge accumulation and discharge.
It greatly reduces the accumulation time of effective signals, improves the response speed of the capacitive sensor, reduces the computing power load and production cost of the MCU, and achieves rapid measurement at the same sensitivity.
Smart Images

Figure CN222258283U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the technical field of capacitive sensors, in particular to a capacitive proximity sensor measurement circuit. Background Art
[0002] In the field of capacitance measurement technology, accurate and fast acquisition of capacitance values is crucial for many application scenarios. At present, high-frequency oscillation, charge amplification and charge accumulation amplification are three widely used capacitance measurement methods. Among them, the charge accumulation method has been widely used in general capacitance sensors because it has the advantages of high sensitivity, low environmental interference and low MCU (microcontroller) resource occupation.
[0003] Specifically, the charge accumulation technology gradually accumulates tiny charge changes through the continuous charging and discharging process of the measured capacitor until it reaches the mV level signal that the MCU can read. This method does perform well in terms of accuracy and stability, especially in scenarios that require high-precision measurements. However, it also has a significant limitation, which is that it cannot perform high-speed measurements.
[0004] Since the capacity of the capacitor being measured is usually very small and the amount of charge transferred in each charging and discharging process is extremely limited, a long accumulation process is required to reach a signal level recognizable by the MCU. This long accumulation not only limits the real-time performance of the measurement, but also limits its application in application scenarios that require fast response. Utility Model Content
[0005] In order to overcome the deficiencies of the prior art, the present application provides a capacitive proximity sensor measurement circuit, which significantly reduces the accumulation time of effective signals, improves the response speed of the capacitive sensor, and reduces the cost.
[0006] The technical solution adopted by the utility model to solve the technical problem is: a capacitive proximity sensor measurement circuit, the improvement of which is that it includes a detection capacitor Cs, an equivalent inherent capacitor C3, an integral capacitor C2, a differential amplifier AMP, an accumulated capacitor C1, a charge and discharge control switch SW1, an electronic switch SW2 and an MCU, wherein;
[0007] The detection capacitor Cs is connected to the power supply end, one end of the equivalent inherent capacitor C3 and one end of the integral capacitor C2 through the charge and discharge control switch SW1;
[0008] The integrating capacitor C2 is connected in parallel to both ends of the amplifier; the other end of the integrating capacitor C2 is connected to the first input end of the differential amplifier AMP, the second input end of the differential amplifier AMP is connected to the DC reference voltage Vref, and the output end of the differential amplifier AMP is connected to the input voltage pin of the MCU;
[0009] The electronic switch SW2 is connected in parallel with the accumulator capacitor C1 and then connected to the output end of the differential amplifier AMP;
[0010] The first output end of the MCU is connected to the discharge control switch SW1 to control the charging and charge transfer of the detection capacitor Cs; the second output end of the MCU is connected to the electronic switch SW2 to output a low-frequency pulse to periodically discharge the voltage accumulated on the accumulation capacitor C1.
[0011] The detection capacitor Cs in the above technical solution includes a detection plate Plate1 and a plate Plate2 formed by the surface of the object to be detected.
[0012] In the above technical solution, the power supply end includes a high level VCC and a resistor R1, and one end of the detection capacitor Cs is connected to the high level VCC through the resistor R1.
[0013] When the charge and discharge control switch SW1 in the above technical solution is in the NO position, the power supply end charges the detection capacitor Cs; when the charge and discharge control switch SW1 is in the NC position, the detection capacitor Cs transfers the full charge to the equivalent inherent capacitor C3 and the integral capacitor C2.
[0014] The model of the MCU described in the above technical solution is STM32G031 G8U6.
[0015] The beneficial effects of the utility model are as follows: the charge is transferred through an integral capacitor and converted into a voltage for voltage accumulation detection; before the signal is accumulated, a differential amplifier is used to process the signal for a second time to eliminate the influence of the inherent capacitance of the system; high-frequency and low-frequency signals are used simultaneously to control the accumulation and discharge of the charge, and a relatively smooth effective signal is obtained using an accumulation capacitor, thereby reducing the computing power load of the MCU, thereby greatly reducing the accumulation time of the effective signal, improving the response speed of the capacitive sensor, and reducing the cost at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is the circuit diagram of the traditional charging and discharging charge accumulation scheme;
[0017] Figure 2 A capacitive proximity sensor measurement circuit provided by the utility model;
[0018] Figure 3 This is a signal measurement diagram shown in the present invention. DETAILED DESCRIPTION
[0019] The utility model is further described below in conjunction with the accompanying drawings and embodiments.
[0020] The following will clearly and completely describe the concept, specific structure and technical effects of the utility model in combination with the embodiments and drawings, so as to fully understand the purpose, characteristics and effects of the utility model. Obviously, the described embodiments are only part of the embodiments of the utility model, not all of them. Based on the embodiments of the utility model, other embodiments obtained by technicians in this field without creative work are all within the scope of protection of the utility model. In addition, all the connection / connection relationships involved in the patent do not refer to the direct connection of components, but refer to the formation of a better connection structure by adding or reducing connection accessories according to the specific implementation situation. The various technical features in the creation of the utility model can be combined interchangeably without conflicting with each other.
[0021] like Figure 1 As shown in the figure, it is a circuit diagram of a traditional charging and discharging charge accumulation scheme, in which the MCU will periodically generate a high-frequency square wave pulse with a frequency of 1-2MHz and connect it to the control end of the electronic switch SW1. When the pulse is at a high level, the COM end of the electronic switch SW1 is connected to NO, and the high level VCC charges Cs through R1, and the charged charge Q = Cs*Vcc; when the pulse is at a low level, the COM end of the electronic switch SW1 is connected to NC, and the charge on Cs is transferred to the accumulation capacitor C1, and the voltage on the accumulation capacitor C1 Va = Vcc*Cs / (Cs+C1). After repeating the above process for a while, the potential at Va gradually accumulates, is amplified by the differential amplifier AMP, and then the AD sampling of the MCU obtains valid data.
[0022] However, there are two problems in this traditional charge-discharge charge accumulation system:
[0023] 1. The detection capacitor Cs is a very small capacitor. According to the current general technical indicators, it is hoped that the capacitance of 0.01p can be detected. In order to obtain a larger dynamic range and overcome the influence of the on-capacitance of the electronic switch, the value of C1 is generally several hundred to 1000p. In this way, under ideal conditions, it takes more than 1000 times to fully charge the capacitor on C1.
[0024] 2. In actual situations, because the circuit is not an ideal model, most of the charge transferred from C1 will be lost through the NC port, AMP port, and its own leakage. Even if it accumulates to a signal of several mV that can be effectively sampled by the ADC, it still takes ms.
[0025] Therefore, how to achieve fast capacitance measurement while maintaining high sensitivity and stability has become an urgent problem to be solved in the current field of capacitance measurement technology.
[0026] In order to solve the problems existing in the prior art, such as Figure 2As shown, the utility model provides a capacitive proximity sensor measurement circuit, including a detection capacitor Cs, an equivalent inherent capacitor C3, an integral capacitor C2, a differential amplifier AMP, an accumulation capacitor C1, a charge and discharge control switch SW1, an electronic switch SW2 and an MCU, wherein;
[0027] The detection capacitor Cs is connected to a power supply end, one end of an equivalent inherent capacitor C3 and one end of an integral capacitor C2 through the charge and discharge control switch SW1.
[0028] In a possible implementation, the power supply end includes a high level VCC and a resistor R1 , and one end of the detection capacitor Cs is connected to the high level VCC through the resistor R1 .
[0029] The integrating capacitor C2 is connected in parallel to both ends of the amplifier, and is connected to the detection capacitor Cs together with the equivalent inherent capacitor C3 through the charge and discharge control switch SW1.
[0030] In a possible implementation, the detection capacitor Cs includes a detection plate Plat1 and a plate Plat2 formed by the surface of the detected object.
[0031] The size of the detection capacitor CS depends on the dielectric constant between the two plates Plate1 and Plate2, the plate area and the distance between the object and the plate, and is proportional to the plate area and inversely proportional to the distance between the plates, as shown in the following formula (1):
[0032] Cs= (εr * □0* A) / d (1)
[0033] Where A is the relative area of the two plates Plate1 and Plate2, εr is the relative dielectric constant between the plates, □0 is the dielectric constant of vacuum, and d is the distance between the two plates.
[0034] When the charge and discharge control switch SW1 is in the NO position, the power supply end charges the detection capacitor Cs. When the detection capacitor Cs is full, the charge and discharge control switch SW1 is switched to the NC position to transfer the charge to the equivalent inherent capacitor C3 and the integral capacitor C2.
[0035] Compared with the traditional charging and discharging charge accumulation scheme, the charge filled by the detection capacitor Cs of the present application is not only transferred to the equivalent inherent capacitor C3, but also converts the charge accumulated on the equivalent inherent capacitor C3 and most of the charge on the detection capacitor Cs into a voltage Vb through the integrating capacitor C2.
[0036] Through the integration circuit, charge amplification is first performed before charge accumulation, and the charge is first converted into voltage, and then the converted voltage is accumulated. Compared with direct charge accumulation, the signal amount of each voltage accumulation is greatly increased, so the accumulation time can be greatly reduced.
[0037] The other end of the integrating capacitor C2 is connected to the first input end of the differential amplifier AMP, the second input end of the differential amplifier AMP is connected to the DC reference voltage Vref, and the output end of the differential amplifier AMP is connected to the input voltage pin of the MCU. The electronic switch SW2 is connected in parallel with the accumulating capacitor C1 and then connected to the output end of the differential amplifier AMP.
[0038] The first output end of the MCU is connected to the discharge control switch SW1, and the output pulse F0 is used to control the charging and charge transfer of the detection capacitor Cs; the second output end of the MCU is connected to the electronic switch SW2, and the output low-frequency pulse F1 is used to periodically discharge the accumulated voltage on C1.
[0039] It is worth mentioning that the signal generated by the detection capacitor Cs is very small. Even after differential amplification, the signal fluctuation is quite serious. If AD sampling is used directly, a lot of data will be required for smoothing and filtering operations, resulting in excessive calculation burden on the MCU.
[0040] Therefore, this application adopts adding a accumulative capacitor C1 to the output terminal Vc of the differential amplifier, and the accumulative capacitor C1 accumulates the voltage of the charge transferred by the detection capacitor Cs only, so as to achieve the stability of the sampled signal. Then, according to the system requirements, a low-frequency control signal f1 is set by the MCU, and after each accumulated signal is read, the accumulated charge is discharged to prepare for the next accumulation. In a possible implementation, the model of the MCU is STM32G031G8U6.
[0041] However, this solution needs to solve the problem of inherent capacitance in the system, that is, in addition to the measured signal, the capacitance signal sensed by the detection end also contains a very large system inherent capacitance. This part of the capacitance is much larger than the capacitance of the measured capacitor, so it will lead to the failure to detect the real detection capacitance. After the system inherent capacitance is charged and discharged, the component of Vb generated in the subsequent circuit is very large, and the signal generated by the inherent capacitance reaches saturation, so that the effective signal is also submerged in the saturated signal. Even if the MCU collects the saturated signal, it cannot identify the weak effective signal.
[0042] Therefore, if Figure 2As shown, the present application differentially amplifies the Vb voltage and the DC reference voltage Vref through a differential amplifier AMP, eliminates the signal that is the same as the DC reference voltage Vref, and obtains the charge transferred only by the detection capacitor Cs; the voltage of the charge transferred only by the detection capacitor Cs is accumulated through the accumulator capacitor C1, thereby achieving the stability of the sampled signal.
[0043] like Figure 3 As shown, in Figure (a), S1 is the first input end of the differential amplifier AMP receiving the effective signal generated by the detection capacitor Cs, and S2 is the first input end of the differential amplifier AMP receiving the signal generated by the inherent capacitance; in Figure (b), S3 is the second input end of the differential amplifier AMP receiving the effective signal generated by the detection capacitor Cs, and S4 is the second input end of the differential amplifier AMP receiving the signal generated by the inherent capacitance.
[0044] Figure (c) shows that after the signal generated by the inherent capacitance reaches saturation, the effective signal is submerged in the saturation signal. Figure (d) shows that after the signal generated by the inherent capacitance is eliminated, only the charge signal transferred by the detection capacitor Cs is included.
[0045] Through the above embodiments, the utility model can obtain a relatively stable and effective signal by reducing the number of accumulations from about 1000 times to 100 times under the same sensitivity. For the high-frequency 2M timing, the time for each data sampling is reduced from 1ms to 0.1ms. In this way, the response time requirement of less than 1ms becomes feasible.
[0046] The utility model transfers charge through an integral capacitor and converts it into voltage for voltage accumulation detection. High-frequency and low-frequency signals are used to control the accumulation and discharge of charge, and a relatively smooth effective signal is obtained using an accumulated capacitor, thereby greatly reducing the accumulation time of the effective signal and improving the response speed of the capacitive sensor. Before the signal is accumulated, a differential amplifier is used to process the signal for a second time to eliminate the influence of the system's inherent capacitance. At the same time, the computing power load and production cost of the MCU are reduced.
[0047] The above is a specific description of the preferred implementation of the utility model, but the invention of the utility model is not limited to the described embodiments. Technical personnel familiar with the field can also make various equivalent deformations or substitutions without violating the spirit of the utility model. These equivalent deformations or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A capacitive proximity sensor measurement circuit, characterized in that: It includes a detection capacitor Cs, an equivalent inherent capacitor C3, an integrating capacitor C2, a differential amplifier AMP, an accumulating capacitor C1, a charge and discharge control switch SW1, an electronic switch SW2 and an MCU, wherein; The detection capacitor Cs is connected to the power supply end, one end of the equivalent inherent capacitor C3 and one end of the integral capacitor C2 through the charge and discharge control switch SW1; The integrating capacitor C2 is connected in parallel to both ends of the amplifier; the other end of the integrating capacitor C2 is connected to the first input end of the differential amplifier AMP, the second input end of the differential amplifier AMP is connected to the DC reference voltage Vref, and the output end of the differential amplifier AMP is connected to the input voltage pin of the MCU; The electronic switch SW2 is connected in parallel with the accumulator capacitor C1 and then connected to the output end of the differential amplifier AMP; The first output terminal of the MCU is connected to the discharge control switch SW1, and is used to control the charging and charge transfer of the detection capacitor Cs; The second output terminal of the MCU is connected to the electronic switch SW2 to output a low-frequency pulse for periodically discharging the voltage accumulated on the accumulation capacitor C1.
2. The capacitive proximity sensor measurement circuit according to claim 1, characterized in that: The detection capacitor Cs includes a detection plate Plate1 and a plate Plate2 formed by the surface of the detected object.
3. The capacitive proximity sensor measurement circuit according to claim 1, characterized in that: The power supply end includes a high level VCC and a resistor R1 , and one end of the detection capacitor Cs is connected to the high level VCC through the resistor R1 .
4. The capacitive proximity sensor measurement circuit according to claim 1, characterized in that: When the charge and discharge control switch SW1 is in the NO position, the power supply end charges the detection capacitor Cs; when the charge and discharge control switch SW1 is in the NC position, the detection capacitor Cs transfers the full charge to the equivalent inherent capacitor C3 and the integral capacitor C2.
5. The capacitive proximity sensor measurement circuit according to claim 1, characterized in that: The model of the MCU is STM32G031 G8U6.
