CN110161318B - Capacitance detection circuit and detection method - Google Patents
Capacitance detection circuit and detection method Download PDFInfo
- Publication number
- CN110161318B CN110161318B CN201810149331.XA CN201810149331A CN110161318B CN 110161318 B CN110161318 B CN 110161318B CN 201810149331 A CN201810149331 A CN 201810149331A CN 110161318 B CN110161318 B CN 110161318B
- Authority
- CN
- China
- Prior art keywords
- capacitance
- capacitance detection
- detected
- self
- detection
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R27/00—Arrangements for measuring resistance, reactance, impedance, or electric characteristics derived therefrom
- G01R27/02—Measuring real or complex resistance, reactance, impedance, or other two-pole characteristics derived therefrom, e.g. time constant
- G01R27/26—Measuring inductance or capacitance; Measuring quality factor, e.g. by using the resonance method; Measuring loss factor; Measuring dielectric constants ; Measuring impedance or related variables
- G01R27/2605—Measuring capacitance
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R31/00—Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Electronic Switches (AREA)
- Measurement Of Resistance Or Impedance (AREA)
Abstract
The invention name is as follows: the invention provides a capacitance detection circuit and a detection method. The N capacitance detection electrodes are connected to a resistance chain formed by connecting M resistors in series to form a resistance chain to be detected, and are connected to the self-capacitance detection module through the switch module. The two access ends of the resistance chain to be detected are respectively connected with the detection port of the self-capacitance detection module and are in a high-resistance state under the control of the switch module, a capacitance count value is measured, and after the cycle time, the two access ends are exchanged to measure another count value. When a touch action is performed, the two counting values are changed, and the ratio of the change amounts of the two counting values is calculated, so that the position of the detection electrode in the resistor chain can be judged to be touched. The invention changes the one-to-one detection mode of the detection port and the detection electrode of the capacitance detection circuit in the prior art, uses less ports of the capacitance detection circuit to detect a plurality of detection electrodes, and reduces the production cost.
Description
Technical Field
The invention relates to the technical field of capacitance detection, in particular to a capacitance detection circuit and a measurement method.
Background
At present, the capacitive touch key is widely applied to the fields of household appliances, fitness equipment, smart homes, industrial control and the like. In the prior art, capacitance change on a capacitance detection electrode is detected by connecting the capacitance detection electrode to a detection port of a capacitance detection circuit in a one-to-one manner, so that actions such as finger touch key pressing and the like are detected and judged. If multiple capacitive touch keys are detected, considerable port resources and processor computing power are required.
Disclosure of Invention
The defect that the existing capacitance detection technology occupies too much detection circuit resources is overcome. The invention provides a technical scheme for detecting a plurality of capacitance detection electrodes under the condition of using less capacitance detection circuit detection ports and calculation resources.
The invention provides a capacitance detection circuit which is composed of N capacitance detection electrodes, M resistors, a switch module and a self-capacitance detection module, wherein M, N is an integer larger than or equal to 2.
M resistors in the circuit are connected in series to form a series resistor chain, N capacitance detection electrodes to be detected are connected among the resistors according to actual needs, and the N capacitance detection electrodes and the M resistors form the resistor chain to be detected. Two ends of the resistor chain to be detected are named as a resistor chain input end A end to be detected and an input end B end to be detected respectively.
The switch module comprises two switches, one access end of each switch is connected with one access end of each switch to form an access end C end of the switch module, and the other access ends of the two switches are named as an access end X end and an access end Y end of the switch module respectively.
And the C end of the access end of the switch module is connected with the detection port of the self-capacitance detection module, and the X end and the Y end of the access end of the switch module are respectively connected with the A end and the B end of the resistance chain to be detected, so that a capacitance detection circuit is formed.
Two switches in a switch module in the capacitance detection circuit are alternately switched on and off, when a switch 1 is in a conducting state, a switch 2 must be in a disconnecting state, at the moment, an A end of a resistance chain to be detected is connected with a detection port of a self-capacitance detection module, and a B end of the resistance chain to be detected is in a high-resistance state; when the switch 2 in the switch module is in a conducting state, the switch 1 must be in a disconnecting state, the end B of the resistor chain to be detected is connected with the detection port of the self-capacitance detection module, and the end A of the resistor chain to be detected is in a high-resistance state.
The detection method matched with the detection circuit comprises the following steps: the two switches of the switch module are alternately in an on state, and the self-capacitance detection module is used for obtaining capacitance counting values under the two conditions. When a touch action is performed, the capacitance changes, so that the change value delta N of the capacitance counting value of the self-capacitance detection module under the two conditions is obtainedXLAnd Δ NXR。
The invention discloses aXLAnd Δ NXRRatio of Δ NXL/ΔNXRUnder an ideal condition, the capacitance detection electrode is completely determined by the access position of the capacitance detection electrode with the changed capacitance on the resistance chain to be detected, and is irrelevant to other factors such as the weight of the key, the capacitance change degree caused by action and the like.
Δ N in example 1 of the present inventionXL/ΔNXR= (VH-VL-I*RXR)/ (VH-VL-I*RXL) Wherein V isH,VLI is a constant, RXRAnd RXLRespectively, capacitive sensing electrodes in the resistor chain to be sensedThe ratio of the resistance values at the A end and the B end away from the two access ends to the capacitance counting difference value of the self-capacitance detection module is RXRAnd RXLAnd (6) determining. So that the ratio Δ NXL/ΔNXRIt is known which one of the N capacitance detection electrodes has changed in capacitance.
Δ N in example 2 of the present inventionXLAnd Δ NXRRatio of Δ NXL/ΔNXRThe value of (d) is also determined by the position of the capacitive detection electrode at the access of the resistive link to be detected. In practical application, when a finger touches different capacitance detection electrodes, the ratio delta N of the charging and discharging count difference of the self-capacitance detection module when two switches are alternately in an on state is measured and recordedXL/ΔNXRThis ratio is tabulated. By back-checking this table, it can be found which capacitance detection electrode is touched by the ratio of the count difference values obtained by actual measurement. Therefore, the purpose of detecting the change of the N capacitance detection electrodes through the detection port of one capacitance detection circuit is achieved.
The invention has the beneficial effects that: the invention realizes the detection of a plurality of capacitance detection electrodes under the condition of using a small number of capacitance detection circuit ports, greatly improves the utilization rate of the capacitance detection circuit ports and reduces the production cost.
Drawings
The invention is further illustrated with reference to the following figures and examples.
Fig. 1 is a schematic structural diagram of a capacitance detection circuit according to the present invention.
Fig. 2 is a schematic circuit diagram of the capacitance detection circuit according to embodiment 1.
FIG. 3 is a graph of voltage variation of the capacitor to be detected in example 1.
Fig. 4 is an approximate equivalent circuit when the switch 1 is on and the switch 2 is off in embodiment 1.
Fig. 5 is an approximate equivalent circuit when the switch 2 is on and the switch 1 is off in embodiment 1.
Fig. 6 is a schematic circuit diagram of a capacitance detection circuit according to embodiment 2.
Fig. 7 is a schematic circuit diagram of a capacitance detection circuit according to embodiment 3.
Detailed Description
In order to explain the invention more clearly, practical examples are disclosed below, examples of which are shown in the accompanying drawings. All embodiments are merely examples, and the present invention is not limited to only the embodiments.
[ example 1 ]
The resistor chain and the switch module to be tested in this embodiment are as described in the summary above, see fig. 2.
The self-capacitance detection module in this embodiment is specifically designed as a self-capacitance detection module 1, and is composed of a detection port, switches SW3 and SW4, two comparators, a logic control unit, and a counter.
The working principle of the self-capacitance detection module 1 in this embodiment is as follows: SW3 is turned on, SW4 is turned off, and current source I1 charges the sense port capacitance. When the capacitor voltage reaches the reference voltage VH, SW3 turns off, SW4 turns on, and current source I2 discharges the detection port capacitor. When the voltage of the capacitor port reaches the reference voltage VL, SW3 is turned on, SW4 is turned off, and the charging and discharging process is repeated. The number of charges and discharges reflects the size of the capacitor within a certain time T. Thereby realizing the detection of the capacitance. The detection port voltage waveform is shown in fig. 3.
The charging and discharging current source is I, the capacitance on the detection port is C, and the charging and discharging time is t = 2C (V)H-VL) I, the count N = T/T = T I/(2C (V) of the counter during a certain period (period duration T)H-VL))
In this example, the detection method is as follows.
The self-capacitance detection module is connected with the resistance chain to be detected through the switch module, and periodically and alternately measures the capacitance of the circuit to be detected in the following two stages.
Stage 1: the switch module is turned on by SW1, turned off by SW2, the self-capacitance detection module 1 connected with the A end of the access end of the resistance chain to be detected starts counting in the period T, and the B end of the access end of the resistance chain to be detected is suspended. When there is finger touching the capacitance detection electrode ELCTXThe circuit is approximately equivalent to fig. 4.
Let RXL=R1+R2+…+RXThe number of charging/discharging times at this stage is counted as NXL:
NXL= T*I/(2*C*(VH-VL-I*RXL) - - - -equation 1.
And (2) stage: and SW2 in the switch group is turned on, SW1 is turned off, the self-capacitance detection module 1 connected with the access end B end of the resistance chain to be detected starts counting in a period T, and the access end A end of the resistance chain to be detected is suspended. When there is finger touching the capacitance detection electrode ELCTXThe circuit is approximately equivalent to fig. 5.
Let RXR=RX+1+RX+2+…+RN+1Then, the number of charging/discharging times at this stage is counted as NXR:
NXR= T*I/(2*C*(VH-VL-I*RXR) - - - -equation 2.
Suppose a finger does not touch the capacitive detection electrode ELCTXTime, ELCTXHas an equivalent capacitance of CX. After the finger touches, the equivalent capacitance becomes CX+ΔC。
Then, in stage 1, before and after the finger touch is obtained by formula 1, the difference value of the count of the charge and discharge times of the self-capacitance detection module 1 is:
ΔNXL= T*I/(2*(CX+ΔC)*(VH-VL-I*RXL))-T*I/(2*CX*(VH-VL-I*RXL))
ΔNXL= T*I*ΔC/(2CX*(CX+ΔC)*(VH-VL-I*RXL) - - - -equation 3.
Similarly, in stage 2, before and after the finger touch is obtained by formula 2, the charge and discharge times counting difference of the self-capacitance detection module 1 is:
ΔNXR= T*I*ΔC/(2CX*(CX+ΔC)*(VH-VL-I*RXR) - - -equation 4.
From the formulas 3 and 4, the charge-discharge frequency variation ratio Δ N in two stagesXL/ΔNXR:
ΔNXL/ΔNXR=(VH-VL-I*RXR)/ (VH-VL-I*RXL) 。
So far, it can be concluded that VH,VLI is constant, and the ratio of the count difference of the self-capacitance detection module is RXRAnd RXLAnd (6) determining. The capacitance detection device is determined by the position of the capacitance detection electrode to be detected connected in the resistance chain to be detected, and is irrelevant to the change degree of the capacitance to be detected, namely, the degree of the finger approaching the capacitance detection electrode to be detected. It is possible to know which capacitance detection electrode has changed in capacitance from the ratio.
[ example 2 ]
The resistor chain and the switch module to be detected in this embodiment are as described in the above summary.
The self-capacitance detection module in this embodiment is specifically designed as a self-capacitance detection module 2, and the self-capacitance detection module 2 is composed of a detection port, switches SW3, SW4, SW5, a comparator, a logic control unit, and a counter, as shown in fig. 6.
The capacitance detection process of the self-capacitance detection module 2 is as follows, and each time sampling starts, SW5 is turned on to discharge the capacitance Cx. SW5 is then turned off, starting the charge transfer process.
In the charge transfer process, firstly, SW3 is turned on, SW4 is turned off, the capacitance of the detection port is charged to the power voltage, then SW3 is turned off, SW4 is turned on, the charge on the capacitance of the detection port is transferred to the CX capacitance, the charge transfer step is repeated, the voltage on the CX reaches the voltage reference Vref, and the count value of the counter records the number of times of charge transfer. The counting value reflects the capacitance of the detection port, so that the capacitance detection is realized.
In the same way, the detection method enables the SW1 and the SW2 in the switch group to be periodically and alternately switched on and off, and the count difference delta N of the charge transfer is respectively measured by the self-capacitance detection module 2 in the two different stagesXLAnd Δ NXRAnd calculating the ratio of the two differences DeltaNXL/ΔNXRThis ratio is tabulated. By back-checking this table, it is possible to find which capacitance detection electrode is touched by counting the ratio of the difference values.
[ example 3 ]
The capacitance detection circuit of embodiment 3 is composed of N capacitance detection electrodes, M resistors, a switch module, and a self-capacitance detection module.
The resistor chain to be detected in this embodiment is shown in fig. 7.
The M resistors in this embodiment are divided into 3 groups, and each group is connected in series to form a resistor chain, namely a resistor chain 1, a resistor chain 2 and a resistor chain 3. One end of each of the 3 resistor chains is connected with one terminal, and the other ends of the 3 resistor chains are named as a1 terminal, an A2 terminal and an A3 terminal respectively. N capacitance detection electrodes to be detected are connected among the resistors according to actual needs, and the N capacitance detection electrodes and the M resistors form a resistor chain to be detected.
The switch module comprises 3 switches, wherein one input end of each switch is connected with one input end of each switch to form an input end C end of the switch module, and the other input ends of the 3 switches are respectively used as the input ends X, Y and Z of the switch module.
The C end of the access end of the switch module is connected with the self-capacitance detection module, and the X, Y end and the Z end of the access end of the switch module are respectively connected with the A1 end, the A2 end and the A3 end of the resistor chain to be detected, so that a capacitance detection circuit is formed.
The self-capacitance detection module in this embodiment is designed as a self-capacitance detection module 1.
In this example, the detection method is as follows.
The self-capacitance detection module is connected with a resistor chain to be detected through a switch group, and the states of 3 switches in the switch group are periodically and alternately changed so as to measure the capacitance of the circuit to be detected in the following 3 stages.
Stage 1: the switch group SW1 is turned on, SW2 and SW3 are turned off, the self-capacitance detection module 1 starts counting in the period T, and the change delta N1 of the charging and discharging times when the finger approaches is obtained.
And (2) stage: the switch group SW2 is turned on, SW1 and SW3 are turned off, the self-capacitance detection module 1 starts counting in the period T, and the change delta N2 of the charging and discharging times when the finger approaches is obtained.
And (3) stage: the switch group SW3 is turned on, SW1 and SW2 are turned off, the self-capacitance detection module 1 starts counting in the period T, and the change delta N3 of the charging and discharging times when the finger approaches is obtained.
Two values of Δ N1, Δ N2, and Δ N3 must be the same, and if Δ N1 is different from the other two values, the touched capacitance detection electrode is a capacitance detection electrode connected to the resistor chain 1, and the position thereof can be determined by Δ N1/Δ N2 (the ratio of the change in the number of charge and discharge times). If Δ N2 or Δ N3 is different from the other two values, the same procedure is performed.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention.
Claims (3)
1. A capacitance detection circuit, comprising:
m resistors form a series resistor chain, wherein M is an integer greater than or equal to 2;
n capacitance detection electrodes are respectively connected to different positions of the series resistor chain, wherein N is an integer which is more than or equal to 2 and less than M;
the switch module is composed of two switches and is used for controlling whether the self-capacitance detection module is connected with the access end of the series resistor chain circuit or not;
the self-capacitance detection module can convert the capacitance value on the detection port of the self-capacitance detection module into an internal count value, and the count value reflects the capacitance value; the switch module can be controlled, two access ends of a resistance chain to be detected are respectively connected with a detection port of the self-capacitance detection module and are in a high-resistance state, a capacitance count value is measured, after the cycle time, the two access ends are switched, and another capacitance count value is measured; when a touch action is performed, the two capacitance count values are changed, and the ratio delta N of the change amounts of the two capacitance count values is calculatedXL/ΔNXRThe ratio is only equal to RXRAnd RXLIn connection with, RXRAnd RXLThe capacitance detection electrode is separated by two in the series resistance chainResistance values of the A end and the B end of the access end; the ratio can be used for knowing which one of the N capacitance detection electrodes to be detected has capacitance change, namely the touch action of the finger can be accurately judged.
2. The capacitance detection circuit according to claim 1, wherein the M resistors are connected in series to form a resistor chain, the N capacitance detection electrodes are respectively connected to different positions to form a resistor chain to be detected, and the resistor chain to be detected has two terminals a and B.
3. The capacitance detection circuit according to claim 1, wherein the switch module is composed of two switches, the two switches are alternately turned on and off, and the two terminals a and B of the resistor chain to be detected are controlled to be alternately connected with the self-capacitance detection module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810149331.XA CN110161318B (en) | 2018-02-13 | 2018-02-13 | Capacitance detection circuit and detection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810149331.XA CN110161318B (en) | 2018-02-13 | 2018-02-13 | Capacitance detection circuit and detection method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110161318A CN110161318A (en) | 2019-08-23 |
CN110161318B true CN110161318B (en) | 2021-01-26 |
Family
ID=67635346
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810149331.XA Active CN110161318B (en) | 2018-02-13 | 2018-02-13 | Capacitance detection circuit and detection method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110161318B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110411535A (en) * | 2019-08-27 | 2019-11-05 | 谢晔华 | A kind of capacitance type liquid level detection circuit and detection method |
CN112363003B (en) * | 2020-11-26 | 2023-07-04 | 深圳市汇顶科技股份有限公司 | Self-capacitance detection circuit, touch chip and electronic equipment |
CN114209095B (en) * | 2021-12-30 | 2024-04-26 | 西安稳先半导体科技有限责任公司 | Battery protection circuit, battery pack and electronic device |
CN114397977A (en) * | 2022-02-26 | 2022-04-26 | 谢晔华 | Capacitance induction type input detection device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201251612Y (en) * | 2008-03-19 | 2009-06-03 | 杜波 | Implementing structure for detecting a plurality of capacity-type touch sensors |
CN103109196A (en) * | 2010-07-09 | 2013-05-15 | 科恩托罗尼丝株式会社 | Method and device for sensing capacitance change and recording medium in which program for executing method is recorded thereon, and method and device for sensing touch using method and recording medium in which program for executing method is record |
CN103883180A (en) * | 2012-12-19 | 2014-06-25 | 法国大陆汽车公司 | Device for measuring a variation of a capacitance and associated measuring method |
CN106055183A (en) * | 2012-12-30 | 2016-10-26 | 比亚迪股份有限公司 | Capacitance detection circuit |
CN106841820A (en) * | 2017-03-24 | 2017-06-13 | 湖北工程学院 | Multrirange capacitance measurement circuit, device and method |
CN107543972A (en) * | 2017-09-08 | 2018-01-05 | 乐鑫信息科技(上海)有限公司 | One kind measurement capacitor system and its measuring method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4356003B2 (en) * | 2003-09-30 | 2009-11-04 | アイシン精機株式会社 | Capacitance detection device |
-
2018
- 2018-02-13 CN CN201810149331.XA patent/CN110161318B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201251612Y (en) * | 2008-03-19 | 2009-06-03 | 杜波 | Implementing structure for detecting a plurality of capacity-type touch sensors |
CN103109196A (en) * | 2010-07-09 | 2013-05-15 | 科恩托罗尼丝株式会社 | Method and device for sensing capacitance change and recording medium in which program for executing method is recorded thereon, and method and device for sensing touch using method and recording medium in which program for executing method is record |
CN103883180A (en) * | 2012-12-19 | 2014-06-25 | 法国大陆汽车公司 | Device for measuring a variation of a capacitance and associated measuring method |
CN106055183A (en) * | 2012-12-30 | 2016-10-26 | 比亚迪股份有限公司 | Capacitance detection circuit |
CN106841820A (en) * | 2017-03-24 | 2017-06-13 | 湖北工程学院 | Multrirange capacitance measurement circuit, device and method |
CN107543972A (en) * | 2017-09-08 | 2018-01-05 | 乐鑫信息科技(上海)有限公司 | One kind measurement capacitor system and its measuring method |
Also Published As
Publication number | Publication date |
---|---|
CN110161318A (en) | 2019-08-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110161318B (en) | Capacitance detection circuit and detection method | |
CN105379120B (en) | It is detected using Δ/Σ conversion capacitive proximity | |
TWI506513B (en) | Method and apparatus to measure self-capacitance using a single pin | |
CN101893972A (en) | Sensing method of a capacitance type touch control screen and driving circuit | |
JP4727754B1 (en) | Capacitive touch panel | |
WO2006132960B1 (en) | Methods and systems for detecting a capacitance using sigma-delta measurement techniques | |
CN107543972A (en) | One kind measurement capacitor system and its measuring method | |
TWI408593B (en) | Capacitive touch panel and sensing apparatus thereof | |
CN108777574A (en) | A kind of capacitance touch button circuit | |
CN103823598A (en) | Touch sensing circuit and touch sensing method | |
CN101847070B (en) | Capacitance change detection module taking electric signal change time as detection target | |
CN108139840A (en) | The device of capacitance detecting | |
CN201382977Y (en) | Capacitor measuring device | |
RU2392629C1 (en) | Microcontroller device for capacity and resistance measurement | |
CN108614161B (en) | Capacitance measuring system | |
CN2938571Y (en) | Electric load tranfer device, touch induction device | |
CN116203411A (en) | Touch key capacitance detection method and system applied to MCU | |
CN108711392A (en) | A kind of naked glass panel, capacitive detection circuit and capacitance determining method | |
CN207281176U (en) | One kind measurement capacitor system | |
US20210165508A1 (en) | Methods and apparatus for variable capacitance detection | |
CN114244344A (en) | Touch key detection device and detection method | |
CN108226649A (en) | Capacitance detecting device and method | |
TWI400456B (en) | Used in capacitive touch buttons and proximity sensing sensing circuits and methods | |
CN101369811B (en) | Condenser type touch sensor with electrostatic immunity and sensing method using the same | |
CN111106820B (en) | Touch key control system and control method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |