CN209419594U - A kind of anti-interference detection device of capacitance type touch key - Google Patents

A kind of anti-interference detection device of capacitance type touch key Download PDF

Info

Publication number
CN209419594U
CN209419594U CN201822009468.3U CN201822009468U CN209419594U CN 209419594 U CN209419594 U CN 209419594U CN 201822009468 U CN201822009468 U CN 201822009468U CN 209419594 U CN209419594 U CN 209419594U
Authority
CN
China
Prior art keywords
value
unit
switch
timing
baseline value
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
Application number
CN201822009468.3U
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.)
Foshan Jusheng Microelectronics Co.,Ltd.
Original Assignee
Zhuhai Giant Sheng Polytron Technologies Inc
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 Zhuhai Giant Sheng Polytron Technologies Inc filed Critical Zhuhai Giant Sheng Polytron Technologies Inc
Priority to CN201822009468.3U priority Critical patent/CN209419594U/en
Application granted granted Critical
Publication of CN209419594U publication Critical patent/CN209419594U/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The utility model discloses a kind of anti-interference detection devices of capacitance type touch key, including timing sampling unit, key detection unit, baseline value detection unit, baseline value updating unit, third switch and the 4th switch;Input terminal, the input terminal of the 4th switch and the input terminal of key detection unit that the sampled value output end of timing sampling unit is switched with third are connect;The output end of third switch is connect with the input terminal of baseline value detection unit;The output end of key detection unit is connect with the control signal input that third switchs;The output end of baseline value detection unit is connect with the control signal input of the 4th switch;The output end of 4th switch is connect with the input terminal of baseline value updating unit;The utility model baseline value detection device needs sampled value to reach baseline value confirmation number greater than the number on baseline value boundary and just updates a reference value, reduce the risk that environmental disturbances cause a reference value mistake to update when sampled value is greater than baseline value boundary.

Description

A kind of anti-interference detection device of capacitance type touch key
Technical field
The utility model relates to touch key-press technical field more particularly to a kind of anti-interference detection dresses of capacitance type touch key It sets.
Background technique
In recent years, being widely used with touching technique, various types of keys are widely used in various electronic products In.Wherein, capacitance touch button is most common touch key-press, by the variation of capacitance on detection capacitance touch button, is sentenced Determine whether touch action generates, and the capacitance that will test is compared with baseline value, updates baseline value with environmental change.
Publication No. is that the patent application of CN104935320A discloses a kind of detection method of capacitance type touch key state, By the way that the current count value of counter is compared with baseline value, and by analysis current count value relative to baseline value The size of variable quantity and its duration, and then judge whether capacitance type touch key is effectively touched.In addition, in current count When value is greater than baseline change threshold and is less than key response threshold value relative to the variable quantity of baseline value, need to update baseline value, i.e., By setting the size of baseline change threshold and key response threshold value, reaction environment temperature change has an impact baseline value, into And baseline value is updated in variation of ambient temperature, the interference performance of environment resistant temperature is improved, detection accuracy is improved.
Although above-mentioned detection method can update baseline value, however it remains following problems: environmental disturbances cause to change Amount is greater than baseline change threshold, and baseline value mistake is caused to update.
Utility model content
First of the utility model is designed to provide a kind of anti-interference detection device of capacitance type touch key, reduces outer The influence that portion's environmental disturbances update baseline value.
To realize first purpose, the utility model is provided the following technical solutions:
A kind of anti-interference detection device of capacitance type touch key, including timing sampling unit, key detection unit, baseline value Detection unit, baseline value updating unit, third switch and the 4th switch;The sampled value output end of timing sampling unit with it is described The input terminal connection of the input terminal of third switch, the input terminal of the 4th switch and the key detection unit;The third is opened The output end of pass is connect with the input terminal of the baseline value detection unit;The output end of the key detection unit and the third The control signal input of switch connects;The output end of the baseline value detection unit and the control signal of the 4th switch are defeated Enter end connection;The output end of 4th switch is connect with the input terminal of the baseline value updating unit;
The timing sampling unit scan capacitance type touch key exports sampled value;The key detection unit is for examining Whether the sampled value for surveying the timing sampling unit output is greater than key threshold value, and when the sampled value is greater than key threshold value, The third switch is controlled to disconnect;Whether the sampled value that the baseline value detection unit is used to detect the third switch output is big It is less than or equal to baseline value boundary in baseline value boundary, and in the sampled value, or, the sampled value is greater than time on baseline value boundary When number is more than baseline value confirmation number, control the described 4th is closed the switch;The baseline value updating unit receives the described 4th and opens The sampled value of output is closed, baseline value is updated.
As specific embodiment, the baseline value detection unit includes the 8th comparator, the 9th comparator, the tenth ratio Decision unit is updated compared with device, the second counter and the first baseline value;Two input terminals of the 8th comparator receive respectively The sampled value of baseline value boundary and third switch output;The output end and second counter of 8th comparator Trigger signal input terminal connection;The output end of second counter is connect with an input terminal of the tenth comparator, Another input terminal of tenth comparator receives baseline value and confirms number;Two input terminals of the 9th comparator are distinguished Receive the sampled value on baseline value boundary and third switch output;The output end and the described tenth of 9th comparator Two input terminals that the output end of comparator updates decision unit with first baseline value respectively are connect;
8th comparator is greater than for determining whether the sampled value is more than baseline value boundary in the sampled value When the baseline value boundary, triggers second counter and count;Tenth comparator is for determining second counter Whether the count value of output reaches baseline value confirmation number;9th comparator is for determining whether the sampled value is more than base Line value boundary;When the tenth comparator determines that the count value of second counter output reaches baseline value confirmation number, or, When 9th comparator determines that the sampled value is less than the baseline value boundary, first baseline value updates decision unit control The described 4th is made to close the switch.
As specific embodiment, it is second or door that first baseline value, which updates decision unit,;When the sampled value Greater than the baseline value boundary, and the count value reaches baseline value confirmation number, and the tenth comparator exports high level;When The sampled value is less than or equal to baseline value boundary, and the 9th comparator exports high level;Described second or door export high level When, the described 4th closes the switch;
Or, it is second and door that first baseline value, which updates decision unit,;When the sampled value is greater than the baseline value side Boundary, and when the count value reaches baseline value confirmation number, the tenth comparator exports low level;When the sampled value is less than When equal to baseline value boundary, the 9th comparator exports low level;Described second with door output low level when, the described 4th opens It closes and closes.
As specific embodiment, the key detection unit includes the 6th comparator;The two of 6th comparator A input terminal receives key threshold value and sampled value respectively, the 6th comparator by the sampled value and the key threshold value into Row compares;When the sampled value is greater than the key threshold value, the 6th comparator controls the third switch and disconnects.
As specific embodiment, the key detection unit further includes the 7th comparator and the first counter;Institute The trigger signal input terminal for stating the first counter is connect with the output end of the 6th comparator;Two of 7th comparator Input terminal receives the count value of key confirmation number and first counter output, output end output key control letter respectively Number;6th comparator triggers first counter and counts when the sampled value is greater than the key threshold value;Described Seven comparators are used to determine whether the count value of the first counter output to reach key confirmation number, and in the count value When reaching the key confirmation number, output key controls signal, and control executes button operation.
Further, when the sampled value is greater than the key threshold value, the 6th comparator exports high level/low electricity It is flat, it triggers first counter and counts;It is described when the count value of first counter output reaches key confirmation number The output of 7th comparator is high level/low level by key control signal, and control executes button operation.
Further, the detection device further includes that timing unit and baseline value update judging unit;The baseline value Judging unit is updated to be connected between the baseline value detection unit and the 4th switch;The baseline value updates judging unit Two input terminals are connect with the output end of the output end of the baseline value detection unit and the timing unit respectively, output end It is connect with the control signal input of the 4th switch;The timing unit is for determining whether to reach timing;It is described Baseline value updates judging unit and closes the switch or disconnect for controlling the described 4th;
When the baseline value detection unit detects that the sampled value of the third switch output is less than or equal to baseline value boundary Or it is more than baseline value confirmation number that the sampled value, which is greater than the number on baseline value boundary, and, the timing unit judgement reaches fixed When the time when, the baseline value updates judging unit control the described 4th and closes the switch.
As specific embodiment, it is first and door that the baseline value, which updates judging unit, when the baseline value detects Unit detects that the sampled value of the third switch output is less than or equal to baseline value boundary or the sampled value is greater than baseline value side When the number on boundary is more than baseline value confirmation number, the baseline value detection unit exports high level;When the timing unit determines When reaching timing, the timing unit exports high level;Described first with door output high level when, it is described 4th switch close It closes;
Or, it is first or door that the baseline value, which updates judging unit, when the baseline value detection unit detects described the The sampled value of three switch outputs is less than or equal to baseline value boundary or the sampled value is greater than the number on baseline value boundary more than baseline When value confirmation number, the baseline value detection unit exports low level;When timing unit judgement reaches timing, institute State timing unit output low level;Described first or door output low level when, the described 4th closes the switch.
Further, the detection device further includes controlling of sampling unit;The input terminal of the controlling of sampling unit receives Sampled value, output end export sampling control signal and connect to the control signal input of the timing sampling unit;The timing The control signal output of sampling unit is connect with the control signal input of the timing unit;The controlling of sampling unit is used Whether it is less than baseline value in the judgement sampled value, and when the sampled value is less than baseline value, controls the timing sampling list Member accelerates sampling rate;When the timing sampling unit accelerates sampling rate, the timing sampling unit controls the timing Unit shortens timing.
As specific embodiment, the timing unit includes timer, third counter, the generation of timing judgment condition Unit and the 11st comparator;The output end of the timer is connect with the input terminal of third counter, third counter pair Timer is counted, and exports count value to an input terminal of the 11st comparator;The timing judgment condition generates single The input terminal of member receives the timing controling signal of the timing sampling unit output, and output end exports timing judgment condition to described Another input terminal of 11st comparator;11st comparator is adjudicated for determining whether the timer reaches timing Condition;The timing sampling unit reduces the numerical value of timing judgment condition by controlling the timing judgment condition generation unit, Shorten the timing of the timing unit.
Further, the detection device further includes noise detection unit and the 5th switch;5th switch is connected into Between the output end of the timing sampling unit and the input terminal of the controlling of sampling unit;The input of the noise detection unit End is connect with the output end of the timing sampling unit, and output end is connect with the control signal input of the 5th switch;Institute Noise detection unit is stated for determining whether the sampled value of timing sampling unit output is greater than noise threshold, and big in the difference When the noise threshold, controls the 5th switch and disconnect.
Further, the detection device further includes noise detection unit and second switch;The second switch is connected into Between the output end of the timing sampling unit and the input terminal of key detection unit;The input terminal of the noise detection unit with The output end of the timing sampling unit connects, and output end is connect with the control signal input of the second switch;It is described to make an uproar Sound detection unit is used to determine whether the sampled value of timing sampling unit output to be greater than noise threshold, and is greater than institute in the difference When stating noise threshold, controls the second switch and disconnect.
Further, the detection device further includes that sampled value stablizes judging unit and first switch;Described first opens Correlate the common end into the output end of the timing sampling unit and third switch, the 4th switch and key detection unit Between;The input terminal that the sampled value stablizes judging unit is connect with the output end of the timing sampling unit, output end and institute State the control signal input connection of second switch;The sampled value stablizes judging unit for determining that timing sampling unit exports Multiple sampled values in maximum sampled value and the difference of minimum sampled value whether be greater than preset difference value, and be greater than in the difference When the preset difference value, controls the first switch and disconnect.
Further, the detection device further includes average filter unit;The average filter unit is connected into the timing Between the output end of sampling unit and the common end of third switch, the 4th switch and key detection unit;It is described average Multiple sampled values that filter unit exports the timing sampling unit are averaged, and are exported average sample value and are opened to the third Pass, the 4th switch and key detection unit.
Further, the detection device further includes digital filtering unit;The digital filtering unit is connected into the timing Between the output end of sampling unit and the common end of third switch, the 4th switch and key detection unit;The number Filter unit carries out digital filtering to the sampled value that the timing sampling unit exports, and exports filtering sampling value and opens to the third Pass, the 4th switch and key detection unit.
As specific embodiment, the digital filtering unit includes the first multiplier, the second multiplier, the first addition Device and filtering sampling value register;Two input terminals of first multiplier receive average sample value respectively and first multiply The method factor 1/K, K=2q, q is positive integer;The output end of the output end of first multiplier and second multiplier point It is not connect with two input terminals of the first adder;The output end of the first adder and the filtering sampling value are deposited The input terminal of device connects;One input terminal of second multiplier receives the second multiplication factor (K-1)/K, another input terminal It is connect with the output end of the filtering sampling value register, the filtering sampling value register feeds back the result of last time filtering To second multiplier, by repeatedly filtering output filtering sampling value.
Further, the detection device further includes that sampled value stablizes judging unit, average filter unit, digital filtering list Member, noise detection unit, timing unit, baseline value update judging unit, first switch, second switch and the 5th switch;Institute State the sampled value output end of timing sampling unit and the sampled value stablize judging unit input terminal and first switch it is defeated Enter end connection;The output end that the sampled value stablizes judging unit is connect with the control signal input of the first switch;Institute The output end for stating first switch is connect with the input terminal of the average filter unit;The output end of the average filter unit and institute State the input terminal of digital filtering unit and the input terminal connection of the noise detection unit;The output of the digital filtering unit It holds and is connect with the input terminal of the second switch, third switch, the 4th switch and the 5th switch;The output of the second switch End is connect with the input terminal of the key detection unit;The input of the output end and the controlling of sampling unit of 5th switch End connection;The control signal input of the output end of the noise detection unit and the second switch and the 5th switch connects It connects;The baseline value update two input terminals of judging unit respectively with the output end of the baseline value detection unit and described The output end of timing unit connects, and output end is connect with the control signal input of the 4th switch;The timing unit is used In determining whether to reach timing;The baseline value updates judging unit and closes the switch or disconnect for controlling the described 4th; The control signal output of the timing sampling unit is connect with the control signal input of the timing unit;
The sampled value stablizes judging unit and is used to determine that the maximum in multiple sampled values of timing sampling unit output to be adopted Whether the difference of sample value and minimum sampled value is greater than preset difference value, and when the difference is greater than the preset difference value, controls institute State first switch disconnection;Multiple sampled values that the average filter unit exports the timing sampling unit are averaged, defeated Average sample value gives the digital filtering unit and noise detection unit out;The digital filtering unit is to the average filter The average sample value of unit output carries out digital filtering, exports filtering sampling value to the second switch;The noise measuring list Whether average sample value of the member for detecting the output of average filter unit is more than noise threshold, and is more than in the average sample value When the noise threshold, controls the second switch and disconnect;It is defeated that the key detection unit is also used to detect the second switch Whether filtering sampling value out is greater than key threshold value, and is more than that key is true in the number that the filtering sampling value is greater than key threshold value When recognizing number, control executes button operation;The controlling of sampling unit for determining whether filtering sampling value is less than baseline value, and When filtering sampling value is less than baseline value, control timing sampling unit accelerates sampling rate;When the timing sampling unit is accelerated When sampling rate, timing sampling unit controls timing unit and shortens timing.
Second of the utility model is designed to provide a kind of capacitance type touch key anti interference detection method, reduces outer The influence that portion's environmental disturbances update baseline value.
To realize second purpose, the utility model is provided the following technical solutions:
A kind of capacitance type touch key anti interference detection method, comprising the following steps:
(1) start;
(2) each module initialization;
(3) noise threshold, key threshold value and baseline value boundary are set;
(4) timing sampling unit scan touch key-press obtains the capacitance of touch key-press;
(5) timing sampling unit exports multiple sampled values and gives sampled value stabilization judging unit;
(6) the stable judging unit of sampled value determines that the difference of maximum sampled value and minimum sampled value in multiple sampled values is It is no to be greater than preset difference value, if so, (7) are entered step, if it is not, entering step (8);
(7) average filter unit does not receive multiple sampled values of timing sampling unit output, return step (4);
(8) average filter unit receives multiple sampled values of timing sampling unit output;
(9) average filter unit exports average sample value to digital filtering unit, noise detection unit;
(10) whether noise detection unit detection average sample value is greater than noise threshold, if so, (11) are entered step, if It is no, enter step (12) and step (26);
(11) key detection unit and controlling of sampling unit do not receive the filtering sampling value of digital filtering unit output, return It returns step (4);
(12) key detection unit receives the filtering sampling value of digital filtering unit output;
(13) whether key detection unit detection filter sampled value is greater than key threshold value, if so, entering step (14) and walking Suddenly (17), if it is not, entering step (16) and step (18);
(14) whether the number that key detection unit detection filter sampled value is greater than key threshold value reaches key confirmation number, If so, (15) are entered step, if it is not, entering step (16);
(15) key operation unit executes button operation, return step (4);
(16) key operation unit does not execute button operation, return step (4);
(17) baseline value detection unit does not receive the filtering sampling value of digital filtering unit output, enters step (25);
(18) baseline value detection unit receives the filtering sampling value of digital filtering unit output;
(19) whether baseline value detection unit detection filter sampled value is greater than baseline value boundary, if so, (20) are entered step, If it is not, entering step (21);
(20) whether the number that baseline value detection unit detection filter sampled value is greater than baseline value boundary it is true reach baseline value Number is recognized, if so, (21) are entered step, if it is not, entering step (24);
(21) whether timing unit reaches timing, if so, (22) are entered step, if it is not, entering step (24);
(22) baseline value updating unit receives the filtering sampling value of digital filtering unit output;
(23) baseline value updating unit updates baseline value, return step (4);
(24) baseline value updating unit does not receive the filtering sampling value of digital filtering unit output;
(25) baseline value updating unit does not update a reference value return step (4);
(26) whether controlling of sampling unit detection filter sampled value is less than baseline value, if so, entering step (27) and step (28), if it is not, return step (4);
(27) timing sampling unit improves sampling rate, return step (4);
(28) timing unit shortens timing, enters step (21).
The utility model has the beneficial effects that
The utility model baseline value detection device is less than baseline value boundary Control the 4th in sampled value and closes the switch, a reference value Updating unit updates a reference value, and when sampled value is greater than baseline value boundary, need sampled value to be greater than the number on baseline value boundary Reach baseline value confirmation number and just update a reference value, reduces the risk that environmental disturbances cause a reference value mistake to update.Further, The utility model confirms number by setting button, when the number that only sampled value is greater than key threshold value reaches key confirmation number Button operation is just executed, reducing environmental disturbances leads to the risk of detection error.Further, the utility model controlling of sampling unit When detecting that sampled value is less than baseline value, the sampling rate of timing sampling unit is improved, timing is shortened by timing sampling unit The timing of unit accelerates the speed that declines after baseline value increases, further decrease continuous several times touch capacitance touch by The influence that key detects baseline value.Further, the utility model noise detection unit is by determining average filter output Whether average sample value is greater than noise threshold, and control the 5th is closed the switch or disconnected so that controlling of sampling unit will not detect it is super The sampled value of noise threshold out prevents from carrying out the noise generated under the action of environmental disturbances.The utility model noise measuring Unit controls second switch closing or opening, so that key detection unit is not by determining whether sampled value is greater than noise threshold The sampled value beyond noise threshold can be detected, prevents from carrying out the noise generated under the action of environmental disturbances key detection, drop The risk of low detection error.Further, the utility model sampled value stablizes judging unit by determining that timing sampling unit is defeated Whether the maximum sampled value of multiple sampled values out and the difference of minimum sampled value are greater than preset difference value, control first switch closure Or disconnect, so that first switch can only export multiple sampled values that difference is less than preset difference value, prevent to the work in environmental disturbances Key detection is carried out with the unstable sampled value of lower generation and baseline value updates, and reduces detection error and a reference value mistake The risk of update.Further, the utility model is averaged multiple sampled values by average filter unit, and it is dry to reduce environment Disturb the risk for influencing sampled value.The utility model carries out digital filtering to sampled value by digital filtering unit, and it is dry to reduce environment Disturb the risk for influencing sampled value.Further, the utility model is filtered by multi-stage digital, and the effect of filtering environmental interference is more It is good.Further, after the utility model average filter unit filters out maximum sampled value and minimum sampled value in multiple sampled values It is averaged, readily available more stable average sample value.
Detailed description of the invention
In order to illustrate more clearly of the utility model embodiment, attached drawing needed in the embodiment is done simply below Introduction.The accompanying drawings in the following description is only the embodiments of the present invention, is come for those of ordinary skill in the art It says, without creative efforts, can also be obtained according to these attached drawings other accompanying drawings.
Fig. 1 is the overall structure block diagram of the anti-interference detection device of the utility model capacitance type touch key;
Fig. 2 is the structural block diagram that the utility model sampled value stablizes judging unit;
Fig. 3 is the structural block diagram of the utility model maximum value judging unit;
Fig. 4 is the structural block diagram of the utility model minimum value judging unit;
Fig. 5 is the structural block diagram of the utility model digital filtering unit;
Fig. 6 is the structural block diagram of the utility model noise threshold generation unit;
Fig. 7 is the structural block diagram of the utility model noise detection unit;
Fig. 8 is the structural block diagram of the utility model key threshold value generation unit;
Fig. 9 is the structural block diagram of the utility model key detection unit;
Figure 10 is the structural block diagram of the utility model baseline value boundary generation unit;
Figure 11 is the structural block diagram of the utility model baseline value detection unit;
Figure 12 is the structural block diagram of the utility model timing unit;
Figure 13 is the structural block diagram of the utility model controlling of sampling unit;
Figure 14 is that the utility model timing sampling unit does not improve the sampled value timing diagram exported when sampling rate;
Figure 15 is that the utility model timing sampling unit improves the sampled value timing diagram exported after sampling rate;
Figure 16 is the overall flow figure of the utility model capacitance type touch key anti interference detection method.
Specific embodiment
With reference to the accompanying drawing, the present invention will be described in detail.
In order to which the purpose of the present invention, technical solution, advantage is more clearly understood, with reference to the accompanying drawings and embodiments to this Invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, not For limiting the present invention.
As shown in Figure 1, a kind of anti-interference detection device of capacitance type touch key includes timing sampling unit, controlling of sampling list Member, timing unit, sampled value stablize judging unit, average filter unit, digital filtering unit, noise detection unit, noise threshold It is worth generation unit, key detection unit, key threshold value generation unit, baseline value detection unit, baseline value boundary generation unit, base It is single that line value updating unit, first switch, second switch, third switch, the 4th switch, the 5th switch and baseline value update judgement Member.
As shown in Figure 1, the sampled value output end of timing sampling unit and sampled value stablize judging unit input terminal and The input terminal of first switch connects;The timing controling signal output end of timing sampling unit and the timing controling signal of timing unit Input terminal connection, controls the timing of timing unit;Sampled value stablizes the output end of judging unit and the control of first switch Signal input part connection, controls first switch closing or opening;The output end of first switch and the input terminal of average filter unit Connection;The output end of average filter unit and the input terminal of digital filtering unit and an input terminal of noise detection unit connect It connects;The input terminal of the output end of digital filtering unit and second switch, the input terminal of third switch, the 4th switch input terminal with And the 5th switch input terminal connection;The output end of noise detection unit and the control signal input of second switch and the 5th The control signal input of switch connects, and controls second switch and the 5th closes the switch or disconnect;The output end of second switch It is connect with an input terminal of key detection unit;One output end output key operation signal of key detection unit is to key Operating unit (not shown) executes corresponding operation by key operation unit, and the control of another output and third switch is believed The connection of number input terminal, control third are closed the switch or are disconnected;One of output end and the baseline value detection unit of third switch is defeated Enter end connection;The output end of baseline value detection unit and the output end of timing unit update decision unit with baseline value respectively Two input terminal connections;The output end that baseline value updates decision unit is connect with the control signal input of the 4th switch, is controlled 4th closes the switch or disconnects;The output end of 4th switch is connect with the input terminal of baseline value updating unit;Baseline value updates single The output end and the input terminal of noise threshold generation unit of member, the input terminal of key threshold value generation unit, baseline value boundary generate The input terminal connection of the input terminal and controlling of sampling unit of unit;The output end and noise of noise threshold generation unit are examined Survey another input terminal connection of unit;The output end of key threshold value generation unit and another input terminal of key detection unit Connection;The output end of baseline value boundary generation unit is connect with another input terminal of baseline value detection unit;5th switch Output end is connect with another input terminal of controlling of sampling unit;The output end of controlling of sampling unit is adopted with timing sampling unit The connection of sample control signal input, controls the sampling rate of timing sampling unit.
As shown in Figure 1, timing sampling unit exports multiple sampled value C1……Cn……CN(N >=2,1≤n≤N, N, n are equal It is the same below for integer) to the stable judging unit of sampled value and first switch;Sampled value stablizes judging unit and receives preset difference value Δ C and multiple sampled value C of timing sampling unit output1……Cn……CN, export first control signal to first switch, Control first switch closing or opening.
Include maximum value judging unit, minimum value judging unit, first subtract as shown in Fig. 2, sampled value stablizes judging unit Musical instruments used in a Buddhist or Taoist mass and first comparator;Maximum value judging unit is connect with an input terminal of the first subtracter, receives timing sampling list Multiple sampled value C of member output1……Cn……CN, export maximum sampled value CMAXTo the first subtracter;Minimum value judging unit It is connect with another input terminal of the first subtracter, receives multiple sampled value C of timing sampling unit output1……Cn……CN, Export minimum sampled value CMINTo the first subtracter;The output end of first subtracter and an input terminal of first comparator connect, Export maximum sampled value CMAXWith minimum sampled value CMINDifference CMAX-CMINTo first comparator, first comparator another Input terminal receives preset difference value Δ C;First comparator is by difference CMAX-CMINIt is compared with preset difference value Δ C, and according to comparing As a result first control signal is exported.
In the present embodiment, as maximum sampled value CMAXWith minimum sampled value CMINDifference CMAX-CMINLess than or equal to default When difference DELTA C, the first control signal that sampled value stablizes judging unit output is high level, control first switch closure;When most Big sampled value CMAXWith minimum sampled value CMINDifference CMAX-CMINWhen greater than preset difference value Δ C, it is defeated that sampled value stablizes judging unit First control signal out is low level, and control first switch disconnects.
In other embodiments, as maximum sampled value CMAXWith minimum sampled value CMINDifference CMAX-CMINLess than or equal to pre- If when difference DELTA C, the first control signal that sampled value stablizes judging unit output is low level, first switch closure;Work as maximum Sampled value CMAXWith minimum sampled value CMINDifference CMAX-CMINWhen greater than preset difference value Δ C, sampled value stablizes judging unit output First control signal be high level, control first switch disconnect.
In the present embodiment, preset difference value Δ C is the empirical value that timing sampling unit multiple repairing weld determines, and need to not had There are environmental disturbances, for example is measured in the case that mobile phone interferes;Count timing sampling unit multiple repairing weld output maximum value with most Small value takes the difference of the maxima and minima as preset difference value Δ C.In the present embodiment, Δ C=100-1000.
As shown in figure 3, maximum value judging unit includes the second comparator and maximum sampled value register;Second comparator An input terminal receive multiple sampled value C1……Cn……CN, the output end and maximum sampled value register of the second comparator Input terminal connection, the output end of maximum sampled value register connect with another input terminal of the second comparator.
In the present embodiment, maximum value judging unit receives multiple sampled value C1……Cn……CN, export maximum sampled value CMAXPrinciple it is as follows: an input terminal of the second comparator receives first sampled value C1, and by the first sampled value C1It is stored in Maximum sampled value register, by maximum sampled value register by the first sampled value C1Feed back another input to the second comparator End;Second comparator receives second sampled value C again2, and by first sampled value C1With second sampled value C2It is compared, And by first sampled value C1With second sampled value C2In biggish sampled value be stored in maximum sampled value register, by maximum Biggish sampled value is fed back to another input terminal of the second comparator by sampling value register;Second comparator receives third again A sampled value C3, and by third sampled value C3It is compared with value of feedback, biggish sampled value is stored in after comparing again Biggish sampled value is fed back to another input of the second comparator by maximum sampled value register by maximum sampled value register End, and;And so on, maximum sampled value register finally exports multiple sampled value C1……Cn……CNIn maximum sampled value CMAX
As shown in figure 4, minimum value judging unit includes third comparator and minimum sampled value register;Third comparator An input terminal receive multiple sampled value C1……Cn……CN, the output end and minimum sampled value register of third comparator Input terminal connection, the output end of minimum sampled value register connect with another input terminal of the second comparator.
In the present embodiment, minimum value judging unit receives multiple sampled value C1……Cn……CN, export minimum sampled value CMINPrinciple it is as follows: an input terminal of third comparator receives first sampled value C1, and by the first sampled value C1It is stored in Minimum sampled value register, by minimum sampled value register by the first sampled value C1Feed back another input of third comparator End;Third comparator receives second sampled value C again2, and by first sampled value C1With second sampled value C2It is compared, And by first sampled value C1With second sampled value C2In lesser sampled value be stored in minimum sampled value register, by minimum Lesser sampled value is fed back to another input terminal of third comparator by sampling value register;Third comparator receives third again A sampled value C3, and by third sampled value C3It is compared with value of feedback, lesser sampled value is stored in after comparing again Lesser sampled value is fed back to another input of third comparator by minimum sampled value register by minimum sampled value register Hold minimum sampled value register;And so on, minimum sampled value register finally exports multiple sampled value C1……Cn……CNIn Minimum sampled value CMIN
In the present embodiment, when first switch is closed, average filter unit receives multiple sampled value C1……Cn…… CN, and to removing maximum sampled value CMAXWith minimum sampled value CMINMultiple sampled value C afterwards1……Cn……CNIt is averaged, Export average sample value CAVE, i.e. average sample value CAVE=(C1+…… Cn……+CN-CMAX-CMIN)/N;When first switch is disconnected When opening, average filter unit stops receiving the sampled value of timing sampling unit output, and stops exporting average sample value CAVETo number Word filter unit.
As shown in Figure 1, digital filtering unit receives the average sample value C of average filter unit outputAVE, export filtering and adopt Sample value CF;Digital filtering unit is to average sample value CAVECarry out digital filtering.In the present embodiment, digital filtering unit is used for It is repeatedly filtered, CF, i+1=CAVE/K+(K-1)*CF, i/ K, K=2q, q and i are positive integer;CF, iFor digital filtering unit I-th filtering as a result, CF, i+1For the result of digital filtering unit i+1 time filtering;CF is digital filtering unit last time The result of filtering.In the present embodiment, q=1,2,3,4,5,6,7,8.
As shown in figure 5, digital filtering unit includes that the first multiplier, the second multiplier, first adder and filtering are adopted Sample value register;Two input terminals of the first multiplier receive average sample value C respectivelyAVEAnd the first multiplication factor 1/K;The The output end of the output end of one multiplier and the second multiplier is connect with two input terminals of first adder respectively;First adds The output end of musical instruments used in a Buddhist or Taoist mass is connect with the input terminal of filtering sampling value register;The output end of filtering sampling value register and the second multiplication One input terminal of device connects, by the result C of last time filteringF, iThe second multiplier is fed back to, another of the second multiplier is defeated Enter end and receive the second multiplication factor (K-1)/K, first adder exports the result C filtered next timeF, i+1, it is stored in filtering and adopts Sample value register;The output end of filtering sampling value register finally exports filtering sampling value CF
As shown in Figure 1, noise threshold generation unit receives the baseline value C of baseline value updating unit outputB, in output noise Threshold value CNUAnd noise lower threshold value CNDTo noise detection unit;Noise detection unit receives the noise of noise threshold unit output Upper threshold value CNU, noise lower threshold value CNDAnd the average sample value C of average filter unit outputAVE, by average sample value CAVEWith make an uproar Sound upper threshold value CNUAnd noise lower threshold value CNDIt is compared, and second control signal is exported to second switch according to comparison result And the 5th switch, it controls second switch and the 5th closes the switch or disconnect.
As shown in fig. 6, in the present embodiment, noise threshold generation unit include the second subtracter, second adder and Third multiplier;Two input terminals of third multiplier receive baseline value C respectivelyBAnd coefficient a1, output end and the second subtracter An input terminal and second adder an input terminal connection, export a1*CBTo the second subtracter and the second addition Device;Another input terminal of second subtracter and another input terminal of second adder receive baseline value CB;Second subtracts The output end of musical instruments used in a Buddhist or Taoist mass exports CB-a1*CB, i.e. output noise lower threshold value CND;The output end of second adder exports CNU=CB+a1* CB, i.e. output noise upper threshold value CNU
As shown in fig. 7, noise detection unit includes the 4th comparator, the 5th comparator and noise decision unit;4th Two input terminals of comparator receive the noise lower threshold value C of noise threshold generation unit output respectivelyNDAnd average filter unit The average sample value C of outputAVE, output end connect with an input terminal of noise decision unit;Two inputs of the 5th comparator End receives the noise upper threshold value C of noise threshold generation unit output respectivelyNUAnd the average sample value of average filter unit output CAVE, output end connect with another input terminal of noise decision unit;Output end output the second control letter of noise decision unit Number.
In the present embodiment, noise decision unit is third and door;When average sample value is more than or equal to noise lower threshold value, 4th comparator exports high level;When average sample is less than noise lower threshold value, the 4th comparator exports low level;When averagely adopting When sample value is less than or equal to noise upper threshold value, the 5th comparator exports high level;When average sample value is greater than noise upper threshold value, the Five comparators export low level;When the 4th comparator and the 5th comparator export high level, third and door export high level, It control second switch and the 5th closes the switch;When the 4th comparator or the 5th comparator output low level, third is defeated with door Low level out, controls second switch and the 5th switch disconnects.
In other embodiments, noise decision unit is third or door;When average sample value is more than or equal to noise lower threshold value When, the 4th comparator exports low level;When average sample is less than noise lower threshold value, the 4th comparator exports high level;When flat When equal sampled value is less than or equal to noise upper threshold value, the 5th comparator exports low level;When average sample value is greater than noise upper threshold value When, the 5th comparator exports high level;When the 4th comparator and the 5th comparator export low level, third or door output are low Level controls second switch and the 5th closure;When the 4th comparator or the 5th comparator output high level when, third or Door output high level, controls second switch and the 5th switch disconnects.
In this embodiment, when second switch is closed, the filtering that key detection unit receives the output of digital filtering unit is adopted Sample value CF, and pass through detection filter sampled value CFNumerical value determine capacitance type touch key whether be in touch condition;It opens when second When shutdown is opened, key detection unit stops receiving the filtering sampling value C of digital filtering unit outputF;When the 5th closes the switch, Controlling of sampling unit receives the filtering sampling value C of digital filtering unit outputF;When second switch disconnects, controlling of sampling unit Stop receiving the filtering sampling value C of digital filtering unit outputF
In the present embodiment, noise lower threshold value CND=CB-a1*CB, noise upper threshold value CNU=CB+a1*CB; a1=0.001- 0.1。
In the present embodiment, only when noise detection unit detects average sample value CAVEIt is not noise, i.e. average sample Value CAVEMore than or equal to noise lower threshold value CNDAnd it is less than or equal to noise upper threshold value CNUWhen, second switch is just closed, and key detection is single Member can just detect average sample value CAVE, the interference that avoids noise from detecting key.
As shown in Figure 1, key threshold value generation unit receives the baseline value C of baseline value updating unit outputB, output key threshold Value CTKGive key detection unit;Key detection unit receives the key threshold value C of key threshold value generation unit outputTKAnd second Switch the filtering sampling value C of outputF, by filtering sampling value CFWith key threshold value CTKIt is compared, and is exported according to comparison result The operation of key operation signal control button operating unit, output third control signal control third are closed the switch or are disconnected.
As shown in figure 8, key threshold value generation unit includes third adder and the 5th multiplier;The two of 5th multiplier A input terminal receives baseline value C respectivelyBAnd coefficient b, the output end of the 5th multiplier and an input terminal of third adder Connection exports b*CBGive third adder;Another input terminal of third adder receives baseline value CB, output end output CB+b* CB, i.e. output key threshold value CTK
As shown in figure 9, key detection unit includes the 6th comparator, the 7th comparator and the first counter;6th ratio Compared with the key threshold value C that two input terminals of device receive the output of key threshold value generation unit respectivelyFKAnd digital filtering unit output Filtering sampling value CF, the 6th comparator is by filtering sampling value CFWith key threshold value CTKIt is compared, and defeated according to comparison result Third control signal gives third switch out, and control third is closed the switch or disconnected, and export the first trigger signal to the first counter, Control the counting of the first counter;Two input terminals of the 7th comparator receive key confirmation times N respectivelyTKAnd first counter The count value of output, the count value and key that the 7th comparator exports the first counter confirm times NTKIt is compared, and root According to comparison result output key operation signal.
In the present embodiment, as filtering sampling value CFGreater than key threshold value CTK, and filtering sampling value CFGreater than key threshold value CTKNumber reach key confirmation times NTKWhen, the key operation signal of key detection unit output is high level, key detection The third control signal of unit output is high level;As filtering sampling value CFGreater than key threshold value CTK, and filtering sampling value CFGreatly In key threshold value CTKNumber be not up to key confirmation times NTKWhen, the key operation signal of key detection unit output is low The third control signal of level, the output of key detection unit is high level;As filtering sampling value CFLess than key threshold value CTKWhen, it presses The key operation signal of key detection unit output is low level, and the third control signal of key detection unit output is low level. In the present embodiment, as filtering sampling value CFGreater than key threshold value CTK, the 6th comparator output high level the first counter of triggering It counts, and the count value of the first counter output is greater than key and confirms times NTK, i.e. filtering sampling value CFGreater than key threshold value CTK Number reach key confirmation times NTKWhen, the key operation signal of the 7th comparator output is high level, key detection unit Determine that corresponding capacitance type touch key is in touch condition;As filtering sampling value CFLess than key threshold value CTK, the 6th comparator Export low level, the first counter without counting, or, filtering sampling value CFGreater than key threshold value CTK, the high electricity of the 6th comparator output The first counter of flat triggering counts, but filtering sampling value CFGreater than key threshold value CTKNumber be not up to key confirmation times NTK When, the key operation signal of the 7th comparator output is low level, and key detection unit determines corresponding capacitance type touch key In not by touch condition.
In the present embodiment, when the key operation signal of push-button unit output is high level, key operation unit is executed The operation of corresponding capacitance type touch key;When the key operation signal of push-button unit output is low level, key operation unit The operation of corresponding capacitance type touch key is not carried out;When the 6th comparator exports high level, i.e. third control signal is high electricity Usually, third switch disconnects;When the 6th comparator exports low level, i.e., when third control signal is low level, third switch is closed It closes.
In other embodiments, as filtering sampling value CFGreater than key threshold value CTK, the output low level triggering of the 6th comparator First counter counts, and the count value of the first counter output is greater than key and confirms times NTK, i.e. filtering sampling value CFIt is greater than Key threshold value CTKNumber reach key confirmation times NTKWhen, the key operation signal of the 7th comparator output is low level, is pressed Key detection unit determines that corresponding capacitance type touch key is in touch condition;As filtering sampling value CFLess than key threshold value CTK, 6th comparator export high level, the first counter without counting, or, filtering sampling value CFGreater than key threshold value CTK, the 6th compares The low level that device exports triggers the first counter and counts, but filtering sampling value CFGreater than key threshold value CTKNumber be not up to key Confirm times NTKWhen, the key operation signal of the 7th comparator output is high level, and key detection unit determines corresponding capacitor Formula touch key-press is in not by touch condition.
In other embodiments, when the key operation signal of push-button unit output is low level, key operation unit is held The operation of the corresponding capacitance type touch key of row;When the key operation signal of push-button unit output is high level, button operation list The operation of corresponding capacitance type touch key is not carried out in member;When the 6th comparator exports high level, i.e. third control signal is height When level, third switch is disconnected;When the 6th comparator exports low level, i.e., when third control signal is low level, third switch Closure.
In the present embodiment, when third closes the switch, baseline value detection unit receives the filter of digital filtering unit output Wave sampled value CF;When third, which switchs, to be disconnected, baseline value detection unit stops receiving the filtering sampling of digital filtering unit output Value CF
In the present embodiment, key threshold value CTK=CB+b*CB;B=0.001-0.1, and b < a2;Key confirms number CTK Repeatedly to touch the empirical value determined after capacitance type touch key;When statistics repeatedly touches capacitance type touch key, filtering sampling Value CFGreater than key threshold value CTKNumber minimum as key confirm number CTK;Key confirms times NTKNumberical range It is 1 to 8.
As shown in Figure 1, baseline value boundary generation unit receives the baseline value C of baseline value updating unit outputB, export base Line value boundary CBBGive baseline value detection unit;Baseline value detection unit receives the baseline value side of baseline value boundary generation unit output Boundary CBBAnd the filtering sampling value C of third switch outputF, by filtering sampling value CFWith baseline value boundary CBBIt is compared, and root The first baseline value more new signal, which is exported, according to comparison result updates decision unit to baseline value.
As shown in Figure 10, baseline value boundary generation unit includes the 4th adder and the 6th multiplier;6th multiplier Two input terminals receive baseline value C respectivelyBAnd coefficient c, one of the output end of the 6th multiplier and the 4th adder are defeated Enter end connection, exports c*CBTo the 4th adder;Another input terminal of 4th adder receives baseline value CB, output end output CB+c*CB, i.e. output baseline value boundary CBB
As shown in figure 11, baseline value detection unit includes the 8th comparator, the 9th comparator, the tenth comparator, the second meter Number device and the first baseline value update judging unit;Two input terminals of the 8th comparator receive the filter of third switch output respectively Wave sampled value CFAnd the baseline value boundary C of baseline value boundary generation unit outputBB, the 8th comparator is by filtering sampling value CFWith Baseline value boundary CBBIt is compared, and the second trigger signal is exported to the second counter according to comparison result, triggering second counts Device counts;Two input terminals of the tenth comparator receive baseline value confirmation times N respectivelyBAnd second counter output counting Value, output end are connect with the input terminal that the first baseline value updates judging unit;Tenth comparator exports the second counter Count value and baseline value confirm times NBIt is compared, and high level or low level is exported to the first baseline according to comparison result Value updates judging unit;Two input terminals of the 9th comparator receive the filtering sampling value C of third switch output respectivelyFAnd base The baseline value boundary C of line value boundary generation unit outputBB, another input of output end and the first baseline value update judging unit End connection;9th comparator is by filtering sampling value CFWith baseline value boundary CBBIt is compared, and high electricity is exported according to comparison result Flat or low level updates judging unit to the first baseline value;The output end that first baseline value updates judging unit exports the first baseline It is worth more new signal.
In the present embodiment, it is second or door that the first baseline value, which updates judging unit,;As filtering sampling value CFGreater than baseline It is worth boundary CBBWhen, the 9th comparator exports low level, and the 8th comparator exports high level and triggers the counting of the second counter;When second The count value of counter output is greater than baseline value and confirms times NB, i.e. filtering sampling value CFGreater than baseline value boundary CBBNumber reach Times N is confirmed to baseline valueBWhen, the tenth comparator exports high level, and the first baseline value more new signal that second or door export is High level confirms times N when the count value of the second counter output is less than baseline valueB, i.e. filtering sampling value CFGreater than baseline value side Boundary CBBNumber be not up to baseline value confirmation times NBWhen, the tenth comparator exports low level, the first base that second or door export Line value more new signal is low level;As filtering sampling value CFLess than or equal to baseline value boundary CBBWhen, the high electricity of the 9th comparator output Flat, the 8th comparator exports low level, does not trigger the second counter and is counted, and the tenth comparator exports low level, second or The first baseline value more new signal of door output is high level.In the present embodiment, baseline value boundary CBB=CB+c*CB;C= 0.001-0.1, and c < b;Baseline value confirms times NBNumberical range be 1 to 32.
As described in Figure 1, timing unit receives the timing controling signal of timing sampling unit output, and the second baseline value of output is more New signal updates decision unit to baseline value.As shown in figure 12, timing unit includes timer, third counter, timing judgement Condition generation unit and the 11st comparator;The output end of timer is connect with the input terminal of third counter, and third counts Device counts timer, and exports count value to an input terminal of the 11st comparator;The reception of timing judgment condition is adopted Sample unit exports timing controling signal, exports timing judgment condition to another input terminal of the 11st comparator;Timing controlled Signal is used to control the numerical value of timing judgment condition;11st comparator exports the second baseline value more new signal.
In the present embodiment, when item is adjudicated in the timing that the count value of third counter output is less than the output of timing judgment condition When part, i.e. baseline value updating unit do not arrive the time that timing updates also, the second baseline value of the 11st comparator output updates letter Number be low level;When the count value of third counter output is equal to the timing judgment condition of timing judgment condition output, i.e. timing When unit reaches timing, the second baseline value more new signal of the 11st comparator output is high level.
In the present embodiment, it is first and door that baseline value, which updates decision unit,;When the first of the output of baseline value detection unit When datum renewal signal and the second datum renewal signal of timing unit output are high level, first exports high level with door; When the first datum renewal signal or the second datum renewal signal are low level, first exports low level with door;When first and door When exporting high level, first controls signal with the 4th of door output as high level, and the 4th closes the switch, and baseline value updating unit connects Receive the filtering sampling value C of digital filtering unit outputFBaseline value update is carried out, the baseline value of output becomes filtering sampling value CF; When first with door output low level, the first the 4th control signal exported with door is low level, and the 4th switch disconnects, baseline value Updating unit is updated without baseline value, and the baseline value of output is constant.
In the present embodiment, baseline value updating unit updates baseline value and needs to meet following conditions: (1) noise measuring list Member detects average sample value CAVEIt is not noise;(2) the filtering sampling value C that baseline value detection unit detectsFReach update item Part, i.e. filtering sampling value CFLess than or equal to baseline value boundary CBB, or, filtering sampling value CFTimes N is confirmed greater than baseline valueBReach Baseline value confirms times NB, and filtering sampling value CFLess than key threshold value CTK;(3) timing unit reaches timing;Reduction is made an uproar The influence that sound detects baseline value;To less than or equal to baseline value boundary CBBFiltering sampling value CF, without multiple confirmation, directly more New baseline value improves the speed of baseline value update;To greater than baseline value boundary CBBFiltering sampling value CF, repeatedly confirmed After could update baseline value, avoid of short duration influence of the mutation to capacitance type touch key capacitance of environment, lead to baseline value mistake It updates.
In the present embodiment, the baseline value of baseline value updating unit output for the first time is capacitance type touch key not by environment Capacitance when interfering, and not touched, the capacitance are obtained by timing sampling unit scan.
As shown in Figure 1, controlling of sampling unit receives the filtering sampling value C of the 5th switch outputFAnd baseline value updates list The baseline value C of member outputB, export sampling control signal and give timing sampling unit.As shown in figure 13, controlling of sampling unit includes 12nd comparator;Two input terminals of the 12nd comparator accept filter sampled value C respectivelyFAnd baseline value CB, the 12nd ratio Compared with device by filtering sampling value CFAnd baseline value CBIt is compared, and sampling control signal is exported according to comparison result.
In the present embodiment, as filtering sampling value CFMore than or equal to baseline value CBWhen, the sampling control of the 12nd comparator output Signal processed is low level, and timing sampling unit maintains original sampling rate, the timing controling signal of timing sampling unit output The numerical value for controlling the timing judgment condition of timing unit output is constant, i.e. the renewal speed of baseline value updating unit is constant;Work as filter Wave sampled value CFLess than baseline value CBWhen, the sampling control signal of the 12nd comparator output is high level, and timing sampling unit mentions High sampling rate, the timing controling signal control timing unit of timing sampling unit output reduce the numerical value of timing judgment condition, The timing for shortening timing unit accelerates the renewal speed of baseline value updating unit.
As shown in figure 14, continuous several times touch capacitance type touch key will lead to capacitance type touch key numerical value it is continuous on Decline after rising;When the sampling rate of timing sampling unit is lower, the sampled value of timing sampling unit output is biggish value, And then the filtering sampling value C for causing digital filtering unit to exportFGreater than baseline value boundary CBBNumber reach baseline value confirmation time Number NB, baseline value updating unit, which updates baseline value, will lead to baseline value raising extremely.
In the present embodiment, controlling of sampling unit detects filtering sampling value CFLess than baseline value CBWhen, control timing sampling Unit accelerates sampling rate (as shown in figure 15), and the sampled value of timing sampling unit output can become smaller, and then digital filtering unit The filtering sampling value C of outputFAlso it can become smaller, prevent from increasing extremely due to the low caused baseline value of sampling rate;On the other hand, fixed When sampling unit while accelerate sampling rate, control timing unit reduces the numerical value of timing judgment condition, i.e. control timing is single Member shortens timing, accelerates the speed that declines after baseline value increases, further decrease continuous several times touch capacitance touch by The influence that key detects baseline value.
As shown in figure 16, a kind of capacitance type touch key anti interference detection method the following steps are included:
(1) start;
(2) each module initialization;
(3) noise threshold, key threshold value and baseline value boundary are set;
(4) timing sampling unit scan touch key-press obtains the capacitance of touch key-press;
(5) timing sampling unit exports multiple sampled values and gives sampled value stabilization judging unit;
(6) the stable judging unit of sampled value determines that the difference of maximum sampled value and minimum sampled value in multiple sampled values is It is no to be greater than preset difference value, if so, (7) are entered step, if it is not, entering step (8);
(7) average filter unit does not receive multiple sampled values of timing sampling unit output, return step (4);
(8) average filter unit receives multiple sampled values of timing sampling unit output;
(9) average filter unit exports average sample value to digital filtering unit, noise detection unit;
(10) whether noise detection unit detection average sample value is greater than noise threshold, if so, (11) are entered step, if It is no, enter step (12) and step (26);
(11) key detection unit and controlling of sampling unit do not receive the filtering sampling value of digital filtering unit output, return It returns step (4);
(12) key detection unit receives the filtering sampling value of digital filtering unit output;
(13) whether key detection unit detection filter sampled value is greater than key threshold value, if so, entering step (14) and walking Suddenly (17), if it is not, entering step (16) and step (18);
(14) whether the number that key detection unit detection filter sampled value is greater than key threshold value reaches key confirmation number, If so, (15) are entered step, if it is not, entering step (16);
(15) key operation unit executes button operation, return step (4);
(16) key operation unit does not execute button operation, return step (4);
(17) baseline value detection unit does not receive the filtering sampling value of digital filtering unit output, enters step (25);
(18) baseline value detection unit receives the filtering sampling value of digital filtering unit output;
(19) whether baseline value detection unit detection filter sampled value is greater than baseline value boundary, if so, (20) are entered step, If it is not, entering step (21);
(20) whether the number that baseline value detection unit detection filter sampled value is greater than baseline value boundary it is true reach baseline value Number is recognized, if so, (21) are entered step, if it is not, entering step (24);
(21) whether timing unit reaches timing, if so, (22) are entered step, if it is not, entering step (24);
(22) baseline value updating unit receives the filtering sampling value of digital filtering unit output;
(23) baseline value updating unit updates baseline value, return step (4);
(24) baseline value updating unit does not receive the filtering sampling value of digital filtering unit output;
(25) baseline value updating unit does not update a reference value, return step (4);
(26) whether controlling of sampling unit detection filter sampled value is less than baseline value, if so, entering step (27) and step (28), if it is not, return step (4);
(27) timing sampling unit improves sampling rate, return step (4);
(28) timing unit shortens timing, enters step (21).
In the present embodiment, step (3) includes the following steps;
(31) baseline value updating unit exports baseline value to noise threshold generation unit, key threshold value generation unit, baseline It is worth boundary generation unit and controlling of sampling unit;
(32) noise threshold generation unit output noise threshold value is pressed to noise detection unit, the output of key threshold value generation unit Key threshold value gives key detection unit, and baseline value boundary generation unit exports baseline value boundary and gives baseline value detection unit.
Embodiment two
The difference between this embodiment and the first embodiment lies in: it is second and door that the first baseline value, which updates decision unit,;Baseline value Updating judging unit is first or door;When the filtering sampling value of digital filtering unit output is greater than baseline value boundary, and the second meter When the count value of number device output reaches baseline value confirmation number, the tenth comparator exports low level;When digital filtering unit exports Filtering sampling value be less than or equal to baseline value boundary when, the 9th comparator export low level;Second with door output low level when, the Four close the switch;When baseline value detection unit detects that the filtering sampling value of the third switch output is less than or equal to baseline value side When the number that boundary or filtering sampling value are greater than baseline value boundary is more than baseline value confirmation number, baseline value detection unit exports low electricity It is flat;When timing unit judgement reaches timing, timing unit exports low level;First or door output low level when, it is described 4th closes the switch.
Embodiment three
The difference between this embodiment and the first embodiment lies in: noise threshold generation unit includes the second subtracter, the second addition Device, third multiplier and the 4th multiplier;Two input terminals of third multiplier receive baseline value C respectivelyBAnd coefficient a1, Output end is connect with an input terminal of the second subtracter, exports a1*CBTo the second subtracter;Two inputs of the 4th multiplier End receives baseline value C respectivelyBAnd coefficient a2, the input terminal connection of output end and second adder, output a2*CBTo Two adders;Another input terminal of second subtracter and another input terminal of second adder receive baseline value CB; The output end of second subtracter exports CB-a1*CB, i.e. output noise lower threshold value CND;The output end of second adder exports CNU=CB +a2*CB, i.e. output noise upper threshold value CNU
In the present embodiment, a1=0.001-0.1, a2=0.001-0.1.
The above is only the preferred embodiment of the utility model, and the protection scope of the utility model is not limited merely to Embodiment is stated, technical solution belonging to the idea of the present invention belongs to the protection scope of the utility model.It should be pointed out that For those skilled in the art, several improvement without departing from the principle of the utility model and profit Decorations, these improvements and modifications also should be regarded as the protection scope of the utility model.

Claims (12)

1. a kind of anti-interference detection device of capacitance type touch key, it is characterised in that: single including timing sampling unit, key detection Member, baseline value detection unit, baseline value updating unit, third switch and the 4th switch;The sampled value of timing sampling unit is defeated Input terminal, the input terminal of the 4th switch and the input terminal of the key detection unit that outlet is switched with the third are connect; The output end of the third switch is connect with the input terminal of the baseline value detection unit;The output end of the key detection unit It is connect with the control signal input of third switch;The output end of the baseline value detection unit and the 4th switch Control signal input connection;The output end of 4th switch is connect with the input terminal of the baseline value updating unit;
The timing sampling unit scan capacitance type touch key exports sampled value;The key detection unit is for detecting institute Whether the sampled value for stating the output of timing sampling unit, which is greater than key threshold value and the sampled value greater than the number of key threshold value, is It is no to reach key confirmation number, and it is greater than key threshold value in the sampled value, and the sampled value is greater than the number of key threshold value When reaching key confirmation number, controls the third switch and disconnect;The baseline value detection unit is opened for detecting the third Whether the sampled value for closing output is greater than baseline value boundary, and is less than or equal to baseline value boundary in the sampled value, or, the sampling When the number that value is greater than baseline value boundary is more than baseline value confirmation number, control the described 4th is closed the switch;The baseline value is more New unit receives the sampled value of the 4th switch output, updates baseline value.
2. the anti-interference detection device of capacitance type touch key according to claim 1, it is characterised in that: the baseline value inspection Surveying unit includes that the 8th comparator, the 9th comparator, the tenth comparator, the second counter and the first baseline value update judgement list Member;Two input terminals of the 8th comparator receive the sampled value on baseline value boundary and third switch output respectively; The output end of 8th comparator is connect with the trigger signal input terminal of second counter;Second counter it is defeated Outlet is connect with an input terminal of the tenth comparator, and it is true that another input terminal of the tenth comparator receives baseline value Recognize number;Two input terminals of the 9th comparator receive the sampling on baseline value boundary and third switch output respectively Value;The output end of 9th comparator and the output end of the tenth comparator are sentenced with first baseline value update respectively Certainly two input terminals connection of unit;
8th comparator is greater than in the sampled value described for determining whether the sampled value is more than baseline value boundary When baseline value boundary, triggers second counter and count;Tenth comparator is for determining the second counter output Count value whether reach baseline value confirmation number;9th comparator is for determining whether the sampled value is more than baseline value Boundary;When the tenth comparator determines that the count value of the second counter output reaches baseline value confirmation number, or, described When 9th comparator determines that the sampled value is less than the baseline value boundary, first baseline value updates decision unit and controls institute The 4th is stated to close the switch.
3. the anti-interference detection device of capacitance type touch key according to claim 2, it is characterised in that: first baseline It is second or door that value, which updates decision unit,;When the sampled value is greater than the baseline value boundary, and the count value reaches baseline Value confirmation number, the tenth comparator export high level;When the sampled value is less than or equal to baseline value boundary, the 9th ratio High level is exported compared with device;Described second or door output high level when, the described 4th closes the switch;
Or, it is second and door that first baseline value, which updates decision unit,;When the sampled value be greater than the baseline value boundary, and When the count value reaches baseline value confirmation number, the tenth comparator exports low level;When the sampled value is less than or equal to When baseline value boundary, the 9th comparator exports low level;Described second with door output low level when, it is described 4th switch close It closes.
4. the anti-interference detection device of capacitance type touch key according to claim 1 to 3, it is characterised in that: institute Stating key detection unit includes the 6th comparator;Two input terminals of the 6th comparator receive key threshold value respectively and adopt The sampled value is compared by sample value, the 6th comparator with the key threshold value;When the sampled value is greater than described press When key threshold value, the 6th comparator controls the third switch and disconnects.
5. the anti-interference detection device of capacitance type touch key according to claim 4, it is characterised in that: the key detection Unit further includes the 7th comparator and the first counter;The trigger signal input terminal of first counter and the described 6th compares Output end compared with device connects;Two input terminals of the 7th comparator receive key confirmation number and first meter respectively The count value of number device output, output end output key control signal;6th comparator is greater than described press in the sampled value When key threshold value, triggers first counter and count;7th comparator is by determining based on the first counter output Whether numerical value reaches key confirmation number, and when the count value reaches the key confirmation number, output key control letter Number, control executes button operation.
6. the anti-interference detection device of capacitance type touch key according to claim 5, it is characterised in that: when the sampled value When greater than the key threshold value, the 6th comparator exports high level/low level, triggers first counter and counts;When When the count value of the first counter output reaches key confirmation number, key control signal is pressed in the 7th comparator output For high level/low level, control executes button operation.
7. the anti-interference detection device of capacitance type touch key according to claim 1 to 3, it is characterised in that: also Judging unit is updated including timing unit and baseline value;The baseline value updates judging unit and is connected into the baseline value detection list It is first it is described 4th switch between;Two input terminals that the baseline value updates judging unit detect with the baseline value single respectively The control signal input of the output end connection of the output end and the timing unit of member, output end and the 4th switch connects It connects;The timing unit is for determining whether to reach timing;The baseline value updates judging unit for controlling described the Four close the switch or disconnect;
When the baseline value detection unit detects that the sampled value of the third switch output is less than or equal to baseline value boundary or institute It is more than baseline value confirmation number that sampled value, which is stated, greater than the number on baseline value boundary, and, when the timing unit judgement reaches timing Between when, the baseline value updates judging unit control the described 4th and closes the switch.
8. the anti-interference detection device of capacitance type touch key according to claim 7, it is characterised in that: the baseline value is more New judging unit is first and door, when the baseline value detection unit detects that the sampled value that the third switch exports is less than When the number that baseline value boundary or the sampled value are greater than baseline value boundary is more than baseline value confirmation number, the baseline value inspection It surveys unit and exports high level;When timing unit judgement reaches timing, the timing unit exports high level;It is described First with door output high level when, the described 4th closes the switch;
Or, it is first or door that the baseline value, which updates judging unit, when the baseline value detection unit detects that the third is opened It is more than that baseline value is true that the sampled value for closing output, which is less than or equal to baseline value boundary or the sampled value greater than the number on baseline value boundary, When recognizing number, the baseline value detection unit exports low level;It is described fixed when timing unit judgement reaches timing Shi Danyuan exports low level;Described first or door output low level when, the described 4th closes the switch.
9. the anti-interference detection device of capacitance type touch key according to claim 7, it is characterised in that: further include sampling control Unit processed;The input terminal of the controlling of sampling unit receives sampled value, and output end exports sampling control signal and adopts to the timing The control signal input of sample unit connects;The control signal output of the timing sampling unit and the control of the timing unit Signal input part connection processed;The controlling of sampling unit is adopted for determining whether the sampled value is less than baseline value described When sample value is less than baseline value, controls the timing sampling unit and accelerate sampling rate;When the timing sampling unit is accelerated to sample When rate, the timing sampling unit controls the timing unit and shortens timing.
10. the anti-interference detection device of capacitance type touch key according to claim 9, it is characterised in that: the timing list Member includes timer, third counter, timing judgment condition generation unit and the 11st comparator;The output of the timer End is connect with the input terminal of third counter, and third counter counts timer, and exports count value to the 11st ratio Compared with an input terminal of device;The input terminal of the timing judgment condition generation unit receives determining for the timing sampling unit output When control signal, output end exports timing judgment condition to another input terminal of the 11st comparator;Described 11st Comparator is for determining whether the timer reaches timing judgment condition;The timing sampling unit is by controlling the timing Judgment condition generation unit reduces the numerical value of timing judgment condition, shortens the timing of the timing unit.
11. the anti-interference detection device of capacitance type touch key according to claim 1 to 3, it is characterised in that: It further include that sampled value stablizes judging unit, average filter unit, digital filtering unit, noise detection unit, timing unit, baseline Value updates judging unit, controlling of sampling unit, first switch, second switch and the 5th switch;The timing sampling unit Sampled value output end is connect with the input terminal of the input terminal of the stable judging unit of the sampled value and first switch;The sampling The output end for being worth stable judging unit is connect with the control signal input of the first switch;The output end of the first switch It is connect with the input terminal of the average filter unit;The output end of the average filter unit is defeated with the digital filtering unit Enter the input terminal connection of end and the noise detection unit;The output end and the second switch of the digital filtering unit, The input terminal connection of third switch, the 4th switch and the 5th switch;The output end of the second switch and the key detect The input terminal of unit connects;The output end of 5th switch is connect with the input terminal of the controlling of sampling unit;The noise The output end of detection unit is connect with the control signal input that the second switch and the 5th switch;The baseline value updates Two input terminals of judging unit output end with the output end of the baseline value detection unit and the timing unit respectively Connection, output end are connect with the control signal input of the 4th switch;The timing unit is fixed for determining whether to reach When the time;The baseline value updates judging unit and closes the switch or disconnect for controlling the described 4th;The timing sampling unit Control signal output connect with the control signal input of the timing unit;
The sampled value stablizes the maximum sampled value in multiple sampled values that judging unit is used to determine that timing sampling unit to export Whether it is greater than preset difference value with the difference of minimum sampled value, and when the difference is greater than the preset difference value, controls described the One switch disconnects;Multiple sampled values that the average filter unit exports the timing sampling unit are averaged, and output is flat Equal sampled value gives the digital filtering unit and noise detection unit;The digital filtering unit is to the average filter unit The average sample value of output carries out digital filtering, exports filtering sampling value to the second switch;The noise detection unit is used Whether it is more than noise threshold in detecting the average sample value that average filter unit exports, and is more than described in the average sample value When noise threshold, controls the second switch and disconnect;The key detection unit is also used to detect the second switch output Whether filtering sampling value is greater than key threshold value, and is more than key confirmation time in the number that the filtering sampling value is greater than key threshold value When number, control executes button operation;The controlling of sampling unit is being filtered for determining whether filtering sampling value is less than baseline value When wave sampled value is less than baseline value, control timing sampling unit accelerates sampling rate;When the timing sampling unit is accelerated to sample When rate, timing sampling unit controls timing unit and shortens timing.
12. the anti-interference detection device of capacitance type touch key according to claim 11, it is characterised in that: the number filter Wave unit includes the first multiplier, the second multiplier, first adder and filtering sampling value register;First multiplier Two input terminals receive average sample value and the first multiplication factor 1/K, K=2 respectivelyq, q is positive integer;Described first multiplies The output end of the output end of musical instruments used in a Buddhist or Taoist mass and second multiplier is connect with two input terminals of the first adder respectively;Institute The output end for stating first adder is connect with the input terminal of the filtering sampling value register;One of second multiplier is defeated Enter end and receive the second multiplication factor (K-1)/K, another input terminal is connect with the output end of the filtering sampling value register, institute It states filtering sampling value register and the result of last time filtering is fed back into second multiplier, by repeatedly filtering output filtering Sampled value.
CN201822009468.3U 2018-11-30 2018-11-30 A kind of anti-interference detection device of capacitance type touch key Active CN209419594U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201822009468.3U CN209419594U (en) 2018-11-30 2018-11-30 A kind of anti-interference detection device of capacitance type touch key

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201822009468.3U CN209419594U (en) 2018-11-30 2018-11-30 A kind of anti-interference detection device of capacitance type touch key

Publications (1)

Publication Number Publication Date
CN209419594U true CN209419594U (en) 2019-09-20

Family

ID=67936214

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201822009468.3U Active CN209419594U (en) 2018-11-30 2018-11-30 A kind of anti-interference detection device of capacitance type touch key

Country Status (1)

Country Link
CN (1) CN209419594U (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110971225A (en) * 2019-12-17 2020-04-07 珠海格力电器股份有限公司 Touch key anti-interference method and circuit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110971225A (en) * 2019-12-17 2020-04-07 珠海格力电器股份有限公司 Touch key anti-interference method and circuit

Similar Documents

Publication Publication Date Title
CN109428579A (en) A kind of anti-interference detection device of capacitance type touch key and detection method
CN104104375B (en) Strengthen the method and circuit of the anti-mobile phone interference of capacitance type touch key
CN101968530B (en) Key detection method and device
CN209419594U (en) A kind of anti-interference detection device of capacitance type touch key
CN108696271B (en) Sliding gesture recognition method and system based on capacitive touch keys
CN101685135A (en) Test device and test method for testing circuit board
US8866794B2 (en) Statistical analyzing method and statistical quality indicator for reliability improvement of a capacitive touch device
CN209419593U (en) A kind of anti-interference detection device of capacitance type touch key
CN100538615C (en) A kind of method that prevents the capacitance key false triggering
WO2018148902A1 (en) Button detection method and device
CN201523371U (en) Human body touch key control circuit
CN109428578A (en) A kind of anti-interference detection device of capacitance type touch key and detection method
CN103733519A (en) Evaluation method and evaluation device for a capacitive contact sensor
CN112198385A (en) Non-invasive load monitoring method
CN108512542A (en) Touch key-press signal processing method and device, computer readable storage medium
CN110739953A (en) Scene type signal self-adaptive processing method of capacitive touch keys and electronic device
CN105791515A (en) Screen state control method for terminal equipment and terminal equipment
CN111578439A (en) Wet hand detection device, drive-by-wire ware and air conditioner of touch button
CN111459340A (en) Touch key anti-interference processing method and touch key device
CN108918929B (en) Power signal self-adaptive filtering method in load decomposition
CN116203411A (en) Touch key capacitance detection method and system applied to MCU
CN114356140B (en) Key action recognition method of infrared induction suspension key
CN105320875A (en) Control method and mobile terminal
CN108572275A (en) One kind is shoved detecting system and detection method
US11456740B2 (en) Touch detection circuit with different charging and discharging currents and operating method thereof

Legal Events

Date Code Title Description
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20211014

Address after: 528000 room a312-29, block a, Nanhai industrial think tank City, Taoyuan Road, software park, Shishan town, Nanhai District, Foshan City, Guangdong Province (residence declaration)

Patentee after: Foshan Jusheng Microelectronics Co.,Ltd.

Address before: 519000 unit Q, room 620, 6th floor, main building, No. 10, Keji 1st Road, Gangwan Avenue, Tangjiawan Town, Xiangzhou District, Zhuhai City, Guangdong Province

Patentee before: ZHUHAI JUSHENG TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of utility model: A capacitive touch key anti-interference detection device

Effective date of registration: 20211207

Granted publication date: 20190920

Pledgee: Guangdong Shunde Rural Commercial Bank Co.,Ltd. science and technology innovation sub branch

Pledgor: Foshan Jusheng Microelectronics Co.,Ltd.

Registration number: Y2021980014276

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20230811

Granted publication date: 20190920

Pledgee: Guangdong Shunde Rural Commercial Bank Co.,Ltd. science and technology innovation sub branch

Pledgor: Foshan Jusheng Microelectronics Co.,Ltd.|Guangzhou Jusheng Microelectronics Co.,Ltd.

Registration number: Y2021980014276

PC01 Cancellation of the registration of the contract for pledge of patent right