CN110502143B - Capacitive screen touch detection method and device - Google Patents

Capacitive screen touch detection method and device Download PDF

Info

Publication number
CN110502143B
CN110502143B CN201910648248.1A CN201910648248A CN110502143B CN 110502143 B CN110502143 B CN 110502143B CN 201910648248 A CN201910648248 A CN 201910648248A CN 110502143 B CN110502143 B CN 110502143B
Authority
CN
China
Prior art keywords
unit
touch
calculation unit
judgment
reference value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910648248.1A
Other languages
Chinese (zh)
Other versions
CN110502143A (en
Inventor
张弛
万伟
余佳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Betterlife Electronic Science And Technology Co ltd
Original Assignee
Shenzhen Betterlife Electronic Science And Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Betterlife Electronic Science And Technology Co ltd filed Critical Shenzhen Betterlife Electronic Science And Technology Co ltd
Priority to CN201910648248.1A priority Critical patent/CN110502143B/en
Publication of CN110502143A publication Critical patent/CN110502143A/en
Application granted granted Critical
Publication of CN110502143B publication Critical patent/CN110502143B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0416Control or interface arrangements specially adapted for digitisers
    • G06F3/0418Control or interface arrangements specially adapted for digitisers for error correction or compensation, e.g. based on parallax, calibration or alignment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/044Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means by capacitive means

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Position Input By Displaying (AREA)

Abstract

The invention discloses a capacitive screen touch detection method and a capacitive screen touch detection device, wherein the capacitive screen touch detection device comprises a sensor pad unit, a sampling unit, a Base value calculation unit, a touch detection calculation unit, a timing unit, a touch judgment comparison unit and an MCU unit, wherein the input end of the sampling unit is connected with the sensor pad unit, data output by the sampling unit are respectively transmitted to the Base value calculation unit and the touch detection calculation unit, the Base value calculation unit and the timing unit are respectively connected with the touch detection calculation unit, data output by the touch detection calculation unit and the timing unit are transmitted to the touch judgment comparison unit, and data output by the touch judgment comparison unit are transmitted to the MCU unit. The invention adopts double thresholds in the touch judgment process, can obviously improve the signal-to-noise ratio of the touch signal, only needs a small part of circuit resources, has simple algorithm and easy realization, and effectively reduces the system cost.

Description

Capacitive screen touch detection method and device
Technical Field
The present invention relates to capacitive touch panels, and particularly to a method and an apparatus for detecting a touch on a capacitive touch panel.
Background
The capacitive touch screen is widely used in the technical field of man-machine interaction due to the advantages of high light transmittance, high reaction speed, long service life and the like, but noise and interference signals with various frequencies can be doped in the process of processing touch signals, the power frequency interference of an alternating current power supply is 50Hz, the refresh frequency (50-150 Hz) of LCD display and the line scanning frequency interference of LCD display, the switching power supply interference of an electric appliance and a power management module, and the front end interference of radio frequency (hundreds of MHz-10 GHz). The noises flee into the touch control chip through the signal receiving circuit at the front end, and after the noises are sampled by the touch control circuit, the noises are judged to be touched and reported to the host, so that wrong report points occur, and particularly when the touch control system is in a low power consumption mode, the noise interference can wake up the touch control chip irregularly, so that the power consumption is increased. And when the capacitive screen changes along with the temperature of the environment, the sampled original value also changes correspondingly, and if the original value under the environment is acquired, the sensitivity of the touch screen is also possibly deteriorated or a point false alarm phenomenon may occur. Therefore, how to correctly process the touch sampled data is the key point for the normal detection of the touch control chip of the capacitive touch screen.
In the process of detecting touch of the capacitive touch screen, a touch control chip firstly obtains a voltage value of voltage change caused by capacitance change on a sensor pad through sampling of an analog-to-digital converter to obtain an original value; establishing a reference according to the original value to obtain a reference value; in the subsequent calculation, the original value is subtracted from the reference value to obtain a difference value, and the coordinate value can be calculated from the difference value. In the actual use process, the alternating current power supply 50Hz power frequency common mode interference, the LCD display refresh frequency (50-150 Hz) and the LCD line scanning frequency interference, the electric appliance and the power supply management module switch power supply interference, and the noise of the radio frequency front end interference (hundreds of MHz-10 GHz) can influence the signal to noise ratio of the sampling signal, so that the calculated touch coordinate is inaccurate, even a false point occurs, the sensitivity of the touch screen is poor or the false alarm point occurs, and the false alarm point refers to the fact that a certain position on the capacitive touch screen is not actually touched and the touch control chip calculates the coordinate.
For the above interference sources, in the prior art, the ac power supply mode interference can suppress the common mode interference to a certain extent by performing differential processing on the sensing signal of the front-end sampling circuit. For interference of different frequencies, low-pass, band-pass, high-pass and band-stop filters can also be selected, but aliasing of touch signals and low-frequency noise exists, which can deteriorate the signal-to-noise ratio. The purpose of suppressing interference can also be achieved by changing the structure of the whole touch system. The LCD noise features high and low peak noise at intervals, and the median filtering process can be adopted for the LCD noise.
In summary, the processing method in the prior art mainly has the following defects:
firstly, the capacitance change on the sensor pad to be sampled is differentiated, but the common-mode signal can only be inhibited, and the positive and negative end circuits of the differential circuit need strict parameter symmetry.
Secondly, with regard to the filter method, although this method has a certain suppression effect on interference, aliasing of touch signals and low-frequency noise exists, which deteriorates the signal-to-noise ratio.
And thirdly, in an algorithm, the reference value is updated according to the original data sampled by each frame in a mode of updating the reference value, but the reference value is also calculated from the original value, and noise data components exist in the reference value.
In addition, the purpose of resisting interference can be achieved by changing the structure of the whole touch system, but the method needs a large amount of resources and increases the difficulty of the algorithm.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method and an apparatus for detecting touch on a capacitive screen, which have a simple circuit structure, are easy to implement, save resources, and have low cost, in order to overcome the shortcomings of the prior art.
In order to solve the technical problems, the invention adopts the following technical scheme.
A touch detection method of a capacitive screen is realized on the basis of a device, the device comprises a sensor pad unit, a sampling unit, a Base value calculating unit, a touch detection calculating unit, a timing unit, a touch judgment comparing unit and an MCU unit, wherein the input end of the sampling unit is connected with the sensor pad unit, data output by the sampling unit is respectively transmitted to the Base value calculating unit and the touch detection calculating unit, the Base value calculating unit and the timing unit are respectively connected with the touch detection calculating unit, the data output by the touch detection calculating unit and the timing unit are transmitted to the touch judgment comparing unit, the data output by the touch judgment comparing unit are transmitted to the MCU unit, an initial Base value is preset by the Base value calculating unit, and a first touch threshold value and a second touch threshold value are preset by the MCU unit, the method comprises the following steps: step S1, starting touch scanning; step S2, the sampling unit collects the voltage value on the sensor pad unit, converts the collected voltage value into a digital signal, and then forms original data and transmits the original data to the touch detection calculation unit; step S3, the touch detection calculation unit acquires the initial Base value to the Base value calculation unit; step S4, the touch detection calculating unit subtracts the current raw data from the initial Base value to obtain a first difference, the touch determination comparing unit determines whether the first difference is greater than the first touch threshold, if so, step S5 is executed; step S5, adding 1 to a first counting register of the timing unit, and calculating touch coordinates on the sensor pad unit by the MCU unit; step S6, the touch determination comparing unit determines whether the first count register value of the timing unit is greater than the second touch threshold, if not, the step returns to step S1, and if so, the step S7 is executed; and step S7, the touch judgment and comparison unit records the current touch state as effective touch, and the MCU unit uploads the touch coordinate to the host.
Preferably, before executing the step S1, the method further includes an initialization step: when the device is powered on, the sampling unit collects the voltage value on the sensor pad unit, the collected voltage value is converted into a digital signal to form original data, and the Base value calculation unit takes the original data as an initial Base value.
Preferably, in the step S4, if the touch determination comparing unit determines that the first difference is not greater than the first touch threshold, the Base value calculating unit updates the initial Base value to the current original data, and then returns to the step S1.
Preferably, the apparatus includes a touch-up determination comparing unit, and in the step S7, when the touch determination comparing unit determines that the current touch state is a valid touch, the step S8 is executed: and judging whether the current touch state has a lifting event or not by using the touch lifting judging and comparing unit.
Preferably, the MCU unit presets a third touch threshold and a fourth touch threshold, and step S8 includes: step S80, starting touch scanning; step S81, the sampling unit collects the voltage value on the sensor pad unit, converts the collected voltage value into a digital signal, and then forms original data and transmits the original data to the touch detection calculation unit; step S82, the touch detection calculation unit obtains the initial Base value from the Base value calculation unit, and subtracts the current raw data from the initial Base value to obtain a second difference value; step S83, the touch lift determination and comparison unit determines whether the second difference is smaller than the third touch threshold, if not, the step S80 is returned to, if yes, the step S84 is executed; step S84, adding 1 to a second counting register of the timing unit, and calculating the touch coordinate on the sensor pad unit by the MCU unit; step S85, the touch lift determination and comparison unit determines whether the second count register value of the timing unit is greater than the fourth touch threshold, if not, the step S80 is returned to, if yes, the touch lift determination and comparison unit marks the current touch state as a lift event, and the MCU unit uploads the lift event to the host; in step S86, the touch detection process ends.
Preferably, the apparatus includes a switch unit, two switch ends of the switch unit are respectively connected to the touch detection calculating unit and the touch lifting determination comparing unit, a control end of the switch unit is connected to the touch determination comparing unit, and in step S7, when the touch determination comparing unit determines that the current touch state is an effective touch, the two switch ends of the switch unit are controlled to be turned on, so as to start step S8.
A capacitive screen touch detection device comprises a sensor pad unit, a sampling unit, a Base value calculation unit, a touch detection calculation unit, a timing unit, a touch judgment comparison unit and an MCU unit, wherein the input end of the sampling unit is connected to the sensor pad unit, data output by the sampling unit is respectively transmitted to the Base value calculation unit and the touch detection calculation unit, the Base value calculation unit and the timing unit are respectively connected to the touch detection calculation unit, data output by the touch detection calculation unit and the timing unit are transmitted to the touch judgment comparison unit, data output by the touch judgment comparison unit are transmitted to the MCU unit, an initial Base value is preset in the Base value calculation unit, and a first touch threshold value and a second touch threshold value are preset in the MCU unit, wherein: the sampling unit is used for acquiring a voltage value on the sensor pad unit, converting the acquired voltage value into a digital signal, forming original data and transmitting the original data to the touch detection calculation unit; the touch detection calculation unit is used for acquiring the initial Base value from the Base value calculation unit; the touch detection calculating unit is used for subtracting the current original data from the initial Base value to obtain a first difference value, the touch judgment comparing unit judges whether the first difference value is larger than the first touch threshold value, if so, a first counting register of the timing unit is added with 1, and the MCU unit calculates a touch coordinate on the sensor pad unit; the touch judging and comparing unit is used for judging whether a first counting register value of the timing unit is larger than a second touch threshold value or not, if yes, the touch judging and comparing unit marks the current touch state as effective touch, and the MCU unit uploads the touch coordinate to a host.
Preferably, the device includes a touch-up judging and comparing unit, and the touch-up judging and comparing unit is configured to judge whether a lift-up event occurs in the current touch state when the touch-up judging and comparing unit judges that the current touch state is an effective touch.
Preferably, the device includes a switch unit, two switch ends of the switch unit are respectively connected to the touch detection calculation unit and the touch lifting judgment comparison unit, a control end of the switch unit is connected to the touch judgment comparison unit, and when the touch judgment comparison unit judges that the current touch state is an effective touch, the two switch ends of the switch unit are controlled to be switched on, so as to start the touch lifting judgment comparison unit.
Preferably, the device includes a filter circuit, and the data output by the sampling unit is subjected to filtering processing by the filter circuit and then transmitted to the Base value calculation unit and the touch detection calculation unit, respectively.
In the capacitive screen touch detection method and device disclosed by the invention, the sampling unit is used for collecting capacitance change on the sensor pad unit, the Base value calculation unit is used for updating a Base value according to sampled data, the touch detection calculation unit is used for calculating a touch differential value, the timing unit is used for judging whether the current touch exceeds a time threshold value, the touch judgment comparison unit is used for judging whether the current differential value is greater than a first touch threshold value, and then the touch judgment comparison unit is used for judging whether the current touch state is effective touch according to a second touch threshold value. Compared with the prior art, the method adopts double thresholds in the touch judgment process, can obviously improve the signal-to-noise ratio of the touch signal, only needs a small part of circuit resources, has simple algorithm and easy realization, and effectively reduces the system cost.
Drawings
FIG. 1 is a block diagram of a touch detection device for a capacitive screen according to the present invention;
FIG. 2 is a flow chart of a capacitive screen touch detection process;
FIG. 3 is a flow chart of a capacitive screen touch lift-off detection process;
FIG. 4 is a block diagram of the touch sensing device of the capacitive screen in an alternative embodiment of the present invention;
FIG. 5 is a schematic diagram illustrating coordinates of touch points of a capacitive screen according to a first embodiment of the present invention;
fig. 6 is a flowchart of a touch detection method of a capacitive screen according to a first embodiment of the present invention.
Detailed Description
The invention is described in more detail below with reference to the figures and examples.
The invention discloses a touch detection method of a capacitive screen, which is realized based on a device shown in figures 1 to 3, wherein the device comprises a sensor pad unit 1, a sampling unit 2, a Base value calculating unit 3, a touch detection calculating unit 4, a timing unit 5, a touch judgment comparing unit 6 and an MCU unit 7, the input end of the sampling unit 2 is connected with the sensor pad unit 1, the data output by the sampling unit 2 is respectively transmitted to the Base value calculating unit 3 and the touch detection calculating unit 4, the Base value calculating unit 3 and the timing unit 5 are respectively connected with the touch detection calculating unit 4, the data output by the touch detection calculating unit 4 and the timing unit 5 are transmitted to the touch judgment comparing unit 6, the data output by the touch judgment comparing unit 6 is transmitted to the MCU unit 7, the Base value calculating unit 3 is preset with an initial Base value, the MCU unit 7 is preset with a first touch threshold and a second touch threshold, and the method comprises the following steps:
step S1, starting touch scanning;
step S2, the sampling unit 2 collects the voltage value of the sensor pad unit 1, converts the collected voltage value into a digital signal, and then forms original data and transmits the original data to the touch detection calculation unit 4;
step S3, the touch detection calculation unit 4 acquires the initial Base value to the Base value calculation unit 3;
step S4, the touch detection calculating unit 4 subtracts the current raw data from the initial Base value to obtain a first difference value, the touch determination comparing unit 6 determines whether the first difference value is greater than the first touch threshold, if so, step S5 is executed;
step S5, adding 1 to the first count register of the timing unit 5, and the MCU unit 7 calculating the touch coordinates on the sensor pad unit 1;
step S6, the touch determination comparing unit 6 determines whether the first count register value of the timing unit 5 is greater than the second touch threshold, if not, the step S1 is returned to, if yes, the step S7 is executed;
in step S7, the touch determination and comparison unit 6 records the current touch state as an effective touch, and the MCU unit 7 uploads the touch coordinates to the host.
In the method and the device, the sampling unit 2 collects capacitance changes on the sensor pad unit 1, the Base value calculating unit 3 updates a Base value according to sampled data, the touch detection calculating unit 4 calculates a touch differential value, the timing unit 5 is used for judging whether the current touch exceeds a time threshold value, the touch judgment comparing unit 6 is used for judging whether the current differential value is greater than a first touch threshold value, and then the touch state is judged to be effective touch according to a second touch threshold value. Compared with the prior art, the method adopts double thresholds in the touch judgment process, can obviously improve the signal-to-noise ratio (SNR) of the touch signal, only needs a small part of circuit resources, has simple algorithm and easy realization, and effectively reduces the system cost.
In the practical application process, the invention can adopt an SOC integrated circuit, and the method can be realized by software without depending on any hardware circuit.
As a preferable mode, before executing the step S1, the method further includes an initialization step:
when the device is powered on, the sampling unit 2 collects the voltage value of the sensor pad unit 1, converts the collected voltage value into a digital signal to form original data, and the Base value calculation unit 3 takes the original data as an initial Base value.
Further, in the step S4, if the touch determination comparing unit 6 determines that the first difference is not greater than the first touch threshold, the Base value calculating unit 3 updates the initial Base value to the current original data, and then returns to step S1.
Preferably, the apparatus includes a touch-up determination comparing unit 8, and in step S7, when the touch determination comparing unit 6 determines that the current touch state is a valid touch, the apparatus executes step S8:
and judging whether the current touch state has a lifting event or not by using the touch lifting judgment and comparison unit 8.
Further, the MCU unit 7 presets a third touch threshold and a fourth touch threshold, and the step S8 includes:
step S80, starting touch scanning;
step S81, the sampling unit 2 collects the voltage value of the sensor pad unit 1, converts the collected voltage value into a digital signal, and then forms original data and transmits the original data to the touch detection calculation unit 4;
step S82, the touch detection calculation unit 4 acquires the initial Base value from the Base value calculation unit 3, and subtracts the current raw data from the initial Base value to obtain a second difference value;
step S83, the touch lift determination comparing unit 8 determines whether the second difference is smaller than the third touch threshold, if not, the step S80 is returned to, if yes, step S84 is executed;
step S84, adding 1 to the second counter register of the timing unit 5, and the MCU unit 7 calculating the touch coordinates on the sensor pad unit 1;
step S85, the touch lift determination and comparison unit 8 determines whether the second count register value of the timing unit 5 is greater than the fourth touch threshold, if not, the process returns to step S80, if yes, the touch lift determination and comparison unit 8 records the current touch state as a lift event, and the MCU unit 7 uploads the lift event to the host;
in step S86, the touch detection process ends.
The method further relates to on-off control, specifically, the device includes a switch unit 9, two switch ends of the switch unit 9 are respectively connected to the touch detection calculating unit 4 and the touch lifting judgment comparing unit 8, a control end of the switch unit 9 is connected to the touch judgment comparing unit 6, in step S7, when the touch judgment comparing unit 6 judges that the current touch state is an effective touch, the two switch ends of the switch unit 9 are controlled to be turned on, and then the step S8 is started.
In order to implement the technical solution of the present invention, the present invention further discloses a capacitive touch panel touch detection device, please refer to fig. 1, the device includes a sensor pad unit 1, a sampling unit 2, a Base value calculating unit 3, a touch detection calculating unit 4, a timing unit 5, a touch judgment comparing unit 6 and an MCU unit 7, an input end of the sampling unit 2 is connected to the sensor pad unit 1, data output by the sampling unit 2 is respectively transmitted to the Base value calculating unit 3 and the touch detection calculating unit 4, the Base value calculating unit 3 and the timing unit 5 are respectively connected to the touch detection calculating unit 4, data output by the touch detection calculating unit 4 and the timing unit 5 is transmitted to the touch judgment comparing unit 6, data output by the touch judgment comparing unit 6 is transmitted to the MCU unit 7, the Base value calculation unit 3 is preset with an initial Base value, and the MCU unit 7 is preset with a first touch threshold and a second touch threshold, where:
the sampling unit 2 is used for acquiring a voltage value on the sensor pad unit 1, converting the acquired voltage value into a digital signal, forming original data and transmitting the original data to the touch detection calculation unit 4;
the touch detection calculation unit 4 is configured to acquire the initial Base value from the Base value calculation unit 3;
the touch detection calculating unit 4 is configured to subtract current raw data from the initial Base value to obtain a first difference, the touch determination comparing unit 6 determines whether the first difference is greater than the first touch threshold, if so, the first count register of the timing unit 5 is incremented by 1, and the MCU unit 7 calculates a touch coordinate on the sensor pad unit 1;
the touch judgment and comparison unit 6 is configured to judge whether the first count register value of the timing unit 5 is greater than the second touch threshold value, if so, the touch judgment and comparison unit 6 marks the current touch state as an effective touch, and the MCU unit 7 uploads the touch coordinate to the host.
Further, the device includes a touch-up determination comparing unit 8, where the touch-up determination comparing unit 8 is configured to determine whether a lift-up event occurs in the current touch state when the touch determination comparing unit 6 determines that the current touch state is an effective touch.
As a preferable mode, the apparatus includes a switch unit 9, two switch ends of the switch unit 9 are respectively connected to the touch detection calculating unit 4 and the touch lifting judgment comparing unit 8, a control end of the switch unit 9 is connected to the touch judgment comparing unit 6, and when the touch judgment comparing unit 6 judges that the current touch state is an effective touch, the two switch ends of the switch unit 9 are controlled to be turned on, so as to start the touch lifting judgment comparing unit 8.
As an alternative of the present invention, please refer to fig. 4, the apparatus includes a filter circuit, and the data output by the sampling unit 2 is filtered by the filter circuit and then transmitted to the Base value calculating unit 3 and the touch detection calculating unit 4, respectively. The invention adds a filter circuit on the output side of the sampling unit for filtering the original data sampled by the sampling unit to process the noise with different frequencies from the touch signal, thereby better realizing the anti-interference purpose.
The capacitive screen touch detection method and device disclosed by the invention are shown in fig. 1 to 3, and the implementation principle is as follows:
firstly, in a stable state of a touch control system, a touch control chip firstly obtains capacitance on a sensor pad through sampling of a sampling circuit, digital signals are converted through an analog-to-digital conversion circuit to obtain an original value, the control chip takes original data sampled in the stable state as a reference base value, and in a subsequent touch detection process, the reference base value is updated according to the original data.
In the process of detecting touch of the capacitive touch screen, a touch control chip firstly samples and acquires capacitance change on a sensor pad through a sampling circuit to obtain an original value; in the subsequent calculation, the original value is subtracted from the reference value to obtain a difference value, if the difference value meets the touch condition, the touch is judged to occur, and the touch coordinate value can be calculated according to the difference value by combining a touch algorithm.
The invention is realized by adopting an integrated circuit mode combining software and hardware, and is realized by combining the influence on the sensor pad during touch and a touch algorithm: after the touch system is powered on, the original data collected by the sampling unit is used as an initial base value, and after the initial base value is established, the base value is updated according to the data change rule of the difference value in the subsequent sampling calculation. In the subsequent touch sampling process, the original data is subtracted from the updated base value to calculate a difference value.
In the touch sampling process, the sampling unit samples a voltage value on the sensor pad, and an analog-to-digital converter inside the sampling unit converts the voltage value into a touch digital signal, i.e., raw data. The original data passes through the touch detection calculation unit, and the touch calculation unit obtains a difference value obtained by subtracting the current original data from a pre-stored base value of the base value calculation unit. And if the difference value is smaller than the first touch threshold value, the difference value is informed to a base calculation unit, and the currently sampled original data is used as a base value to be updated. If the difference value is larger than the first touch threshold value, the touch judgment unit informs an MCU (microcontroller) of the result, and the MCU calculates the coordinate according to the calculated difference value, but does not report the coordinate information to the host. If the original data sampled by the continuous M frames meet the condition that the difference value obtained by subtracting the original data from the base value is larger than the first touch threshold value and is the same coordinate point, the real touch is considered to exist, and meanwhile, the MCU is informed to report detailed touch information to a host (touch coordinates and the like). M is the second touch threshold, and both are configured by the MCU together with the first touch threshold. From this point the touch detection process is complete.
Similarly, if it is determined in the touch sampling process that a real touch exists, the M0 pipe of the switch unit is opened, and the touch up determination and comparison process is performed. And in the process of detecting the touch lifting, subtracting the current original data from the pre-stored base value of the base calculating unit to obtain a difference value, and adding 1 to the counting register of the timing unit if the difference value is smaller than a touch third touch threshold value. And if the original data sampled by the N continuous frames meet the condition that the difference value obtained by subtracting the original data from the base value is smaller than a third touch threshold value and the same touch coordinate point is obtained, the real touch uplifting is considered, and meanwhile, the MCU is informed to report detailed touch information to the host. N is a fourth touch threshold, and the third touch threshold together are configured by the MCU. From this the touch lift-off detection process is complete.
The above description explains the algorithm and the working principle of the single touch, and the calculation process can be completed for two or more touches, and at this time, only the number of the register counted by the timing unit which adds corresponding touch points is needed to record whether the touch detection meets the second touch threshold and whether the touch lift-off detection meets the fourth touch threshold.
The following describes in detail an implementation process of the present invention in a specific application scenario by taking the first embodiment as an example.
The first embodiment is as follows:
in this embodiment, the entire touch system is very vulnerable to external noise interference, please refer to fig. 5, assume that C1 and C2 are real two touch points, and assume that the interference at C3 disappears during the third frame scan because the interference C3 is a false touch point.
Referring to fig. 6, raw data of each point is electrically sampled as a base value, a first touch threshold and a second touch threshold are initialized, and if the second touch threshold is configured to be 3, progressive scanning is started. The sampling circuit scans each sensor pad in the first row, and since the difference between the raw data and the base value of each sensor pad is smaller than the first touch threshold, no touch point exists. The sampling unit scans a second row, original data of each sensor pad of the second row are sampled, when a sensor pad of a point C1 is scanned, because a difference value between the original data of the point C1 and a base value is larger than a first touch threshold value, the point C1 is judged to be a touch point possibly, a counting register 1 of a timing unit is added with 1, the MCU calculates coordinates of the point C1 to be (2, 3), and because the touch judgment and comparison unit judges that the counting register 1 of the timing unit is smaller than a second touch threshold value, the coordinates of the point C1 are not reported. The sampling unit samples the third row of sensor pads, and since the difference value between the base value and the raw data of each sensor pad of the third row is smaller than the first touch threshold, no touch point exists. The sampling unit scans the fourth sensor pad, and since the difference calculated by sampling the original data of the C2 and the C3 sensor pad is greater than the first touch threshold, 1 is added to the count register 2 and the count register 3 of the timing unit, respectively, and the MCU calculates the coordinates of the C2 point and the C3 point as (4,2), (4,3), respectively. And neither the C2 point nor the C3 point in the current frame scan meets the second touch threshold, so that the touch coordinates are not reported. The sampling unit samples the fifth row of sensor pads, and since the difference value between the original data of each sensor pad of the fifth row and the base value is smaller than the first touch threshold value, no touch point exists. By this point, one frame of data has been swept.
And starting the next scanning, wherein the scanned touch points are C1, C2 and C3 points as the same as the previous frame, the coordinates calculated by the MCU are (2, 3), (4,2) and (4,3) as the same as the previous frame, and the counting register 1, the counting register 2 and the counting register 3 of the timing unit at the moment are accumulated by 1, and the result value is 2 or is smaller than the second touch threshold value.
And starting the third round of scanning, judging that the difference value between the original data of the C1 point and the C2 point and the corresponding Base value is larger than a first touch threshold value, judging that the original data is touched, respectively calculating coordinates (2, 3) and (4,2), accumulating the counter register 1 and the counter register 2 of the timing unit by 1, wherein the values are both 3, judging that the values of the counter register 1 and the counter register 2 are larger than or equal to a second touch threshold value by the touch judging unit, and reporting the touch coordinates of the C1 point and the C2 point to the host by the touch chip. However, at this time, the difference between the original data of the sensor PAD at the point C3 and the base value corresponding to the original data does not satisfy the first touch threshold, it is determined that the point is a touch error point, and the touch information of the point is not reported to the host.
Up to this point, the three-frame scan completion determination C1 and C2 are touch points, and C3 is an erroneous touch point.
In practical application, the software program for calculating the MCU touch detailed information can also be made into a software program for calculating the detailed touch information by the main control module. Meanwhile, a filtering circuit can be added after the sampling unit, and the influence of noise on touch can be effectively inhibited by combining the method of the invention. The method does not limit the original data sampled by continuous M frames, meets the method that the difference value obtained by subtracting the original data from the base value is larger than the first touch threshold value and judges the touch as the real touch, and can also be replaced by other methods. The invention also does not limit that the original data sampled by the continuous N frames meet the condition that the difference value obtained by subtracting the original data from the base value is smaller than the third touch threshold value and the same touch coordinate point is obtained, so the method is considered to be a real touch lifting method and can be replaced by other methods. The invention can be better realized and the signal-to-noise ratio of the touch signal can be improved by combining other anti-interference methods.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents or improvements made within the technical scope of the present invention should be included in the scope of the present invention.

Claims (2)

1. A capacitive screen touch detection method is characterized in that the method is realized based on a device, the device comprises a sensor board unit (1), a sampling unit (2), a reference value calculation unit (3), a touch detection calculation unit (4), a timing unit (5), a touch judgment comparison unit (6) and an MCU unit (7), the input end of the sampling unit (2) is connected with the sensor board unit (1), data output by the sampling unit (2) are respectively transmitted to the reference value calculation unit (3) and the touch detection calculation unit (4), the reference value calculation unit (3) and the timing unit (5) are respectively connected with the touch detection calculation unit (4), data output by the touch detection calculation unit (4) and the timing unit (5) are transmitted to the touch judgment comparison unit (6), the data output by the touch judgment and comparison unit (6) is transmitted to the MCU unit (7), the reference value calculation unit (3) is preset with a reference value, the MCU unit (7) is preset with a first touch threshold and a second touch threshold, and the method comprises the following steps:
step S1, starting touch scanning;
step S2, the sampling unit (2) collects the voltage value on the sensor board unit (1), converts the collected voltage value into a digital signal, and then forms original data and transmits the original data to the touch detection calculation unit (4);
step S3, the touch detection calculation unit (4) acquires the reference value to the reference value calculation unit (3);
step S4, the touch detection calculation unit (4) subtracts the current original data from the reference value to obtain a first difference value, the touch judgment comparison unit (6) judges whether the first difference value is greater than the first touch threshold value, if yes, step S5 is executed;
step S5, adding 1 to a first counting register of the timing unit (5), and calculating the touch coordinate on the sensor board unit (1) by the MCU unit (7);
step S6, the touch judgment comparing unit (6) judges whether the first count register value of the timing unit (5) is larger than the second touch threshold value, if not, the step S1 is returned to, if yes, the step S7 is executed;
step S7, the touch judgment and comparison unit (6) records the current touch state as effective touch, and the MCU unit (7) uploads the touch coordinate to a host;
before the step S1 is executed, the method further includes an initialization step:
when the device is powered on, the sampling unit (2) collects voltage values on the sensor board unit (1), converts the collected voltage values into digital signals and then forms original data, and the reference value calculation unit (3) takes the original data as a reference value;
in the step S4, if the touch determination comparing unit (6) determines that the first difference is not greater than the first touch threshold, the reference value calculating unit (3) updates the reference value to the current original data, and then returns to the step S1;
the device comprises a touch lifting judgment comparing unit (8), and in the step S7, when the touch judgment comparing unit (6) judges that the current touch state is the effective touch, the step S8 is executed:
judging whether the current touch state has a lifting event or not by using the touch lifting judgment and comparison unit (8);
the third touch threshold and the fourth touch threshold are preset in the MCU unit (7), and the step S8 includes:
step S80, starting touch scanning;
step S81, the sampling unit (2) collects the voltage value on the sensor board unit (1), converts the collected voltage value into a digital signal, and then forms original data and transmits the original data to the touch detection calculation unit (4);
step S82, the touch detection calculation unit (4) obtains the reference value from the reference value calculation unit (3), and subtracts the current original data from the reference value to obtain a second difference value;
step S83, the touch lift-up determination comparing unit (8) determines whether the second difference is smaller than the third touch threshold, if not, the step S80 is returned to, if yes, the step S84 is executed;
step S84, adding 1 to a second counting register of the timing unit (5), and calculating the touch coordinate on the sensor board unit (1) by the MCU unit (7);
step S85, the touch lift determination and comparison unit (8) determines whether the second count register value of the timing unit (5) is greater than the fourth touch threshold, if not, the step S80 is returned to, if yes, the touch lift determination and comparison unit (8) records the current touch state as a lift event, and the MCU unit (7) uploads the lift event to the host;
step S86, the touch detection process ends;
the device comprises a switch unit (9), wherein two switch ends of the switch unit (9) are respectively connected with the touch detection calculation unit (4) and the touch lifting judgment comparison unit (8), a control end of the switch unit (9) is connected with the touch judgment comparison unit (6), in the step S7, when the touch judgment comparison unit (6) judges that the current touch state is effective touch, the two switch ends of the switch unit (9) are controlled to be switched on, and then the step S8 is started.
2. A capacitive screen touch detection device is characterized by comprising a sensor board unit (1), a sampling unit (2), a reference value calculation unit (3), a touch detection calculation unit (4), a timing unit (5), a touch judgment comparison unit (6) and an MCU unit (7), wherein the input end of the sampling unit (2) is connected to the sensor board unit (1), data output by the sampling unit (2) are respectively transmitted to the reference value calculation unit (3) and the touch detection calculation unit (4), the reference value calculation unit (3) and the timing unit (5) are respectively connected to the touch detection calculation unit (4), data output by the touch detection calculation unit (4) and the timing unit (5) are transmitted to the touch judgment comparison unit (6), and data output by the touch judgment comparison unit (6) are transmitted to the MCU unit (7), the reference value calculation unit (3) is preset with a reference value, and the MCU unit (7) is preset with a first touch threshold and a second touch threshold, wherein:
the sampling unit (2) is used for acquiring a voltage value on the sensor board unit (1), converting the acquired voltage value into a digital signal, forming original data and transmitting the original data to the touch detection calculation unit (4);
the touch detection calculation unit (4) is used for acquiring the reference value from the reference value calculation unit (3);
the touch detection calculating unit (4) is used for subtracting the current original data from the reference value to obtain a first difference value, the touch judgment comparing unit (6) judges whether the first difference value is larger than the first touch threshold value, if yes, a first counting register of the timing unit (5) is added with 1, and the MCU unit (7) calculates a touch coordinate on the sensor board unit (1);
the touch judgment and comparison unit (6) is used for judging whether a first counting register value of the timing unit (5) is larger than a second touch threshold value or not, if so, the touch judgment and comparison unit (6) marks the current touch state as effective touch, and the MCU unit (7) uploads the touch coordinate to a host;
the device comprises a touch lifting judgment and comparison unit (8), wherein the touch lifting judgment and comparison unit (8) is used for judging whether a lifting event occurs in the current touch state when the touch judgment and comparison unit (6) judges that the current touch state is effective touch;
the device comprises a switch unit (9), wherein two switch ends of the switch unit (9) are respectively connected to the touch detection calculation unit (4) and the touch lifting judgment comparison unit (8), a control end of the switch unit (9) is connected to the touch judgment comparison unit (6), and when the touch judgment comparison unit (6) judges that the current touch state is effective touch, the two switch ends of the switch unit (9) are controlled to be switched on, so that the touch lifting judgment comparison unit (8) is started;
the device comprises a filter circuit, and data output by the sampling unit (2) are respectively transmitted to the reference value calculation unit (3) and the touch detection calculation unit (4) after being filtered by the filter circuit.
CN201910648248.1A 2019-07-18 2019-07-18 Capacitive screen touch detection method and device Active CN110502143B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910648248.1A CN110502143B (en) 2019-07-18 2019-07-18 Capacitive screen touch detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910648248.1A CN110502143B (en) 2019-07-18 2019-07-18 Capacitive screen touch detection method and device

Publications (2)

Publication Number Publication Date
CN110502143A CN110502143A (en) 2019-11-26
CN110502143B true CN110502143B (en) 2022-02-15

Family

ID=68585644

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910648248.1A Active CN110502143B (en) 2019-07-18 2019-07-18 Capacitive screen touch detection method and device

Country Status (1)

Country Link
CN (1) CN110502143B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113157132B (en) * 2021-04-13 2023-06-16 合肥松豪电子科技有限公司 Filter for reducing TP chip noise and filtering method thereof

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102855032A (en) * 2011-06-27 2013-01-02 比亚迪股份有限公司 Baseline updating method and touch device
CN104199572A (en) * 2014-08-18 2014-12-10 京东方科技集团股份有限公司 Touch positioning method of touch display device and touch display device
CN107294522A (en) * 2017-07-05 2017-10-24 广东欧珀移动通信有限公司 Response method, device, storage medium and electronic equipment based on touch key-press
CN108021259A (en) * 2016-11-03 2018-05-11 华为技术有限公司 A kind of false-touch prevention method and terminal
CN108073329A (en) * 2018-01-31 2018-05-25 北京集创北方科技股份有限公司 Touch device and its driving method and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110221701A1 (en) * 2010-03-10 2011-09-15 Focaltech Systems Ltd. Multi-touch detection method for capacitive touch screens

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102855032A (en) * 2011-06-27 2013-01-02 比亚迪股份有限公司 Baseline updating method and touch device
CN104199572A (en) * 2014-08-18 2014-12-10 京东方科技集团股份有限公司 Touch positioning method of touch display device and touch display device
CN108021259A (en) * 2016-11-03 2018-05-11 华为技术有限公司 A kind of false-touch prevention method and terminal
CN107294522A (en) * 2017-07-05 2017-10-24 广东欧珀移动通信有限公司 Response method, device, storage medium and electronic equipment based on touch key-press
CN108073329A (en) * 2018-01-31 2018-05-25 北京集创北方科技股份有限公司 Touch device and its driving method and terminal

Also Published As

Publication number Publication date
CN110502143A (en) 2019-11-26

Similar Documents

Publication Publication Date Title
CN103365506B (en) Sensing method and device for improving noise interference of capacitive touch device
CN102522975B (en) Adaptive-environmental touch key circuit and key touch detection method
CN103049159B (en) Method for preventing water drop false triggering of capacitive touch screen
CN102915138B (en) Sensor electrode array control circuit, control method and touch-control sensing system thereof
TWI455005B (en) Method of eliminating noise of a touch panel
CN110199247B (en) Noise detection method and device, electronic equipment and computer readable storage medium
CN102594327B (en) Capacitive sensing key and key detection method
CN103645822B (en) The foreign matter detecting method of touch-screen and touch-screen
CN103365505A (en) Sensing method and device for improving noise interference of capacitive touch device
CN110502143B (en) Capacitive screen touch detection method and device
EP3783463B1 (en) Signal processing system, chip, and active pen
CN107003783B (en) A kind of key detecting method and device
WO2015109562A1 (en) Interference suppression method and apparatus for touch screen and terminal device
KR20150026504A (en) Electronic device having a touch sensor and driving method thereof
CN103927048B (en) Touch-control scan method, touch-control display panel and touch control display apparatus
TW201335822A (en) Driving method for charger noise rejection in touch panel
CN104360769A (en) Anti-interference method for touch panel, touch panel and display
EP3862857A1 (en) Capacitance measurement circuit, touch-control chip and electronic device
CN112684938A (en) Touch screen scanning data adaptive noise control method and system
CN106130795A (en) A kind of intelligent domestic system
CN109683697A (en) A kind of super low-power consumption system wake-up device and method
CN102999241A (en) Touch screen adopting capacitive touch detection and real-time image positioning
CN112764596B (en) Capacitive touch anti-interference detection device, system and method
CN103019495B (en) A kind of method for Noise measarement in capacitive touch screen and device
CN109324711B (en) Data processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant