CN112073047A - Capacitive touch key system and control method thereof - Google Patents

Capacitive touch key system and control method thereof Download PDF

Info

Publication number
CN112073047A
CN112073047A CN202010938378.1A CN202010938378A CN112073047A CN 112073047 A CN112073047 A CN 112073047A CN 202010938378 A CN202010938378 A CN 202010938378A CN 112073047 A CN112073047 A CN 112073047A
Authority
CN
China
Prior art keywords
touch key
capacitor
switch
voltage
reference voltage
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.)
Pending
Application number
CN202010938378.1A
Other languages
Chinese (zh)
Inventor
高云
曾加
袁俊
陈光胜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Eastsoft Microelectronics Co ltd
Original Assignee
Shanghai Eastsoft Microelectronics Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai Eastsoft Microelectronics Co ltd filed Critical Shanghai Eastsoft Microelectronics Co ltd
Priority to CN202010938378.1A priority Critical patent/CN112073047A/en
Publication of CN112073047A publication Critical patent/CN112073047A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K17/00Electronic switching or gating, i.e. not by contact-making and –breaking
    • H03K17/94Electronic switching or gating, i.e. not by contact-making and –breaking characterised by the way in which the control signals are generated
    • H03K17/965Switches controlled by moving an element forming part of the switch
    • H03K17/975Switches controlled by moving an element forming part of the switch using a capacitive movable element

Landscapes

  • Electronic Switches (AREA)

Abstract

The capacitive touch key system and the control method thereof comprise the following steps: performing a pre-step before counting; counting the number of times that the detection capacitor charges the touch key induction capacitor and the number of times that the touch key induction capacitor discharges to the detection capacitor (or counting the number of times that the touch key induction capacitor charges to the detection capacitor and counting the number of times that the detection capacitor discharges to the touch key induction capacitor); and comparing the count on the counter with a preset count to determine whether the touch key induction capacitor is pressed, wherein the preset count is the count on the counter obtained through the steps under the condition that the touch key induction capacitor is not pressed. The scheme of the invention has higher time utilization rate, and is beneficial to improving the scanning precision, reducing the false triggering rate, improving the reliability of the system and the like.

Description

Capacitive touch key system and control method thereof
Technical Field
The invention relates to the technical field of touch keys, in particular to a capacitive touch key system and a control method thereof.
Background
Compared with the traditional mechanical key, the capacitive touch key has obvious advantages in various aspects such as service life, attractive appearance and the like, and is widely applied to the fields of household appliances, consumer electronics, industrial control, mobile equipment and the like.
At present, the mainstream touch key system is realized by adopting a charge migration mode, and the working principle is roughly as follows: the touch key induction capacitor Cp with a small capacitance value is repeatedly charged and discharged and is transferred, the detection capacitor Cx with a large capacitance value is repeatedly charged through charge transfer, the charging times of the detection capacitor are counted, and whether the key is pressed down by a hand is judged according to the change of the charging times.
The detection method only counts the charge transfer times from the small capacitor to the large capacitor, has high cost and power consumption and low scanning speed, and generally needs to occupy one IO port, so that the use convenience of a user is reduced.
Disclosure of Invention
The technical problem solved by the invention is as follows: how to improve the performance of the capacitive touch key (the invention is improved in various aspects such as improving the time utilization rate, improving the scanning precision, reducing the false triggering rate, improving the reliability of the system, reducing the power consumption, improving the scanning speed and the like).
In order to solve the above technical problem, an embodiment of the present invention provides a method for controlling a capacitive touch key system, including:
performing a pre-step before counting;
counting the times of charging the touch key induction capacitor by the detection capacitor and counting the times of discharging the touch key induction capacitor to the detection capacitor; or, counting the number of times that the touch key induction capacitor charges the detection capacitor and counting the number of times that the detection capacitor discharges to the touch key induction capacitor;
and comparing the count on the counter with a preset count to determine whether the touch key induction capacitor is pressed, wherein the preset count is the count on the counter obtained through the steps under the condition that the touch key induction capacitor is not pressed.
Optionally, the pre-step before performing counting includes:
gating one or more touch key sensing capacitors;
clearing the counter;
the first switch, the charge switch, and the discharge switch are open, and the third switch is closed, in which case the touch key sensing capacitor discharges to the third discharge voltage V3.
Optionally, the pre-step before performing counting further includes:
and adjusting the capacitance value of the detection capacitor.
Optionally, the counting the number of times that the detection capacitor charges the touch key induction capacitor includes:
a1) the fourth switch gates the charging reference voltage V4;
a2) the detection capacitor charging voltage V1 charges the detection capacitor;
a3) the detection capacitor charges the touch key induction capacitor;
a4) adding 1 to the counter, and comparing the voltage Vn on the touch key sensing capacitor with a charging reference voltage V4;
a5) if the voltage Vn across the touch key sensing capacitor is less than the charging reference voltage V4, the steps a2) to a4) are repeated until the voltage Vn across the touch key sensing capacitor is equal to or greater than the charging reference voltage V4.
Optionally, the charging the detection capacitor with the detection capacitor charging voltage V1 includes: the third switch is opened and the charging switch is closed.
Optionally, the detecting the capacitance to charge the touch key inductive capacitance includes: the charging switch is opened and the first switch is closed.
Optionally, the comparing the voltage Vn across the touch key sensing capacitor with the charging reference voltage V4 includes: the first switch, the charging switch, the discharging switch and the third switch are disconnected.
Optionally, the counting the number of times that the touch key induction capacitor discharges to the detection capacitor includes:
b1) the fourth switch gates a discharge reference voltage V5;
b2) the detection capacitor discharges to a detection capacitor discharge voltage V2;
b3) the touch key induction capacitor discharges to the detection capacitor;
b4) adding 1 to the counter, and comparing the voltage Vn on the touch key sensing capacitor with a discharge reference voltage V5;
b5) if the voltage Vn across the touch key sensing capacitor is greater than the discharging reference voltage V5, the steps b2) to b4) are repeated until the voltage Vn across the touch key sensing capacitor is equal to or less than the discharging reference voltage V5.
Optionally, the discharging the detection capacitor to the detection capacitor discharge voltage V2 includes: the discharge switch is closed.
Optionally, the discharging the touch key sensing capacitor to the detection capacitor includes: the discharge switch is open and the first switch is closed.
Optionally, the comparing the voltage Vn across the touch key sensing capacitor with the discharge reference voltage V5 includes: the first switch, the charging switch, the discharging switch and the third switch are disconnected.
In order to solve the above technical problem, an embodiment of the present invention further provides a capacitive touch key system, including: a microcontroller and peripheral circuitry; the microcontroller comprises a control circuit, a comparator, a counter, a detection capacitor and a plurality of switches, and the peripheral circuit comprises a plurality of touch key induction capacitors; wherein:
the control circuit is suitable for controlling the gating of the induction capacitors of the touch keys, controlling the switches and controlling the counter to be reset;
the comparator is connected with the touch key sensing capacitor at one input end through the key gating switch, is connected with the detection capacitor through the first switch, is connected with the charging reference voltage V4 or the discharging reference voltage V5 at the other input end through the fourth switch, and is connected with the counter at the output end and suitable for comparing the voltage on the touch key sensing capacitor with the preset charging reference voltage V4 or the preset discharging reference voltage V5;
the counter is suitable for counting the times of charging the detection capacitor to the touch key induction capacitor and the times of discharging the detection capacitor by the touch key induction capacitor;
the detection capacitor is connected with a detection capacitor charging voltage V1 after passing through the charging switch, is connected with a detection capacitor discharging voltage V2 after passing through the discharging switch, is connected with one input end of the comparator after passing through the first switch, and is connected with the touch key induction capacitor after passing through the first switch and the key gating switch;
the touch key sensing capacitors are connected with the key gating switches in a one-to-one corresponding mode, the touch key sensing capacitors are connected with the detection capacitors after passing through the key gating switches and the first switches, and the touch key sensing capacitors are connected with a third discharge voltage V3 after passing through the key gating switches and the third switches.
Optionally, a positive input end of the comparator is connected to the touch key sensing capacitor after passing through the key gating switch, and is connected to the detection capacitor after passing through the first switch, and a negative input end of the comparator is connected to the charging reference voltage V4 or the discharging reference voltage V5 after passing through the fourth switch.
Optionally, the discharge reference voltage V5 is less than the charge reference voltage V4, the charge reference voltage V4 is less than the charge voltage V1 is less than the power supply voltage VDD, the ground voltage GND is less than the discharge voltage V2 is less than the discharge reference voltage V5, and the ground voltage GND is less than the third discharge voltage V3 is less than the discharge reference voltage V5.
Compared with the prior art, the technical scheme of the invention has the following beneficial effects:
counting the number of times that the detection capacitor charges the touch key induction capacitor and the number of times that the touch key induction capacitor discharges to the detection capacitor (or counting the number of times that the touch key induction capacitor charges to the detection capacitor and counting the number of times that the detection capacitor discharges to the touch key induction capacitor); the counting on the counter is compared with the preset counting to determine whether the touch key induction capacitor is pressed or not, so that the time utilization rate is higher, the scanning precision is improved, the false triggering rate is reduced, the reliability of a system is improved, and the like.
Furthermore, the invention can be realized in a fully integrated mode, thereby reducing the cost, reducing the system power consumption, improving the scanning speed and providing higher use convenience for users.
The following is a detailed description:
(1) regarding the reasonable utilization time, the touch key system in the prior art judges the key through the charging times, in order to not influence the statistics of the charging times, the complete discharge on the detection capacitor in the previous charging and discharging period needs to be ensured, so the set discharge time is higher than the actually required discharge time, and unnecessary waste is caused.
(2) The method has the advantages of improving scanning precision, reducing false triggering rate and improving system reliability.
The prior art is a system with an external detection capacitor, the capacitance value (nF level) of the detection capacitor Cx is larger than Cp, and the charge is transferred from Cp to Cx;
the number of charge transfers when no touch occurs is Cx/Cp;
the charge transfer times when the key is pressed is Cx/(Cp + Cf);
the difference of the charge transfer times between the touch and the non-touch is Cx/Cp-Cx/(Cp + Cf).
Compared with the prior art, the difference value of the charge transfer times before and after the key pressing is more obvious.
In addition, compared with the scheme of discharging the touch key sensing capacitance Cp with a larger capacitance value to the detection capacitance Ci with a smaller capacitance value (the scheme does not belong to the prior art, and is hereinafter referred to as "reference scheme"), in the reference scheme,
the number of charge transfers when no touch occurs is Cp/Ci;
when a key is pressed, the number of times of charge transfer is (Cp + Cf)/Ci;
the difference between the number of charge transfers between the touch and the non-touch is (Cp + Cf)/Ci-Cp/Ci is Cf/Ci.
In the present invention, however,
the number of charge transfer times when no touch occurred is 2 Cp/Ci;
when a key is pressed, the number of times of charge transfer is 2(Cp + Cf)/Ci;
the difference between the number of charge transfers between the touch and the non-touch is 2(Cp + Cf)/Ci-2Cp/Ci is 2 Cf/Ci.
Where Cx denotes a detection capacitance having a large external capacitance value, Ci denotes a detection capacitance (having a small internal capacitance value), Cp denotes a capacitance of the touch key itself, and Cf denotes a capacitance of a pressed object (for example, a finger of a user).
2Cf/Ci > Cf/Ci, it can be seen that the difference of the number of charge transfer times before and after the key pressing is more obvious than that of the reference scheme, so that the false triggering rate can be reduced, and the system reliability is improved.
(3) Regarding the fully integrated implementation, the touch key system in the prior art is implemented by externally arranging a large capacitance value of the detection capacitor Cx, and the scanning precision is related to the ratio of Cp/Cx. Assuming that touch key Cp is 10pF (normal capacitance is 10pF 30pF), to achieve one-thousandth of scan accuracy (Cp/Cx <1/1000), the Cx capacitance needs to be greater than 10 nF. When the detection capacitance Cx of 10nF is integrated in the chip, the formula Q ═ It ═ CU ═ CIR shows that: on the other hand, if U is the same, if the discharge resistance R is too small, the discharge current I becomes too large. Assuming that U is 1.5V and the acceptable discharge current I inside the chip is less than 0.5mA, the discharge resistance R is required to be greater than 3000 Ω. On the other hand, if the resistance value of the discharge resistor R is too large, the discharge time becomes too long. Normally, the discharge is required to be completed within 32us, i.e., CR <32us, and the discharge resistance R <3200 Ω is required. It follows that the presence of the large capacitance detection capacitance Cx makes the system unsuitable for implementation in a fully integrated manner. The scheme of the invention can be realized only by detecting the capacitor Ci with a small capacitance value, and the smaller the capacitance value of the capacitor Ci is, the higher the scanning precision is, so that the invention is more beneficial to realizing full integration in a chip.
(4) Regarding cost reduction, in the case of an external detection capacitor, since the number of charge transfer is determined by the ratio of Cx/Cp, it is usually desired to increase the number of scanning operations by increasing the capacitance value of the detection capacitor Cx, but this leads to an increase in cost. In the scheme of the invention, the capacity value of Cx is not required to be changed, and the charging times and the discharging times are only required to be subjected to combined statistics. That is, the scheme of the invention can improve the charge transfer times without increasing the cost. Furthermore, the detection capacitor Ci with a small built-in capacitance value is adopted, so that the cost is lower.
(5) For reducing power consumption, the capacitance electric quantity Q is CU It and the power consumption P is UIt, i.e. P is CU 2, within a certain time t. Therefore, in the case where the charging voltage U is the same, the smaller the capacitance value C, the lower the power consumption P. Therefore, the touch key system provided by the invention has lower power consumption. In addition, the charging voltage V1 is adjustable, so that the system can further reduce the power consumption of the system by reducing the charging voltage on the basis of ensuring the application performance.
(6) In order to increase the scanning speed, the capacitance Q is CU It, where C is the capacitance of the detection capacitor, U is the charging voltage, I is the charging current, and t is the time. And I ═ U/R where R is resistance, so CU ═ U/R × t, i.e., C ═ t/R. Therefore, in the case where R is equal, the smaller the capacitance value C, the shorter the required charging time t, that is, the faster the scanning speed. Therefore, the touch key system provided by the invention has higher scanning speed.
(7) Regarding the convenience of use, in the case of externally detecting the capacitance in the prior art, the detecting capacitance Cx needs to fixedly occupy one IO port, so that the user has to give up using one touch port for connecting the Cx when the number of the IO ports is limited, and thus the convenience of use of the user is reduced. The touch key system provided by the invention does not need to occupy the IO port, so that a user can realize more touch ports or other functions.
(8) Regarding the adaptivity, for the scheme of charge-discharge joint detection provided by the present invention, the value of the counter Cnt is larger than that of a single charge detection. Therefore, when the capacitance value of the internal detection capacitor Ci is adjustable, the relative fixation of Vref and Cnt values can be ensured, and the self-adaption of various conditions is realized.
Drawings
FIG. 1 is a block diagram of a circuit structure of a capacitive touch key system according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for controlling the capacitive touch key system according to an embodiment of the present invention;
FIG. 3 is a flow chart of pre-processing steps before counting is performed in an embodiment of the present invention;
fig. 4 is a flowchart illustrating a process of counting the number of times that the detection capacitor charges the touch key inductive capacitor according to the embodiment of the present invention;
fig. 5 is a flowchart illustrating a process of counting the number of times that the touch key sensing capacitor discharges to the detection capacitor according to the embodiment of the present invention;
FIG. 6 is a timing diagram of the switching circuit and the charge transfer count Cnt value in accordance with an embodiment of the present invention;
FIG. 7 is a schematic diagram illustrating a change in voltage across the touch key sensing capacitor during charging and discharging according to an embodiment of the present invention;
FIG. 8 is a flowchart illustrating a method for controlling a capacitive touch key system according to another embodiment of the present invention;
wherein:
CMP-comparator;
cnt — the value of the counter;
cnt1, detecting the charging times of the capacitor to be detected;
cnt2, discharge times of the capacitor to be detected to the detection capacitor;
v1 — detecting capacitor charging voltage;
v2 — detection of capacitor discharge voltage;
v3 — third discharge voltage;
v4 — charge reference voltage;
v5 — discharge reference voltage;
vn-voltage on the touch key sensing capacitor;
s1-first switch;
s3 — third switch;
s4-fourth switch;
s21 — charge switch;
s22-discharge switch;
sel _1, Sel _2 — control signals;
ci- (with a small capacitance value) detection capacitance;
cp (including Cp 0-Cpn) -the capacitance of the touch key itself;
cf (including Cf 0-Cfn) -the capacitance of a press (e.g., a user's finger).
Detailed Description
According to the analysis of the background art, the capacitive touch key in the prior art has many defects, including high cost and power consumption, slow scanning speed, and the like, and usually needs to occupy one IO port, so that the use convenience of a user is reduced.
The inventor proposes a capacitive touch key system for realizing key detection based on the change of discharge times, and briefly describes the principle of the capacitive touch key system to be roughly: the touch key induction capacitor Cp with a large capacitance value is charged, the charge is transferred to the detection capacitor Ci with a small capacitance value for repeated discharge, Ci is repeatedly discharged to the ground, the discharge times of the detection capacitor are counted, and whether the key is pressed by a hand or not is judged according to the change of the discharge times. The scheme effectively overcomes the defects of the touch key system in the aspects of cost, power consumption and the like in the prior art.
The inventor further improves the method, namely counting the number of times that the detection capacitor charges the touch key induction capacitor and the number of times that the touch key induction capacitor discharges to the detection capacitor (or counting the number of times that the touch key induction capacitor charges the detection capacitor and the number of times that the detection capacitor discharges to the touch key induction capacitor); the counting on the counter is compared with the preset counting to determine whether the touch key induction capacitor is pressed or not, so that the time utilization rate is higher, the scanning precision is improved, the false triggering rate is reduced, the reliability of a system is improved, and the like.
In order that those skilled in the art will better understand and realize the present invention, the following detailed description is given by way of specific embodiments with reference to the accompanying drawings.
Example one
As described below, embodiments of the present invention provide a method for controlling a capacitive touch key system.
In some embodiments, the control method of the capacitive touch key system provided by this embodiment may adopt the following circuit structure.
Referring to fig. 1, a circuit block diagram of a capacitive touch key system is shown. The capacitive touch key system comprises a microcontroller and a peripheral circuit; the microcontroller comprises a control circuit, a comparator, a counter, a detection capacitor and a plurality of switches, and the peripheral circuit comprises a plurality of touch key induction capacitors. The functions and the connection relations of the devices in the circuit are as follows:
the control circuit is suitable for controlling the gating of the induction capacitors of the touch keys, controlling the switches and controlling the counter to be reset;
the comparator is connected with the touch key sensing capacitor at one input end through the key gating switch, is connected with the detection capacitor through the first switch, is connected with the charging reference voltage V4 or the discharging reference voltage V5 at the other input end through the fourth switch, and is connected with the counter at the output end and suitable for comparing the voltage on the touch key sensing capacitor with the preset charging reference voltage V4 or the preset discharging reference voltage V5; further, in some embodiments, the positive input end of the comparator is connected to the touch key sensing capacitor after passing through the key gating switch, and is connected to the detection capacitor after passing through the first switch, and the negative input end of the comparator is connected to the charging reference voltage V4 or the discharging reference voltage V5 after passing through the fourth switch;
the counter is suitable for counting the times of charging the detection capacitor to the touch key induction capacitor and the times of discharging the touch key induction capacitor to the detection capacitor;
the detection capacitor is connected with a detection capacitor charging voltage V1 after passing through the charging switch, is connected with a detection capacitor discharging voltage V2 after passing through the discharging switch, is connected with one input end of the comparator after passing through the first switch, and is connected with the touch key induction capacitor after passing through the first switch and the key gating switch;
the touch key sensing capacitors are connected with the key gating switches in a one-to-one corresponding mode, the touch key sensing capacitors are connected with the detection capacitors after passing through the key gating switches and the first switches, and the touch key sensing capacitors are connected with a third discharge voltage V3 after passing through the key gating switches and the third switches.
The voltages may range from discharge reference voltage V5 < charge reference voltage V4, charge reference voltage V4 < charge voltage V1 < power supply voltage VDD, ground voltage GND < discharge voltage V2 < discharge reference voltage V5, ground voltage GND < third discharge voltage V3 < discharge reference voltage V5.
Referring to a flow chart of a control method of the capacitive touch key system shown in fig. 2, the following detailed description is made through specific steps:
s201, executing the pre-step before counting.
In some embodiments, specifically, as shown in fig. 3, the pre-step before performing counting may include the following sub-steps:
and S2011, adjusting the capacitance value of the detection capacitor.
S2012, one or more touch key sensing capacitors are gated.
S2013, the counter is cleared.
S2014, the touch key sensing capacitor discharges to the third discharging voltage V3.
Specifically, the touch key sensing capacitor can be discharged to the third discharge voltage V3 by controlling the first switch, the charging switch, and the discharging switch to be turned off and the third switch to be turned on.
And S202, counting the times of charging the touch key induction capacitor by the detection capacitor and the times of discharging the touch key induction capacitor to the detection capacitor.
Specifically, the present invention may count the number of charging times first and then the number of discharging times, or may count the number of discharging times first and then the number of charging times.
In some embodiments, specifically, as shown in fig. 4, the counting the number of times the detection capacitor charges the touch key sensing capacitor may include the following sub-steps:
s401, the fourth switch gates the charging reference voltage V4.
S402, the detection capacitor charging voltage V1 charges the detection capacitor.
Specifically, the detection capacitor charging voltage V1 can be charged to the detection capacitor by controlling the third switch to be turned off and the charging switch to be turned on (at this time, the first switch, the discharging switch, the third switch are turned off and the charging switch is turned on, and the fourth switch gates the charging reference voltage V4).
And S403, charging the touch key induction capacitor by the detection capacitor.
Specifically, the detection of the capacitance to charge the touch key induction capacitance can be realized by controlling the charging switch to be turned off and the first switch to be turned on (at this time, the first switch is turned on, the third switch, the charging switch and the discharging switch are turned off, and the fourth switch gates the charging reference voltage V4).
S404, adding 1 to the counter, and comparing the voltage Vn on the induction capacitor of the touch key with the charging reference voltage V4.
Specifically, the comparison between the voltage Vn across the touch key sensing capacitor and the charging reference voltage V4 can be realized by controlling the first switch, the charging switch, the discharging switch and the third switch to be turned off (at this time, the first switch, the third switch, the charging switch and the discharging switch are turned off, and the fourth switch gates the charging reference voltage V4).
If the voltage Vn across the touch key sensing capacitor is less than the charging reference voltage V4, the steps S402 to S404 are repeated until the voltage Vn across the touch key sensing capacitor is equal to or greater than the charging reference voltage V4.
In some embodiments, specifically, as shown in fig. 5, the counting the number of times that the touch key sensing capacitor is discharged to the detection capacitor may include the following sub-steps:
s501, the fourth switch gates a discharge reference voltage V5.
S502, the detection capacitor discharges to the detection capacitor discharge voltage V2.
Specifically, the discharge of the detection capacitor to the detection capacitor discharge voltage V2 can be realized by controlling the discharge switch to be closed (at this time, the first switch, the third switch and the charge switch are opened, the discharge switch is closed, and the fourth switch gates the discharge reference voltage V5).
And S503, discharging the touch key induction capacitor to the detection capacitor.
Specifically, the discharge of the touch key sensing capacitor to the detection capacitor can be realized by controlling the discharge switch to be turned off and the first switch to be turned on (at this time, the first switch is turned on, the third switch, the charge switch and the discharge switch are turned off, and the fourth switch gates the discharge reference voltage V5).
S504, adding 1 to the counter, and comparing the voltage Vn on the touch key sensing capacitor with the discharge reference voltage V5.
Specifically, the comparison between the voltage Vn across the touch key sensing capacitor and the discharge reference voltage V5 can be realized by controlling the first switch, the charge switch, the discharge switch, and the third switch to be turned off (at this time, the first switch, the third switch, the charge switch, the discharge switch are turned off, and the fourth switch gates the discharge reference voltage V5).
If the voltage Vn across the touch key sensing capacitor is greater than the discharging reference voltage V5, the steps S502 to S504 are repeated until the voltage Vn across the touch key sensing capacitor is equal to or less than the discharging reference voltage V5.
And S203, comparing the count on the counter with a preset count to determine whether the touch key sensing capacitor is pressed.
And the preset count is the count on the counter obtained through the steps under the condition that the touch key induction capacitor is not pressed.
In the control method of the capacitive touch key system provided in this embodiment, in one scanning period, the time sequence of the switch circuit and the charge transfer time Cnt value is changed as shown in fig. 6. The control method of the capacitive touch key system provided in the embodiment can be used for judging the keys of the capacitive touch keys, and the key judging principle is that when no touch occurs, the capacitance value of the touch key sensing capacitor is Cp; when a key is pressed, the capacitance Cf to the ground is connected in parallel to the touch key, the actual touch key sensing capacitance value becomes Cp + Cf, and compared with the case where no touch occurs, the charge number Cnt1 of Ci to Cp + Cf and the discharge number Cnt2 of Cp + Cf to Ci become large, so that the total charge transfer number Cnt is obviously large, namely Cnt1+ Cnt 2. The key judgment of the capacitive touch key is realized by comparing the difference value of the charge transfer times Cnt before and after the key with a preset threshold value.
In the charge and discharge processes of the capacitive touch key system (control method) provided in this embodiment, the change of the voltage Vn across the touch key sensing capacitor Cp (or Cp + Cf) is as shown in fig. 7.
As can be seen from the above description of the technical solutions, in this embodiment, the number of times that the detection capacitor charges the touch key induction capacitor is counted; counting the discharge times of the touch key induction capacitor to the detection capacitor; the counting on the counter is compared with the preset counting to determine whether the touch key induction capacitor is pressed or not, so that the time utilization rate is higher, the scanning precision is improved, the false triggering rate is reduced, the reliability of a system is improved, and the like.
Example two
As described below, embodiments of the present invention provide a method for controlling a capacitive touch key system.
Referring to a flow chart of a control method of the capacitive touch key system shown in fig. 8, the following detailed description is made through specific steps:
s801, a pre-step before counting is performed.
And S802, counting the charging times of the touch key induction capacitor to the detection capacitor and the discharging times of the detection capacitor to the touch key induction capacitor.
The difference from the first embodiment is that, comparing step S802 of the present embodiment with step S202 of the first embodiment, the present embodiment is applicable to the structure of the external detection capacitor with a large capacitance value (the first embodiment is applicable to the structure of the internal detection capacitor with a small capacitance value, and the present invention is applicable to both the external detection capacitor and the internal detection capacitor).
And S803, comparing the count on the counter with a preset count to determine whether the touch key sensing capacitor is pressed.
As can be seen from the above description of the technical solutions, in this embodiment, the number of times that the touch key sensing capacitor charges the detection capacitor is counted; counting the discharge times of the detection capacitor to the touch key induction capacitor; the counting on the counter is compared with the preset counting to determine whether the touch key induction capacitor is pressed or not, so that the time utilization rate is higher, the scanning precision is improved, the false triggering rate is reduced, the reliability of a system is improved, and the like.
EXAMPLE III
As described below, embodiments of the present invention provide a capacitive touch key system.
Referring to fig. 1, a circuit block diagram of a capacitive touch key system is shown.
The capacitive touch key system includes: a microcontroller and peripheral circuitry; the microcontroller comprises a control circuit, a comparator, a counter, a detection capacitor and a plurality of switches, and the peripheral circuit comprises a plurality of touch key induction capacitors. The functions and the connection relations of the devices in the circuit are as follows:
the control circuit is suitable for controlling the gating of the induction capacitors of the touch keys, controlling the switches and controlling the counter to be reset;
the comparator is connected with the touch key sensing capacitor at one input end through the key gating switch, is connected with the detection capacitor through the first switch, is connected with the charging reference voltage V4 or the discharging reference voltage V5 at the other input end through the fourth switch, and is connected with the counter at the output end and suitable for comparing the voltage on the touch key sensing capacitor with the preset charging reference voltage V4 or the preset discharging reference voltage V5;
the counter is suitable for counting the times of charging the detection capacitor to the touch key induction capacitor and the times of discharging the touch key induction capacitor to the detection capacitor;
the detection capacitor is connected with a detection capacitor charging voltage V1 after passing through the charging switch, is connected with a detection capacitor discharging voltage V2 after passing through the discharging switch, is connected with one input end of the comparator after passing through the first switch, and is connected with the touch key induction capacitor after passing through the first switch and the key gating switch;
the touch key sensing capacitors are connected with the key gating switches in a one-to-one corresponding mode, the touch key sensing capacitors are connected with the detection capacitors after passing through the key gating switches and the first switches, and the touch key sensing capacitors are connected with a third discharge voltage V3 after passing through the key gating switches and the third switches.
The control method of the capacitive touch key system in the embodiment can be used for controlling the capacitive touch key system provided in the embodiment, so that the key judgment of the capacitive touch key is realized.
As can be seen from the above description of the technical solutions, in this embodiment, the number of times that the detection capacitor charges the touch key induction capacitor is counted; counting the discharge times of the touch key induction capacitor to the detection capacitor; the counting on the counter is compared with the preset counting to determine whether the touch key induction capacitor is pressed or not, so that the time utilization rate is higher, the scanning precision is improved, the false triggering rate is reduced, the reliability of a system is improved, and the like.
In some embodiments, the positive input terminal of the comparator is connected to the touch key sensing capacitor through the key gating switch, the detection capacitor is connected to the first switch, and the negative input terminal of the comparator is connected to the charging reference voltage V4 or the discharging reference voltage V5 through the fourth switch.
In some embodiments, the voltages may range from discharge reference voltage V5 < charge reference voltage V4, charge reference voltage V4 < charge voltage V1 < power supply voltage VDD, ground voltage GND < discharge voltage V2 < discharge reference voltage V5, and ground voltage GND < third discharge voltage V3 < discharge reference voltage V5.
Those skilled in the art will understand that, in the methods of the embodiments, all or part of the steps can be performed by hardware associated with program instructions, and the program can be stored in a computer-readable storage medium, which can include: ROM, RAM, magnetic or optical disks, and the like.
Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications may be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (14)

1. A control method of a capacitive touch key system is characterized by comprising the following steps:
performing a pre-step before counting;
counting the times of charging the touch key induction capacitor by the detection capacitor and counting the times of discharging the touch key induction capacitor to the detection capacitor; or, counting the number of times that the touch key induction capacitor charges the detection capacitor and counting the number of times that the detection capacitor discharges to the touch key induction capacitor;
and comparing the count on the counter with a preset count to determine whether the touch key induction capacitor is pressed, wherein the preset count is the count on the counter obtained through the steps under the condition that the touch key induction capacitor is not pressed.
2. The method of controlling a capacitive touch key system according to claim 1, wherein said pre-step prior to performing a count comprises:
gating one or more touch key sensing capacitors;
clearing the counter;
the first switch, the charge switch, and the discharge switch are open, and the third switch is closed, in which case the touch key sensing capacitor discharges to the third discharge voltage V3.
3. The method for controlling a capacitive touch key system according to claim 2, wherein said pre-step prior to performing a count further comprises:
and adjusting the capacitance value of the detection capacitor.
4. The method for controlling a capacitive touch key system according to claim 1, wherein said counting the number of times the detection capacitor charges the touch key sensing capacitor comprises:
a1) the fourth switch gates the charging reference voltage V4;
a2) the detection capacitor charging voltage V1 charges the detection capacitor;
a3) the detection capacitor charges the touch key induction capacitor;
a4) adding 1 to the counter, and comparing the voltage Vn on the touch key sensing capacitor with a charging reference voltage V4;
a5) if the voltage Vn across the touch key sensing capacitor is less than the charging reference voltage V4, the steps a2) to a4) are repeated until the voltage Vn across the touch key sensing capacitor is equal to or greater than the charging reference voltage V4.
5. The method for controlling a capacitive touch key system according to claim 4, wherein the detecting a capacitor charging voltage V1 to charge a detecting capacitor comprises: the third switch is opened and the charging switch is closed.
6. The method for controlling a capacitive touch key system according to claim 4, wherein the detecting a capacitance to charge a touch key sensing capacitance comprises: the charging switch is opened and the first switch is closed.
7. The method for controlling a capacitive touch key system according to claim 4, wherein said comparing the voltage Vn across the touch key sensing capacitance with the charging reference voltage V4 comprises: the first switch, the charging switch, the discharging switch and the third switch are disconnected.
8. The method for controlling a capacitive touch key system according to claim 1, wherein said counting the number of times that the touch key sensing capacitance discharges to the detection capacitance comprises:
b1) the fourth switch gates a discharge reference voltage V5;
b2) the detection capacitor discharges to a detection capacitor discharge voltage V2;
b3) the touch key induction capacitor discharges to the detection capacitor;
b4) adding 1 to the counter, and comparing the voltage Vn on the touch key sensing capacitor with a discharge reference voltage V5;
b5) if the voltage Vn across the touch key sensing capacitor is greater than the discharging reference voltage V5, the steps b2) to b4) are repeated until the voltage Vn across the touch key sensing capacitor is equal to or less than the discharging reference voltage V5.
9. The method for controlling a capacitive touch key system according to claim 8, wherein said discharging the detection capacitance to the detection capacitance discharge voltage V2 comprises: the discharge switch is closed.
10. The method for controlling a capacitive touch key system according to claim 8, wherein the discharging of the touch key sensing capacitance to the detection capacitance comprises: the discharge switch is open and the first switch is closed.
11. The method for controlling a capacitive touch key system of claim 8, wherein said comparing the voltage Vn across the touch key sensing capacitance to a discharge reference voltage V5 comprises: the first switch, the charging switch, the discharging switch and the third switch are disconnected.
12. A capacitive touch key system, comprising: a microcontroller and peripheral circuitry; the microcontroller comprises a control circuit, a comparator, a counter, a detection capacitor and a plurality of switches, and the peripheral circuit comprises a plurality of touch key induction capacitors; wherein:
the control circuit is suitable for controlling the gating of the induction capacitors of the touch keys, controlling the switches and controlling the counter to be reset;
the comparator is connected with the touch key sensing capacitor at one input end through the key gating switch, is connected with the detection capacitor through the first switch, is connected with the charging reference voltage V4 or the discharging reference voltage V5 at the other input end through the fourth switch, and is connected with the counter at the output end and suitable for comparing the voltage on the touch key sensing capacitor with the preset charging reference voltage V4 or the preset discharging reference voltage V5;
the counter is suitable for counting the times of charging the detection capacitor to the touch key induction capacitor and the times of discharging the detection capacitor by the touch key induction capacitor;
the detection capacitor is connected with a detection capacitor charging voltage V1 after passing through the charging switch, is connected with a detection capacitor discharging voltage V2 after passing through the discharging switch, is connected with one input end of the comparator after passing through the first switch, and is connected with the touch key induction capacitor after passing through the first switch and the key gating switch;
the touch key sensing capacitors are connected with the key gating switches in a one-to-one corresponding mode, the touch key sensing capacitors are connected with the detection capacitors after passing through the key gating switches and the first switches, and the touch key sensing capacitors are connected with a third discharge voltage V3 after passing through the key gating switches and the third switches.
13. The capacitive touch key system of claim 12, wherein a positive input of the comparator is connected to the touch key sensing capacitor through the key gating switch, and to the detection capacitor through the first switch, and wherein a negative input of the comparator is connected to the charging reference voltage V4 or the discharging reference voltage V5 through the fourth switch.
14. The capacitive touch key system of claim 12, wherein the discharge reference voltage V5 < the charge reference voltage V4, the charge reference voltage V4 < the charge voltage V1 < the power supply voltage VDD, the ground voltage GND < the discharge voltage V2 < the discharge reference voltage V5, and the ground voltage GND < the third discharge voltage V3 < the discharge reference voltage V5.
CN202010938378.1A 2020-09-09 2020-09-09 Capacitive touch key system and control method thereof Pending CN112073047A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010938378.1A CN112073047A (en) 2020-09-09 2020-09-09 Capacitive touch key system and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010938378.1A CN112073047A (en) 2020-09-09 2020-09-09 Capacitive touch key system and control method thereof

Publications (1)

Publication Number Publication Date
CN112073047A true CN112073047A (en) 2020-12-11

Family

ID=73662850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010938378.1A Pending CN112073047A (en) 2020-09-09 2020-09-09 Capacitive touch key system and control method thereof

Country Status (1)

Country Link
CN (1) CN112073047A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113515208A (en) * 2021-08-02 2021-10-19 上海东软载波微电子有限公司 Control method, device and system of capacitive touch system
CN113644905A (en) * 2021-08-11 2021-11-12 上海芯跳科技有限公司 Capacitive touch key detection system
CN114221644A (en) * 2022-02-22 2022-03-22 杭州炬源智能科技有限公司 Intelligent water meter with touch keys and detection method of touch keys
CN114499486A (en) * 2021-09-06 2022-05-13 上海芯圣电子股份有限公司 Anti-noise touch key integrated circuit
CN115694464A (en) * 2022-11-03 2023-02-03 东莞市力博得电子科技有限公司 Pressure sensing switch control method and device, electronic equipment and readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070247172A1 (en) * 2006-04-19 2007-10-25 Zhiqian Li Charge transfer device and method, touch sensing device and method
US20100321301A1 (en) * 2008-12-16 2010-12-23 Casparian Mark A Systems and methods for implementing pressure sensitive keyboards
CN108512542A (en) * 2018-03-29 2018-09-07 上海东软载波微电子有限公司 Touch key-press signal processing method and device, computer readable storage medium
CN109245754A (en) * 2018-11-27 2019-01-18 深圳市飞翼科技有限公司 A kind of capacitance touch button circuit for detecting and method
CN109560804A (en) * 2018-11-07 2019-04-02 珠海格力电器股份有限公司 Touch key control method, control circuit and chip
WO2019084832A1 (en) * 2017-11-01 2019-05-09 深圳市汇顶科技股份有限公司 Fingerprint recognition circuit, fingerprint sensor and mobile terminal
CN112039512A (en) * 2020-09-03 2020-12-04 上海东软载波微电子有限公司 Capacitive touch key system and key detection method thereof

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070247172A1 (en) * 2006-04-19 2007-10-25 Zhiqian Li Charge transfer device and method, touch sensing device and method
US20100321301A1 (en) * 2008-12-16 2010-12-23 Casparian Mark A Systems and methods for implementing pressure sensitive keyboards
WO2019084832A1 (en) * 2017-11-01 2019-05-09 深圳市汇顶科技股份有限公司 Fingerprint recognition circuit, fingerprint sensor and mobile terminal
CN108512542A (en) * 2018-03-29 2018-09-07 上海东软载波微电子有限公司 Touch key-press signal processing method and device, computer readable storage medium
CN109560804A (en) * 2018-11-07 2019-04-02 珠海格力电器股份有限公司 Touch key control method, control circuit and chip
CN109245754A (en) * 2018-11-27 2019-01-18 深圳市飞翼科技有限公司 A kind of capacitance touch button circuit for detecting and method
CN112039512A (en) * 2020-09-03 2020-12-04 上海东软载波微电子有限公司 Capacitive touch key system and key detection method thereof

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113515208A (en) * 2021-08-02 2021-10-19 上海东软载波微电子有限公司 Control method, device and system of capacitive touch system
CN113515208B (en) * 2021-08-02 2024-03-01 上海东软载波微电子有限公司 Control method, device and system of capacitive touch system
CN113644905A (en) * 2021-08-11 2021-11-12 上海芯跳科技有限公司 Capacitive touch key detection system
CN113644905B (en) * 2021-08-11 2024-01-05 上海芯跳科技有限公司 Capacitive touch key detection system
CN114499486A (en) * 2021-09-06 2022-05-13 上海芯圣电子股份有限公司 Anti-noise touch key integrated circuit
CN114221644A (en) * 2022-02-22 2022-03-22 杭州炬源智能科技有限公司 Intelligent water meter with touch keys and detection method of touch keys
CN114221644B (en) * 2022-02-22 2023-08-29 杭州炬源智能科技有限公司 Intelligent water meter with touch keys and detection method of touch keys
CN115694464A (en) * 2022-11-03 2023-02-03 东莞市力博得电子科技有限公司 Pressure sensing switch control method and device, electronic equipment and readable storage medium
CN115694464B (en) * 2022-11-03 2023-09-12 东莞市力博得电子科技有限公司 Pressure-sensitive switch control method, pressure-sensitive switch control device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN112073047A (en) Capacitive touch key system and control method thereof
KR102337627B1 (en) Capacitance detection circuit, touch device and terminal device
EP1381160B1 (en) Capacitive keyboard with reduced keying ambiguity
CN109274363B (en) Key judging system of capacitive touch key
CN109444556B (en) Novel sigma-delta capacitance touch detection circuit
CN203084695U (en) Capacitance detection circuit
CN104794433A (en) Fingerprint recognition system and fingerprint recognition method
US7868877B2 (en) Touch panel detection circuitry and method of operation
JP2009239666A (en) Capacitance detecting apparatus and method
CN109560804A (en) Touch key control method, control circuit and chip
CN109245753A (en) The sub key system of capacitance type touch key
CN111399679B (en) Capacitance detection device
CN108777574A (en) A kind of capacitance touch button circuit
CN105242804B (en) Touch-control compensation circuit, its compensation method, touch-screen and display device
WO2017197574A1 (en) Capacitance detection device
CN112162166B (en) USB charging port no-load detection circuit and detection method thereof
CN112039512A (en) Capacitive touch key system and key detection method thereof
CN212875769U (en) Capacitive touch key system
CN112986691A (en) Sensing circuit and method for calculating capacitance value by using sensing circuit with inverter
CN205003650U (en) Capacitive discharge circuit
CN209250603U (en) A kind of sub key system of capacitance type touch key
CN111106820B (en) Touch key control system and control method thereof
CN116203411A (en) Touch key capacitance detection method and system applied to MCU
CN113644905B (en) Capacitive touch key detection system
CN216819821U (en) High-speed low-power-consumption capacitive touch detection circuit and chip

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