A key touch control method, device and electronic equipment
By obtaining the capacitance difference from the touch buttons and combining it with a threshold and the number of detections, the problem of accidental touches caused by changes in ambient temperature is solved, improving the accuracy of button operation and the stability of the device.
Patent Information
- Application Number
- CN202210172213.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-24
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2042-02-24
AI Technical Summary
Traditional touch buttons are prone to accidental touches when the ambient temperature changes, leading to unpredictable problems in electronic devices such as washing machines.
By obtaining the difference in capacitance value of the button and combining it with a preset threshold and the number of detections, it is determined whether the button has been touched, eliminating the cumulative change in capacitance caused by temperature changes and avoiding accidental touches.
This effectively avoids accidental button presses due to temperature changes, improves the accuracy and reliability of button operation, and reduces the risk of unexpected device pauses or shutdowns.
Smart Images

Figure CN114567313B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of touch control technology, specifically to a button touch control method, device, and electronic device. Background Technology
[0002] With societal development, washing machines have become a staple in almost every household. The control panel, as the most crucial element of human-computer interaction, is the most common way for users to directly control their washing machine. While traditional washing machines mostly use mechanical buttons, touch-sensitive buttons are becoming increasingly popular to improve the user experience.
[0003] Touch buttons primarily determine whether a button has been pressed by detecting changes in capacitance. When a hand approaches the conductive film of a touch button, the corresponding capacitance changes significantly, triggering the button press. However, capacitance is a very microscopic signal that is affected by various factors, such as ambient temperature. As the ambient temperature slowly increases, the capacitance change gradually accumulates. When this accumulated capacitance change reaches the level indicated by a hand touch, accidental button presses can occur, leading to unpredictable problems with the washing machine, such as unexpected pauses or shutdowns, causing significant inconvenience to the user. Summary of the Invention
[0004] Therefore, in order to solve the problem of accidental touch of touch buttons due to temperature changes, the present invention provides a button touch control method, device and electronic device.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] This invention provides a button touch control method, comprising: acquiring a first capacitance value of a button at a first moment; acquiring a second capacitance value of the button at a second moment, wherein the second moment is the first moment plus a preset first time period; calculating the difference between the second capacitance value and the first capacitance value to obtain a current capacitance difference; and determining that the button has been touched when the current capacitance difference is greater than a preset first threshold.
[0007] Optionally, the button touch control method further includes: when the current capacitance difference is greater than or equal to a preset second threshold and less than or equal to the first threshold, obtaining the sum of the number of detections and the sum of capacitance differences; incrementing the sum of the number of detections by one; and adding the current capacitance difference to the sum of capacitance differences.
[0008] Optionally, the button touch control method further includes: when the current capacitance difference is less than the second threshold, setting the sum of the number of detections and the sum of the capacitance differences to zero.
[0009] Optionally, the button touch control method further includes: determining whether the sum of the number of detections reaches a preset third threshold; when the sum of the number of detections reaches the third threshold, setting the sum of the number of detections and the sum of the capacitance difference to zero.
[0010] Optionally, the button touch control method further includes: when the sum of the number of detections does not reach the third threshold, returning to obtain the first capacitance value of the button at the first moment after a preset second time period.
[0011] Optionally, the first time period is less than 1 millisecond; the second time period is less than 1 second.
[0012] Optionally, the button touch control method further includes: after setting the sum of the number of detections and the capacitance difference to zero, returning to obtain the first capacitance value of the button at the first moment.
[0013] According to a second aspect, embodiments of the present invention also disclose a button touch control method apparatus, comprising a first acquisition module, a second acquisition module, a calculation module, and a determination module, wherein the first acquisition module is used to acquire a first capacitance value of the button at a first moment; the second acquisition module is used to acquire a second capacitance value of the button at a second moment, wherein the second moment is the first moment plus a preset first time period; the calculation module is used to calculate the difference between the second capacitance value and the first capacitance value to obtain a current capacitance difference; and the determination module is used to determine that the button has been touched when the current capacitance difference is greater than a preset first threshold.
[0014] According to a third aspect, embodiments of the present invention also disclose an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the key touch control method steps as described in the first aspect or any optional embodiment of the first aspect.
[0015] According to a fourth aspect, embodiments of the present invention also disclose a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the key touch control method steps as described in the first aspect or any optional embodiment of the first aspect.
[0016] The technical solution of this invention has the following advantages:
[0017] This invention obtains the first capacitance value of a button at a first moment, and then obtains the second capacitance value of the button at a second moment, where the second moment is the first moment plus a preset first time period. The difference between the second capacitance value and the first capacitance value is calculated to obtain the current capacitance difference. When the current capacitance difference is greater than a preset first threshold, it can be determined that the button has been touched, and the corresponding button operation is executed. Thus, when determining whether the button has been touched, not only the amount of capacitance change is considered, but also the duration of the capacitance change, thereby eliminating false button triggering caused by a large cumulative capacitance change due to temperature rise. Attached Figure Description
[0018] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating a button touch control method in an embodiment of the present invention;
[0020] Figure 2 This is another flowchart illustrating the button touch control method in an embodiment of the present invention;
[0021] Figure 3 This is another schematic diagram of the button touch control method in an embodiment of the present invention;
[0022] Figure 4 This is a schematic diagram of a button touch control device in an embodiment of the present invention;
[0023] Figure 5 This is a specific example diagram of an electronic device in an embodiment of the present invention. Detailed Implementation
[0024] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] In the description of this invention, it should be noted that the term "and / or" as used in this application specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0026] Furthermore, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0027] This invention discloses a button touch control method, such as... Figure 1 As shown, the method includes the following steps:
[0028] Step 101: Obtain the first capacitance value of the button at the first moment.
[0029] Specifically, before obtaining the first capacitance value of the button press at the first moment, such as Figure 2 As shown, when manufacturing touch-button devices, manufacturers use experiments and tools such as oscilloscopes to obtain the first threshold N2, the second threshold N1, and the third threshold Max under normal conditions stored within the device. These thresholds are then stored in the controller chip of the touch-button device. The first threshold can be a touch threshold, the second threshold N1 can be a touch noise value, and the third threshold Max can be the maximum number of touch anomalies. Furthermore, the first threshold, the second threshold, and the maximum number of touch anomalies Max can be adjusted by the user based on changes in the device's operating environment. Touch-button devices can be electronic devices with touch buttons, such as washing machines, dishwashers, and range hoods.
[0030] For example, as an optional embodiment of the present invention, such as Figure 2 As shown, after the touch button device is powered on, it obtains the first capacitance value C1 of the button at the first moment.
[0031] Step 102: Obtain the second capacitance value of the button at a second time, wherein the second time is the first time plus a preset first time period.
[0032] For example, as an optional embodiment of the present invention, such as Figure 2 As shown, after obtaining the first capacitance value C1 of the device button at a first moment, the touch button device waits for a preset first time period t1, and then obtains the second capacitance value C2 of the device button again.
[0033] In order to ensure that the first capacitance value C1 of the device button obtained at the first moment and the second capacitance value C2 of the device button obtained at the second moment are under the same environment, the preset first time period needs to be set very short, for example, less than 1 millisecond. This can reduce the problem of excessive capacitance change caused by temperature changes or other common interferences during the capacitance acquisition period.
[0034] Step 103: Calculate the difference between the second capacitance value and the first capacitance value to obtain the current capacitance difference.
[0035] For example, as an optional embodiment of the present invention, the current capacitance difference ΔC = C2 - C1 is obtained by subtracting the obtained second capacitance value from the first capacitance value.
[0036] Step 104: When the current capacitance difference is greater than a preset first threshold, it is determined that the button has been touched.
[0037] Specifically, the capacitance difference ΔC calculated by the current touch button device is compared with the preset first threshold N2 and second threshold N1.
[0038] As a specific implementation method, to address the issue of accidental button presses caused by the gradual accumulation of capacitance changes due to a slow increase in ambient temperature, leading to a situation where the accumulated capacitance change equals the capacitance change caused by a human hand touching a touch button, the following method is employed: When the current capacitance difference is greater than or equal to a preset second threshold and less than or equal to a first threshold, the sum of the number of detections and the sum of the capacitance differences are obtained. The sum of the number of detections is then incremented by one, and the current capacitance difference is added to the sum of the capacitance differences.
[0039] For example, as an optional embodiment of the present invention, such as Figure 2 As shown, when the capacitance difference ΔC is greater than or equal to the second threshold N1 and less than or equal to the first threshold N2, the sum of the current number of detections n and the sum of historical capacitance differences stored in the controller chip of the touch button device are obtained. The sum of the current number of detections is incremented by one, and the sum of the current capacitance difference and the sum of historical capacitance differences are added together to obtain the sum of capacitance differences. Figure 3 As shown, the vertical axis represents the capacitance difference ΔC, the horizontal axis represents time t, line 1 is the second threshold N1, i.e. the noise threshold line, and line 2 is the first threshold N2, i.e. the touch threshold. At this time, the signal simulation diagram of the capacitance difference of the touch button is ΔC during the time period from t3 to t4.
[0040] Furthermore, to avoid accidentally deleting data that increases capacitance when a user touches a touch button, the sum of the current number of detections, n, can be compared with a preset third threshold, Max, to determine whether the sum of the current number of detections, n, reaches the preset third threshold, Max. When the sum of the current number of detections, n, reaches the third threshold, Max, the sum of the sum of the current number of detections, n, and the capacitance difference is set to zero.
[0041] When the sum n of the current detection times has not reached the preset third threshold Max, after delaying for the preset second time period t2, return to the step of obtaining the first capacitance value of the button at the first moment, then obtain the capacitance value of the touch button at the current moment, and perform the next touch detection. Among them, in order to avoid obtaining the first touch capacitance value C1 at the first moment in the same temperature environment twice continuously, the preset second time period t2 can be set, for example, as t2≥t1*1000, so as to avoid repetitive determination of the capacitance in the same temperature environment. Also, in order to avoid insensitive calculation caused by too long determination time, the preset second time period is less than 1 second. The preset second time period can also be set according to the specific application environment, and the present invention does not limit this.
[0042] Specifically, after calculating ΔC, if ΔC > N1 and ΔC < N2, add 1 to the sum n of the current detection times, and sum the current ΔC with the sum of the capacitance differences to obtain the current sum of capacitance differences. After waiting for the time t2, calculate ΔC after the time t2. If ΔC after the time t2 still satisfies the condition of ΔC > N1 and ΔC < N2, continue to wait for the time t2 and perform cumulative calculation to obtain the sum of capacitance differences after the time t2. When the cumulative number of times n = Max, stop the cumulative calculation, and obtain the time (Max - 1)*t2 of the abnormal state, which proves that within the continuous (Max - 1)*t2 time, the touch button is in an abnormal state, that is, a state of about to be triggered but not triggered. This abnormal state may be caused by temperature change. Then clear the button state of the touch button at this time, clear the sum of capacitance differences at this time and clear the sum n of the detection times.
[0043] Based on the sum of capacitance differences and the abnormal state time calculated by the above method, it can be obtained that when the cumulative number of times reaches the maximum number of touch abnormalities Max, the touch button is in an abnormal state within the abnormal state time. This method can clear the accumulation of the capacitance difference of the touch button before the button is triggered, eliminate the interference of temperature on the touch button, and thus avoid the touch button from being accidentally triggered.
[0044] It should be noted that Figure 2 only gives the implementation method of how to eliminate the accidental touch of the touch button caused by environmental temperature change. For how to respond to the normal button trigger operation of the user Figure 2 is not given. The normal button trigger operation of the user can be executed according to any scheme in the prior art. Thus, if Figure 2 during the process of delaying and waiting for the preset time t2, the user touches the button, the normal button trigger operation of the user will also be responded to at this time.
[0045] By accumulating the capacitance difference over a certain period before clearing the sum, instead of clearing it directly if the capacitance difference of the touch button device is greater than a first threshold but less than a second threshold, data that increases capacitance when the user touches the touch button can be avoided from being mistakenly deleted. This is because when a user touches the touch button, although the capacitance difference before and after the first time period will be greater than the second threshold, the capacitance difference before and after the second time period (for example) that is less than the first time period will not necessarily be greater than the second threshold. If the capacitance difference greater than the first threshold but less than the second threshold is cleared every time, the capacitance difference before and after the second time period may also be cleared. However, the capacitance difference before and after the second time period is actually caused by the user's touch, so it will affect the accuracy of the user's touch button.
[0046] The third threshold Max, which represents the maximum number of abnormal touches, is affected by the rate of temperature rise. It can be preset by the manufacturer under standard temperature conditions. In real life, the touch button device will also adjust the third threshold Max according to the actual ambient temperature. The faster the ambient temperature rises, the smaller the third threshold Max value; the slower the ambient temperature rises, the larger the third threshold Max value.
[0047] This invention determines whether the change in capacitance is caused by a temperature change by detecting the magnitude and duration of the capacitance change. This avoids situations where temperature changes alter the cumulative capacitance change, leading to accidental button presses and unpredictable problems with the washing machine, such as unexpected pauses, unexpected shutdowns, or changes in washing parameters.
[0048] For example, as an optional embodiment of the present invention, such as Figure 2 As shown, when the current capacitance difference ΔC is greater than the preset first threshold N2, it can be determined that the touch button has been pressed by the user, and the touch button device executes the corresponding button function. Figure 3 As shown, the analog signal diagram of the capacitance difference of the touch button at this time is ΔC for the time period after t4.
[0049] In this invention, if a human hand touches the touch button, the capacitance will increase instantly in a short time, reaching the set first threshold, and then it can directly respond to the corresponding button operation.
[0050] As an example, as another optional embodiment of the present invention, such as Figure 2As shown, when the current capacitance difference ΔC is less than the preset second threshold N1, it can be determined that the touch button is subject to ordinary interference. The capacitance change at this time is cleared and ignored. Then, the process returns to the step of obtaining the first capacitance value of the button at the first moment, and the capacitance value of the touch button at the current moment is obtained for the next touch detection. Ordinary interference refers to periodic interference to the touch button caused by factors such as power supply ripple, voltage and current spikes, etc. This interference does not persist for a long time and does not cause a continuous increase in capacitance difference. This ordinary interference is different from temperature interference and can be easily cleared and ignored by simply clearing the capacitance change. The analog signal diagram of the capacitance difference of the touch button at this time is ΔC over the time period from 0 to t3.
[0051] In this invention, if the detected change in touch capacitance is less than a set noise value, the detected capacitance change is ignored, and the system waits for the next detection. This avoids interference from common interference on the touch buttons.
[0052] The present invention also provides a button touch control device, such as Figure 4 As shown, the device includes:
[0053] The first acquisition module 41 is used to acquire the first capacitance value of the button at the first moment, as detailed in step 101.
[0054] The second acquisition module 42 is used to acquire the second capacitance value of the button at a second time, wherein the second time is the first time plus a preset first time period, and for details, please refer to step 102.
[0055] Calculation module 43 is used to calculate the difference between the second capacitance value and the first capacitance value to obtain the current capacitance difference. For details, please refer to step 103.
[0056] The determination module 44 is used to determine that the button has been touched when the current capacitance difference is greater than a preset first threshold. For details, please refer to step 104.
[0057] This invention also provides an electronic device, such as... Figure 5 As shown, the electronic device may include a processor 501 and a memory 502, wherein the processor 501 and the memory 502 may be connected via a bus or other means. Figure 5 Taking the example of a connection between China and Israel via a bus.
[0058] Processor 501 can be a Central Processing Unit (CPU). Processor 501 can also be other general-purpose processors, digital signal processors (DAP), application-specific integrated circuits (AAIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations thereof.
[0059] The memory 502, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the key-blocking method of the key-touch control method device in this embodiment of the invention. The processor 501 executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions, and modules stored in the memory 502, thereby implementing the key-touch control method in the above method embodiment.
[0060] Memory 502 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the processor 501, etc. Furthermore, memory 502 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 502 may optionally include memory remotely located relative to processor 501, and these remote memories may be connected to processor 501 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0061] The one or more modules are stored in the memory 502, and when executed by the processor 501, they perform actions such as... Figure 1-3 The button touch control method in the illustrated embodiment.
[0062] For specific details regarding the aforementioned electronic devices, please refer to the relevant documentation. Figure 1-3 The relevant descriptions and effects in the illustrated embodiments are for understanding purposes only and will not be repeated here.
[0063] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (AAD), etc.; the storage medium can also include combinations of the above types of memory.
[0064] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A button touch control method, characterized in that, include: Obtain the first capacitance value of the button at the first moment; Obtain the second capacitance value of the button at a second time, wherein the second time is the first time plus a preset first time interval; Calculate the difference between the second capacitance value and the first capacitance value to obtain the current capacitance difference; When the current capacitance difference is greater than a preset first threshold, it is determined that the button has been touched; Also includes: When the current capacitance difference is greater than or equal to a preset second threshold and less than or equal to the first threshold, the sum of the number of detections and the sum of capacitance differences are obtained; Add one to the sum of the number of detections; Add the current capacitance difference to the sum of the capacitance differences; Also includes: Determine whether the sum of the number of detections reaches a preset third threshold; When the sum of the number of detections reaches the third threshold, the sum of the number of detections and the sum of the capacitance difference are set to zero.
2. The method according to claim 1, characterized in that, Also includes: When the current capacitance difference is less than the second threshold, the sum of the number of detections and the sum of the capacitance differences are set to zero.
3. The method according to claim 1, characterized in that, Also includes: If the sum of the number of detections does not reach the third threshold, the process returns to the step of obtaining the first capacitance value of the button at the first moment after a preset second time period.
4. The method according to claim 3, characterized in that, The first time period is less than 1 millisecond; the second time period is less than 1 second.
5. The method according to claim 2, characterized in that, Also includes: After setting the sum of the number of detections and the sum of the capacitance difference to zero, return to the step of obtaining the first capacitance value of the button at the first moment.
6. A button touch control device, characterized in that, include: The first acquisition module is used to acquire the first capacitance value of the button at the first moment; The second acquisition module is used to acquire the second capacitance value of the button at a second time, wherein the second time is the first time plus a preset first time period. The calculation module is used to calculate the difference between the second capacitance value and the first capacitance value to obtain the current capacitance difference; The determination module is used to determine that the button has been touched when the current capacitance difference is greater than a preset first threshold. The button touch control device is also used to: when the current capacitance difference is greater than or equal to a preset second threshold and less than or equal to the first threshold, obtain the sum of the number of detections and the sum of capacitance differences; Add one to the sum of the number of detections; Add the current capacitance difference to the sum of the capacitance differences; The button touch control device is also used for: Determine whether the sum of the number of detections reaches a preset third threshold; When the sum of the number of detections reaches the third threshold, the sum of the number of detections and the sum of the capacitance difference are set to zero.
7. An electronic device, characterized in that, include: A memory and a processor are interconnected, the memory stores computer instructions, and the processor executes the key touch control method according to any one of claims 1-5 by executing the computer instructions.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the key touch control method as described in any one of claims 1-5.
Citation Information
Patent Citations
Trigging judgement method of touch key and household appliance
CN104716944A
Access control system control method and device, access control system and readable storage medium
CN111508119A