Touch detection circuit and touch device
By accumulating the number of charging cycles in the touch detection circuit to determine the touch state, the accuracy and stability issues of the main control chip's simulated touch detection are solved, hardware costs are reduced, and the reliability and real-time performance of the detection are improved.
Patent Information
- Application Number
- CN202422948643.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2034-12-02
AI Technical Summary
In existing technologies, simulating touch detection through a main control chip has issues with accuracy and stability, and the hardware cost is high, which affects user experience and product competitiveness.
Touch detection is performed by accumulating the number of charging cycles. The capacitor is periodically charged and discharged by the charging and discharging component. The detection unit compares the number of charging cycles with a preset threshold to determine the touch state, which avoids clock errors caused by timers and increases in hardware costs.
It improves the reliability and stability of touch detection, reduces system complexity and cost, avoids transient errors caused by rapid charging and discharging, and ensures the accuracy and real-time performance of touch detection.
Smart Images

Figure CN223472251U_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of touch key, and in particular to a touch detection circuit and a touch device. BACKGROUND
[0002] In modern electronic products, touch keys are widely used in various devices such as table lamps and mirror lights due to their simple and elegant appearance and convenient operation. There are usually two ways to realize the function of touch keys. One is to use a special touch chip, but the cost of the special touch chip is relatively high, which increases the overall cost of the product and is not suitable for simple function products sensitive to cost. The other is to use the pins of the master control chip to simulate touch. This method is low in cost and high in flexibility, and is suitable for products that only need simple touch function. By simulating the touch function through the pins of the master control chip, the cost of the product can be greatly reduced, and the market competitiveness can be improved. However, the second method needs to ensure the accuracy and stability of touch detection.
[0003] In the related art, touch is simulated by the following method: a counter inside the control chip records the time of capacitor charging and discharging, and touch detection is realized by mutual comparison. The speed of capacitor charging and discharging is very fast, so the time collected is also very short. However, this method requires high accuracy of the clock of the master control chip, and also requires high response speed of the chip. In addition, it is sensitive to external environment, which can easily lead to touch out of control and affect user experience. Alternatively, the voltage across the capacitor is collected by the ADC module of the control chip, and touch detection is realized by mutual comparison. This scheme requires the control chip to have an ADC module, which increases the hardware cost. At the same time, the sampling speed of the ADC is relatively slow, which may affect the real-time performance of touch response. SUMMARY
[0004] In view of the above-mentioned shortcomings of the prior art, the purpose of the present disclosure is to provide a touch detection circuit and a touch device to solve the problems in the related art.
[0005] The first aspect of the present disclosure provides a touch detection circuit, which is applied to a touch device, and the touch detection circuit comprises:
[0006] A charge and discharge assembly is coupled to a capacitor and is used to periodically perform a charging process, the charging process comprising periodically stopping charging after charging the capacitor in each charging period, accumulating the number of charging periods, and stopping the charging process when the voltage of the capacitor reaches a preset voltage threshold; the capacitor is electrically connected to a touch part through a resistor;
[0007] The detection unit is communicatively connected to the charging and discharging component, and is configured to perform a detection action in response to the voltage of the capacitor reaching a preset voltage threshold, the detection action including reading the number of charging periods and comparing the number of charging periods with a preset number of period threshold / range to obtain a detection signal indicating whether the touch device is touched.
[0008] In an embodiment of the first aspect, the charging and discharging component includes:
[0009] The charging and discharging unit has a power supply end coupled to at least one end of the capacitor and a ground end.
[0010] The voltage detection module is connected to and detects the voltage of the power supply end, and generates a trigger signal to the charging and discharging unit to stop the charging process and perform the discharging process when the voltage reaches the voltage threshold, and to the detection unit to trigger the detection action.
[0011] In an embodiment of the first aspect, the charging and discharging unit includes a first power supply end and a second power supply end, respectively coupled to both ends of the capacitor, and the charging process or discharging process is formed by the voltage change between the first power supply end and the second power supply end.
[0012] In an embodiment of the first aspect, the counting unit is communicatively connected to the charging and discharging component and the detection unit, and is configured to accumulate the number of charging periods and clear the number of charging periods after being read by the detection unit when the voltage of the capacitor reaches the preset voltage threshold.
[0013] In an embodiment of the first aspect, the detection unit includes:
[0014] The comparison unit is communicatively connected to the charging and discharging component, and is configured to compare the number of charging periods with the preset number of period threshold / range to form the detection signal.
[0015] In an embodiment of the first aspect, the storage unit includes at least one memory communicatively connected to the detection unit, configured to store / output the preset number of period threshold / range; or communicatively connected to the charging and discharging component and the detection unit, configured to store / output the voltage threshold and the preset number of period threshold / range, respectively.
[0016] In an embodiment of the first aspect, the charging and discharging component and the detection unit are integrated into a touch chip.
[0017] In an embodiment of the first aspect, the preset number of period threshold / range is in a range between a charging period of the capacitor when a touch signal is present and a charging period of the capacitor when a touch signal is not present.
[0018] In an embodiment of the first aspect, the charging and discharging assembly periodically performs, in each charging and discharging cycle, the charging process and the discharging process after the charging process is stopped.
[0019] The second aspect of the present disclosure provides a touch device, wherein the touch detection circuit is as any one of the above.
[0020] The present disclosure has the following advantages: the number of charging cycles is accumulated to determine the touch state, without using a timer, so that clock error and timing problems caused by the timer are avoided, and the reliability and stability of touch detection are improved. The capacitor is periodically charged and stopped, so that the charging speed of the capacitor is relatively slow, so that the change of the capacitor voltage can be more accurately detected, and transient error caused by fast charging and discharging is avoided. BRIEF DESCRIPTION OF DRAWINGS
[0021] Figure 1 A structural block diagram of a touch detection circuit in an embodiment of the present disclosure is shown.
[0022] Figure 2 A structural block diagram of a charging and discharging assembly in a touch detection circuit in an embodiment of the present disclosure is shown.
[0023] Figure 3 A connection diagram of a charging and discharging assembly and a capacitor in a touch detection circuit in an embodiment of the present disclosure is shown.
[0024] Figure 4 A structural block diagram of a touch detection circuit including a counting unit in an embodiment of the present disclosure is shown.
[0025] Figure 5 A structural block diagram of a detection unit in a touch detection circuit in an embodiment of the present disclosure is shown.
[0026] Figure 6 A structural block diagram of a touch detection circuit including a storage unit in an embodiment of the present disclosure is shown.
[0027] Figure 7 A structural block diagram of a touch detection circuit in another embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0028] The embodiments of the present disclosure are described below through specific and concrete examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the messages disclosed in the present disclosure. The present disclosure can also be implemented or applied by other different specific embodiments, and the details in the present disclosure can be modified or changed according to different views and applications without departing from the spirit of the present disclosure. It should be noted that the embodiments in the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0029] The embodiments of the present disclosure will be described in detail with reference to the drawings, so as to be easily carried out by a person skilled in the art to which the present disclosure pertains. The present disclosure can be embodied in various ways, and is not limited to the embodiments described herein.
[0030] In the description of the present disclosure, the expressions "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" etc. mean that the specific features, structures, materials or characteristics represented in connection with the embodiment or example are included in at least one embodiment or example of the present disclosure. Also, the specific features, structures, materials or characteristics represented can be combined in an appropriate manner in any one or a group of embodiments or examples. In addition, the person skilled in the art can combine and combine the different embodiments or examples represented in the present disclosure and the features of the different embodiments or examples, without contradiction.
[0031] In addition, the terms "first", "second" are used only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the present disclosure, the meaning of "a group" is two or more, unless otherwise specifically limited.
[0032] In order to clearly explain the present disclosure, the devices irrelevant to the description are omitted, and the same reference numerals are given to the same or similar constituent elements throughout the specification.
[0033] Throughout the specification, when it is said that a device is "connected" to another device, it not only includes the case of "directly connected", but also includes the case of "indirectly connected" in which other elements are placed therebetween. In addition, when it is said that a device "includes" a certain constituent element, unless otherwise specifically stated, other constituent elements are not excluded, but it means that other constituent elements can also be included.
[0034] Although the terms first, second, etc. can be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first interface and a second interface, etc. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises", "comprising", "includes" and / or "including", when used herein, specify the presence of stated features, steps, operations, elements, modules, items, components, and / or groups thereof, but do not preclude the presence or addition of one or more other features, steps, operations, elements, modules, items, components, and / or groups thereof. As used herein, the terms "or" and "and / or" are construed to be inclusive, or mean any one or any combination of the listed items. Thus, "A, B or C" or "A, B and / or C" means any of the following: A; B; C; A and B; A and C; B and C; A, B and C. Exceptions to this definition are only present when items are grouped in conjunction with the phrase "one of X, Y or Z" or "one of X, Y and / or Z" unless otherwise stated.
[0035] The professional terms used herein are used only to refer to specific embodiments and are not intended to limit the present disclosure. The singular form used herein, unless the context clearly indicates otherwise, also includes the plural form. The meaning of "include" used in the specification is to specify a particular characteristic, region, integer, step, operation, element, and / or component, and does not exclude the presence or addition of other characteristics, regions, integers, steps, operations, elements, and / or components.
[0036] Although not differently defined, all terms used herein, including technical and scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. Terms defined in commonly used dictionaries are to be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and the present disclosure, and should not be interpreted in an idealized or overly formal sense unless clearly defined otherwise.
[0037] In modern electronic products, touch keys are widely used due to their simple and beautiful appearance and convenient operation, such as table lamps, mirror lamps, etc. There are usually two ways to realize the function of touch keys: using a special touch chip, but the cost of a special touch chip is relatively high, which increases the overall cost of the product, and is not suitable for simple function products sensitive to cost. Using the pins of the main control chip to simulate touch, through the pins of the main control chip (MCU) to simulate the touch function, the cost of the product can be greatly reduced, and the market competitiveness can be improved. The common simulation touch scheme mainly has the following two kinds: through the control chip internal counter records the time of the capacitor charge and discharge, compares each other to realize touch detection. But the speed of capacitor charge and discharge is very fast, so the time of collection is also very short. Therefore, the clock accurate counting requirement of MCU is higher, and the reaction speed requirement of chip is also higher. In addition, it is sensitive to the influence of external environment, which is easy to lead to touch out of control, and affects the user experience. Or through the control chip ADC module collects the voltage between the two ends of the capacitor, and compares each other to realize touch detection. This scheme needs the control chip to have ADC module, which increases the hardware cost. At the same time, the sampling speed of ADC is relatively slow, which may affect the real-time performance of touch response.
[0038] In view of the deficiencies in the related simulation touch scheme, an embodiment of the present disclosure provides a touch detection circuit, which judges the touch state by accumulating the number of charging periods, without using a timer, simplifying the hardware design and reducing the complexity and cost of the system. Further, by periodically charging and stopping charging the capacitor, the charging speed of the capacitor is relatively slow, so that the change of the capacitor voltage can be more accurately detected, avoiding the transient error caused by fast charge and discharge, and improving the stability of touch detection.
[0039] In Figure 1 In an embodiment, the touch detection circuit comprises a charge and discharge component 100 and a detection unit 200.
[0040] The charge and discharge component 100 is coupled to a capacitor C1, and is used to periodically perform a charging process, the charging process comprising periodically performing charging and then stopping charging on the capacitor C1 in each charging period, accumulating the number of charging periods, and stopping the charging process when the voltage of the capacitor C1 reaches a preset voltage threshold; the capacitor C1 is electrically connected to a touch part 300 through a resistor R1.
[0041] The detection unit 200 is communicatively connected to the charge and discharge component 100, and is used to perform a detection action in response to the voltage of the capacitor C1 reaching the preset voltage threshold, including reading the number of charging periods and comparing the number of charging periods with a preset period number threshold / range to obtain a detection signal indicating whether the touch device is touched.
[0042] Specifically, in some embodiments, in the related art, the touch detection method usually charges the capacitor C1 directly until the capacitor C1 voltage reaches a certain preset voltage threshold. It is usually necessary to use a timer to record the charging time, and to determine whether a touch occurs by comparing the charging time. In the present disclosure, by the charge-discharge assembly 100, when triggered, the capacitor C1 is periodically charged, and the charging is stopped until the voltage of the capacitor C1 reaches the preset voltage threshold, and the number of charging times during the entire charging process is recorded, which forms the number of charging cycles. When the voltage reaches the voltage threshold, the detection unit 200 starts to compare the charging cycle with the preset cycle number threshold or range, so as to detect whether the touch part is touched.
[0043] In the touch detection circuit, the number of charging cycles of the capacitor C1 is different because the equivalent capacitance changes when touched and not touched, that is, the equivalent capacitance formed between the human body capacitance introduced when touched and C1 changes compared with the capacitance of C1. This change directly affects the charging speed of the capacitor C1, and further causes the difference in the number of charging cycles. Specifically, when the user touches the touch part 300, the human body capacitance (usually referred to as parasitic capacitance) will form an equivalent capacitance with the capacitor C1 in the circuit. When the user touches the touch part 300, the parasitic capacitance is in series with the capacitor C1 in the circuit, so that the equivalent capacitance is reduced. Because the equivalent capacitance is reduced, the time required for the capacitor C1 to charge to the same voltage will be shortened. Because the charging time is shortened, the number of charging cycles required for the capacitor C1 to reach the preset voltage threshold will be reduced. If the detected number of charging cycles is significantly reduced, it means that the equivalent capacitance C1 is reduced, that is, a touch occurs. If the detected number of charging cycles remains unchanged, it means that the equivalent capacitance C1 does not change, that is, no touch occurs. Alternatively, if the number of charging cycles is reduced, but does not reach the "obvious" corresponding preset cycle number threshold / range, it can also be determined as a false touch.
[0044] Optionally, in Figure 2 In an embodiment, the charge-discharge assembly 100 includes a charge-discharge unit 101 and a voltage detection module 102.
[0045] The charge-discharge unit 101 has a power supply end coupled to at least one end of the capacitor C1 and a ground end; optionally, in Figure 3 In an embodiment, the charge-discharge unit 101 includes a first power supply end A and a second power supply end B, respectively coupled to both ends of the capacitor C1, and the charging process or discharging process is formed by the voltage change between the first power supply end A and the second power supply end B.
[0046] For example, when charging, the first power supply terminal A can be set to output mode and output a high level to provide charging current. The second power supply terminal B is set to input mode so that it is in a high impedance state and does not participate in the charging process. When the first power supply terminal A outputs a high level, the capacitor C1 is charged through the voltage difference between the first power supply terminal A and the ground terminal. The voltage across the capacitor C1 gradually increases. After the first power supply terminal A is set to output mode, it is immediately converted to input mode, that is, it is converted to a stop charging state, and the first power supply terminal A is set to input mode, so that it is in a high impedance state and no longer provides charging current. The second power supply terminal B is set to output mode and set to a low level to provide a discharge path. When the first power supply terminal A is set to input mode and the second power supply terminal B is set to a low level, the capacitor C1 is not charged. The states of the first power supply terminal A and the second power supply terminal B are continuously switched as above, that is, the first power supply terminal A immediately changes to input mode after outputting a high level, and the second power supply terminal B immediately changes to input mode after outputting a low level, and so on. The number of charging cycles can be accumulated (for example Figure 4 The voltage detection module 102 detects the voltage of the capacitor C1. When the voltage detection module 102 detects that the voltage of the capacitor C1 reaches a preset voltage threshold, a trigger signal is generated to stop the charging process.
[0047] In order to perform the next touch check, the capacitor C1 needs to be discharged after it is fully charged. If it is not discharged, the residual charge of the capacitor C1 will accumulate during the next charging, causing the charging time to gradually shorten, which ultimately affects the accuracy of the detection result. Therefore, the voltage detection module 102 is connected to and detects the voltage of the power supply end, and when the voltage reaches the voltage threshold, generates a trigger signal and sends it to the charge and discharge unit 101 to stop the charging process and perform the discharge process, and sends it to the detection unit 200 to trigger the detection action. When the charge and discharge unit 101 performs the discharge process, the voltage detection module 102 is connected to and detects the voltage of the power supply end, and when the voltage reaches the voltage threshold, generates a trigger signal and sends it to the charge and discharge unit 101 to stop the charging process and perform the discharge process, and sends it to the detection unit 200 to trigger the detection action.
[0048] Optionally, the charging and discharging component 100 periodically performs the charging process and discharging process after stopping the charging process in each charging and discharging cycle. The second power supply end B is set to output mode and outputs low level to provide another discharging path. When the first power supply end A and the second power supply end B both output low level, the capacitor C1 discharges through the low level paths of the two ends. The voltage across the capacitor C1 gradually decreases. Keeping the first power supply end A and the second power supply end B output low level for a period of time ensures that the capacitor C1 is completely discharged. By completely discharging the capacitor C1 after each charging, it is ensured that the capacitor C1 starts from zero voltage at the next charging. This eliminates the influence of the previous charging and ensures that each charging starts from the same initial condition. By periodic charging and discharging, the charging state of the capacitor C1 can be better controlled, and unnecessary energy waste can be avoided.
[0049] Optionally, in Figure 4 In an example, the touch detection circuit further comprises a counting unit 400, which is communicatively connected to the charging and discharging component 100 and the detection unit 200, and is configured to accumulate the number of charging cycles and clear after being read by the detection unit 200 when the voltage of the capacitor C1 reaches the preset voltage threshold. The counting unit 400 is used to record the number of each charging process, so that the detection unit 200 can determine whether a touch occurs according to these data. Clearing the counting unit 400 ensures that each new detection cycle starts from zero. In this way, the influence of the count result of the previous detection on the current detection can be avoided, and it is ensured that each detection is independent. If the counter is not cleared, the value of the counter will gradually accumulate, resulting in inaccurate count results in subsequent detections. For example, if the count result of the previous detection is not cleared, the initial value of the counter will not be zero at the next detection, which will affect the accuracy of the detection result. In some embodiments, the counting unit 400 is implemented as a counter.
[0050] Optionally, in Figure 5 In an example, the detection unit 200 comprises a comparison unit 201.
[0051] The comparison unit 201 is communicatively connected to the charge and discharge component 100, and is configured to compare the number of charging cycles with the preset number of cycles threshold / range to generate the detection signal. The comparison unit 201 can include a single limit comparator or a double limit comparator. When the preset number of cycles threshold is used, the single limit comparator is used; when the preset number of cycles range is used, the double limit comparator is used. Optionally, the preset number of cycles threshold / range is selected from a range between the number of charging cycles of the capacitor C1 in the case of no touch and the number of charging cycles of the capacitor C1 in the case of touch. In advance, for a corresponding touch chip, the number of charging cycles of the capacitor C1 is measured in the case of no touch, and the number of charging cycles of the capacitor C1 is measured in the case of touch. According to the measurement results, a suitable threshold range is selected. For example, a value selected from any one of the average number of charging cycles in the case of no touch plus several standard deviations and the average number of charging cycles in the case of touch minus several standard deviations can be used as the threshold of the single limit comparator, or the average number of charging cycles in the case of no touch plus several standard deviations can be used as the minimum threshold of the double limit comparator, and the average number of charging cycles in the case of touch minus several standard deviations can be used as the maximum threshold. The comparator can be implemented as a digital comparator.
[0052] Optionally, in Figure 6 In an embodiment, the touch detection circuit further includes a storage unit 500, which includes at least one memory 501 communicatively connected to the detection unit 200 and configured to store / output the preset number of cycles threshold / range.
[0053] In some embodiments, the storage unit 500 can be communicatively connected to the charge and discharge component 100 and the detection unit 200, and configured to store / output the voltage threshold and the preset number of cycles threshold / range, respectively.
[0054] Specifically, the storage unit 500 stores the preset voltage threshold for comparison by the voltage detection module 102. The storage unit 500 stores the preset number of cycles threshold / range for comparison by the comparison unit 201 in the detection unit 200. For example, the threshold can be written into the storage unit 500 through a programming interface or a physical button. During the touch detection process, the preset voltage threshold and the number of cycles threshold / range are read from the storage unit 500.
[0055] Optionally, the charge and discharge component 100 and the detection unit 200 are integrated into a touch chip.
[0056] In another embodiment of the present disclosure, a touch device is provided, which includes the touch detection circuit according to any one of the above embodiments.
[0057] The above embodiments are only illustrative of the principles of the present disclosure and its effects, and are not intended to limit the present disclosure. Any modification or change made by any person skilled in the art without departing from the spirit and scope of the present disclosure shall be covered by the protection scope of the present disclosure.
Claims
1. A touch detection circuit, characterized by, The touch detection circuit is applied to a touch device and comprises: A charge-discharge component coupled to a capacitor and configured to periodically perform a charging process, the charging process comprising periodically performing charging and then stopping charging on the capacitor in each charging period, accumulating the number of charging periods, and stopping the charging process when the voltage of the capacitor reaches a preset voltage threshold; the capacitor is electrically connected to a touch part through a resistor; A detection unit communicatively connected to the charge-discharge component and configured to perform a detection action in response to the voltage of the capacitor reaching the preset voltage threshold, the detection action comprising reading the number of charging periods and comparing the number of charging periods with a preset number of charging periods threshold / range to obtain a detection signal indicating whether the touch device is touched.
2. The touch detection circuit of claim 1, wherein, The charge-discharge component comprises: A charge-discharge unit having a power supply end coupled to at least one end of the capacitor and a ground end; A voltage detection module connected to and configured to detect the voltage of the power supply end, generate a trigger signal to the charge-discharge unit to stop the charging process and perform a discharging process when the voltage reaches the voltage threshold, and send the trigger signal to the detection unit to trigger the detection action.
3. The touch detection circuit of claim 2, wherein, The charge-discharge unit comprises a first power supply end and a second power supply end respectively coupled to two ends of the capacitor, and the charging process or the discharging process is formed by the voltage change between the first power supply end and the second power supply end.
4. The touch detection circuit of claim 1, wherein, Further comprising a counting unit communicatively connected to the charge-discharge component and the detection unit, configured to accumulate the number of charging periods and clear the number of charging periods when read by the detection unit when the voltage of the capacitor reaches the preset voltage threshold.
5. The touch detection circuit of claim 1, wherein, The detection unit comprises: A comparison unit communicatively connected to the charge-discharge component and configured to compare the number of charging periods with the preset number of charging periods threshold / range to form the detection signal.
6. The touch detection circuit of claim 1, wherein, Further comprising a storage unit comprising at least one memory communicatively connected to the detection unit and configured to store / output the preset number of charging periods threshold / range, or communicatively connected to the charge-discharge component and the detection unit and configured to store / output the voltage threshold and the preset number of charging periods threshold / range, respectively.
7. The touch detection circuit of claim 1, wherein, The charge-discharge component and the detection unit are integrated in a touch chip.
8. The touch detection circuit of claim 1, wherein, The preset number of charging periods threshold / range is between the number of charging periods of the capacitor when touched and the number of charging periods of the capacitor when not touched.
9. The touch detection circuit of claim 1, wherein, The charge-discharge component periodically performs the charging process and the discharging process after stopping the charging process in each charge-discharge period.
10. A touch device, comprising: The touch detection circuit comprises any one of claims 1-9.