Summary of the invention
What the present invention will solve is that the triggering method that existing button detects causes the problem of omitting that detects easily because adopting unidirectional frequency hopping to receive outer signals.
For solving the problems of the technologies described above, the triggering method that embodiment of the present invention provides a kind of button to detect, comprise the steps: that frequency hopping receives outer signals, described frequency hopping receives and refers to that described frequency hopping reception refers to the only receive frequency outer signals identical with the frequency hopping frequency, wherein, described frequency hopping frequency is decremented to the 3rd frequency from the 4th frequency again from the 3rd frequency increments to the four frequencies, and repeating the described process that increases progressively and successively decrease, the described frequency hopping frequency that increases progressively is different from the frequency hopping frequency of successively decreasing; When the frequency of described outer signals produces trigger pip when first frequency is to the scope of second frequency, described the 3rd frequency is less than described first frequency, and described the 4th frequency is greater than described second frequency.
Optionally, the increment value of described frequency hopping frequency or decrement value are 2 cps.
Optionally, described button is capacitance type touch key.
Optionally, described button is contact button or air type button.
Optionally, the frequency range of described the 3rd frequency to the four frequencies comprises continuous first frequency scope, second frequency scope and the 3rd frequency range, described second frequency scope comprises described first frequency to the frequency range of second frequency, and the residence time of each frequency of described frequency hopping frequency in described first frequency scope, the 3rd frequency range is less than the residence time of each frequency of described frequency hopping frequency in described second frequency scope.
Optionally, described the 3rd frequency is 20KHz, and described the 4th frequency is 500KHz, and described first frequency is 80KHz, and described second frequency is 120KHz.
Optionally, the frequency range of described the 3rd frequency to the four frequencies comprises continuous first frequency scope, second frequency scope and the 3rd frequency range, described first frequency scope is 20KHz~80KHz, described second frequency scope is 80KHz~300KHz, and described the 3rd frequency range is 300~500KHz; The residence time of each frequency of described frequency hopping frequency in described first frequency scope, the 3rd frequency range is 0.1ms, and the residence time of each frequency of described frequency hopping frequency in described second frequency scope is 0.2ms.
For solving the problems of the technologies described above, the flip flop equipment that embodiment of the present invention also provides a kind of button to detect comprises: antenna is used for receiving extraneous ambient signal; The frequency hopping receiving element, be used for frequency hopping and receive outer signals, described frequency hopping receives and refers to that the ambient signal in only that frequency is identical with the frequency hopping frequency external world receives as outer signals, wherein, described frequency hopping frequency is from the 3rd frequency increments to the four frequencies, be decremented to the 3rd frequency from the 4th frequency again, and repeat the described process that increases progressively and successively decrease, the described frequency hopping frequency that increases progressively is different from the frequency hopping frequency of successively decreasing; The outer signals detecting unit, be used for when described first frequency is to the frequency range of second frequency, producing the trigger pip that is used for triggering described button detection when the frequency of described outer signals, described the 3rd frequency is less than described first frequency, and described the 4th frequency is greater than described second frequency.
Optionally, the increment value of described frequency hopping frequency or decrement value are 2 cps.
Optionally, described button is capacitance type touch key.
Optionally, described button is contact button or air type button.
Optionally, the frequency range of described the 3rd frequency to the four frequencies comprises continuous first frequency scope, second frequency scope and the 3rd frequency range, described second frequency scope comprises described first frequency to the frequency range of second frequency, and the residence time of each frequency of described frequency hopping frequency in described first frequency scope, the 3rd frequency range is less than the residence time of each frequency of described frequency hopping frequency in described second frequency scope.
Optionally, described the 3rd frequency is 20KHz, and described the 4th frequency is 500KHz, and described first frequency is 80KHz, and described second frequency is 120KHz.
Optionally, the frequency range of described the 3rd frequency to the four frequencies comprises continuous first frequency scope, second frequency scope and the 3rd frequency range, described first frequency scope is 20KHz~80KHz, described second frequency scope is 80KHz~300KHz, and described the 3rd frequency range is 300~500KHz; The residence time of each frequency of described frequency hopping frequency in described first frequency scope, the 3rd frequency range is 0.1ms, and the residence time of each frequency of described frequency hopping frequency in described second frequency scope is 0.2ms.
Optionally, described frequency hopping frequency refers to from the 3rd frequency increments to the four frequencies: described frequency hopping frequency increases to 21KHz from 20KHz, then is incremented to 499KHz with each 2KHz, then increases to 500KHz from 499KHz; Described frequency hopping frequency is decremented to the 3rd frequency from the 4th frequency and refers to: described frequency hopping frequency is decremented to 20KHz with each 2KHz from 500KHz.
For solving the problems of the technologies described above, embodiment of the present invention also provides a kind of key detecting method, comprise the steps: that frequency hopping receives outer signals, described frequency hopping receives and refers to that described frequency hopping reception refers to the only receive frequency outer signals identical with the frequency hopping frequency, wherein, described frequency hopping frequency is decremented to the 3rd frequency from the 4th frequency again from the 3rd frequency increments to the four frequencies, and repeating the described process that increases progressively and successively decrease, the described frequency hopping frequency that increases progressively is different from the frequency hopping frequency of successively decreasing; When the frequency of described outer signals when first frequency is to the scope of second frequency, detect button, obtain push button signalling, described the 3rd frequency is less than described first frequency, described the 4th frequency is greater than described second frequency; The described push button signalling of frequency-change sampling, when the number of times that samples the button useful signal in schedule time scope meets or exceeds pre-determined number, the output control signal, wherein, described frequency-change sampling refers to that sample frequency is incremented to second frequency from described first frequency, be decremented to first frequency from described second frequency again, and repeat the described process that increases progressively and successively decrease, and described sample frequency is in the resident schedule time of each frequency.
Optionally, the increment value of described frequency hopping frequency or decrement value are 2 cps.
Optionally, the increment value of described sample frequency or decrement value are 1 cps.
Optionally, described the 3rd frequency is 20KHz, and described the 4th frequency is 500KHz, and described first frequency is 80KHz, and described second frequency is 120KHz; Described schedule time scope is 3ms, and described pre-determined number is 80, and the described schedule time is 5 μ s.
Compared with prior art, the triggering method that above-mentioned button detects and device in predetermined frequency range (the 3rd frequency to the four frequencies) adopt positive frequency hopping to receive and knock-on receives frequently, and repeat, wherein, the frequency hopping frequency that positive frequency hopping receives is different from knock-on frequency hopping frequency frequently, receives with existing unidirectional frequency hopping and compares, and the frequency hopping frequency can be resident in each frequency, therefore can be not undetected, be detected as power thereby improved.
Further, above-mentioned key detecting method just triggers button in the outer signals that receives (first frequency is to second frequency) in predetermined frequency range and detects, and, what receive the outer signals employing is that frequency hopping receives, namely in the certain hour scope, only receive a kind of outer signals of frequency, whether the push button signalling that samples with frequency-change sampling and detection is that the button useful signal combines, the outer signals that the sample frequency that changes is difficult for being changed is followed the tracks of, further reduced sampled signal and greatly reduced with the probability that the frequency of outer signals overlaps, button detects disturbed possibility and greatly reduces.
Embodiment
Receive outer signals and cause easily the problem that detects omission owing to adopting with unidirectional frequency hopping for the existing method that triggers the button detection, the present inventor has proposed to adopt two-way frequency hopping to receive outer signals, to produce the method for trigger pip, described two-way frequency hopping receives and comprises that positive frequency hopping receives and knock-on receives frequently, positive frequency hopping refers to that from the 3rd frequency increments to the four frequencies knock-on frequently refers to be decremented to the 3rd frequency from the 4th frequency.
Below in conjunction with the drawings and specific embodiments embodiment of the present invention is elaborated, need to prove, following examples describe take button as capacitance type touch key as example, in other embodiments, described button is not limited to described capacitance type touch key, for example, also can be the resistance-type button, switching regulator button etc.
Fig. 1 is the schematic flow sheet of the triggering method that detects of the button of one embodiment of the invention, and the triggering method that described button detects comprises:
Step S21, frequency hopping receives outer signals, described frequency hopping receives and refers to that described frequency hopping reception refers to the only receive frequency outer signals identical with the frequency hopping frequency, wherein, described frequency hopping frequency is from the 3rd frequency increments to the four frequencies, be decremented to the 3rd frequency from the 4th frequency again, and repeat the described process that increases progressively and successively decrease, the described frequency hopping frequency that increases progressively is different from the frequency hopping frequency of successively decreasing;
Step S22, when the frequency of described outer signals produces trigger pip when first frequency is to the scope of second frequency, described the 3rd frequency is less than described first frequency, and described the 4th frequency is greater than described second frequency.
Key detecting method below in conjunction with Fig. 2 is elaborated, and key detecting method shown in Figure 2 comprises:
Step S21, frequency hopping receives outer signals; Described frequency hopping receives and refers to that described frequency hopping reception refers to the only receive frequency outer signals identical with the frequency hopping frequency, wherein, described frequency hopping frequency is from the 3rd frequency increments to the four frequencies, be decremented to the 3rd frequency from the 4th frequency again, and repeating the described process that increases progressively and successively decrease, the described frequency hopping frequency that increases progressively is different from the frequency hopping frequency of successively decreasing;
Step S22 is used for triggering the trigger pip that described button detects when the frequency of described outer signals produces when described first frequency is to the frequency range of second frequency; Described the 3rd frequency is less than described first frequency, and described the 4th frequency is greater than described second frequency;
Step S11 detects button, obtains push button signalling,, after trigger pip produces, begins to detect button that is;
Step S12, the described push button signalling of frequency-change sampling, when the number of times that samples the button useful signal in schedule time scope meets or exceeds pre-determined number, the output control signal, wherein, described frequency-change sampling refers to that sample frequency is incremented to second frequency from first frequency, is decremented to first frequency from second frequency again, and repeat the described process that increases progressively and successively decrease, and described sample frequency is in resident first schedule time of each frequency.
The below is elaborated to each step.
Execution in step S21 at first, frequency conversion receives outer signals.Described outer signals comprises signal and the extraneous ambient signal that the external key operation produces.Described outer signals can be passed through antenna reception, and antenna can receive the frequency range of signal and determine that by the characteristic of antenna in the present embodiment, the frequency range that antenna can receive signal is the low frequency signal of 20KHz~500KHz.
Described frequency hopping receives and refers to the only receive frequency outer signals identical with the frequency hopping frequency, wherein, described frequency hopping frequency is from the 3rd frequency increments to the four frequencies, be decremented to the 3rd frequency from the 4th frequency again, and repeat the described process that increases progressively and successively decrease, the described frequency hopping frequency that increases progressively is different from the frequency hopping frequency of successively decreasing, and described the 3rd frequency is less than described first frequency (describing in detail in step S12), and described the 4th frequency is greater than described second frequency (describing in detail in step S12).Described the 3rd frequency is the lower limit that antenna can receive the frequency range of signal, for example is 20KHz (KHz); Described the 4th frequency is the higher limit that antenna can receive the frequency range of signal, for example is 500KHz.In other embodiments, also can not adopt frequency hopping to receive, and make antenna keep accepting state always.
In the present embodiment, the increment value of described frequency hopping frequency is (during from the 3rd frequency increments to the four frequency, the recruitment of every secondary frequencies) or decrement value (when being decremented to the 3rd frequency from the 4th frequency, the decrease of every secondary frequencies) be that 2 cps (are KHz such as cps, then 2 cps are 2KHz), be that equal difference increases progressively or equal difference is successively decreased.
It is odd number equal difference frequency hopping that described frequency hopping frequency is incremented to 500KHz from 20KHz, comprising: described frequency hopping frequency increases to 21KHz from 20KHz, then is incremented to 499KHz with each 2KHz, then increases to 500KHz from 499KHz; It is even number equal difference frequency hopping that described frequency hopping frequency is decremented to 20KHz from 500KHz, comprising: described frequency hopping frequency is decremented to 20KHz with each 2KHz from 500KHz.
In addition, the frequency range of described the 3rd frequency to the four frequencies comprises continuous first frequency scope, second frequency scope and the 3rd frequency range, described second frequency scope comprises described first frequency to the frequency range of second frequency, and the residence time of each frequency of described frequency hopping frequency in described first frequency scope, the 3rd frequency range is less than the residence time of each frequency of described frequency hopping frequency in described second frequency scope.Take the 3rd frequency as 20KHz, the 4th frequency as 500KHz, first frequency as 80KHz, second frequency is example as 120KHz, described first frequency scope is 20KHz~80KHz, described second frequency scope is 80KHz~300KHz, and described the 3rd frequency range is 300~500KHz; The residence time of each frequency of described frequency hopping frequency in described first frequency scope, the 3rd frequency range (being that the frequency hopping frequency is the maintenance retention time of this frequency) is 0.1ms, and the residence time of each frequency of described frequency hopping frequency in described second frequency scope is 0.2ms.
In other embodiments, the residence time of described frequency hopping frequency each frequency of (i.e. the scope of the 3rd frequency to the four frequencies) in described first frequency scope, second frequency scope and the 3rd frequency range also can be identical.In the present embodiment, because the outer signals of first frequency scope or the 3rd frequency range can be considered to undesired signal usually, therefore the residence time by shortening each frequency of described frequency hopping frequency in described first frequency scope, the 3rd frequency range residence time of each frequency of described frequency hopping frequency in described second frequency scope (namely less than), to accelerate the frequency hopping rate of described frequency hopping frequency in described first frequency scope, the 3rd frequency range, can save thus the utilization factor of detection time and raising system resource.
Then execution in step S22 is used for triggering the trigger pip that described button detects when the frequency of described outer signals produces during to the frequency range of second frequency at first frequency.Described first frequency and second frequency are lower-frequency limit and the lower-frequency limit that button is operated the signal that produces after (pressing), and the first frequency of present embodiment is 80KHz, and second frequency is 120KHz.Present embodiment is the frequency in the described outer signals that receives when being frequency between described first frequency or second frequency or first frequency and the second frequency, namely might have in the operated situation of button, continues follow-up button detecting step again.Particularly, whether judge the frequency of outer signals of described reception in the frequency range of first frequency to second frequency, if then produce trigger pip, then be judged to be if not extraneous environmental interference.
Then execution in step S11 detects button, obtains push button signalling.In the present embodiment, described button is capacitance type touch key, for example air type button, contact button, usually, button has over the ground a stray capacitance, when finger pushes button, is equivalent on stray capacitance in parallel one over the ground finger electric capacity, therefore can pass through the detection to the quantity of electric charge or the capacitance of electric capacity, determine whether this button is pressed.
In the present embodiment, step S11 specifically comprises: the charge variation amount of Detection capacitance (such as stray capacitance); Obtain push button signalling, described push button signalling is the digital signal of the charge variation amount of corresponding described electric capacity, is used for determining at subsequent step whether this button is pressed.Wherein, the digital signal of the charge variation amount of corresponding described electric capacity refers to that the represented numerical value of this digital signal can be the charge variation amount of described electric capacity, or can with the proportional relation of charge variation amount of described electric capacity.Because the detection technique of the charge variation amount of electric capacity is well known to those skilled in the art, and does not repeat them here.
Then execution in step S12, the described push button signalling of frequency-change sampling, when the number of times that samples the button useful signal in schedule time scope meets or exceeds pre-determined number, the output control signal.Judge that namely the number of times that whether samples the button useful signal in schedule time scope meets or exceeds pre-determined number, if then export control signal, represent that this button probably is pressed; Then being judged to be if not outer signals disturbs.Described frequency-change sampling refers to that sample frequency is incremented to second frequency from first frequency, is decremented to first frequency from second frequency again, and repeats the described process that increases progressively and successively decrease, and described sample frequency is in the resident schedule time of each frequency.
The described button useful signal that samples comprises: the described push button signalling of sampling; If the represented numerical value of described push button signalling is greater than the variable quantity threshold value, then the described push button signalling that samples is the button useful signal.
Present embodiment step S12 comprises in detail as shown in Figure 2:
Step S121, the described push button signalling of sampling, the digital signal corresponding to the charge variation amount of electric capacity of namely step S11 being obtained is sampled, sample frequency is incremented to second frequency from first frequency, be decremented to first frequency from second frequency again, and repeat the described process that increases progressively and successively decrease, and described sample frequency is in the resident schedule time of each frequency.
In the present embodiment, sample frequency changes in scope (comprising first frequency and the second frequency) samsara of first frequency to second frequency, the increment value of described sample frequency is (when being incremented to second frequency from first frequency, the recruitment of every secondary frequencies) or decrement value (when being decremented to first frequency from second frequency, the decrease of every secondary frequencies) is 1 cps, is that equal difference increases progressively or equal difference is successively decreased.Particularly, sample frequency is incremented to second frequency from first frequency first, 1 cps of each increase (is the unit of first frequency and second frequency, be KHz such as unit, then increase 1KHz) at every turn, and keep the schedule time in each frequency, that is to say every schedule time sample frequency increases by 1 cps; Then, sample frequency is decremented to first frequency from second frequency again, reduces 1 cps at every turn, and keeps the schedule time in each frequency, that is to say every schedule time sample frequency to reduce 1 cps; Then sample frequency is incremented to second frequency from first frequency again, is decremented to first frequency from second frequency again, so repeatedly.
Described first frequency and second frequency are lower-frequency limit and the lower-frequency limit that button is operated the signal that produces after (pressing), it typically is according to actual conditions and fixed empirical value.In the present embodiment, press capacitance type touch key as example take people's finger, usually can produce the signal that frequency is 80KHz to 120KHz, so first frequency is set as 80KHz, second frequency is set as 120KHz, and described sample frequency increment value or decrement value are 1KHz.The described schedule time is determined according to described schedule time scope and pre-determined number (can be empirical value), it is the push button signalling that can determine the schedule time in schedule time scope, to sample greater than pre-determined number, take described schedule time scope as 3ms, described pre-determined number is 80 for example, and the described schedule time can be 5 μ s.Sample frequency increases to 81KHz behind the 5 μ s from 80KHz, increase to 82KHz after 5 μ s ..., sample frequency increases to 120KHz, and the time of this increasing process is 200 μ s; Then, 5 μ s post-sampling frequencies reduce to 119KHz from 120KHz, reduce to 118KHz after 5 μ s ..., sample frequency reduces to 80KHz, and the time of this process of successively decreasing is 200 μ s; A samsara process comprises an increasing process and the process of successively decreasing, and is 400 μ s, usually can sample 11 push button signallings (digital signal), and 3ms comprises 7.5 samsara processes, therefore can sample about 82~83 digital signals.
Step S122 judges whether the described push button signalling that samples is the button useful signal, if execution in step S123 then, if not execution in step S124 then.Described push button signalling is that the button useful signal refers to that the represented numerical value of the described push button signalling that samples (being digital signal) is greater than the variable quantity threshold value.
Step S123, count value adds 1, execution in step S124.The initial value of described count value is 0, and when the described push button signalling that samples was the button useful signal, count value added 1, and count value is that the number of times that samples the button useful signal is counted.
Step S124 judges whether to meet or exceed schedule time scope, if execution in step S125 then, if not execution in step S122 then.If when if the described push button signalling that samples is not the button useful signal or the described push button signalling that samples be after button useful signal and count value add 1, judge that whether the difference of the time that current time and step S12 begin to carry out is more than or equal to schedule time scope, if execution in step S125 then, if not execution in step S122 then.
Whether step S125 judges count value more than or equal to pre-determined number, if execution in step S126 then, if not execution in step S127 then.If whether the difference of the time that current time and step S12 begin to carry out more than or equal to schedule time scope, then judges count value more than or equal to pre-determined number, if execution in step S126 then, if not execution in step S127 then.
Step S126, the output control signal.If more than or equal to pre-determined number, then export control signal in schedule time scope inside counting value, illustrate that this button is pressed or probably is pressed.
Step S127 is determined with outer signals and disturbs.If less than pre-determined number, illustrate then that this button is not pressed in schedule time scope inside counting value, the external world may have undesired signal to disturb button to detect.
Generally, above-mentioned steps S121 and step S122~S125 can walk abreast and carry out.
The judged result that described control signal and/or the number of times that whether samples the button useful signal in schedule time scope meet or exceed pre-determined number can be used as the situation that follow-up further judgement operates this button, for example, can be in 3s repeated execution of steps S11 and S12, if have control signal to produce, illustrate that then this button may be pressed continuously always.
The key detection device of corresponding above-mentioned key detecting method comprises receivingelement 51, outersignals detecting unit 52,button detecting unit 41 and usefulsignal detecting unit 42 as shown in Figure 4.Wherein, the flip flop equipment of the button of embodiment of the invention detection comprises receiving element shown in Figure 4 51 and outersignals detecting unit 52.
Receivingelement 51 is used for receiving outer signals.In the present embodiment, receiving element comprisesantenna 511 and frequencyhopping receiving element 512, and describedantenna 511 is used for receiving extraneous ambient signal; Described frequency hopping receivingelement 512 is used for frequency hopping and receives outer signals, and described frequency hopping receives and refers to that the ambient signal in only that frequency is identical with the frequency hopping frequency external world receives as outer signals, and delivers to outer signals detecting unit 52.Wherein, described frequency hopping frequency is decremented to the 3rd frequency from the 4th frequency again from the 3rd frequency increments to the four frequencies, and repeats the described process that increases progressively and successively decrease, and the described frequency hopping frequency that increases progressively is different from the frequency hopping frequency of successively decreasing.
The increment value of described frequency hopping frequency or decrement value are 2 cps.The frequency range of described the 3rd frequency to the four frequencies comprises continuous first frequency scope, second frequency scope and the 3rd frequency range, described second frequency scope comprises described first frequency to the frequency range of second frequency, and the residence time of each frequency of described frequency hopping frequency in described first frequency scope, the 3rd frequency range is less than the residence time of each frequency of described frequency hopping frequency in described second frequency scope.
Outersignals detecting unit 52, be used for when first frequency is to the frequency range of second frequency, producing the trigger pip that is used for triggering described button detection when the frequency of described outer signals, described the 3rd frequency is less than described first frequency, and described the 4th frequency is greater than described second frequency.Described outersignals detecting unit 52 is connected with describedbutton detecting unit 41, sends described trigger pip to describedbutton detecting unit 41.
Button detecting unit 41 is used for detecting button after the trigger pip that receives described outersignals detecting unit 52 transmissions, obtains push button signalling.In the present embodiment, described button is capacitance type touch key, and described button detecting unit is capacitance detection unit, for detection of the charge variation amount of electric capacity, obtains push button signalling, and described push button signalling is the digital signal of the charge variation amount of corresponding described electric capacity.In the present embodiment, described capacitance detection unit is realized by analog to digital converter ADC, the charge variation amount of ADC Detection capacitance, and the analog quantity of charge variation is converted to digital quantity.
Usefulsignal detecting unit 42, be used for the described push button signalling of frequency-change sampling, and the number of times that samples the button useful signal in schedule time scope is when meeting or exceeding pre-determined number, the output control signal, wherein, described frequency-change sampling refers to that sample frequency is incremented to second frequency from first frequency, is decremented to first frequency from second frequency again, and repeat the described process that increases progressively and successively decrease, and described sample frequency is in the resident schedule time of each frequency.The increment value of described sample frequency or decrement value can be 1 cps.Described push button signalling is that the button useful signal refers to that the represented numerical value of described push button signalling is greater than the variable quantity threshold value.In the present embodiment, described useful signal detecting unit is realized by microcontroller.
Above-mentioned key detecting method can be applied to a kind of anti-interference capacitor touch key-press detection system, gets rid of the interference of neighbourhood noise, improves the accuracy of detection of actuation of keys.Described button can be the contact button, especially capacitance touch button, also can be other button, such as the air type button, described contact button refer to the people know from experience with button in the button that directly contacts of metal polar plate, described air type button refer to human body can be not directly with button in the button that directly contacts of metal polar plate.
The structural representation of anti-interference capacitor touch key-press detection system as shown in Figure 5 comprises:capacitance touch button 21;Environmental detection unit 31, for detection of the background environment signal, shielding first frequency (be 80KHz in the present embodiment) is to the extraneous signal of second frequency (in the present embodiment for 120KHz), after detecting the signal of described first frequency to the second frequency scope, and the generation trigger pip;Button detecting unit 32 is triggered by described trigger pip, and described capacitance touch button is detected, and obtains push button signalling;Control module 40 is triggered by described trigger pip, and described push button signalling is sampled, when the number of times that samples the button useful signal in very first time window meets or exceeds pre-determined number, and the output control signal.
Wherein,capacitance touch button 21 distributes and is arranged on the detectingboard 20, and described detectingboard 20 can be a printed circuit board (PCB).Also be provided with at least oneequilibrium point 22 on the described detectingboard 20, describedequilibrium point 22 is metal material, is used for regulating frequency reception and the responding range of described detectingboard 20, hereinafter will be described in detail.
In addition, describedenvironmental detection unit 31 andbutton detecting unit 32 can be integrated on the same detection chip 30.Describedbutton detecting unit 32 is for detection of the charge variation amount ofcapacitance touch button 21, also be the quantity of electric charge and the difference of capacitance touch button between the quantity of electric charge under the initial equilibrium conditions current on thecapacitance touch button 21, afterwards, described charge variation amount is converted into corresponding digital signal, that is to say that described digital signal expressed described charge variation amount.
Describedcontrol module 40 can pass through a microcontroller (MCU, Micro Controller Unit) to be realized.
Fig. 6 is the detailed construction synoptic diagram of Fig. 5, and wherein, describedenvironmental detection unit 31 comprises: systeminterference detection module 311, for detection of the system noise signal in the frequency range of power supply; Low-frequencydisturbance detection module 312, for detection of the low-frequency noise signal in the 3rd frequency to the four frequency ranges, described the 3rd frequency is less than described first frequency, described the 4th frequency is greater than described second frequency, after detecting the signal of described first frequency to the second frequency scope, produce trigger pip; High frequencyinterference detection module 313, for detection of the HF noise signal in the 5th frequency to the six frequency ranges, described the 5th frequency is greater than described the 4th frequency; Detectcontrol module 314, be used for controlling described systeminterference detection module 311, low-frequencydisturbance detection module 312 and successively periodic duty of high frequencyinterference detection module 313.
Wherein, the noise that described systeminterference detection module 311 produces mainly for detection of power supply, and other noises in the power supply frequency range.In the present embodiment, employed power supply is to produce after the mains lighting supply transformation, and the sensing range of corresponding system noise signal is 50Hz to 75Hz.General, can realize with power supply ripple testing circuit and detection method commonly used in the prior art.
Described low-frequencydisturbance detection module 312 is mainly for detection of the low-frequency noise signal, and its frequency range is the 3rd frequency to the four frequencies, is specially 20KHz to 500KHz in the present embodiment.In order to mate the signal that receives in this band limits, in the present embodiment affiliated detectingboard 20 is used as the antenna of low-frequencydisturbance detection module 312, by shape, the size of adjusting described detectingboard 20, and thereon even theequilibrium point 22 of one or more metal materials, capacitive reactance and induction reactance to whole detectingboard 20 are adjusted, make its frequency response and the range of receiving of the signal band limits that can comprise described the 3rd frequency to the four frequencies, namely can receive the Frequency of 20KHz to 500KHz.In the present embodiment, the capacitive reactance of described detectingboard 20 is about 0.5pF, and induction reactance is 0.1mH to 0.8mH.Owing to describedbutton 21 and the detectingboard 20 integral body antenna as low-frequencydisturbance detection module 312, and do not need to dispose special low-frequency antenna, thereby improved the integrated level of system, be beneficial to the volume that reduces final products.
Described high frequencyinterference detection module 313 is the HF noise signal of the 5th frequency to the six frequencies for detection of frequency range, is specially 900MHz to 3GHz.The reception of its signal realizes byindependent antenna 312a.
Below in conjunction with Fig. 7 to the anti-interference capacitor touch key-press detection system of present embodiment with and the course of work in detection method be described in detail.
Described anti-interference capacitor touch key-press detection system is at first carried out initialization behind upper electric-opening, described initialization comprises carries out initialization todetection chip 30, also namelyenvironmental detection unit 31,button detection signal 32 is carried out initialization; Also comprise initialization to controlmodule 32 etc., described initialization procedure is about about 20ms.
After finishing initialization, describedenvironmental detection unit 31 begins the background environment signal is detected, and first frequency to the extraneous signal shielding of second frequency, when detecting the signal of first frequency to the second frequency scope, is produced trigger pip.Be specially in the present embodiment: during signal in detecting 80KHz to 120KHz scope, produce trigger pip, and the background environment signal in other frequency ranges is shielded.It should be understood that the signal in the described 80KHz to 120KHz of the detecting scope refers at the signal of amplitude of 80KHz to 120KHz existence greater than a certain amplitude threshold.The testing process of described background environment signal also is the step S11 among Fig. 3.
The below is elaborated to the testing process of background environment noise.At first, system noise signal in the frequency range of 311 pairs of power supplies of system interference detection module detects, be specially the system noise in 50Hz to the 75Hz scope, in this scope, detect signal, do not trigger described button detecting unit 32 and carry out the button detection, described control module 40 does not carry out button yet and judges.As a preferred embodiment, when if the amplitude of described system noise signal is lower than the first default amplitude (present embodiment is 100mV), as be 50mV, the amplitude of this system noise signal is transferred to control module 40, described control module 40 adds it in reference signal of system, in the deterministic process of follow-up button useful signal, with the amplitude deduction of this system noise signal, avoided the impact of power supply ripple interference on result of determination.If the amplitude of described system noise signal is higher than the second default amplitude (being 500mV in the present embodiment), such as 800mV.Then the amplitude with this system noise signal transfers to described control module 40, and described control module 40 carries out amplitude limiting processing to it, namely in the decision process of follow-up button useful signal, think to surpass very system noise of this amplitude, and be not actuation of keys.
After the detection of described systeminterference detection module 311 completion system noise signals, the described low-frequencydisturbance detection module 312 of describeddetection control module 314 controls carries out the detection of the low-frequency noise signal in the 3rd frequency to the four frequency ranges, is specially the low-frequency noise input in 20KHz to the 500KHz scope.The reception of described low-frequency noise signal realizes by described detecting board 20.Concrete testing process detects by frequency hopping and realizes, described frequency hopping detect refer to synchronization only receive frequency equal the signal of frequency hopping frequency, wherein, described frequency hopping frequency is incremented to the 4th frequency (500KHz) from the 3rd frequency (20KHz), be decremented to the 3rd frequency (20KHz) from the 4th frequency (500KHz) again, the described frequency hopping frequency that increases progressively is different from described frequency hopping frequency of successively decreasing, wherein, the increment value of described frequency hopping frequency and decrement value are 2 cps, are the equal difference increasing or decreasing.
If outside 80KHz to 120KHz scope, there is the low-frequency noise signal, then it is shielded, namely do not go to trigger describedbutton detecting unit 32 andcontrol module 40 yet, thereby avoided the erroneous judgement of the actuation of keys that the low-frequency noise signal causes.
After 312 pairs of low-frequency noise input of described low-frequency disturbance detection module were finished, describeddetection control module 314control 313 pairs of the 5th frequencies of described high frequency interference detection module (900MHz) to the HF noise signal in the 6th frequency (3GHz) scope detected.If exist HF noise signal then it to be shielded in this frequency range, namely do not go to trigger describedbutton detecting unit 32 andcontrol module 40 yet, thereby avoided the erroneous judgement of the actuation of keys that HF noise signal causes.
Afterwards, 314 control described systeminterference detection module 311, low-frequencydisturbance detection module 312 and the successively periodic duties of high frequencyinterference detection module 313 of described detection control module, described system noise signal, low-frequency noise signal and HF noise signal are detected repeatedly.
If detecting described first frequency (80KHz), described low-frequencydisturbance detection module 312 to second frequency (120KHz) scope, signal is arranged, then produce trigger pip, triggering describedbutton detecting unit 32 andcontrol module 40 starts working, wherein, 32 pairs of described capacitance touch buttons of button detecting unit detect, and obtain push button signalling; 40 pairs of described push button signallings of control module are sampled, when the number of times that samples the button useful signal in very first time window (3ms) meets or exceeds pre-determined number, and the output control signal.
In the present embodiment, sample frequency changes to the scope samsara of second frequency at first frequency, and the increment value of described sample frequency or decrement value are 1 cps, is that equal difference increases progressively or equal difference is successively decreased.Particularly, sample frequency is incremented to second frequency from first frequency first, increases by 1 cps at every turn, and keeps the schedule time in each frequency, and that is to say every schedule time sample frequency increases by 1 cps; Then, sample frequency is decremented to first frequency from second frequency again, reduces 1 cps at every turn, and keeps the schedule time in each frequency, that is to say every schedule time sample frequency to reduce 1 cps; Then sample frequency is incremented to second frequency from first frequency again, is decremented to first frequency from second frequency again, so repeatedly.
Need to prove that describedcontrol module 40 is in the process to the push button signalling sampling, describedenvironmental detection unit 31 is still constantly detecting the background environment noise.
If the number of times that samples the button useful signal in described very first time window is during less than described pre-determined number, namely in very first time window, when all not detecting actuation of keys, do not export control signal, then describedenvironmental detection unit 31 enters dormancy (sleep) state, stops the detection to the background environment signal.
If the number of times that samples the button useful signal in described very first time window is during more than or equal to described pre-determined number, namely in very first time window, detect actuation of keys, and the corresponding control signal of generation output, then open the second time window, the duration of described the second time window, the duration of the second time window was 3s in the present embodiment greater than very first time window.In the second time window, continue described push button signalling is sampled, in the arbitrary very first time window in described the second time window, when the number of times that samples the button useful signal meets or exceeds pre-determined number, the output control signal.Namely in the second time window, still carry out the detection of push button signalling take very first time window as unit, if in a certain very first time window in the second time window, the number of times of button useful signal is then exported control signal again more than or equal to pre-determined number (80 times).If the number of times that samples the button useful signal in the second time window is during less than described pre-determined number, be all not detect authentic and valid actuation of keys in whole the second time window, then described environmental detection unit 31 enters dormant state, stops the detection to the background environment signal.Enter dormant state and be conducive to reduce the power consumption of whole system.In the use of reality, actuation of keys is continuous often, adjust volume, switching channels etc. such as the button that the user is continuous, therefore, after very first time window is confirmed actuation of keys, open longer the second time window of duration to catch other actuation of keys following closely, can effectively improve the accuracy of detection to the continuous key-press action.
In the present embodiment, described anti-interference capacitor touch key-press detection system also comprises house dog (WatchDog) module, after describedenvironmental monitoring unit 31 enters the preset dormancy time (being specially 128ms in the present embodiment) of dormant state, wake describedenvironmental detection unit 31 up, its continuation is detected system noise signal, low-frequency noise signal, HF noise signal.In general, the duration of people's actuation of keys is much larger than 128ms, and therefore, describedenvironmental monitoring unit 31 enters the time of dormant state and can't miss actuation of keys, thereby when reducing power consumption, has guaranteed accuracy of detection.
As a preferred embodiment, described control module 40 is background extraction ambient signal from described environmental detection unit 31 also, in default monitoring period, with described environmental detection unit 31 scanning system noise signals, the low-frequency noise signal, each once is a samsara for HF noise signal, if (500 detection corresponding times of samsara are described default monitoring period 500 samsaras, certainly, this numeral can be adjusted accordingly according to practical application) in, the signal of certain frequency exists all the time, and then the signal amplitude according to this frequency compensates adjustment to described variable quantity threshold value.For example, placed for a long time a metal parts near the described capacitance touch button 21, having caused fixed frequency is the interference of 30KHz, then in the detection of the background environment signal of 500 samsaras, on the frequency of 30KHz, all there is undesired signal, then control module 40 will compensate adjustment to described variable quantity threshold value according to the signal amplitude of this frequency, cause the quantity of electric charge of capacitance touch button when the equilibrium state to reduce such as the external interference of 30KHz, when then described push button signalling being detected, described variable quantity threshold value is adjusted, so that the variable quantity threshold value after adjusting adapts with it.Therefore, by above-mentioned adjustment, realized the self-adaptation of anti-interference capacitor touch key-press detection system to environment, after described fixedly interference disappears, again described variable quantity threshold value is recalled to initial value, thereby realized memory and restore funcitons to environment, guarantee the precision that detects.
In sum, the triggering method that above-mentioned button detects and device in predetermined frequency range (the 3rd frequency to the four frequencies) adopt positive frequency hopping to receive and knock-on receives frequently, and repeat, wherein, the frequency hopping frequency that positive frequency hopping receives is different from knock-on frequency hopping frequency frequently, receives with existing unidirectional frequency hopping and compares, and the frequency hopping frequency can be resident in each frequency, therefore can be not undetected, be detected as power thereby improved.
Further, above-mentioned key detecting method just triggers button in the outer signals that receives (first frequency is to second frequency) in predetermined frequency range and detects, and, what receive the outer signals employing is that frequency hopping receives, namely in the certain hour scope, only receive a kind of outer signals of frequency, whether the push button signalling that samples with frequency-change sampling and detection is that the button useful signal combines, the outer signals that the sample frequency that changes is difficult for being changed is followed the tracks of, further reduced sampled signal and greatly reduced with the probability that the frequency of outer signals overlaps, button detects disturbed possibility and greatly reduces.
Although the present invention discloses as above with preferred embodiment, the present invention is defined in this.Any those skilled in the art without departing from the spirit and scope of the present invention, all can make various changes or modifications, so protection scope of the present invention should be as the criterion with the claim limited range.