Search

CN-113541668-B - Touch sensing method, circuit and electronic device

CN113541668BCN 113541668 BCN113541668 BCN 113541668BCN-113541668-B

Abstract

The embodiment of the application provides a touch sensing method, a circuit and electronic equipment, wherein the method is applied to a control unit, the control unit is connected with a touch key through a pin, the method firstly converts the pin between a first configuration and a second configuration through time division multiplexing, parasitic capacitance of the touch key is charged to a preset voltage through the pin under the first configuration, the pin is converted into the second configuration when the parasitic capacitance is charged to the preset voltage, the parasitic capacitance is discharged through the pin under the second configuration, the current voltage of the parasitic capacitance is measured when the preset time is reached, and then the induction state of the touch key is judged according to the current voltage. The touch sensing method provided by the application has lower hardware cost.

Inventors

  • Gong Yinqiang
  • YANG YANG

Assignees

  • 深圳光峰科技股份有限公司

Dates

Publication Date
20260505
Application Date
20200422

Claims (8)

  1. 1. The touch sensing method is applied to a control unit, and the control unit is connected with a touch key through a pin, and is characterized by comprising the following steps: switching the pins between a first configuration and a second configuration by time multiplexing; under the first configuration, charging parasitic capacitance formed by the touch key and a grounding network to a preset voltage through the pin, and converting the pin into the second configuration when the parasitic capacitance is charged to the preset voltage; under the second configuration, discharging the parasitic capacitance through the pin, and measuring the current voltage of the parasitic capacitance when the preset time is reached, wherein the current voltage represents the voltage to which the parasitic capacitance starts to discharge from the preset voltage and is reduced after the preset time is elapsed; filtering the current voltage; and calibrating the filtered current voltage; Calculating a difference between the current voltage and a reference voltage, the reference voltage being a reference measurement of the current voltage in the second configuration when the touch key is in a non-touched state, and And comparing the difference value with a preset threshold value, and judging the induction state of the touch key according to a comparison result, wherein the preset threshold value is obtained by the average value and standard deviation of a plurality of voltage measurement values obtained by carrying out a plurality of touch tests on the touch key.
  2. 2. The touch sensing method of claim 1, wherein the filtering the current voltage comprises: And filtering the current voltage by any one or more algorithms of an average method, a median method, a recursive average method, a recursive median method and a Kalman filtering method.
  3. 3. The touch sensing method of claim 1, wherein the calibrating the filtered current voltage comprises: filtering the reference voltage by any one or more algorithms of an average method, a median method, a recursive average method, a recursive median method and a Kalman filtering method; Performing multiple measurement tests on the filtered reference voltage, and obtaining the average value and standard deviation of the multiple measurement tests, and Normalizing the current voltage by the mean value and standard deviation of the reference voltage.
  4. 4. The touch sensing method of claim 3, wherein after performing a plurality of measurement tests on the filtered reference voltage and obtaining an average value and a standard deviation of the plurality of measurement tests, further comprising: Performing multiple touch tests on the touch keys, and normalizing voltage measurement values of each touch test through the average value and standard deviation of the reference voltage; Calculating the average value and standard deviation of the normalized voltage measurement values, and And determining the preset threshold according to the average value and the standard deviation of the voltage measured values.
  5. 5. A touch sensing circuit, comprising: the touch key is provided with a grounding network around, so that parasitic capacitance is generated between the touch key and the grounding network; a charge-discharge circuit connected with the touch key and A control circuit including a pin connected to the charge and discharge circuit, the control circuit configured to: switching the pins between a first configuration and a second configuration by time multiplexing; under the first configuration, the charge-discharge circuit charges parasitic capacitance of the touch key to a preset voltage through the pin, and when the parasitic capacitance is charged to the preset voltage, the pin is converted into the second configuration; Under the second configuration, the charge-discharge circuit discharges the parasitic capacitance through the pin, and measures the current voltage of the parasitic capacitance when the preset time is reached, wherein the current voltage represents the voltage to which the parasitic capacitance starts to discharge from the preset voltage and is reduced after the preset time is elapsed; And comparing the difference value with a preset threshold value, and judging the induction state of the touch key according to the comparison result, wherein the preset threshold value is obtained by carrying out multiple touch tests on the touch key to obtain an average value and a standard deviation of a plurality of voltage measurement values.
  6. 6. The touch sensing circuit of claim 5, wherein the ground network comprises a bottom ground and a top ground, the top ground disposed about the touch keys.
  7. 7. The touch sensor circuit of claim 5, wherein the charge-discharge circuit comprises a first diode, a second diode, a third diode, a fourth diode, a first resistor, a second resistor and a first capacitor, wherein the positive electrode of the first diode is connected between the negative electrode of the second diode, the negative electrode of the first diode is connected to one end of the first resistor, the positive electrode of the second diode is connected to one end of the second resistor, the other end of the first resistor is connected to the other end of the second resistor, the positive electrode of the third diode is connected between the negative electrode of the fourth diode, the negative electrode of the fourth diode is connected between the second diode and the second resistor, the positive electrode of the fourth diode is connected between the first diode and the first resistor, the first capacitor is connected in parallel to two ends of the first resistor, the connection node of the first diode and the second diode is connected to the touch key, the positive electrode of the third diode is connected to the control node of the fourth diode and the first resistor.
  8. 8. An electronic device comprising a device body and a touch sensing circuit as claimed in any one of claims 5 to 7 disposed within the device body.

Description

Touch sensing method, circuit and electronic device Technical Field The present application relates to the field of touch sensing, and in particular, to a touch sensing method, a circuit and an electronic device. Background The touch key has the advantages of small volume, good dustproof effect, attractive appearance and the like, and is widely applied to household intelligent appliances. Common touch keys include piezoelectric film keys, resistive touch keys, and capacitive touch keys. The capacitive touch key is usually a conductive electrode with a specific shape, when a finger touches or approaches the electrode, the capacitance of the electrode changes due to the distributed capacitance of the human body, and the chip judges whether the key is pressed or not by detecting the change of the capacitance. However, the conventional capacitive touch key needs to use a dedicated capacitive detection IC (INTEGRATED CIRCUIT ) chip for detection, and the principle of the capacitive detection IC chip is complex and has high cost. Accordingly, improvements in capacitive touch keys are urgently needed by those skilled in the art. Disclosure of Invention In view of the above problems, embodiments of the present application provide a touch sensing method, a circuit and an electronic device, so as to solve the above technical problems. The embodiment of the application is realized by adopting the following technical scheme: In a first aspect, an embodiment of the present application provides a touch sensing method applied to a control unit, the control unit being connected to a touch key through a pin, the method including switching the pin between a first configuration and a second configuration by time division multiplexing, wherein in the first configuration, a parasitic capacitance formed by the touch key and a ground network is charged to a preset voltage through the pin, and when the parasitic capacitance is charged to the preset voltage, the pin is switched to the second configuration, in the second configuration, the parasitic capacitance is discharged through the pin, and when a preset time arrives, a current voltage of the parasitic capacitance is measured, and And judging the induction state of the touch key according to the current voltage. In some embodiments, determining the sensing state of the touch key according to the current voltage includes calculating a difference between the current voltage and a reference voltage, the reference voltage being a reference measurement of the current voltage in the second configuration when the touch key is in the non-touched state, and comparing the difference with a preset threshold value, and determining the sensing state of the touch key according to the comparison result. In some embodiments, filtering the present voltage is included before calculating the difference between the present voltage and the reference voltage, and calibrating the filtered present voltage. In some embodiments, filtering the current voltage includes filtering the current voltage by any one or more of an averaging method, a median method, a recursive averaging method, a recursive median method, and a kalman filtering method. In some embodiments, calibrating the filtered current voltage includes filtering the reference voltage by any one or more of an average method, a median method, a recursive average method, a recursive median method, and a Kalman filtering method, performing a plurality of measurement trials on the filtered reference voltage and obtaining an average and a standard deviation of the plurality of measurement trials, and normalizing the current voltage by the average and the standard deviation of the reference voltage. In some embodiments, the method further comprises performing multiple touch tests on the touch key after performing multiple measurement tests on the filtered reference voltage and obtaining an average value and a standard deviation of the multiple measurement tests, normalizing voltage measurement values of each touch test through the average value and the standard deviation of the reference voltage, calculating the average value and the standard deviation of the normalized voltage measurement values, and determining a preset threshold value according to the average value and the standard deviation of the voltage measurement values. The embodiment of the application also provides a touch sensing circuit, which comprises a touch key, a charge-discharge circuit, a control circuit and a pin, wherein a grounding network is arranged around the touch key so as to enable parasitic capacitance to be generated between the touch key and the grounding network, the charge-discharge circuit is connected with the touch key, the control circuit comprises the pin, the pin is connected with the charge-discharge circuit, the control circuit is configured to switch the pin between a first configuration and a second configuration through time division multiplexing, the charg