首页 / 专利库 / 信号处理 / 采样频率 / METHOD AND APPARATUS FOR DETECTING KEY

METHOD AND APPARATUS FOR DETECTING KEY

阅读:139发布:2022-08-13

专利汇可以提供METHOD AND APPARATUS FOR DETECTING KEY专利检索,专利查询,专利分析的服务。并且A method and an apparatus for detecting a key are provided. The method comprises: detecting the key to obtain a key signal (S11); sampling the key signal with a variable frequency; and outputting a control signal when the number of times of sampling the key effective signal in a pre-set time range reaches or exceeds a pre-set number (S12), wherein sampling with the variable frequency means that the sampling frequency is gradually increases from a first frequency to a second frequency, then gradually reduced from the second frequency to the first frequency, and the gradual increasing and reducing processes are repeated, moreover, the sampling frequency stays for a pre-set time in each frequency. The method and the apparatus for detecting the key reduce the probability of key detection being interfered by external signals.,下面是METHOD AND APPARATUS FOR DETECTING KEY专利的具体信息内容。

A key detection method, comprising:detecting a key to obtain a key signal; andsampling the key signal with varying frequencies and outputting a control signal when the sampling times for an effective key signal in a predetermined time span reach or exceed a predetermined value;where the sampling frequency varies from a first frequency increasing to a second frequency and then from the second frequency decreasing to the first frequency, the increasing and decreasing sampling processes are repeated, and the sampling stays in each frequency point for a predetermined time.The key detection method according to claim 1, where the sampling is performed in 1 unit of frequency increasingly or decreasingly.The key detection method according to claim 1, where the key is a capacitive touch-key.The key detection method according to claim 1, where the key is an air key or a contact key.The key detection method according to claim 3, where detecting the key to obtain the key signal comprises: detecting a charge change amount in a capacitance in the key; and obtaining the key signal, where the key signal is a digital signal corresponding to the charge change amount in the capacitance.The key detection method according to claim 5, where sampling an effective key signal comprises: sampling a key signal; and determining a sampled key signal to be an effective key signal when numerical value of the sampled key signal is greater than a threshold of charge change amount.The key detection method according to claim 3, where the predetermined time span is 3ms, the predetermined value is 80, the first frequency is 80KHz, the second frequency is 120KHz, the predetermined time is 5µs, and the 1 unit of frequency is 1KHz.The key detection method according to claim 1 or 3, comprising:receiving external signals; andwhen the frequency of an external signal is between the first frequency and the second frequency, generating a trigger signal which is used to trigger the key detection process.The key detection method according to claim 8, where receiving external signals comprises: receiving external signals at hopping frequencies, where receiving at hopping frequencies includes receiving external signals whose frequencies are equal to hopping frequency points;
where the hopping frequency increases from a third frequency to a fourth frequency, then decreases from the fourth frequency to the third frequency, and so the cycle to repeat, the frequency points in the increasing process are different from those in the decreasing process, and the third frequency is less than the first frequency and the fourth frequency is greater than the second frequency.
The key detection method according to claim 9, where the hopping frequency increases or decreases in 2 units of frequency.The key detection method according to claim 9, where the frequency range from the third frequency to the fourth frequency comprises three continuous frequency bands, namely, a first frequency band, a second frequency band and a third frequency band, the second frequency band comprises a frequency band from the first frequency to the second frequency and time stayed in each frequency point within the first frequency band or the third frequency band is less than that in each frequency point within the second frequency band.The key detection method according to claim 9, where the third frequency is 20KHz and the fourth frequency is 500KHz.The key detection method according to claim 12, where the frequency range from the third frequency to the fourth frequency comprises three continuous frequency bands, namely, a first frequency band, a second frequency band and a third frequency band, the first frequency band is from 20KHz to 80KHz, the second frequency band is from 80KHz to 300KHz, and the third frequency band is from 300KHz to 500KHz; and
time stayed in each frequency point within the first frequency band or in the third frequency band is 0.1ms and time stayed in each frequency point within the second frequency band is 0.2ms.
The key detection method according to claim 12,
where the hopping frequency increasing from the third frequency to the fourth frequency comprises: the hopping frequency increasing from 20KHz to 21KHz, then increasing from 21KHz to 499KHz in 2KHz and increasing from 499KHz to 500KHz; and
the hopping frequency decreasing from the fourth frequency to the third frequency comprises: the hopping frequency decreasing from 500KHz to 20KHz in 2KHz.
A key detection apparatus, comprising:a key detecting unit configured to detect a key to obtain a key signal; andan effective signal detecting unit to sample the key signal with varying frequencies and output a control signal when the sampling times for an effective key signal in a predetermined time span reach or exceed a predetermined value;where the sampling frequency varies from a first frequency increasing to a second frequency, then from the second frequency decreasing to the first frequency, the increasing and decreasing sampling processes are repeated, and the sampling stays in each frequency point for a predetermined time.The key detection apparatus according to claim 15, where the sampling is performed in 1 unit of frequency increasingly or decreasingly.The key detection apparatus according to claim 15, where the key is a capacitive touch-key.The key detection apparatus according to claim 15, where the key is an air key or a contact key.The key detection apparatus according to claim 17, where the key detecting unit comprises a capacitance detecting unit configured to detect a charge change amount in a capacitance in the key to obtain the key signal, where the key signal is a digital signal corresponding to the charge change amount in the capacitance.The key detection apparatus according to claim 19, where a key signal being an effective key signal means numerical value of the key signal is greater than a threshold of charge change amount.The key detection apparatus according to claim 15, where the predetermined time span is 3ms, the predetermined value is 80, the first frequency is 80KHz, the second frequency is 120KHz, the predetermined time is 5µs, and the 1 unit of frequency is 1KHz.The key detection apparatus according to claim 15 or 17, further comprising:a receiving unit configured to receive external signals; andan external signal detecting unit configured to generate a trigger signal which is used to trigger the key detection process when the frequency of an external signal is between the first frequency and the second frequency;where the key detecting unit detects a key to obtain a key signal after receiving the trigger signal.The key detection apparatus according to claim 22, where the receiving unit comprises:an antenna configured to receive external environment signals; anda frequency hopping receiving unit configured to receive external signals at hopping frequencies, receiving at hopping frequencies includes receiving external signals whose frequencies are equal to hopping frequency points;where the hopping frequency increases from a third frequency to a fourth frequency, then decreases from the fourth frequency to the third frequency, and so the cycle to repeat, the frequency points in the increasing process are different from those in the decreasing process, and the third frequency is less than the first frequency and the fourth frequency is greater than the second frequency.The key detection apparatus according to claim 23, where the hopping frequency increases or decreases in 2 units of frequency.The key detection apparatus according to claim 23, where the frequency range from the third frequency to the fourth frequency comprises three continuous frequency bands, namely, a first frequency band, a second frequency band and a third frequency band, the second frequency band comprises a frequency band from the first frequency to the second frequency, and time stayed in each frequency point within the first frequency band or the third frequency band is less than that in each frequency point within the second frequency band.The key detection apparatus according to claim 23, where the third frequency is 20KHz and the fourth frequency is 500KHz.The key detection apparatus according to claim 26, where the frequency range from the third frequency to the fourth frequency comprises three continuous frequency bands, namely, a first frequency band, a second frequency band and a third frequency band, the first frequency band is from 20KHz to 80KHz, the second frequency band is from 80KHz to 300KHz, and the third frequency band is from 300KHz to 500KHz; and
time stayed in each frequency point within the first frequency band or in the third frequency band is 0.1ms and time stayed in each frequency point within the second frequency band is 0.2ms.
The key detection apparatus according to claim 23, where the hopping frequency progressively increasing from the third frequency to the fourth frequency comprises: the hopping frequency increasing from 20KHz to 21KHz, then increasing from 21KHz to 499KHz in 2KHz and increasing from 499KHz to 500KHz; and the hopping frequency decreasing from the fourth frequency to the third frequency comprises: the hopping frequency decreasing from 500KHz to 20KHz in 2KHz.
说明书全文

CROSS REFERENCE TO RELATED APPLICATIONS

The present application claims priority to Chinese patent application No. 201010515086.3, filed on September 30, 2010, and entitled "METHOD AND APPARATUS FOR DETECTING KEY", and the entire disclosure of which is incorporated herein by reference.

FIELD OF THE DISCLOSURE

The present disclosure generally relates to electronic technology, and more particularly, to a key detection method and apparatus.

BACKGROUND

At present, a variety of keys have been widely used in electronic products. The successful key detection rate may have a direct effect on electronic products. Key detection generally includes detecting an operation on a key and determining whether the key is pressed.

The existing key detection methods mainly include following steps: detecting a key to obtain a key signal; sampling the key signal with a fixed frequency; and outputting a control signal when the sampling times for an effective key signal in a predetermined time span reach or exceed a predetermined value.

In the existing methods, a false key triggering rate and a miss key detection rate increases and a successful key detection rate decreases if there is any interference of environment, such as noise from mobile phones or other electric appliances.

SUMMARY

The present disclosure provides a key detection method to increase the successful key detection rate.

The key detection method may include following steps: detecting a key to obtain a key signal; sampling the key signal at varying frequencies; and outputting a control signal when the sampling times for an effective key signal in a predetermined time span reach or exceed a predetermined value, where the sampling frequency varies from a first frequency increasing to a second frequency and then from the second frequency decreasing to the first frequency, the increasing and decreasing sampling processes are performed repeatedly, and the sampling may stay in each frequency point for a predetermined time.

Optionally, the sampling is performed in 1 unit of frequency increasingly or decreasingly.

Optionally, the key may be a capacitive touch-key.

Optionally, the key may be an air key or a contact key.

Optionally, detecting the key to obtain the key signal may include: detecting a charge change amount in a capacitance in the key; and obtaining the key signal, where the key signal may be a digital signal corresponding to the charge change amount in the capacitance.

Optionally, sampling an effective key signal may include: sampling a key signal; and determining a sampled key signal to be an effective one when numerical value of the sampled key signal is greater than a threshold of the charge change amount.

Optionally, the predetermined time span may be 3ms, the predetermined value may be 80, the first frequency may be 80KHz, the second frequency may be 120KHz, the predetermined time may be 5µs, and the 1 unit of frequency may be 1KHz.

Optionally, the key detection method further includes: receiving external signals; and when the frequency of an external signal is between the first frequency and the second frequency, generating a trigger signal which is used to trigger the key detection process.

Optionally, receiving external signals may include: receiving external signals at hopping frequencies, where receiving at hopping frequencies includes receiving external signals whose frequencies are equal to hopping frequency points, the hopping frequency increases from a third frequency to a fourth frequency, then decreases from the fourth frequency to the third frequency, and so the cycle to repeat, the frequency points in the increasing process are different from those in the decreasing process, and the third frequency is less than the first frequency and the fourth frequency is greater than the second frequency.

Optionally, the hopping frequency increases or decreases in 2 units of frequency.

Optionally, the frequency range from the third frequency to the fourth frequency may include three continuous frequency bands, namely, a first frequency band, a second frequency band and a third frequency band. The second frequency band may include a frequency band from the first frequency to the second frequency. Time stayed in each frequency point within the first frequency band or the third frequency band is less than that in each frequency point within the second frequency band.

Optionally, the third frequency may be 20KHz and the fourth frequency may be 500KHz.

Optionally, the frequency range from the third frequency to the fourth frequency may include three continuous frequency bands, namely, a first frequency band, a second frequency band and a third frequency band. The first frequency band is from 20KHz to 80KHz, the second frequency band is from 80KHz to 300KHz, and the third frequency band is from 300KHz to 500KHz. Time stayed in each frequency point within the first frequency band or in the third frequency band is 0.1ms and time stayed in each frequency point within the second frequency band is 0.2ms.

Optionally, the hopping frequency increasing from the third frequency to the fourth frequency may include: the hopping frequency increasing from 20KHz to 21KHz, then increasing from 21KHz to 499KHz in 2KHz and increasing from 499KHz to 500KHz. The hopping frequency decreasing from the fourth frequency to the third frequency may include: the hopping frequency decreasing from 500KHz to 20KHz in 2KHz.

The present disclosure further provides a key detection apparatus, including: a key detecting unit configured to detect a key to obtain a key signal; and an effective signal detecting unit to sample the key signal at varying frequencies and output a control signal when the sampling times for an effective key signal in a predetermined time span reach or exceed a predetermined value, where the sampling frequency varies from a first frequency increasing to a second frequency, then from the second frequency decreasing to the first frequency, the increasing and decreasing sampling processes are repeated, and the sampling may stay in each frequency point for a predetermined time.

Optionally, the sampling is performed in 1 unit of frequency increasingly or decreasingly.

Optionally, the key may be a capacitive touch-key.

Optionally, the key may be an air key or a contact key.

Optionally, the key detecting unit may include a capacitance detecting unit configured to detect a charge change amount in a capacitance in the key to obtain the key signal, where the key signal may be a digital signal corresponding to the charge change amount in the capacitance.

Optionally, a key signal being an effective key signal means numerical value of the key signal is greater than a threshold of charge change amount.

Optionally, the predetermined time span may be 3ms, the predetermined value may be 80, the first frequency may be 80KHz, the second frequency may be 120KHz, the predetermined time may be 5µs, and the 1 unit of frequency may be 1KHz.

Optionally, the key detection apparatus further includes: a receiving unit configured to receive external signals; and an external signal detecting unit configured to generate a trigger signal which is used to trigger the key detection process when the frequency of an external signal is between the first frequency and the second frequency. After receiving the trigger signal, the key detecting unit may detect a key to obtain a key signal.

Optionally, the receiving unit may include: an antenna configured to receive external environment signals; and a frequency hopping receiving unit configured to receiving external signals at hopping frequencies. Receiving at hopping frequencies includes receiving external signals whose frequencies are equal to hopping frequency points, the hopping frequency increases from a third frequency to a fourth frequency, then decreases from the fourth frequency to the third frequency, and so the cycle to repeat, the frequency points in the increasing process are different from those in the decreasing process, and the third frequency is less than the first frequency and the fourth frequency is greater than the second frequency.

Optionally, the hopping frequency increases or decreases in 2 units of frequency.

Optionally, the frequency range from the third frequency to the fourth frequency may include three continuous frequency bands, namely, a first frequency band, a second frequency band and a third frequency band. The second frequency band may include a frequency band from the first frequency to the second frequency. Time stayed in each frequency point within the first frequency band or the third frequency band is less than that in each frequency point within the second frequency band.

Optionally, the third frequency may be 20KHz and the fourth frequency may be 500KHz.

Optionally, the frequency range from the third frequency to the fourth frequency may include three continuous frequency bands, namely, a first frequency band, a second frequency band and a third frequency band. The first frequency band is from 20KHz to 80KHz, the second frequency band is from 80KHz to 300KHz, and the third frequency band is from 300KHz to 500KHz. Time stayed in each frequency point within the first frequency band or in the third frequency band is 0.1ms and time stayed in each frequency point within the second frequency band is 0.2ms.

Optionally, the hopping frequency increasing from the third frequency to the fourth frequency may include: the hopping frequency increasing from 20KHz to 21KHz, then increasing from 21KHz to 499KHz in 2KHz and increasing from 499KHz to 500KHz. The hopping frequency decreasing from the fourth frequency to the third frequency may include: the hopping frequency decreasing from 500KHz to 20KHz in 2KHz.

In the present disclosure, a key signal is sampled at varying frequencies and its effectiveness is determined. Compared with a fixed sampling frequency in the existing methods, varying sampling frequencies are difficult to be tracked by varying external signals, thereby reducing the probability of sampled signals being interfered by external signals.

Further, key detection may be initiated after an external signal with a frequency within a predetermined frequency range is received. External signals are received at hopping frequency points, which means that external signals with one kind of frequency point are received in a particular time span. Embodiments of the present disclosure combine receiving signals at hopping frequency points with sampling signals at varying frequencies, which further decreases the coincidence between sampling frequency and external signals' frequency, and thereby decreases interferences in key detection.

Further, external signals are received in a predetermined frequency range (from a first frequency to a second frequency) in forward hopping frequency, backward hopping frequency, and so the cycle to repeat, hopping frequency points in the forward process are different from those in the backward process, and staying time at each frequency point lasts for a predetermined time, which improve detection rate, and almost will not miss a key press event.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 schematically illustrates a flow chart of a key detection method according to one embodiment of the present disclosure;

FIG. 2 schematically illustrates a detailed flow chart of Step S12 shown in FIG. 1;

FIG. 3 schematically illustrates a flow chart of a key detection method according to another embodiment of the present disclosure;

FIG. 4 schematically illustrates a structure of a key detection apparatus according to one embodiment of the present disclosure;

FIG. 5 schematically illustrates a structure of a key detection apparatus according to another embodiment of the present disclosure;

FIG. 6 schematically illustrates a structure of an anti-interference capacitive touch-key detection system according to one embodiment of the present disclosure; and

FIG. 7 schematically illustrates a detailed structure of an anti-interference capacitive touch-key detection system according to one embodiment of the present disclosure.

DETAILED DESCRIPTION OF THE DISCLOSURE

In the existing key detection technologies, a key signal is sampled with a fixed frequency and the sampling frequency is easy to be tracked by varied external environment signals, and the sampled signals are thereby interfered, resulting in missing effective key signals or an interference signal mistaken as an effective key signal. The present disclosure provides a method to sample a key signal with varying frequencies, thereby reducing risk of sampling signals being interfered by external signals.

In order to clarify the objects, characteristics and advantages of the disclosure, embodiments of present disclosure will be described in detail in conjunction with accompanying drawings. In following embodiments, a key may be a capacitive touch-key, which is not limited thereto. For example, it may be a resistive key or a switching key in other embodiments.

FIG. 1 schematically illustrates a flow chart of a key detection method according to one embodiment of the present disclosure, the key detection method including steps of:

Step S 11, detecting a key to obtain a key signal; and

Step S12, sampling the key signal at varying frequencies and outputting a control signal when the sampling times for an effective key signal in a predetermined time span reach or exceed a predetermined value, where the sampling frequency varies from a first frequency increasing to a second frequency, then from the second frequency decreasing to the first frequency, the sampling staying in each frequency point for a predetermined time, and the increasing sampling and the decreasing sampling processes are repeated.

Hereinafter, Step S11 and Step S 12 are described in detail.

In Step S11, a key may be detected and a key signal may be obtained. In some embodiments, the key may be a capacitive touch-key, such as an air key or a contact key. Generally, there is a parasitic capacitance to ground in a key. Once a key is pressed, the parasitic capacitance in the key is to be paralleled with a finger capacitance to ground. Therefore, whether a key is pressed can be determined by detecting the capacitance charge or the capacitance value.

In some embodiments, Step S11 may include: detecting a charge change amount in a capacitance (e.g. a parasitic capacitance) to obtain a key signal, where the key signal is a digital signal corresponding to the charge change amount in the capacitance and used to determine whether a key is pressed in subsequent steps. A digital signal corresponding to the charge change amount in the capacitance means numerical value which the digital signal represents may be the charge change amount in the capacitance or may be proportional to the charge change amount in the capacitance. The technology for detecting charge change amount in a capacitance is known to those skilled in the art and is not described in detail herein.

Following Step S11, Step S12 may be performed. In Step S12: sampling the key signal at varying frequencies and outputting a control signal when the sampling times for an effective key signal in a predetermined time span reach or exceed a predetermined value. Namely, whether the sampling times for an effective key signal in a predetermined time span reach or exceed a predetermined value is determined. If so, a control signal is output and the key may be predetermined to be pressed; otherwise, the key signal is determined to be caused by interference of external signals. Sampling at varying frequencies may include sampling from a first frequency increasing to a second frequency, then from the second frequency decreasing to the first frequency, repeating the increasing and decreasing sampling processes, and the sampling stay in each frequency point for a predetermined time.

Optionally, sampling an effective key signal may include: sampling a key signal; and determining a sampled key signal to be an effective one when numerical value of the sampled key signal is greater than a threshold of charge change amount.

In some embodiments, FIG. 2 schematically illustrates a detailed flow chart of Step S12. Step S12 may include steps of:

Step S121, sampling the key signal, namely, sampling a digital signal corresponding to the charge change amount in a capacitance obtained in Step S11, where the sampling frequency increases from a first frequency to a second frequency and then decreases from the second frequency to the first frequency, this increasing and decreasing sampling process is performed repeatedly, and the sampling may stay in each frequency point for a predetermined time.

In some embodiments, the sampling frequency may vary between the first frequency and the second frequency (including the first frequency and the second frequency) in turn. An increment value (an increment value each time of the sampling frequency increasing from the first frequency to the second frequency) and a decrement value (an decrement value each time of the sampling frequency decreasing from the second frequency to the first frequency) of the sampling frequency is 1 unit of frequency, namely, the sampling frequency increases or decreases in an equal difference. Specifically, the sampling frequency increases from the first frequency to the second frequency in 1 unit of frequency (i.e. the unit of the first frequency and the second frequency, for example, if the unit is KHz, the sampling frequency increasing in 1KHz each time) and the sampling may stay in each frequency point for a predetermined time, namely, the sampling frequency increases in 1 unit of frequency every predetermined time; then the sampling frequency decreases from the second frequency to the first frequency in 1 unit of frequency and the sampling may stay in each frequency point for the predetermined time, namely, the sampling frequency decreases in 1 unit of frequency every predetermined time; furthermore, the sampling frequency increases from the first frequency to the second frequency and decreases from the second frequency to the first frequency, and the increasing sampling and the decreasing sampling is repeated.

The first frequency and the second frequency may respectively be a lower limit and an upper limit of frequency of signals generated after a key is pressed and they are always determined by an experience value according to practical application. For example, a capacitive touch-key is pressed by a finger. Signals between 80KHz and 120KHz may be generated accordingly. Therefore, the first frequency may be set to be 80KHz and the second frequency may be set to be 120KHz. The 1 unit of frequency may be 1KHz. The predetermined time may depend on a predetermined time span and a predetermined value of times (sometimes being experience value). Namely, according to the predetermined time, effective key signals may be sampled more than the predetermined value of times in the predetermined time span. For example, the predetermined time span is 3ms and the predetermined value is 80, then the predetermined time may be 5µs. The sampling frequency may be 80KHz at first, then increases to 81KHz 5µs later, increases to 82KHz after another 5µs, and so on, until the sampling frequency reaches 120KHz, and it takes 200µs to finish this increasing process; then, the sampling frequency decreases from 120KHz to 119KHz 5µs later, decreases to 118KHz after another 5µs, and so on, until the sampling frequency reaches 80KHz, and it takes 200µs to finish this decreasing process. Thus a cycle process including a increasing process and a decreasing process may be 400µs, and a key signal (digital signal) may be sampled 11 times therein. 3ms includes 7.5 cycles, therefore, a key signal may be sampled 82 to 83 times therein.

Step S122, determining whether a sampled key signal is an effective key signal, if so, proceeding to Step S123; otherwise, proceeding to Step S124. A key signal being an effective key signal means numerical value of the key signal is greater than a threshold of charge change amount.

Step S123, a counting number being increased by 1 and proceeding to Step S124. The original counting number is 0 and the counting number is used to count times for obtaining an effective key signal. The counting number may be increased by 1 when the sampled key signal is an effective key signal.

Step S124, determining whether the current time reaches or exceeds the predetermined time span, if so, proceeding to Step S125; otherwise, proceeding to Step S122. Each time after the sampled key signal is determined to be not an effective key signal, or the sampled key signal is determined to be an effective key signal and the counting number is increased by 1, the difference between the current time and the start time of Step S12 is determined whether to be greater than or equal to the predetermined time span, if so, proceeding to Step S125; otherwise, proceeding to Step S122.

Step S125, determining whether the counting number is more than or equal to the predetermined value, if so, proceeding to Step S126; otherwise, proceeding to

Step S127. If difference between the current time and the start time of Step S12 is greater than or equal to the predetermined time span, the counting number is determined whether to be greater than or equal to the predetermined value, if so, proceeding to Step S126; otherwise, proceeding to Step S127.

Step S126, outputting a control signal. If the counting number within the predetermined time span is greater than or equal to the predetermined value, a control signal is output, which means that the key is pressed or probable to be pressed.

Step S127, determining to be interference of external signals. If the counting number within the predetermined time span is less than the predetermined value, it means that the key is not pressed and the key detection may be interfered by external interference signals.

Generally, the abovementioned Step S121 may be performed in parallel with Step S122 to S125.

The control signal and / or the determination result of whether the sampling times for an effective key signal in a predetermined time span reach or exceed a predetermined value may be used to further determine operation on the key in subsequent process. For example, Step S11 and Sep S12 may be performed repeatedly in 3s. If control signals are generated all the time, it means the key is pressed continuously.

FIG. 3 schematically illustrates a flow chart of a key detection method according to another embodiment of the present disclosure. The difference between the embodiment and the first embodiment lies in: before Step S11, the method may further include: receiving external signals and generating a trigger signal to trigger the key detection process when the frequency of an external signal is between a first frequency and a second frequency, namely, after a trigger signal is generated, Step S11 is started.

The key detection method shown in FIG. 3 may include:

Step S21, receiving external signals;

Step S22, generating a trigger signal to trigger the key detection process when the frequency of an external signal is between the first frequency and the second frequency;

Thereafter, Step S11, detecting a key to obtain a key signal, namely, detecting a key after the trigger signal is generated; and

Step S12, sampling the key signal at varying frequencies and outputting a control signal when the sampling times for an effective key signal in a predetermined time span reach or exceed a predetermined value, where the sampling frequency varies from a first frequency increasing to a second frequency and then decreasing from the second frequency to the first frequency, the increasing and decreasing sampling processes are repeated, and the sampling may stay in each frequency point for a first predetermined time.

The abovementioned Steps S11 and S12 are the same as in the first embodiment, so only Steps S21 and S22 are described in detail hereinafter.

First, Step S21 may be performed. In Step S21, external signals may be received. The external signals may include signals caused by environment signals and key operation from external, which may be received through an antenna. A frequency range of signals received by the antenna may depend on the antenna. In some embodiments, the frequency range of signals received by the antenna may be from 20KHz to 500KHz.

In some embodiments, receiving external signals may include: receiving external signals at hopping frequencies, where receiving at hopping frequencies includes receiving external signals whose frequencies are equal to hopping frequency points, the hopping frequency increases from a third frequency to a fourth frequency, then decreases from the fourth frequency to the third frequency, and so the cycle to repeat, the frequency points in the increasing process are different from those in the decreasing process, and the third frequency is less than the first frequency and the fourth frequency is greater than the second frequency. The third frequency is a lower limit of frequency of signals received by an antenna, for example, 20KHz; and the fourth frequency is an upper limit of frequency of signals received by the antenna, for example, 500KHz. In other embodiments, external signals may be received not at hopping frequencies, while the antenna keeps in reception state all the time.

In some embodiments, an increment value (an increment value each time of the hopping frequency increasing from the third frequency to the fourth frequency) and a decrement value (a decrement value each time of the hopping frequency decreasing from the fourth frequency to the third frequency) of the hopping frequency is 2 units of frequency, namely, the hopping frequency increases or decreases in an equal difference.

The hopping frequency progressively increasing from 20KHz to 500KHz may be frequencies with an almost equal difference, e.g., the hopping frequency increasing from 20KHz to 21KHz, then increasing from 21KHz to 499KHz in 2KHz and then increasing from 499KHz to 500KHz; the hopping frequency progressively decreasing from 500KHz to 20KHz may be frequencies with an equal difference, e.g., the hopping frequency decreasing from 500KHz to 20KHz in 2KHz. In some embodiments, the frequencies points in the increasing process and in the decreasing process are different, e.g., odd ones and even ones, respectively.

Optionally, the frequency range from the third frequency to the fourth frequency may include three continuous frequency bands, namely, a first frequency band, a second frequency band and a third frequency band. The second frequency band may include a frequency band from the first frequency to the second frequency. Time stayed in each frequency point within the first frequency band or the third frequency band is less than that in each frequency point within the second frequency band. For example, the third frequency is 20KHz and the fourth frequency is 500KHz. Accordingly, the first frequency band may be from 20KHz to 80KHz, the second frequency band may be from 80KHz to 300KHz, and the third frequency band may be from 300KHz to 500KHz. Time stayed in each frequency point within the first frequency band or in the third frequency band is 0.1ms and time stayed in each frequency point within the second frequency band is 0.2ms.

In some embodiments, time stayed at each frequency point within a first frequency band, a second frequency band and a third frequency band (a frequency band from a third frequency to a fourth frequency) may be the same. In some embodiments, external signals with frequencies within a first frequency band or a third frequency band are generally interference signals, shortening residence time at each frequency point within these two frequency bands (being less than that at each frequency point within a second frequency band) may increase frequency hopping rate, thus reduce detection time and improve a utilization rate of system resources.

Following Step S21, Step S22 may be performed. In Step S22, a trigger signal may be generated to trigger the key detection process when the frequency of an external signal is between the first frequency and the second frequency. The first frequency and the second frequency may respectively be a lower limit and an upper limit of frequency of signals which are caused by an operation on a key (e.g. pressing a key). In some embodiments, the first frequency is 80KHz and the second frequency is 120KHz. In the present disclosure, a subsequent key detection process is performed when an external signal with a frequency between the first frequency and the second frequency (including the first frequency and the second frequency) is received, namely, when a key is possible to be pressed. Specifically, whether the frequency of an external signal is between the first frequency and the second frequency or not is determined. If so, a trigger signal is generated; otherwise, the external signal is determined to be caused by interferences of environment.

Corresponding to the abovementioned key detection method, a key detection apparatus according to one embodiment of the present disclosure is illustrated in FIG. 4, including a key detecting unit 41 and an effective signal detecting unit 42.

The key detecting unit 41 is configured to detect a key to obtain a key signal. In some embodiments, the key may be a capacitive touch-key, the key detecting unit may be a capacitance detecting unit configured to detect a charge change amount in a capacitance. The key signal is a digital signal corresponding to the charge change amount in the capacitance. In some embodiments, the capacitance detecting unit may be implemented by an Analog to Digital Converter (ADC) which is configured to detect the charge change amount in the capacitance and convert analog data of charge change to digital data.

The effective signal detecting unit 42 is configured to sample the key signal at varying frequencies and output a control signal when the sampling times for an effective key signal in a predetermined time span reach or exceed a predetermined value, where the sampling frequency varies from a first frequency increasing to a second frequency, then from the second frequency decreasing to the first frequency, the increasing and decreasing sampling processes are repeated, and the sampling may stay in each frequency point for a predetermined time. The 1 unit of frequency may be 1KHz. A key signal being an effective key signal means numerical value of the key signal is greater than a threshold of charge change amount. In some embodiments, the effective signal detecting unit 42 may be implemented by a Micro Controller Unit (MCU).

A key detection apparatus according to another embodiment of the present disclosure is illustrated in FIG. 5, including a receiving unit 51, an external signal detecting unit 52, a key detecting unit 41 and an effective signal detecting unit 42.

The receiving unit 51 is configured to receive external signals. In some embodiments, the receiving unit 51 may include an antenna 511 and a frequency hopping receiving unit 512. The antenna 511 is configured to receive external environment signals; and the frequency hopping receiving unit 512 is configured to receive external signals at hopping frequencies. Receiving at hopping frequencies includes receiving external signals whose frequencies are equal to hopping frequency points, and transmitting the received external environment signals to the external signal detecting unit 52, the hopping frequency increases from a third frequency to a fourth frequency, then decreases from the fourth frequency to the third frequency, and so the cycle to repeat, the frequency points in the increasing process are different from those in the decreasing process, and the third frequency is less than the first frequency and the fourth frequency is greater than the second frequency. In other embodiments, a receiving unit 51 may be used as an antenna, namely, the receiving unit 51 directly receives external environment signals and transmits the received external environment signals to an external signal detecting unit 52.

The hopping frequency increases or decreases in 2 units of frequency. The frequency range from the third frequency to the fourth frequency may include three continuous frequency bands, namely, a first frequency band, a second frequency band and a third frequency band. The second frequency band may include a frequency band from the first frequency to the second frequency. Time stayed in each frequency point within the first frequency band or the third frequency band is less than that in each frequency point within the second frequency band.

The external signal detecting unit 52 is configured to generate a trigger signal which is used to trigger the key detection process when the frequency of an external signal is between the first frequency and the second frequency. The external signal detecting unit 52 is connected to the key detecting unit 41 and transmits the trigger signal to it.

The key detecting unit 41 is configured to detect a key to obtain a key signal after receiving the trigger signal from the external signal detecting unit 52. The effective signal detecting unit 42 is the same as the first embodiment and is not described in detail therein.

The abovementioned key detection method may be applied in a key detection system, which may eliminate interference of ambient noises and increase accuracy of key detection. The key may be a contact key, such as a capacitive touch-key, or other types of keys, such as an air key. The contact key denotes the key where bodies may directly contact with metal plates and the air key denotes the key where bodies may not directly contact with metal plates.

FIG. 5 schematically illustrates a structure of an anti-interference capacitive touch-key detection system, including: capacitive touch-keys 21, an environment detecting unit 31, a key detecting unit 32 and a control unit 40. The environment detecting unit 31 is configured to detect background environment signals, shield signals with frequencies beyond the range from a first frequency to a second frequency and generate a trigger signal after a signal with a frequency between the first frequency and the second frequency is detected; the key detecting unit 32 is configured to detect a key, triggered by the trigger signal, to obtain a key signal; and the control unit 40 is configured to sample the key signal, triggered by the trigger signal, and output a control signal when the sampling times for an effective key signal in a first time window reach or exceed a predetermined value.

The capacitive touch-keys are set on a detection plate 20. The detection plate 20 may be a Printed Circuit Board (PCB). At least one balance point 22 is set on the detection plate 20. The balance point may be made of metal and used to adjust the frequency reception and response range of the detection plate 20, which is described in further detail below.

Furthermore, the environment detecting unit 31 and the key detecting unit 32 may be integrated on one detection chip 30. The key detecting unit 32 is configured to detect a charge change amount in the keys 21, namely, the difference between the current charge in the keys 21 and the charge therein under the original balanced state, and convert the charge change amount to corresponding digital signals which correspond to the charge change amount.

The control unit 40 may be implemented by a MCU.

FIG. 7 schematically illustrates a detailed structure of FIG. 6. Referring to FIG. 7, the environment detecting unit 31 may include: a system interference detecting module 311 configured to detect system noise signals with frequencies within the frequency range of a power supply; a low-frequency interference detecting module 312 configured to detect low-frequency noise signals with frequencies between a third frequency and a fourth frequency, where the third frequency is less than the first frequency and the fourth frequency is greater than the second frequency, and generate a trigger signal after a signal with a frequency between the first frequency and the second frequency is detected; a high-frequency interference detecting module 313 configured to detect high-frequency noise signals with frequencies between a fifth frequency and a sixth frequency, where the fifth frequency is greater than the fourth frequency; and a detection control module 314 configured to control the system interference detecting module 311, the low-frequency interference detecting module 312 and the high-frequency interference detecting module 313 to operate successively and repeatedly.

The system interference detecting module 311 is mainly configured to detect noises caused by a power supply and other noises with frequencies within the frequency range of the power supply. In some embodiments, the power supply is formed after a voltage transformation of a lighting source and a frequency range of the corresponding system noise signals to be detected is from 50Hz to 75Hz. Generally, these system noise signals may be detected through power ripple detection circuit and method.

The low-frequency interference detecting module 312 is mainly configured to detect low-frequency noise signals with frequencies between the third frequency and the fourth frequency. In some embodiments, the range may be from 20KHz to 500KHz. In order to receive signals with frequencies within the range, the detection plate 20 is configured to be an antenna of the low-frequency interference detecting module 312. One or more balance points made of metal may be set on the detection plate 20 to adjust its capacitive reactance and inductive reactance. Due to the above adjustment and additional adjustment of shape and size of the detection plate 20, both the frequency response and receiving range for signals of the detection plate 20 can include the range from the third frequency to the fourth frequency, namely, the detection plate 20 can receive the signals with frequencies between 20KHz and 500KHz. In some embodiments, capacitive reactance of the detection plate 20 may be 0.5pF, and inductive reactance may be 0.1mH to 0.8mH. The keys 21 and the whole detection plate 20 may be taken as the antenna of the low-frequency interference detecting module 312 and no special low-frequency antenna needs to be configured, thereby improving integration of the system and reducing size of a final product.

The high-frequency interference detecting module 313 is configured to detect high-frequency noise signals with frequencies between the fifth frequency and the sixth frequency. Specifically, the range may be from 900MHz to 3GHz. The high-frequency noise signals are received through an individual antenna 312a.

An anti-interference capacitive touch-key detection system and a detection method therein according to one embodiment of the present disclosure are described in detail in conjunction with FIG. 7.

Initialization may be performed following a power-on event of the anti-interference capacitive touch-key detection system. During the initialization, a detection chip 30 is initialized, namely, the environment detecting unit 31 and the key detecting unit 32 are initialized; furthermore, a control unit 40 is initialized as well. It may take 20ms to complete the whole initialization.

Following the initialization, the environment detecting unit 31 may detect background environment signals, shield signals with frequencies beyond the range from a first frequency to a second frequency and generate a trigger signal after a signal with a frequency between the first frequency and the second frequency is detected. Specifically, the environment detecting unit 31 may generate a trigger signal after a signal with a frequency between 80KHz and 120KHz is detected, and shield signals whose frequencies are other frequencies. It should be known that, a signal with a frequency between 80KHz and 120KHz being detected means that there is a signal between 80KHz and 120KHz whose amplitude is larger than a particular amplitude threshold. The background environment signal detection process is shown in Step S11 in FIG. 3.

The detection process of background environment signals will be described in detail. First, a system interference detecting module 311 may detect system noise signals with frequencies within the frequency range of a power supply. Specifically, frequencies of these system noise signals are between 50Hz and 75Hz. If a signal with a frequency within the range is detected, the key detecting unit 32 may not be triggered to detect a key and the control unit 40 may not determine the key as well. In some embodiments, if amplitude of a system noise signal is less than a first predetermined amplitude (being 100mV here), for example, 50mV, the amplitude of the system noise signal may be transmitted to the control unit 40 and added to a reference signal by the control unit 40. In a subsequent determination process of effective key signals, the amplitude of the system noise signal is removed from a key signal, thereby avoiding the influence to determination caused by power ripple interference. If amplitude of a system noise signal is greater than a second predetermined amplitude (being 500mV here), for example, 800mV, the amplitude of the system noise signal may be transmitted into the control unit 40 and limited therein, namely, in the subsequent determination process of effective key signals, a key signal whose amplitude is greater than the second predetermined amplitude may be determined to be caused by system noises but not a press on a key.

Following the system noise signal detection, the detection control module 314 may control the low-frequency interference detecting module 312 to detect low-frequency noise signals with frequencies between the third frequency and the fourth frequency. Specifically, frequencies of these low-frequency noise signals are between 20KHz and 500KHz and the low-frequency noise signals are received through the detection plate 20. The detailed detection is performed at hopping frequencies. Detecting at hopping frequencies includes receiving external signals whose frequencies are equal to hopping frequency points, where the hopping frequency increases from the third frequency (20KHz) to the fourth frequency (500KHz) and then decreases from the fourth frequency (500KHz) to the third frequency (20KHz), and the frequency points in the increasing process are different from those in the decreasing process. The hopping frequency increases or decreases in 2 units of frequency, namely, the hopping frequency increases or decreases by equal difference.

Low-frequency noise signals with frequencies beyond the range from 80KHz to 120KHz may be shielded, namely, neither the key detecting unit 32 nor the control unit 40 is triggered, thereby avoiding false determination on a key press event caused by low-frequency noise signals.

Following the low-frequency noise signal detection, the detection control module 314 may control the high-frequency interference detecting module 313 to detect high-frequency noise signals with frequencies between the fifth frequency (900MHz) and the sixth frequency (3GHz). High-frequency noise signals with frequencies between 900MHz and 3GHz may be shielded, namely, neither the key detecting unit 32 nor the control unit 40 is triggered, thereby avoiding false determination on a key press event caused by high-frequency noise signals.

Following the high-frequency noise signal detection, the detection control module 314 may control the system interference detecting module 311, the low-frequency interference detecting module 312 and the high-frequency interference detecting module 313 to operate successively and repeatedly. Namely, system noise signals, low-frequency noise signals and high-frequency noise signals are detected repeatedly.

If a signal with a frequency between the first frequency (80KHz) and the second frequency (120KHz) is detected at the low-frequency interference detecting module 312, a trigger signal may be generated to trigger the key detecting unit 32 and the control unit 40 to operate. The key detecting unit 32 is configured to detect the capacitive touch-key to obtain a key signal. The control unit 40 is configured to sample the key signal and output a control signal when the sampling times for an effective key signal in a first time window (3ms) reach or exceed a predetermined value.

In some embodiments, a sampling frequency may vary between the first frequency and the second frequency in turn. The sampling is performed in 1 unit of frequency increasingly or decreasingly, namely, the sampling frequency increases or decreases in an equal difference. Specifically, the sampling frequency increases from the first frequency to the second frequency in 1 unit of frequency and the sampling may stay in each frequency point for a predetermined time, namely, the sampling frequency increases in 1 unit of frequency every predetermined time; then the sampling frequency decreases from the second frequency to the first frequency in 1 unit of frequency and the sampling may stay in each frequency point for the predetermined time, namely, the sampling frequency decreases in 1 unit of frequency every predetermined time; furthermore, the sampling frequency increases from the first frequency to the second frequency and decreases from the second frequency to the first frequency, and the increasing sampling and the decreasing sampling is repeated.

It should be noted that, during the process of sampling a key signal at the control unit 40, background environment signals are still detected continually at the environment detecting unit 31.

If the sampling times for an effective key signal in a first time window are less than a predetermined value, namely, no key press event being detected in the first time window and no control signal being output, the environment detecting unit 31 may enter a sleep state and stop detecting background environment signals.

If the sampling times for an effective key signal in a first time window reach or exceed a predetermined value, namely, a key press event being detected in the first time window and a corresponding control signal being output, then a second time window is opened, where duration of the second time window is longer than that of the first time window. In some embodiments, duration of the second time window may be 3s. The key signal may be continually sampled in the second time window and a control signal may be output when the sampling times for an effective key signal in any first time window of the second time window reach or exceed the predetermined value. Namely, the key signal is detected still by taking the first time window as basis unit in the second time window. A control signal may be output again when the sampling times for an effective key signal in any first time window of the second time window reach or exceed the predetermined value (80 times). If the sampling times for an effective key signal in a second time window are less than a predetermined value, no key press event being detected in the second time window, the environment detecting unit 31 may enter a sleep state and stop detecting background environment signals, thereby reducing power consumption of the whole system. In practice, key press events always occur successively, such as volume is adjusted or channel is switched by pressing a key successively. Therefore, after a key press event is determined in the first time window, the longer second time window is opened to catch other following key press events, thereby effectively improving accuracy of successive key press event detection.

In some embodiments, a watchdog module may be included in the anti-interference capacitive touch-key detection system, configured to wake up the environment detecting unit 31 to detect system noise signals, low-frequency noise signals and high-frequency noise signals if the environment detecting unit 31 has been in a sleep state for a predetermined sleep time(being 128ms here). Generally, duration of a key press event is much longer than 128ms, therefore the environment detecting unit 31 will not miss a key press event when it is in a sleep state, thereby reducing power consumption and ensuring accuracy of detection.

In some embodiments, the control unit 40 may receive background environment signals from the environment detecting unit 31. Considering system noise signals, low-frequency noise signals and high-frequency noise signals being successively scanned one time at the environment detecting unit 31 as a cycle, during a predetermined monitoring time, if a signal in one frequency point exists in 500 cycles (corresponding time of 500 cycles being the predetermined monitoring time), compensation is performed on the threshold of charge change amount according to the amplitude of the signal in the frequency point. For example, a metal component is placed around the capacitive touch-keys 21 for a long time, causing interference with a fixed frequency of 30KHz. Therefore, interference signals exists in the frequency point of 30KHz during background environment signal detection process of 500 cycles and the control unit 40 may perform compensation on the threshold of charge change amount according to the amplitude of the signal in the frequency point of 30KHz. For example, if charge in capacitive touch-keys in a balance state is reduced because of the external interference of 30KHz, the threshold of charge change amount may be adjusted when detecting the capacitive touch-keys, and the adjusted threshold may adapt to the charge in a balance state. Based on the above adjustment, the anti-interference capacitive touch-key detection system may be self-adapting to environment. And the threshold of charge change amount is modified to an original value when the fixed frequency interference disappears, thereby implementing memory and recovery function of environment and ensuring accuracy of detection.

In conclusion, in the present disclosure, a key signal is sampled with varying frequencies and its effectiveness is determined. Compared with a fixed sampling frequency in the existing methods, varying sampling frequencies are difficult to be tracked by varied external signals, thereby reducing the probability of sampled signals being interfered by external signals.

Furthermore, a key detection process may be initiated after an external signal with a frequency within a predetermined frequency range is received. Besides, external signals are received at hopping frequencies, which means that external signals with one kind of frequency point are received in a particular time span. Embodiments of the present disclosure combine receiving signals at hopping frequencies with sampling signals at varying frequencies, which further decreases the coincidence between sampling frequency signals and external signals' frequency, and thereby decreases interferences in key detection.

Further, external signals are received in a predetermined frequency range (from a first frequency to a second frequency) in forward hopping frequency, backward hopping frequency, and so the cycle to repeat, hopping frequency points in the forward process are different from those in the backward process, and staying time at each frequency point lasts for a predetermined time, which improve detection rate, and almost will not miss a key press event.

Although the present disclosure has been disclosed as above with reference to preferred embodiments thereof but will not be limited thereto. Those skilled in the art can modify and vary the embodiments without departing from the spirit and scope of the present disclosure. Accordingly, without departing from the scope of the present invented technology scheme, whatever simple modification and equivalent variation belong to the protection range of the present invented technology scheme.

高效检索全球专利

专利汇是专利免费检索,专利查询,专利分析-国家发明专利查询检索分析平台,是提供专利分析,专利查询,专利检索等数据服务功能的知识产权数据服务商。

我们的产品包含105个国家的1.26亿组数据,免费查、免费专利分析。

申请试用

分析报告

专利汇分析报告产品可以对行业情报数据进行梳理分析,涉及维度包括行业专利基本状况分析、地域分析、技术分析、发明人分析、申请人分析、专利权人分析、失效分析、核心专利分析、法律分析、研发重点分析、企业专利处境分析、技术处境分析、专利寿命分析、企业定位分析、引证分析等超过60个分析角度,系统通过AI智能系统对图表进行解读,只需1分钟,一键生成行业专利分析报告。

申请试用

QQ群二维码
意见反馈