CN110971225A - Touch key anti-interference method and circuit - Google Patents
Touch key anti-interference method and circuit Download PDFInfo
- Publication number
- CN110971225A CN110971225A CN201911303698.3A CN201911303698A CN110971225A CN 110971225 A CN110971225 A CN 110971225A CN 201911303698 A CN201911303698 A CN 201911303698A CN 110971225 A CN110971225 A CN 110971225A
- Authority
- CN
- China
- Prior art keywords
- value
- touch
- touch key
- key
- input
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03K—PULSE TECHNIQUE
- H03K17/00—Electronic switching or gating, i.e. not by contact-making and –breaking
- H03K17/94—Electronic switching or gating, i.e. not by contact-making and –breaking characterised by the way in which the control signals are generated
- H03K17/96—Touch switches
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03K—PULSE TECHNIQUE
- H03K17/00—Electronic switching or gating, i.e. not by contact-making and –breaking
- H03K17/16—Modifications for eliminating interference voltages or currents
Landscapes
- Electronic Switches (AREA)
Abstract
The invention discloses a touch key anti-interference method and a circuit, wherein the touch key anti-interference method comprises the following steps: the method comprises the steps of collecting an input value of a touch key, processing the input value to obtain an effective value, judging whether the effective value meets a preset condition or not, and if so, sending a trigger signal to a working circuit corresponding to the touch key. The invention can effectively improve the anti-interference level of the touch keys, prevent the problems of key misoperation, insensitive operation and the like of a user in the using process and reduce the failure rate of the touch display panel.
Description
Technical Field
The invention relates to the technical field of touch keys, in particular to an anti-interference method and circuit for the touch keys.
Background
The operation of the display panel of the electric control refrigerator is usually realized by a touch chip and a spring key, the touch chip widely used in the industry is a TS08NE chip of ADS company, a TS08NE chip supports 8-channel key input at most, and if more keys exist, two chips are needed to realize the operation. The design of refrigerator display panel receives the restriction of structure size, and too much spring button uses and brings the difficulty for PCB layout wiring, and complicated wiring brings the button simultaneously and gathers the problem of receiving the interference, easily leads to the spurious triggering, appears sensitivity decline, dead screen etc. in the injection current test process. The touch pad technology for manufacturing the flexible circuit board, which is newly used in the industry, separates the keys from the PCB, so that the problem that a plurality of keys interfere with the PCB wiring is solved, and crosstalk also exists between printed lines of the flexible circuit board.
Therefore, how to design an anti-interference method and circuit for a touch key with better anti-interference effect is a technical problem to be solved urgently in the industry.
Disclosure of Invention
In order to overcome the defect that the existing touch key is easy to interfere, the invention provides an anti-interference method and circuit for the touch key.
The technical scheme adopted by the invention is that the anti-interference method for the touch keys is designed, and comprises the following steps: the method comprises the steps of collecting an input value of a touch key, processing the input value to obtain an effective value, judging whether the effective value meets a preset condition or not, and if so, sending a trigger signal to a working circuit corresponding to the touch key.
Preferably, the processing the input value to obtain the valid value includes: continuously acquiring N input values to be arranged into a queue, and averaging the input values in the queue to obtain an effective value; wherein N is a positive integer.
Preferably, the processing the input value to obtain the effective value further includes: the input values collected each time are queued with the N-1 input values in front of it.
Preferably, the judging whether the effective value meets the preset condition includes: judging whether the difference value between the effective value and the reference value is greater than or equal to a preset threshold value or not every time one effective value is obtained, if so, accumulating the effective key values once, and otherwise, resetting the accumulated times of the effective key values; and when the accumulated times of the effective key values are greater than the preset times, judging that the effective key values meet the preset condition.
Preferably, each touch key is individually provided with a reference value and a preset threshold, and the reference value and the preset threshold corresponding to the touch key are adopted when judging whether the effective value meets the preset condition.
Preferably, the initial value of the reference value is a preset reference value, and the reference value is automatically calibrated according to the input value of the corresponding touch key in the process of acquiring the input value of the touch key.
Preferably, the automatic calibration of the reference value according to the input value includes:
collecting an input value of each touch key;
judging whether the input value of the touch key is larger than or equal to a corresponding preset threshold value or not, and if so, determining that the touch key is a pressed key;
counting the number of keys which are pressed currently and timing the pressing time;
and when the number of the pressed keys reaches the preset number and the pressing time reaches the preset time corresponding to the preset number, updating the reference value of the pressed keys into the input value of the pressed keys.
Preferably, the automatic calibration of the reference value according to the input value further comprises:
collecting an input value of each touch key;
and judging whether the input value of the touch key is smaller than a corresponding preset threshold value or not, and if so, updating the reference value of the touch key to the input value.
The invention also provides an anti-interference circuit of the touch key, which comprises: the touch chip, at least one touch key and a working circuit arranged corresponding to the touch key are connected to an input pin of the touch chip, the working circuit is connected to an output pin of the working chip, and the touch chip executes the touch key anti-interference method.
Preferably, a resistor is connected in series between each touch key and the corresponding input pin of the touch chip.
Preferably, a filter circuit is connected between the power supply pin and the ground pin of the touch chip.
Preferably, each touch key is connected to the touch chip through a connecting line, the line width of the connecting line is 0.2mm, and the distance between two adjacent connecting lines is larger than 1 mm.
Preferably, the touch chip is a touch chip with the model number of CBM 7312.
Compared with the prior art, the touch display panel and the control method thereof can effectively improve the anti-interference level of the touch keys, prevent the problems of key misoperation, insensitive operation and the like in the using process of a user, and reduce the failure rate of the touch display panel.
Drawings
The invention is described in detail below with reference to examples and figures, in which:
fig. 1 is a schematic connection diagram of an anti-jamming circuit of a touch key according to the present invention.
Detailed Description
As shown in fig. 1, the present invention further provides an anti-jamming circuit for touch keys, comprising: the touch chip adopts a touch chip with the model of CBM 7312.
And a resistor is connected in series between each touch key and the corresponding input pin of the touch chip, and the resistance value change of the resistor can adjust the size of the input value collected when the touch key is pressed. A filter circuit is connected between a power supply pin and a grounding pin of the touch chip, the filter circuit comprises a bypass capacitor, a filter capacitor and a magnetic bead, and the power supply pin of the touch chip is connected with a 5V power supply. Each touch key is connected to the touch chip through a connecting wire, the line width of each connecting wire is 0.2mm, and the distance between every two adjacent connecting wires is larger than 1mm, so that crosstalk between the adjacent connecting wires is prevented.
The invention provides an anti-interference method for touch keys, which comprises the following steps: the method comprises the steps of collecting an input value of a touch key, processing the input value to obtain an effective value, judging whether the effective value meets a preset condition or not, and if so, sending a trigger signal to a working circuit corresponding to the touch key.
The process of processing the input value to obtain the effective value is as follows: continuously acquiring N input values to form a queue, averagely processing the input values in the queue to obtain an effective value, arranging the acquired input values and the previous N-1 input values into a queue, averagely processing the input values in the queue to obtain the effective value, arranging the acquired input values and the previous N-1 input values into a queue and calculating to obtain the effective value, wherein N is a positive integer. Taking a touch chip with the model number of CBM7312 as an example, assuming that a corresponding data value given by a program is 5, the touch chip automatically adds 1 and then multiplies 2, the filter base number of the touch chip is 12, that is, N is 12, all input values acquired in the previous 12 times are reserved and arranged into a queue, average processing is performed on the input values in the current queue to obtain an effective value, after the input value acquired in the 13 th time, the input value acquired in the 1 st time is removed, the input value acquired in the 13 th time is put into the queue to obtain an effective value, after the input value acquired in the 14 th time, the input value acquired in the 2 nd time is removed, the input value acquired in the 14 th time is put into the queue to obtain an effective value, and the effective value is obtained by continuous calculation.
The process of judging whether the effective value meets the preset condition is as follows: and when the accumulated effective key value times are greater than the preset times, judging that the accumulated effective key value times meet the preset conditions, sending a trigger signal to a working circuit corresponding to a touch key of which the effective value meets the preset conditions, and clearing the accumulated effective key value times. Taking the above CBM7312 touch chip as an example, assuming that the corresponding data value given by the program is 3, the touch chip will automatically add 1, that is, the preset number of times is 4, assuming that the touch chip is connected with 9 touch keys, the time for sampling and scanning a complete time by using a 16-bit ADC is about 4.5ms, and the determination result will be obtained when the number of times of sampling and scanning is about 20 ms.
It should be noted that, because the sizes of the pads and the lengths of the traces of the different touch keys may be different, the sensitivity requirement of each touch key is different. In the invention, each touch key is independently provided with a reference value and a preset threshold value, the reference value and the preset threshold value corresponding to the touch key are adopted when judging whether the effective value meets the preset condition, namely, each touch key independently sets the corresponding preset condition, and when the effective value of the touch key meets the corresponding preset condition, a trigger signal is sent to a corresponding working circuit to match the sensitivity requirements of different touch keys, so that the possibility of misoperation of the keys is low, and the operation sensitivity is high.
Preferably, the initial value of the reference value is a preset reference value, the reference value is automatically calibrated according to the input value of the corresponding touch key in the process of acquiring the input value of the touch key, and the dynamic change of the reference value can realize the automatic calibration of the sensitivity of each key, so that the triggering is more accurate.
The automatic calibration process of the reference value, which is automatically calibrated according to the input value, is described in detail below, including:
collecting an input value of each touch key;
judging whether the input value of the touch key is larger than or equal to a corresponding preset threshold value or not, and if so, determining that the key is pressed;
counting the number of keys which are pressed currently and timing the pressing time;
and when the number of the pressed keys reaches the preset number and the pressing time reaches the preset time corresponding to the preset number, updating the reference value of the pressed keys into the input value of the pressed keys. If the touch key is required to continue to respond, the pressing force of the touch key needs to be increased, the effective value of the input value meets the preset condition, and the touch key can continue to start, and does not respond any more.
Further, the automatic calibration of the reference value according to the input value further comprises:
collecting an input value of each touch key;
and judging whether the input value of the touch key is smaller than a corresponding preset threshold value or not, and if so, updating the reference value of the touch key to the input value. The purpose of this design is when the glass surface that touch button contacted has water, its input value can appear changing and change steadily, when renewing the benchmark value to current input value for touch button sensitivity is along with environment self-adaptation change. Aiming at different operation panels, mainly difference in capacitance values, self-calibration is carried out on the key sensitivity, namely a reference value, when the power is on, and self-calibration is carried out on the key sensitivity at intervals.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.
Claims (13)
1. An anti-interference method for touch keys is characterized by comprising the following steps: the method comprises the steps of collecting an input value of a touch key, processing the input value to obtain an effective value, judging whether the effective value meets a preset condition or not, and if so, sending a trigger signal to a working circuit corresponding to the touch key.
2. The method of claim 1, wherein the processing the input value to obtain the valid value comprises: continuously acquiring N input values to form a queue, and averaging the input values in the queue to obtain the effective value; wherein N is a positive integer.
3. The method for resisting disturbance of touch keys according to claim 2, wherein the processing the input value to obtain the valid value further comprises: the input values collected each time are queued with the N-1 input values in front of it.
4. The method according to any one of claims 1 to 3, wherein the determining whether the valid value meets a preset condition includes: judging whether the difference value between the effective value and the reference value is greater than or equal to a preset threshold value or not every time one effective value is obtained, if so, accumulating the effective key values once, and otherwise, resetting the accumulated times of the effective key values; and when the accumulated times of the effective key values are greater than the preset times, judging that the effective key values meet the preset condition.
5. The method according to claim 4, wherein each touch key is individually provided with a reference value and a preset threshold, and the reference value and the preset threshold corresponding to the touch key are adopted when determining whether the effective value meets the preset condition.
6. The method according to claim 5, wherein an initial value of the reference value is a preset reference value, and the reference value is automatically calibrated according to the input value of the corresponding touch key in the process of acquiring the input value of the touch key.
7. The touch key tamper resistant method of claim 6, wherein the automatically calibrating the reference value based on the input value comprises:
collecting an input value of each touch key;
judging whether the input value of the touch key is larger than or equal to a corresponding preset threshold value or not, and if so, determining that the touch key is a pressed key;
counting the number of keys which are pressed currently and timing the pressing time;
and updating the reference value of the pressed key to the input value of the pressed key when the number of the pressed keys reaches the preset number and the pressing time reaches the preset time corresponding to the preset number.
8. The touch key tamper resistant method of claim 6, wherein the automatic calibration of the reference value based on the input value further comprises:
collecting an input value of each touch key;
and judging whether the input value of the touch key is smaller than a corresponding preset threshold value, and if so, updating the reference value of the touch key to the input value.
9. An anti-jamming circuit for touch keys, comprising: the anti-interference method comprises a touch chip, at least one touch key and a working circuit arranged corresponding to the touch key, wherein the touch key is connected to an input pin of the touch chip, and the working circuit is connected to an output pin of the working chip, and the anti-interference method is characterized in that the touch chip executes the anti-interference method for the touch key according to any one of claims 1 to 8.
10. The touch key immunity circuit of claim 9, wherein a resistor is connected in series between each touch key and the corresponding input pin of the touch chip.
11. The touch key immunity circuit of claim 9, wherein a filter circuit is connected between the power supply pin and the ground pin of the touch chip.
12. The touch key anti-jamming circuit according to claim 9, wherein each of the touch keys is connected to the touch chip through a connection line, a line width of the connection line is 0.2mm, and a distance between two adjacent connection lines is greater than 1 mm.
13. The touch key anti-jamming circuit of claim 9, wherein the touch chip is a type CBM7312 touch chip.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911303698.3A CN110971225A (en) | 2019-12-17 | 2019-12-17 | Touch key anti-interference method and circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911303698.3A CN110971225A (en) | 2019-12-17 | 2019-12-17 | Touch key anti-interference method and circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110971225A true CN110971225A (en) | 2020-04-07 |
Family
ID=70035023
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911303698.3A Pending CN110971225A (en) | 2019-12-17 | 2019-12-17 | Touch key anti-interference method and circuit |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110971225A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111555749A (en) * | 2020-05-07 | 2020-08-18 | 合肥市航嘉电子技术有限公司 | Capacitive touch key control method and system and electronic device |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101799734A (en) * | 2010-03-29 | 2010-08-11 | 深圳龙多电子科技有限公司 | Key detection method of capacitive touch screen |
CN103607187A (en) * | 2013-11-12 | 2014-02-26 | 青岛歌尔声学科技有限公司 | Method and apparatus for detecting whether capacitor touch button is triggered |
CN204229149U (en) * | 2014-09-26 | 2015-03-25 | 深圳市培林体育科技有限公司 | Touch key-press driving circuit and the control desk be made up of it |
US20150268764A1 (en) * | 2014-03-19 | 2015-09-24 | Mitsubishi Electric Corporation | Touch panel device |
CN105790747A (en) * | 2016-02-25 | 2016-07-20 | 广东美的厨房电器制造有限公司 | Touch key triggering detection method and triggering detection device |
US20160226521A1 (en) * | 2015-02-03 | 2016-08-04 | Texas Instruments Incorporated | Touch-on-Metal Keypad with N-1 Key Scan Averaging |
CN108491115A (en) * | 2018-03-13 | 2018-09-04 | 青岛海尔洗衣机有限公司 | Household appliance control method and household electrical appliance |
CN110048703A (en) * | 2019-04-18 | 2019-07-23 | 珠海格力电器股份有限公司 | A kind of method, apparatus and terminal device improving touch key-press sensitivity |
CN209419594U (en) * | 2018-11-30 | 2019-09-20 | 珠海巨晟科技股份有限公司 | A kind of anti-interference detection device of capacitance type touch key |
-
2019
- 2019-12-17 CN CN201911303698.3A patent/CN110971225A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101799734A (en) * | 2010-03-29 | 2010-08-11 | 深圳龙多电子科技有限公司 | Key detection method of capacitive touch screen |
CN103607187A (en) * | 2013-11-12 | 2014-02-26 | 青岛歌尔声学科技有限公司 | Method and apparatus for detecting whether capacitor touch button is triggered |
US20150268764A1 (en) * | 2014-03-19 | 2015-09-24 | Mitsubishi Electric Corporation | Touch panel device |
CN204229149U (en) * | 2014-09-26 | 2015-03-25 | 深圳市培林体育科技有限公司 | Touch key-press driving circuit and the control desk be made up of it |
US20160226521A1 (en) * | 2015-02-03 | 2016-08-04 | Texas Instruments Incorporated | Touch-on-Metal Keypad with N-1 Key Scan Averaging |
CN105790747A (en) * | 2016-02-25 | 2016-07-20 | 广东美的厨房电器制造有限公司 | Touch key triggering detection method and triggering detection device |
CN108491115A (en) * | 2018-03-13 | 2018-09-04 | 青岛海尔洗衣机有限公司 | Household appliance control method and household electrical appliance |
CN209419594U (en) * | 2018-11-30 | 2019-09-20 | 珠海巨晟科技股份有限公司 | A kind of anti-interference detection device of capacitance type touch key |
CN110048703A (en) * | 2019-04-18 | 2019-07-23 | 珠海格力电器股份有限公司 | A kind of method, apparatus and terminal device improving touch key-press sensitivity |
Non-Patent Citations (2)
Title |
---|
戴佳 等: "《51单片机应用系统开发典型实例》", 30 September 2005, 中国电力出版社 * |
汪赟: "电容式触摸按键动态自适应的校正方法", 《电子世界》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111555749A (en) * | 2020-05-07 | 2020-08-18 | 合肥市航嘉电子技术有限公司 | Capacitive touch key control method and system and electronic device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9684418B1 (en) | Self and mutual capacitance measurement in a touch screen | |
US8874396B1 (en) | Injected touch noise analysis | |
CN103607187B (en) | Method and apparatus for detecting whether capacitor touch button is triggered | |
CN101080689B (en) | Methods and systems for detecting noise in a position sensor using minor shifts in sensing frequency | |
CN105302383B (en) | A kind of capacitive touch screen anti-disturbance method and equipment | |
EP2680018B1 (en) | Method and apparatus for detecting key | |
CN102662518B (en) | System and method for controlling signal noise ratio | |
SE1351489A1 (en) | Fingerprint detection system and method | |
CN104111761B (en) | method for filtering interference source and touch sensing device | |
CN102522975B (en) | Adaptive-environmental touch key circuit and key touch detection method | |
CN103389847B (en) | Touch control terminal and anti-interference method and system thereof | |
US8212159B2 (en) | Capacitive touchpad method using MCU GPIO and signal processing | |
CN103365507B (en) | Sensing device and method for improving reliability of capacitive touch device | |
CN109298331A (en) | Low cost can detect the detection circuit and processing method of multiple any combination keys | |
CN110971225A (en) | Touch key anti-interference method and circuit | |
CN102868392A (en) | Portability key circuit | |
CN108181541B (en) | Detection device and detection method of touch panel | |
WO2021213194A1 (en) | Touch sensing method and circuit, and electronic device | |
CN102914981A (en) | Chip burning detection system | |
CN101907961B (en) | Realizing method of capacitance type inductive key, inductive key circuit and keyboard | |
CN205910667U (en) | Multi -processor control circuit that resets | |
CN104297579A (en) | Detection device and method | |
CN202008649U (en) | Light band display type slide touch-control bar | |
CN201467099U (en) | Capacitive sensing key circuit and keyboard | |
CN114356140A (en) | Key action identification method of infrared induction suspension key |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200407 |
|
RJ01 | Rejection of invention patent application after publication |