A high-sensitivity capacitance change detection method
By counting the oscillating signal of the capacitance change in three consecutive fixed time windows, and judging the capacitance change using a predetermined threshold value of adjustable sensitivity, the problem of misjudgment and limited sensitivity in the prior art is solved, and high-precision and adjustable sensitivity capacitance change detection is achieved.
Patent Information
- Application Number
- CN202211123690.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-15
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2042-09-15
AI Technical Summary
The existing capacitance detection methods have a large difference in reference values under different environments, and are easily affected by changes in external environments (such as temperature and humidity), resulting in misjudgment of capacitance changes. The threshold for determining capacitance changes is fixed, and the sensitivity is limited, which cannot meet the needs of high-sensitivity capacitance changes detection.
The oscillation signal with a frequency change is generated by the oscillation circuit, the signal is counted in three consecutive fixed time windows, and the counting values of the first and second fixed time windows, the first and third fixed time windows are compared, and the capacitance change is judged using a predetermined threshold value of adjustable sensitivity.
It realizes high-precision capacitance change detection, which can eliminate external environment interference and avoid misjudgment. The sensitivity can be configured according to different application scenarios to meet the needs of high-sensitivity capacitance change detection.
Smart Images

Figure CN115494307B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of capacitance detection technology, and more specifically, to a high-sensitivity capacitance change detection method. Background Art
[0002] With the continuous development and progress of society and electronic technology, capacitance detection technology is becoming more and more widely used, bringing a lot of convenience to people's lives. Capacitance detection technology is usually used in products such as touch screens and microphones, especially in the field of electronic cigarettes, and the accuracy requirements for capacitance change detection are getting higher and higher.
[0003] Figure 2 Schematic diagram of the principle of a capacitance detection method in the prior art. The capacitance detection method usually judges the absolute difference of the change in the capacitance to be measured, uses an oscillator to convert the change in the capacitance to be measured into an oscillation signal with a certain frequency, and uses a counter to count the oscillation signal within a certain period of time, and compares it with the baseline count value when the capacitance to be measured has not changed, so as to judge whether the capacitance to be measured has changed and what kind of change it has.
[0004] like Figure 2 As shown, the capacitance detection method counts the number of oscillation signals within a fixed time when the capacitance to be measured has not changed, and stores it in a reference counter as a reference value for comparing whether the capacitance has changed. Subsequently, counting is performed at each fixed time, and the counting result obtained is compared with the reference value in the reference counter. If the difference exceeds a predetermined threshold, it is recorded as a change in capacitance. The reference values of this scheme vary greatly under different environments. When the capacitance is affected by changes in the surrounding environment, such as changes in temperature, humidity, etc., the reference value and subsequent count values are affected, which may result in misjudgment of capacitance changes. Taking electronic cigarettes as an example, when there is no smoking action, the capacitance does not change, but due to the increase in external temperature, the capacitance changes, which may lead to a misjudgment of entering smoking, which is very dangerous for users. In addition, the threshold for judging capacitance changes is fixed, and the sensitivity is limited, which cannot meet the requirements of application scenarios that require high-sensitivity capacitance change detection. Summary of the invention
[0005] In order to solve at least one of the above technical problems, the present invention proposes a high-sensitivity capacitance change detection method.
[0006] A first aspect of the present invention provides a high-sensitivity capacitance change detection method, characterized in that it comprises the following steps:
[0007] The oscillation circuit generates an oscillation signal with a changing frequency. By counting the signal in three consecutive fixed time windows,
[0008] Among them, during the process of detecting the capacitance, the first fixed time window for starting counting is recorded as the first window, and the count value of this window is C1. Subsequently, the fixed time windows for counting are the second window and the third window respectively, and the count values are C2 and C3 respectively. The predetermined threshold of the adjustable sensitivity is Δ;
[0009] If C1 > C2 and C1 > C2 + Δ, that is, the count value of the first window is greater than the count value of the second window, and the difference between the two is greater than the predetermined threshold Δ, this detection method determines that the capacitance value of the external capacitance to be detected increases;
[0010] If C1 > C2 but C1 < C2 + Δ, that is, the count value of the first window is greater than the count value of the second window, but the difference between the two is less than the predetermined threshold Δ, then further judge the magnitude of the difference between C1 and C3:
[0011] At this time, if C1 > C3 + Δ, this detection method determines that the capacitance value of the external capacitance to be detected increases; at this time, if C1 < C3 + Δ, this detection method determines that the external capacitance to be detected has not changed and is within the normal fluctuation range;
[0012] If C1 < C2 and C1 + Δ < C2, that is, the count value of the first window is less than the count value of the second window, and the difference between the two is greater than the predetermined threshold Δ, this detection method determines that the capacitance value of the external capacitance to be detected decreases;
[0013] If C1 < C2 but C1 + Δ > C2, that is, the count value of the first window is less than the count value of the second window, but the difference between the two is less than the predetermined threshold Δ, then continue to judge the magnitude of the difference between C1 and C3:
[0014] At this time, if C1 + Δ < C3, this detection method determines that the capacitance value of the external capacitance to be detected decreases; at this time, if C1 + Δ > C3, this detection method determines that the external capacitance to be detected has not changed and is within the normal fluctuation range. In a preferred embodiment of the present invention, the selection range of the fixed time window is 10 ms - 40 ms.
[0015] In a preferred embodiment of the present invention, when the fixed time window is selected as 10 ms, the fastest time to obtain the capacitance detection result is 20 ms, and the slowest is 30 ms;
[0016] When the fixed time window is selected as 40 ms, the fastest time to obtain the capacitance detection result is 80 ms, and the slowest is 120 ms.
[0017] In a preferred embodiment of the present invention, the selection range of the predetermined threshold of the adjustable sensitivity is 4 - 64, and the predetermined threshold is a positive integer.
[0018] In a preferred embodiment of the present invention, if the count value when the initial external measured capacitance does not change is 1000 (i.e., assuming that the count value C1 is 1000 when the capacitance does not change at the beginning), the fixed time window is selected as 10ms, and the predetermined threshold value is 64 as an example. Then, under this configuration, a capacitance value change of 64 / 1000 can be detected, and the sensitivity is the lowest.
[0019] If the fixed time window is selected as 40ms and the predetermined threshold value is 4, then a capacitance change of 4 / 4000 can be detected under this configuration, with the highest sensitivity.
[0020] In a preferred embodiment of the present invention, the oscillation signal is counted once per cycle.
[0021] The above technical solution of the present invention has the following advantages compared with the prior art:
[0022] The high-sensitivity capacitance change detection method of the present invention can detect capacitance changes with high precision. An oscillation circuit generates an oscillation signal whose frequency changes with the external capacitance to be detected. The oscillation frequency change of the oscillation signal within a certain period of time is compared before and after to determine whether the capacitance to be measured has changed. The fixed time window length and the predetermined threshold value are optional, and a variety of high-sensitivity detection configurations can be combined. Moreover, since it is a before-and-after comparison of the count value, the interference caused by the external environment such as temperature, humidity, etc. can be eliminated, and it will not cause erroneous judgment operations due to external environmental factors. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, some of the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 is a flow chart of a high-sensitivity capacitance change detection method of the present invention;
[0025] Figure 2 It is a schematic diagram of the principle of a capacitance detection method in the prior art;
[0026] Figure 3 is a window schematic diagram of a capacitance change detection method in an embodiment of the present invention;
[0027] Figure 4 is a counting schematic diagram of a capacitance change detection method in an embodiment of the present invention;
[0028] Figure 5 4 is a circuit diagram of a capacitance change detection analog module in an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0030] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0031] Embodiment 1
[0032] Figure 1 The figure shows a flow chart of a high-sensitivity capacitance change detection method of the present invention. The capacitance change detection method generates an oscillation signal whose frequency changes with the change of the external detection capacitance through an oscillation circuit, counts the signal in three consecutive fixed time windows, and compares the difference in count values between the first and second fixed time windows and the first and third fixed time windows, reflecting the change in its oscillation frequency, and then determines the change in the external detection capacitance.
[0033] like Figure 5 As shown, the capacitance detection analog module circuit in this embodiment includes: internal IBIAS bias current, internal capacitor, reference voltage comparator, and waveform shaping circuit. In this embodiment, an external capacitor is connected in parallel, and the internal and external capacitors are charged and discharged by the internal IBIAS bias current. The charged capacitor voltage is obtained and the comparison result is obtained by the reference voltage comparator. The comparison result is a spike wave with a certain frequency. Through the waveform shaping circuit, an oscillation signal with a certain frequency is finally output.
[0034] When the external capacitor becomes smaller, the internal IBIAS bias current can charge the capacitor faster, and the capacitor voltage value rises rapidly. When passing through the reference voltage comparator, the capacitor voltage can exceed the reference voltage in a short time, and the comparator controls the capacitor to discharge. This process is repeated many times, and a higher frequency oscillation signal can be output.
[0035] When the external capacitance becomes larger, the internal IBIAS bias current takes longer to charge the capacitor. After the capacitor voltage rises slowly and reaches the reference voltage, the circuit controls the capacitor to discharge and charge again, and finally outputs an oscillation signal with a lower frequency, and the frequency of the oscillation signal changes with the capacitance.
[0036] For the oscillation signal whose output frequency changes with the capacitance, the capacitance change detection method counts and performs logic analysis on it to finally obtain the result. Figure 2It is a schematic diagram of the principle of a capacitance detection method in the prior art. It can be seen that in this capacitance change detection method, the reference count value when the capacitance to be measured remains unchanged is compared with the count value at a subsequent moment. When the surrounding environment changes and affects the capacitance, such as temperature change, humidity change, etc., which causes the capacitance to change, both the reference value and the subsequent count value are affected. Therefore, misjudgment may occur, and it is considered that the capacitance has changed only when the difference between the reference count value and the subsequent count value reaches a predetermined threshold to avoid the small fluctuations in the capacitance value in the stable state. This makes the sensitivity of this capacitance change detection method limited and cannot meet the application scenario requirements for high-sensitivity capacitance change detection.
[0037] In response to this phenomenon, we propose a solution of performing continuous three fixed-time window counting on the oscillation signal, comparing the count values of the front and back windows with the size of the predetermined threshold, and both the fixed-time window size and the predetermined threshold can be configured. As Figure 3 and Figure 4 shown, the two figures are the window schematic diagram and the counting schematic diagram of the high-sensitivity capacitance change detection method of this embodiment. Combining Figure 1 shown, the high-sensitivity capacitance change detection method of this embodiment includes:
[0038] Count the oscillation signal whose output frequency of the oscillator changes with the capacitance to be measured within a fixed time window, perform continuous three fixed-time window counting, and compare the counting difference between the first fixed time window and the second fixed time window, and the counting difference between the first fixed time window and the third fixed time window. During the process of detecting the capacitance to be detected externally, the first fixed time window when starting to count is recorded as the first window, and the count value of this window is C1. The subsequent fixed time windows for counting are the second window and the third window respectively, and the count values are C2 and C3. Denote the adjustable sensitivity predetermined threshold as ∆:
[0039] If C1 > C2 and C1 > C2 + ∆, that is, the count value of the first window is greater than the count value of the second window, and the difference between the two is greater than the predetermined threshold Δ, this detection method determines that the capacitance value of the capacitance to be detected externally increases;
[0040] If C1 > C2 but C1 < C2 + ∆, that is, the count value of the first window is greater than the count value of the second window, but the difference between the two is less than the predetermined threshold Δ, then further judge the difference between C1 and C3:
[0041] At this time, if C1 > C3 + Δ, this detection method determines that the capacitance value of the capacitance to be detected externally increases; at this time, if C1 < C3 + Δ, this detection method determines that the capacitance to be detected externally has not changed and is within the normal fluctuation range;
[0042] If C1 < C2 and C1 + ∆ < C2, that is, the count value of the first window is less than that of the second window, and the difference between them is greater than the predetermined threshold ∆, this detection method determines that the capacitance value of the external capacitance to be detected decreases;
[0043] If C1 < C2 but C1 + ∆ > C2, that is, the count value of the first window is less than that of the second window, but the difference between them is less than the predetermined threshold ∆, then continue to judge the difference between C1 and C3:
[0044] At this time, if C1 + ∆ < C3, this detection method determines that the capacitance value of the external capacitance to be detected decreases; at this time, if C1 + ∆ > C3, this detection method determines that the external capacitance to be detected has not changed and is within the normal fluctuation range.
[0045] The count values of the first and second fixed windows are judged first. If the difference between C1 and C2 is significantly greater than the fixed threshold ∆, it can be judged whether the capacitance has changed within the second fixed time window, and the capacitance change rate is relatively fast; if the difference between C1 and C2 is less than the fixed threshold ∆, then judge the count values C1 and C3 of the first and third fixed windows again. At this time, if the difference between C1 and C3 is greater than the fixed threshold ∆, it can be judged that the capacitance has indeed changed, but the capacitance value change rate is relatively slow and it takes the change time of three fixed windows to judge. However, if the differences between C1 and C2, and C1 and C3 are both less than the fixed threshold ∆, it means that the external capacitance is within the normal fluctuation range and the capacitance value has not changed.
[0046] By using the above method, it is possible to save time and draw a conclusion on whether the capacitance has changed in a shorter time when the capacitance value change rate is relatively fast. Since the external capacitance to be detected is affected by voltage, current and external factors in the circuit, the capacitance value will also have small fluctuations. For the case where the capacitance value change rate is relatively slow, this method can also accurately judge whether the external capacitance to be detected has changed or is within the normal fluctuation range.
[0047] The predetermined threshold is used to configure the sensitivity. The smaller the predetermined threshold, the smaller the difference between the front and rear window counts and the smaller the change in the measured capacitance, the more the change in the measured capacitance can be judged. The larger the predetermined threshold, the more capacitance value changes are needed to judge the change in the measured capacitance. The predetermined threshold is also used to deal with the slight fluctuations generated when the measured capacitance is stable. If the threshold configuration is very small, any capacitance value fluctuation generated when the measured capacitance is stable will lead to the misjudgment of the capacitance change, so it needs to be set reasonably. The fixed time window size is also used to configure the sensitivity. The longer the window time, the more counts, and the higher the accuracy of judging the change in the measured capacitance. However, more counters are required at the same time, and the time to obtain the judgment result will increase accordingly. The size of the fixed time window can be selected in the range of 10ms-40ms, and the predetermined threshold is also divided into multiple gears. The appropriate threshold can be selected in the range of 4-64. The reasonable combination of the predetermined threshold and the fixed time window size can combine a variety of highly sensitive configurations:
[0048] When the fixed time window size is selected as 10ms, it takes at least 20ms to get the capacitance detection result, and because the window time is short and the counts are small, the sensitivity of judging the change of the capacitance to be measured is low;
[0049] When the fixed time window size is selected as 40ms, it takes at least 80ms to get the capacitance detection result. The longer the window time, the more counts of the oscillation signal, and it is easier to determine whether the capacitance to be tested has changed, and the sensitivity is higher.
[0050] If there are specific requirements for the time to obtain the capacitance detection result, the fixed time window size can be reasonably selected according to the specific requirements. For example, if the result needs to be obtained before 50ms, the maximum fixed time window size is 16ms.
[0051] If the predetermined threshold value is 64, a larger capacitance value change is required under this configuration, and the difference between the count values of the fixed time windows before and after must be large enough to determine that the capacitance to be measured has changed, so the sensitivity is low;
[0052] If the preset threshold value is 4, then under this configuration, even a very small change in capacitance value, that is, a small difference in the counts in the fixed time window before and after, can be used to determine that the capacitance to be measured has changed, and the sensitivity is higher;
[0053] If the count value when the initial external capacitance to be measured does not change is 1000, the fixed time window is selected as 10ms, and the predetermined threshold value is 64, for example, then under this configuration, a capacitance change of 64 / 1000 can be detected, and the sensitivity is the lowest.
[0054] If the fixed time window is selected as 40ms and the predetermined threshold value is 4, then a capacitance change of 4 / 4000 can be detected under this configuration, with the highest sensitivity.
[0055] The configuration with the highest sensitivity in the detection method of the present invention is to select a fixed time window size of 40ms and a predetermined threshold of 4; the configuration with the lowest sensitivity is to select a fixed time window size of 10ms and a predetermined threshold of 64. This scheme will not be affected by external factors such as temperature, humidity, etc., and there will be no misjudgment caused by changes in the external environment.
[0056] Furthermore, the sensitivity is from high to low: the fixed time window is 40ms and the preset threshold is 4; the fixed time window is 40ms and the preset threshold is 16; ... the fixed time window is 40ms and the preset threshold is 64, and the fixed time window is 30ms and the preset threshold is 4; ... the fixed time window is 30ms and the preset threshold is 64... the fixed time window is 10ms and the preset threshold is 4; ... the fixed time window is 10ms and the preset threshold is 64.
[0057] The invention discloses a high-sensitivity capacitance change detection method, which makes a judgment by comparing the count values of capacitance change within a certain period of time. The window size and threshold value are optional, and a variety of high-sensitivity detection configurations can be combined. Since the count values are compared before and after, the interference caused by the external environment such as temperature and humidity can be excluded, and the external environmental factors will not cause misjudgment operations.
[0058] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0059] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to the above embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the above embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0060] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A high-sensitivity capacitance change detection method, characterized in that: It includes the following steps: An oscillation circuit generates an oscillation signal with a changing frequency. By performing continuous counting for three fixed time windows on this signal, During the process of detecting the capacitance, the first fixed time window for starting counting is denoted as the first window, and the count value of this window is C1. The subsequent fixed time windows for counting are the second window and the third window respectively, and the count values are C2 and C3 respectively. The configurable predetermined threshold is Δ; If C1 > C2 and C1 > C2 + Δ, that is, the count value of the first window is greater than the count value of the second window, and the difference between the two is greater than the predetermined threshold Δ, this detection method determines that the capacitance value of the external capacitance to be detected increases; If C1 > C2 but C1 < C2 + Δ, that is, the count value of the first window is greater than the count value of the second window, but the difference between the two is less than the predetermined threshold Δ, then further judge the difference between C1 and C3: At this time, if C1 > C3 + Δ, this detection method determines that the capacitance value of the external capacitance to be detected increases; at this time, if C1 < C3 + Δ, this detection method determines that the external capacitance to be detected has not changed and is within the normal fluctuation range; If C1 < C2 and C1 + Δ < C2, that is, the count value of the first window is less than the count value of the second window, and the difference between the two is greater than the predetermined threshold Δ, this detection method determines that the capacitance value of the external capacitance to be detected decreases; If C1 < C2 but C1 + Δ > C2, that is, the count value of the first window is less than the count value of the second window, but the difference between the two is less than the predetermined threshold Δ, then continue to judge the difference between C1 and C3: At this time, if C1 + Δ < C3, this detection method determines that the capacitance value of the external capacitance to be detected decreases; at this time, if C1 + Δ > C3, this detection method determines that the external capacitance to be detected has not changed and is within the normal fluctuation range; First, make a judgment on the count values of the first and second fixed windows. If the difference between C1 and C2 is greater than the fixed threshold Δ, then it can be judged whether the capacitance has changed within the second fixed time window, and the capacitance change speed is relatively fast; If the difference between C1 and C2 is less than the fixed threshold Δ, then judge the count values C1 and C3 of the first and third fixed windows again. At this time, if the difference between C1 and C3 is greater than the fixed threshold Δ, it can be judged that the capacitance has indeed changed, but the capacitance value change rate is relatively slow and it takes the change time of three fixed windows to judge. If the differences between C1 and C2, and C1 and C3 are both less than the fixed threshold Δ, it means that the external capacitance is within the normal fluctuation range and the capacitance value has not changed, thereby judging whether the external capacitance to be detected has changed or is within the normal fluctuation range; The selection range of the fixed time window is 10 ms - 40 ms; When the fixed time window is selected as 10 ms, the time to obtain the capacitance detection result is 20 ms - 30 ms; When the fixed time window is selected as 40 ms, the time to obtain the capacitance detection result is 80 ms - 120 ms; The selection range of the predetermined threshold of adjustable sensitivity is 4 - 64, where the predetermined threshold is a positive integer; If the count value when the initial external capacitance to be measured does not change is 1000, the fixed time window is selected as 10ms, and the predetermined threshold value is 64, then under this configuration, a capacitance change of 64 / 1000 can be detected, with the lowest sensitivity; If the fixed time window is selected as 40ms and the predetermined threshold value is 4, then a capacitance change of 4 / 4000 can be detected under this configuration, with the highest sensitivity.
2. A high-sensitivity capacitance change detection method according to claim 1, characterized in that: The oscillating signal is counted once per cycle.
Citation Information
Patent Citations
A capacitive touch detection circuit and method
CN110347294A
Device and method for testing capacitor array in integrated circuit
CN1598603A