A multi-channel touch detection system and detection method

Through the multi-channel touch detection system and method, the capacitive value detection output function and filter technology is used to solve the problem of electromagnetic interference in complex environments, and efficient and stable touch detection is achieved, which improves the system cost-effective.

CN118694355BActive Publication Date: 2024-12-20CHIPINTELLI TECH CO LTD
View PDF -1 Cites 0 Cited by

Patent Information

Application Number
CN202411183693.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-12-20
Estimated Expiration
2044-08-27

AI Technical Summary

Technical Problem

The existing capacitive touch detection circuits are susceptible to electromagnetic interference, resulting in unstable touch response in complex environments. The existing anti-interference method has limited effect and cannot effectively suppress periodic interference and strong interference signals.

Method used

Using a multi-channel touch detection system and method, the output function of capacitance value detection is constructed, the charging current and sampling frequency point are adjusted, and the interference signal is screened out through the second-order differential error calculation and baseline follow-up mode. Improve detection accuracy and stability.

Benefits of technology

Effectively avoid external electromagnetic signal interference, improve detection speed and accuracy, enhance the system's anti-interference ability, and achieve cost-effective high-performance touch detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118694355B_ABST
    Figure CN118694355B_ABST
Patent Text Reader

Abstract

A multi-channel touch detection system and detection method, the detection method comprising the following steps: step 1. constructing a capacitance value detection output function, step 2. setting a sampling frequency and a charging current for each time slice, detecting changes in external capacitance, and obtaining an output frequency; step 3. inputting the output frequency and the corresponding charging current into the capacitance value detection output function to obtain a capacitance detection original value, and screening all capacitance detection original values ​​in each detection cycle to obtain a preferred capacitance value; step 4. judging whether a touch occurs according to the preferred capacitance value. The present invention adjusts the sampling frequency and the detection frequency through mode setting, and obtains the capacitance value detection output function in advance, which can effectively avoid interference of external electromagnetic signals on capacitance detection, and improves the detection speed by directly calling the capacitance value detection output function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of electronic circuits and relates to a capacitive touch detection circuit, and in particular to a multi-channel touch detection system and a detection method. Background Art

[0002] With the popularization of smart appliances, capacitive touch buttons are an excellent choice for fast response and low cost. The principle of capacitive touch is that when a finger approaches the sensing electrode, the capacitance of the sensing electrode will increase. This capacitance is positively correlated with the dielectric constant of the charge conducting medium and the finger touch area. The change in capacitance value is detected by the circuit to determine whether there is a touch behavior. Commonly used capacitance detection circuits include charge transfer capacitance acquisition circuit, relaxation oscillation circuit, Sigma-delta capacitance detection circuit, etc.

[0003] Capacitive touch detection is easily affected by electrical, magnetic, thermal and other factors, making it difficult for the touch response to operate stably under different working conditions. The structure of the charge transfer capacitor acquisition circuit is relatively complex. It can accurately control the charge transfer process and achieve high capacitance detection accuracy, but the cost of this circuit is relatively high and the control is complex. The Sigma-delta detection circuit uses Sigma-delta modulation technology to output a signal with a high signal-to-noise ratio. It has a complex structure and high cost. The relaxation oscillation circuit is a self-excited oscillation circuit with a simple structure, high accuracy, and cost advantages, but the signal processing is relatively complex. The circuit characteristic of the relaxation oscillation circuit is that the output frequency decreases as the detection capacitance increases. By detecting the change in capacitance when the finger approaches the capacitive touch device, it can be determined whether the finger has a series of behaviors such as approaching the detection device or touching the detection device.

[0004] The Chinese invention patent with application number 201511020533.7 and patent name "A method for improving the anti-electromagnetic interference performance of capacitive touch buttons" proposes using multiple switching frequencies to determine whether the slope of the key value at the key discrimination frequency exceeds the set range to determine whether it is subject to electromagnetic interference, and use other uninterrupted frequencies for key discrimination to make touch detection more stable. However, this method only processes data after multi-frequency sampling at the acquisition end, which has limited interference suppression capabilities.

[0005] The Chinese invention patent with application number 201410283861.5 and patent name "A method and device for anti-interference of capacitive touch sensor" proposes to determine whether there is noise in the collected original capacitance data, and use the original capacitance data without noise as the reference value of capacitance to determine whether a touch has occurred. However, only filtering out the noise signal cannot suppress periodic interference, and once there is a strong interference signal, the touch behavior cannot be identified. Summary of the invention

[0006] In view of the above-mentioned defects in the prior art, the present invention discloses a multi-channel touch detection system and a detection method.

[0007] A multi-channel touch detection method according to the present invention comprises the following steps:

[0008] Step 1. Construct the capacitance value detection output function, specifically:

[0009] Step 11. Configure a detection cycle, each detection cycle includes multiple time slices, and set different charging currents for each time slice through a mode drive controller, so that the multi-drive relaxation oscillation circuit outputs detection frequency points of different frequencies;

[0010] Step 12. The data sampler configures different detection frequencies for different time slices within the detection cycle;

[0011] Step 13. After setting different detection frequencies and sampling frequencies for each time slice in the detection cycle in steps 11 and 12, repeat the detection cycle to perform continuous capacitance detection;

[0012] For each time slice, different sampling frequencies are used for detection to obtain different capacitance detection original values ​​and corresponding output frequencies;

[0013] Step 14. Replace the capacitor to be tested, repeat step 13, and use the output frequency points and original capacitance detection values ​​of each time slice obtained in step 13, and the charging current corresponding to the time slice to construct a capacitance value detection output function F(k1, k2), where k1 represents the charging current, k2 represents the output frequency point, and F represents the corresponding original capacitance detection value;

[0014] Step 2. After obtaining the capacitance value detection output function F(k1, k2), set the sampling frequency and charging current for each time slice according to steps 11 and 12, detect the change of external capacitance, and obtain the output frequency;

[0015] Step 3. Input the output frequency point and the corresponding charging current into the capacitance detection output function F(k1, k2) to obtain the capacitance detection original value, and screen all the capacitance detection original values ​​in each detection cycle to obtain the optimal capacitance value;

[0016] Step 4: Determine whether a touch occurs based on the preferred capacitance value.

[0017] Preferably, the screening method in step 3 specifically comprises the following steps:

[0018] Step 31. Pass multiple capacitance detection original values ​​in the same detection cycle through a preferred filter, filter out the interfered capacitance values, and output a preliminary screening capacitance value; the preferred filter is a variance filter or a multi-order median filter;

[0019] Step 32. Set the initial screening capacitance value X n As the excitation input, the IIR filter is further smoothed to suppress periodic interference. The subscript n represents different primary screening capacitor values;

[0020] IIR filter, which is implemented as follows:

[0021] Y n =(1-L)* Y n-1 +L*X n (Formula 1)

[0022] Y n is the initial screening capacitance value X n The preferred capacitance value after inputting the IIR filter. When n=1, Y0 takes the power-on constant value, and L is the filter parameter.

[0023] Step 33. Calculate the second-order differential error of the optimal capacitance value output by the IIR filter;

[0024] The formula for calculating the second-order differential value FD of the preferred capacitance value is:

[0025] FD = Y j+k +Y j-k -2*Y j (Formula 2)

[0026] Solve the second-order difference value FD, k is the set second-order difference offset length; Y j+k , Y j-k , Y j They respectively represent the preferred capacitance values ​​after the j+kth, jkth, and jth initial screening capacitance values ​​are input into the IIR filter.

[0027] An error detection threshold is set. When FD is greater than the error detection threshold, the corresponding preferred capacitance value is discarded.

[0028] Preferably, in step 33, the preferred capacitance value output by the IIR filter is stored in a large bit width data memory, and the storage method is: each preferred capacitance value is stored in chronological order starting from the least significant bit of the first channel of the memory, and the stored data is moved from the least significant bit to the most significant bit each time it is stored. When the channel is full, the preferred capacitance value is removed from the most significant bit; the number of preferred capacitance values ​​stored in each channel is 2k+1, and k is the set second-order differential offset length.

[0029] Preferably, the capacitance value detection output function F(k1, k2) obtained in step 1 is a capacitance value lookup table, index one of the capacitance value lookup table is the charging current of the relaxation oscillator, index two is the output frequency point within the circuit detection range, and the lookup result is the original capacitance detection value.

[0030] Preferably, in step 4,

[0031] When the difference between the preferred capacitance value and the baseline value used as a comparison reference is greater than the target finger threshold and the duration is greater than the time threshold T1, it is considered that a touch occurs, otherwise it is considered that no touch occurs;

[0032] If it is determined that no touch occurs, the baseline is updated using the obtained preferred capacitance value;

[0033] The modes of baseline update include normal following mode and abnormal following mode;

[0034] If the capacitance changes but the capacitance value does not increase, the abnormal following mode is performed, otherwise the normal following mode is entered;

[0035] In normal follow mode, if:

[0036] Baseline value before update + target finger threshold > preferred capacitance value > baseline value before update,

[0037] Then update, the update method is

[0038] Baseline value after update = baseline value before update + baseline value update step length,

[0039] if:

[0040] Preferred capacitance value < baseline value before update:

[0041] Then the updated baseline value = the baseline value before the update - the baseline value update step;

[0042] No update in other cases;

[0043] In abnormal follow mode, if:

[0044] The preferred capacitance value is less than the baseline value before updating - the baseline abnormal threshold.

[0045] If yes, the initial baseline value is adopted again, otherwise it is not updated.

[0046] Preferably, in step 4, when the difference between the preferred capacitance value and the baseline value used as a comparison reference is greater than the target finger threshold and the duration is greater than the time threshold T1, it is considered that a touch occurs, otherwise it is considered that no touch occurs;

[0047] If a touch occurs, the sensitivity is adjusted as follows:

[0048] Set a high activity sensitivity threshold VTH and a low activity sensitivity threshold VTL, and the interval between the two is defined as the activity sensitivity threshold interval;

[0049] When a touch occurs, the amplitude of the preferred capacitance value is higher than the high activity sensitivity threshold VTH, and the set target finger threshold is not within the activity sensitivity threshold interval, then the target finger threshold is automatically adjusted to within the activity sensitivity threshold interval;

[0050] When a touch occurs, the amplitude of the preferred capacitance value is higher than the low activity sensitivity threshold VTL, but lower than the high activity sensitivity threshold VTH, and the target finger threshold is in the activity sensitivity threshold interval. At this time, the target finger threshold is adjusted to be less than the low activity sensitivity threshold VTL.

[0051] Preferably, the target finger threshold is adjusted by adjusting the step length of the active finger threshold according to the set active finger threshold, and adjusting the active finger threshold adjustment step length in each detection cycle until the adjustment target is reached.

[0052] The multi-channel touch detection system of the present invention comprises a configuration register, a clock divider, a mode drive controller, a data sampler, a data preprocessor, a baseline follower and a touch determiner, and is used to execute the multi-channel touch detection method as described above;

[0053] The configuration register is used to receive external commands and configure other modules of the detection system;

[0054] The clock divider provides a corresponding clock for the detection system;

[0055] The mode driving controller is connected to the multi-channel relaxation oscillator and is used to adjust the charging current and detection frequency of the multi-channel relaxation oscillator;

[0056] The data sampler is connected to the multi-channel relaxation oscillator for setting different sampling frequencies;

[0057] A data preprocessor processes the sampling signal output by the multi-channel relaxation oscillator to screen out the optimal capacitance value;

[0058] The baseline follower is used for baseline setting and adjustment;

[0059] The touch judgement device is used to adjust the sensitivity and output the touch judgment result.

[0060] Preferably, the data preprocessor comprises a preferred filter, an IIR filter and a second-order difference calculator connected in sequence; the preferred filter is a variance filter or a multi-order median filter.

[0061] Preferably, the data preprocessor further comprises a multi-channel large bit width data memory connected between the IIR filter and the second-order differential value calculator.

[0062] The present invention adjusts the sampling frequency and the detection frequency through mode setting and obtains the capacitance value detection output function in advance, which can effectively avoid the interference of external electromagnetic signals on capacitance detection and improve the detection speed by directly calling the capacitance value detection output function. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 A schematic diagram of a specific implementation of the multi-channel touch detection system of the present invention;

[0064] Figure 2 A schematic diagram of a specific implementation method for setting the charging current, sampling frequency and detection frequency in the multi-channel touch detection method of the present invention;

[0065] Figure 3 A schematic diagram of a specific implementation of the data preprocessor of the present invention;

[0066] Figure 4 A schematic diagram of a specific data storage method of the large bit width data memory of the present invention;

[0067] Figure 5 It is a schematic diagram of a specific implementation method of sensitivity adjustment in the present invention. DETAILED DESCRIPTION

[0068] In order to overcome the shortcomings of the above scheme when the capacitive touch circuit is interfered by multiple interference sources in a complex environment, including but not limited to circuit background noise, external conduction or radio frequency interference, electrical fast transients and AC power supply interference, the present invention discloses a multi-channel touch detection system and detection method.

[0069] In order to more intuitively and clearly describe the specific details of the technical solution of the present invention, a detailed description will be given below in conjunction with specific embodiments and example drawings.

[0070] The multi-channel touch detection system of the present invention is directed to a multi-channel relaxation oscillator with adjustable sampling frequency and detection frequency, comprising a configuration register, a clock divider, a mode drive controller, a data sampler, a data preprocessor, a baseline follower, and a touch determiner. Figure 1 As shown, it is used to execute the multi-channel touch detection method of the present invention, wherein the configuration register is connected to an external bus matrix, and software configuration is provided for the system through the bus matrix.

[0071] The clock divider provides the system with a corresponding clock to meet different sampling clock requirements and low-power clock requirements.

[0072] The mode driving controller is connected to the multi-channel relaxation oscillator and is used to adjust the charging current and detection frequency of the multi-channel relaxation oscillator. The mode driving controller inputs different digital signals to the multi-channel relaxation oscillator to adjust the charging current and detection frequency.

[0073] The data sampler is connected to the multi-channel relaxation oscillator to set different sampling frequencies. The data preprocessor processes the sampling signal output by the multi-channel relaxation oscillator to select the capacitance value after filtering out interference;

[0074] A specific implementation of data preprocessing includes sequentially connected preferred filters, IIR filters, and second-order difference calculators;

[0075] A specific workflow of the data preprocessor includes:

[0076] 1. Input multiple groups of capacitance measurement original values,

[0077] 2. Obtain the capacitance detection output function f(n) based on the output characteristics of the relaxation oscillator

[0078] 3. The original values ​​of multiple sets of capacitance measurements are used as the excitation input capacitance detection output function to obtain multiple detection capacitance values ​​of the current capacitance.

[0079] 4. Multiple detection capacitance values ​​are input into the optimal filter to obtain an optimal capacitance value without distortion.

[0080] 5. Optimize the capacitance value and input it into the IIR filter for IIR filtering;

[0081] 6. Select multiple groups of optimal capacitance data for each channel and input them into the second-order differential difference calculator for second-order differential detection to determine the error. If there is an error, change the driving strategy in the mode driver and the sampling strategy in the data sampler. If there is no error, output it to the baseline follower.

[0082] The touch judge is used to adjust the sensitivity and output the judgment touch result. There are two sensitivity configuration modes: fixed sensitivity and active sensitivity configuration. The sensitivity adjustment when the environment changes is added, which can improve the touch sensitivity and stabilize the response.

[0083] Before detection, first construct the capacitance value detection output function to obtain the output detection frequency points under different conductors and different charging currents. The specific steps to construct the capacitance value detection output function are:

[0084] Step 11. Configure a detection cycle, each detection cycle includes multiple time slices, and set different charging currents for each time slice through a mode drive controller, so that the multi-drive relaxation oscillation circuit outputs detection frequency points of different frequencies;

[0085] In the detection of capacitance, for the same input capacitance value, when the mode drive controller configures the charging current I1, the relaxation oscillation circuit outputs the detection current through the internal constant current source, controls the corresponding output detection frequency f1, and when the charging current I2 is configured, the detection frequency f2 is output, and so on, when the mode drive controller configures the charging current In, the corresponding output detection frequency fn. That is, after applying the same capacitance, the multi-drive relaxation oscillation circuit outputs detection frequencies of different frequencies under different charging currents.

[0086] For single-channel detection of a multi-drive relaxation oscillation circuit, a finger contacts and leaves the touch detection circuit within a millisecond time range. At this time, the mode drive controller sets the length of the time slice and detects the change in capacitance value by configuring different detection methods in each time slice.

[0087] like Figure 2 As shown, the charging current I1 is configured in the time slice t1 to obtain the detection frequency f1 of the finger capacitance detection output, and the charging current I3 is configured in the time slice t5 to obtain the output detection frequency f3 of the same capacitance under different driving forces. By analogy, the charging current In is configured in the time slice tx to obtain the detection frequency fn.

[0088] Research shows that if the frequency of the external electromagnetic input interference source (usually 150KHz~80MHz) is near the detection frequency, it will cause serious interference to the output signal. However, since the multi-driven relaxation oscillator will output detection frequencies with different characteristics for the current detection capacitance value according to different charging currents, the degree to which other detection frequencies that are not near the interference source frequency are affected by the interference source will be greatly reduced. Furthermore, the data sampling circuit will also be affected by interference when sampling the detection frequency. Therefore, within the divided capacitance detection time slice, implementing multiple sampling strategies to sample the detection frequency has a significant effect on suppressing interference.

[0089] Step 12. The data sampler configures different detection frequencies for different time slices within the detection cycle;

[0090] like Figure 2 As shown, in the time slices t1 and t2, the charging current is set to be the same, so the same detection frequency point fs1 is sampled;

[0091] However, the sampling frequencies of different time slices are different. In the t1 time slice, the sampling frequency fs1 is used for data sampling to obtain the original capacitance detection value c1; the sampling frequency fs2 is used for data sampling in the t2 time slice to obtain the original capacitance detection value c2; and so on, the sampling frequency fsm can be used for different detection frequencies of the same capacitor in the time slice tx to obtain the original capacitance detection value cm, thereby further reducing the impact of interference sources on signals during the conduction process.

[0092] The sampling frequency is set according to the general sampling rules, so that the interference to the sampling frequency is minimized while meeting the oversampling requirements.

[0093] Set the sampling cycle. The cycle contains multiple time slices. The detection frequency and sampling frequency of each time slice can be set as needed.

[0094] When a conductor such as a finger approaches and leaves the touch detection circuit, due to the inductive effect of the conductor, the capacitance value detected by the touch detection circuit will continue to change due to the approach and departure of the conductor. By setting the length of the time slice, for example, 5 to 10 microseconds, for the normal millisecond human touch time, the relatively slowly changing capacitance can be detected at different detection frequencies and sampling frequencies within the cycle.

[0095] Step 13. After setting different detection frequencies and sampling frequencies for each time slice in the detection cycle in steps 11 and 12, repeat the detection cycle to perform continuous capacitance detection;

[0096] For each time slice, different sampling frequencies are used for detection to obtain different capacitance detection original values ​​and corresponding output frequencies;

[0097] Step 14. Replace the capacitor to be detected, repeat step 13, and use the output frequency points and capacitance detection original values ​​of each time slice obtained in step 13, as well as the charging current corresponding to the time slice, to construct a capacitance value detection output function F(k1, k2), wherein k1 represents the charging current, k2 represents the output frequency point, and F represents the corresponding capacitance detection original value. The capacitance value detection output function F(k1, k2) outputs the corresponding capacitance detection original value according to the input values ​​of k1 and k2;

[0098] During the entire time slice when the finger touches the touch sensor, the present invention has obtained multiple groups of capacitance detection original values ​​with nearly the same capacitance value, including disturbed and undisturbed capacitance detection original values, through different strategy combinations.

[0099] A precise capacitor with a variable capacitance value within the detection range is applied to the multi-drive relaxation oscillation circuit for capacitance detection. After traversing different detection currents, the output frequency characteristic data of the precise capacitor with a known capacitance value under different detection currents can be obtained.

[0100] A specific implementation method of the capacitance value detection output function F(k1, k2) is to use these characteristic data to construct a capacitance value lookup table limited within the detection range. Index one of the capacitance value lookup table is the charging current of the relaxation oscillator, index two is the output frequency point within the circuit detection range, and the lookup result is the original capacitance detection value.

[0101] The capacitance value lookup table can be used as a capacitance value detection output function F(k1, k2).

[0102] Step 2. After obtaining the capacitance value detection output function F(k1, k2), set the sampling frequency and charging current for each time slice according to steps 11 and 12, detect the change of external capacitance, and obtain the output frequency;

[0103] Step 3. Input the output frequency point and the corresponding charging current into the capacitance detection output function F(k1, k2) to obtain the capacitance detection original value;

[0104] In step 3, the sampled data can be further processed using a data preprocessor. The sampled data processing in the data preprocessor includes the following processes, such as Figure 3 As shown:

[0105] Step 31. Pass multiple original capacitance detection values ​​within the same detection cycle through a preferred filter to filter out the capacitance values ​​that are interfered with. The preferred filter may be a variance filter or a multi-order median filter or other device that effectively filters out interference, and output a preliminary screening capacitance value;

[0106] The screening strategy of this step can be variance filtering, calculating the variance of all the original capacitance detection values ​​in the same detection cycle, retaining the one with the smallest variance value as the preferred capacitance value; or using median filtering, traversing the data through the inspection window, and using the middle value in the inspection window as the output data.

[0107] Step 32. Set the initial screening capacitance value X n As the excitation input, the IIR (Infinite Impulse Response) filter is further smoothed to suppress periodic interference. The subscript n represents different initial screening capacitance values, and n actually represents the preferred capacitance value obtained in different cycle detection periods;

[0108] IIR filter, its implementation is shown below.

[0109] Y n =(1-L)* Y n-1 +L*X n (Formula 1)

[0110] Y n is the initial screening capacitance value X n The output after inputting the IIR filter, for n=1, Y0 takes any constant value, and L is the filter parameter.

[0111] Step 33. The data Y output by the IIR filter is converted into Figure 4 The data is stored in a large bit width data memory in a manner to facilitate IIR filtering and second order differential error detection calculations;

[0112] Figure 4 In the specific implementation shown, the large bit width data memory is a data storage space with 9 windows. The preferred capacitance value Y1 detected for the first time is stored from the least significant bit LSB of the channel 0 address. When the second detection data Y2 is valid, Y1 is shifted left by the data bit width corresponding to the preferred capacitance value, so that a data bit width corresponding to a preferred capacitance value is reserved from the least significant bit to the left, and then the preferred capacitance Y2 detected for the second time is stored in the least significant bit LSB. By analogy, when all valid bits of the channel 0 address store capacitance values, the memory stores the preferred capacitance values ​​detected 9 times. The preferred capacitance value detected for the first time near the most significant bit MSB, and the preferred capacitance value detected for the ninth time near the least significant bit LSB. When the new data of the preferred capacitance value inputted for the tenth time continues to be valid, the data of the first preferred capacitance value is shifted out from the most significant bit MSB, and the new data is shifted in from the least significant bit LSB; for channel j, 9 priority capacitance values, Y2 are stored in chronological order. j , Y j+1 ,…Y j+8 .

[0113] By setting multiple channels, a large-bit-width data storage device can realize simultaneous detection of multiple groups of priority capacitance values, that is, each channel corresponds to a touch scenario with different time or space, and each group of priority capacitance values ​​can be a multi-channel relaxation oscillator for a touch point, or multiple channels can detect the same multi-channel relaxation oscillator that outputs multiple groups of capacitance values ​​through time division multiplexing, thereby broadening the application scenarios of the present invention.

[0114] In order to further detect whether there is an error in the capacitance value, the present invention uses a second-order differentiator to detect the error. If no error occurs, the strategy of the mode drive controller and the data sampler is not changed. If an error occurs, the output control signal of the mode drive controller and the data sampler is replaced, and the detection frequency and the sampling frequency are changed to stagger the interference interval and obtain more accurate capacitance data. The second-order difference formula is:

[0115] FD = Y j+k +Y j-k- 2*Y j (Formula 2)

[0116] In Formula 2, the priority capacitor value is input into Formula 2 to solve the second-order differential value FD, k=(WD-1) / 2, WD is the number of large-bit-width data memory windows;

[0117] For example, for Figure 4The nine preferred capacitance values ​​Y1 to Y9 of channel 1 in the data; the central Y5 is used as the center point position during the second-order differential detection. The data on the left side of Y5 is the left-biased data with gradually increasing offset values, and the data on the right side of Y5 is the right-biased data with gradually increasing offset values. The offset point of the second-order differential detection is selected by formula 2 and the configuration register, and an error detection value is calculated to indicate the degree of interference of the capacitor. When this value is greater than the set error detection threshold, it can be determined whether the current preferred capacitor has an error.

[0118] Finally, the optimal capacitance value whose second-order differential value is not greater than the error detection threshold is sent to the baseline follower of each channel.

[0119] Step 4: Determine whether a touch occurs based on the preferred capacitance value, and update the baseline if no touch occurs.

[0120] Determining whether a touch occurs is a prior art in the field and will not be elaborated here. For example, a target finger threshold can be set. When the difference between the preferred capacitance value and the baseline value used as a comparison benchmark is greater than the target finger threshold and lasts for a set period of time, it is considered that a touch occurs. Otherwise, it is considered that no touch occurs. The preferred capacitance value when no touch occurs will still change relative to the baseline value. It is generally believed that this change is a slow change caused by environmental factors such as temperature, humidity, noise, etc., and a baseline update is required.

[0121] The data after passing the data preprocessor needs to identify the detection capacitance when there is no touch in order to build a baseline.

[0122] The baseline follower is mainly used to construct the capacitance baseline of each channel when there is no touch. The update modes of the baseline follower are divided into three modes: initialization baseline update, wake-up update baseline and continuous update baseline mode.

[0123] Mode 1. Initialize baseline update mode,

[0124] The updated baseline value = 3 / 4 of the preferred capacitance value + 1 / 4 of the pre-update baseline value. For the initial state, the pre-update baseline value is the set baseline default value, which allows the baseline after initialization to quickly follow the current preferred capacitance value from the reset default value.

[0125] Mode 2. Wake-up update baseline mode, through the low power switch and timed wake-up configuration in the configuration register, when the module is in sleep mode, the baseline is not updated, and after the timed wake-up count ends, all enabled channels are woken up for scanning and the baseline is updated. Wait for a while, if no touch occurs, it will enter sleep again.

[0126] Mode 3: Continuously update baseline mode. In this mode, the baseline is continuously updated as long as there is no touch action. The baseline update mode is divided into normal following mode and abnormal following mode.

[0127] The normal following mode and the abnormal following mode determine whether the preferred capacitance value input this time satisfies the characteristic that the capacitance will increase when the finger touches. If the capacitance changes but the capacitance value does not increase, the abnormal following mode is performed, otherwise the normal following mode is performed.

[0128] Normal follow mode is if:

[0129] Baseline value before update + target finger threshold > preferred capacitance value > baseline value before update,

[0130] Then update, the update method is

[0131] Baseline value after update = baseline value before update + baseline value update step length,

[0132] The baseline value update step size is set according to current environment changes and experience.

[0133] if:

[0134] Preferred capacitance value < baseline value before update:

[0135] Baseline value after update = baseline value before update - baseline value update step size;

[0136] No update in other cases;

[0137] In abnormal follow mode, if:

[0138] The preferred capacitance value is less than the baseline value before updating - the baseline abnormal threshold.

[0139] The abnormal follow mode indicates that the detected preferred capacitance value does not follow the characteristic change of the capacitance value increase after the finger touches. For example, due to unknown factors, the detected preferred capacitance value decreases after the finger touches, which does not match the detection capacitance increase characteristic. Therefore, the baseline abnormal threshold is usually set closer to the initial value or the current baseline value.

[0140] At this time, it indicates that the preferred capacitance value is much smaller than the baseline, and the baseline follows abnormally, and then returns to the initialization state.

[0141] Step 5. The touch judge selects the baseline value of different channels according to the configured channels, and can use the sensitivity threshold set by the configuration register to perform touch judgment.

[0142] During normal use of the capacitive touch detection system, environmental changes such as water droplets, oil droplets, and deformation of the touch panel may cause changes in the signal amplitude, which may affect the touch signal and fail to meet the sensitivity threshold set in a stable environment. This may cause problems such as touch failure to be recognized and reduced recognition rate, affecting the user experience. This situation can be improved by setting the sensitivity threshold.

[0143] The sensitivity control mode of the touch judgement device in the present invention is divided into two modes: active sensitivity configuration and fixed sensitivity configuration. The sensitivity is adjusted according to the change of the actual signal amount without software intervention, thereby improving the recognition rate.

[0144] In the active sensitivity configuration mode, a dual threshold method is used to limit the sensitivity of the target finger threshold of the configuration register. Figure 5 As shown, first, three sensitivity values ​​are configured, namely, the low activity sensitivity threshold VTL, the high activity sensitivity threshold VTH, and the target finger threshold VTF. The values ​​of the low activity sensitivity threshold VTL and the high activity sensitivity threshold VTH are set according to the actual capacitance measured multiple times for each channel in a stable environment to determine the optimal sensitivity threshold.

[0145] In the fixed sensitivity configuration mode, the module's judgment logic directly uses the target finger threshold VTF configured in the configuration register as the threshold for judging touch response. When the detection capacitance value is greater than the target finger threshold for a certain number of times, it is judged that a touch has occurred at this time, otherwise no touch has occurred.

[0146] Figure 5 Scenario 1 in the figure shows that the amplitude of the preferred capacitance value detected when a touch occurs in a stable environment is greater than the high activity sensitivity threshold VTH. If the set target finger threshold is not in the activity sensitivity threshold interval, that is, higher than the high activity sensitivity threshold VTH or lower than the low activity sensitivity threshold VTL, it may cause oversensitivity or insensitivity, affecting the stable operation of the system.

[0147] The activity sensitivity configuration mode automatically adjusts the target finger threshold to between the two activity sensitivity thresholds VTL and VTH according to the activity finger threshold adjustment step set in the configuration register and does not adjust it again. If the target finger threshold is between VTL and VTH, the target finger threshold is not adjusted.

[0148] Figure 5 Scenario 2 in the figure shows that the detected preferred capacitance value output by the same detection circuit when a touch occurs after an environmental change is higher than the low activity sensitivity threshold VTL, but lower than the high activity sensitivity threshold VTH; this indicates that due to environmental changes, the capacitance change when the finger touches is reduced, and the target finger threshold setting needs to be lowered to improve detection accuracy.

[0149] Since the target finger threshold configured by the current register is between VTL and VTH, the target finger threshold is subtracted from the active finger threshold adjustment step until the target finger threshold VTF is less than the low activity sensitivity threshold VTL. This ensures that the impact on sensitivity after environmental changes is minimal. When the target finger threshold set by the configuration register is less than the low activity sensitivity threshold VTL, there is no need to adjust the target finger threshold.

[0150] When the preferred capacitance value outputted in step 3 is greater than the adjusted target finger threshold for a certain number of times, it is determined that a touch occurs at this time, otherwise no touch occurs.

[0151] The present invention can comprehensively improve the anti-interference ability of the system. The detection system can achieve cost advantages while obtaining stable, reliable and high recognition accuracy performance, and is extremely cost-effective.

[0152] It should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0153] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0154] The foregoing describes various preferred embodiments of the present invention. Unless the preferred implementation modes in various preferred embodiments are obviously self-contradictory or based on a certain preferred implementation mode, various preferred implementation modes can be arbitrarily superimposed and used in combination. The embodiments and specific parameters in the embodiments are only for clearly describing the invention verification process of the inventor, and are not used to limit the patent protection scope of the present invention. The patent protection scope of the present invention shall still be based on its claims. All equivalent structural changes made using the contents of the description and drawings of the present invention should be included in the protection scope of the present invention.

Claims

1. A multi-channel touch detection method, Features , including the following steps: Step 1. Construct the capacitance value detection output function, specifically: Step 11. Configure a detection cycle, each detection cycle includes multiple time slices, and set different charging currents for each time slice through a mode drive controller, so that the multi-drive relaxation oscillation circuit outputs detection frequency points of different frequencies; Step 12. The data sampler configures different detection frequencies for different time slices within the detection cycle; Step 13. After setting different detection frequencies and sampling frequencies for each time slice in the detection cycle in steps 11 and 12, repeat the detection cycle to perform continuous capacitance detection; For each time slice, different sampling frequencies are used for detection to obtain different capacitance detection original values ​​and corresponding output frequencies; Step 14. Replace the capacitor to be tested, repeat step 13, and use the output frequency points and original capacitance detection values ​​of each time slice obtained in step 13, as well as the charging current corresponding to the time slice, to construct a capacitance value detection output function F(k1, k2), where k1 represents the charging current, k2 represents the output frequency point, and F represents the corresponding original capacitance detection value; Step 2. After obtaining the capacitance value detection output function F(k1, k2), set the sampling frequency and charging current for each time slice according to steps 11 and 12, detect the change of external capacitance, and obtain the output frequency; Step 3. Input the output frequency point and the corresponding charging current into the capacitance detection output function F(k1, k2) to obtain the capacitance detection original value, and screen all the capacitance detection original values ​​in each detection cycle to obtain the optimal capacitance value; Step 4: Determine whether a touch occurs based on the preferred capacitance value; The screening method in step 3 specifically comprises the following steps: Step 31. Pass multiple capacitance detection original values ​​in the same detection cycle through a preferred filter, filter out the interfered capacitance values, and output a preliminary screening capacitance value; the preferred filter is a variance filter or a multi-order median filter; Step 32. Set the initial screening capacitance value X n As the excitation input, the IIR filter is further smoothed to suppress periodic interference. n represents different primary screening capacitor values; IIR filter, which is implemented as follows: Y n =(1-L)*Y n-1 +L*X n Formula 1 Y n is the initial screening capacitance value X n The preferred capacitance value after inputting the IIR filter, when n=1, Y 0 Take the power-on constant value, L is the filter parameter; Step 33. Calculate the second-order differential error of the optimal capacitance value output by the IIR filter; The formula for calculating the second-order differential value FD of the preferred capacitance value is: FD=Y j+k +Y j-k -2*Y j Formula 2 Solve the second-order difference value FD, k is the set second-order difference offset length; Y j+k , Y j-k , Y j They respectively represent the preferred capacitance values ​​after the j+kth, jkth, and jth initial screening capacitance values ​​are input into the IIR filter; An error detection threshold is set. When FD is greater than the error detection threshold, the corresponding preferred capacitance value is discarded.

2. The multi-channel touch detection method according to claim 1, It is characterized in that In the step 33, the preferred capacitance value output by the IIR filter is stored in a large bit width data memory, and the storage method is: each preferred capacitance value is stored in chronological order starting from the least significant bit of the first channel of the memory, and the stored data is moved from the least significant bit to the most significant bit each time. When the channel is full, the preferred capacitance value is removed from the most significant bit; the number of preferred capacitance values ​​stored in each channel is 2k+1, and k is the set second-order differential offset length.

3. The multi-channel touch detection method according to claim 1, It is characterized in that The capacitance value detection output function F(k1, k2) obtained in step 1 is a capacitance value lookup table, wherein index 1 of the capacitance value lookup table is the charging current of the relaxation oscillator, index 2 is the output frequency point within the circuit detection range, and the search result is the original capacitance detection value.

4. The multi-channel touch detection method according to claim 1, It is characterized in that In step 4, When the difference between the preferred capacitance value and the baseline value used as a comparison reference is greater than the target finger threshold and the duration is greater than the time threshold T1, it is considered that a touch occurs, otherwise it is considered that no touch occurs; If it is determined that no touch occurs, the baseline is updated using the obtained preferred capacitance value; The modes of baseline update include normal following mode and abnormal following mode; If the capacitance changes but the capacitance value does not increase, the abnormal following mode is performed, otherwise the normal following mode is entered; In normal follow mode, if: Baseline value before update + target finger threshold > preferred capacitance value > baseline value before update, Then update, the update method is Baseline value after update = baseline value before update + baseline value update step length, if: Preferred capacitance value < baseline value before update: Then the updated baseline value = the baseline value before updating - the baseline value update step size; No update in other cases; In abnormal follow mode, if: The preferred capacitance value is less than the baseline value before updating - the baseline abnormal threshold. If yes, the initial baseline value is adopted again, otherwise it is not updated.

5. The multi-channel touch detection method according to claim 1, It is characterized in that In step 4, when the difference between the preferred capacitance value and the baseline value used as a comparison reference is greater than the target finger threshold and the duration is greater than the time threshold T1, it is considered that a touch occurs, otherwise it is considered that no touch occurs; If a touch occurs, the sensitivity is adjusted as follows: Set a high activity sensitivity threshold VTH and a low activity sensitivity threshold VTL, and the interval between the two is defined as the activity sensitivity threshold interval; When a touch occurs, the amplitude of the preferred capacitance value is higher than the high activity sensitivity threshold VTH, and the set target finger threshold is not within the activity sensitivity threshold interval, then the target finger threshold is automatically adjusted to within the activity sensitivity threshold interval; When a touch occurs, the amplitude of the preferred capacitance value is higher than the low activity sensitivity threshold VTL, but lower than the high activity sensitivity threshold VTH, and the target finger threshold is in the activity sensitivity threshold interval. At this time, the target finger threshold is adjusted to be less than the low activity sensitivity threshold VTL.

6. The multi-channel touch detection method according to claim 5, It is characterized in that The target finger threshold is adjusted by adjusting the step length according to the set active finger threshold, and adjusting the active finger threshold adjustment step length in each detection cycle until the adjustment target is reached.

7. A multi-channel touch detection system, It is characterized in that It includes a configuration register, a clock divider, a mode drive controller, a data sampler, a data preprocessor, a baseline follower and a touch determiner, and is used to perform the multi-channel touch detection method according to any one of claims 1 to 6; The configuration register is used to receive external commands and configure other modules of the detection system; The clock divider provides a corresponding clock for the detection system; The mode driving controller is connected to the multi-channel relaxation oscillator and is used to adjust the charging current and detection frequency of the multi-channel relaxation oscillator; The data sampler is connected to the multi-channel relaxation oscillator for setting different sampling frequencies; A data preprocessor processes the sampling signal output by the multi-channel relaxation oscillator to screen out the optimal capacitance value; The baseline follower is used for baseline setting and adjustment; The touch judgement device is used to adjust the sensitivity and output the touch judgment result.

8. The multi-channel touch detection system as claimed in claim 7, It is characterized in that The data preprocessor comprises a preferred filter, an IIR filter and a second-order difference calculator connected in sequence; the preferred filter is a variance filter or a multi-order median filter.

9. The multi-channel touch detection system as claimed in claim 8, It is characterized in that The data preprocessor also includes a multi-channel large bit width data memory connected between the IIR filter and the second-order difference calculator.