Capacitive touch detection circuit, method and chip
By introducing an environmental calibration module and a successive approximation voltage comparison mechanism, the problems of capacitive touch detection being susceptible to external interference and parasitic capacitance drift are solved, realizing high-speed, low-power capacitive touch detection and improving the robustness and response speed of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN YSPRING TECH
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-21
AI Technical Summary
Capacitive touch detection is susceptible to external electromagnetic interference. Parasitic capacitance is affected by temperature drift, humidity and circuit board process deviations, which can lead to reference drift, reduced signal-to-noise ratio, and affect the sensitivity and reliability of touch detection. It can even cause the device to fail to respond to user operations normally.
An environmental calibration module is introduced, which dynamically adjusts the adjustable capacitor to match the external parasitic capacitance. Combined with the reference voltage generation module and the control module, common-mode balance between the reference path and the detection path is achieved. A successive approximation voltage comparison mechanism is adopted to eliminate common-mode interference, calibrate the external parasitic capacitance in real time, and shorten the detection cycle.
It improves the system's robustness to environmental fluctuations, reduces power consumption, increases detection speed and reliability, and reduces false positives, making it suitable for consumer electronics products such as smart home panels and wearable devices.
Smart Images

Figure CN121900643A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic circuit technology, and in particular to a capacitive touch detection circuit, method and chip. Background Technology
[0002] With the widespread application of electronic devices, capacitive touch technology has been widely used in smartphones, tablets, home appliances, and industrial control equipment due to its excellent user experience and high reliability. Capacitive touch detection achieves touch recognition by sensing the minute capacitance changes formed between a human finger and a touch sensor. Its basic principle is that when a finger approaches or touches the sensor, it causes a change in the local electric field, which is then recognized by the detection circuit as a valid touch event.
[0003] However, since capacitive touch detection essentially senses extremely weak changes in capacitance, it is highly susceptible to external electromagnetic interference, such as noise from the power supply, display screen, and wireless communication module, which may lead to misjudgments or complete failure of touch detection. Simultaneously, the sensor's own parasitic capacitance changes with temperature drift, moisture intrusion, and process deviations during circuit board manufacturing, causing a continuous drift in the reference capacitance value. If this drift is not compensated or corrected in a timely manner, it will significantly reduce the system's signal-to-noise ratio, affecting the sensitivity and reliability of touch detection, and may even cause the device to fail to respond properly to user input. Summary of the Invention
[0004] In view of this, the embodiments of this application provide a capacitive touch detection circuit, method and chip, which can effectively solve the problems in the prior art where the parasitic capacitance of capacitive touch detection is greatly affected by temperature drift, humidity and the process of circuit board manufacturing, resulting in reference drift, reduced signal-to-noise ratio, affecting the sensitivity and reliability of touch detection, and even causing the device to fail to respond to user operations normally.
[0005] In a first aspect, embodiments of this application provide a capacitive touch detection circuit, including: An environmental calibration module, wherein the input terminal of the environmental calibration module is used to input a first reference voltage; A touch detection module, wherein the first input terminal of the touch detection module is used to input a second reference voltage, and the second input terminal of the touch detection module is used to connect at least one touch electrode to be tested; A reference voltage generation module, wherein the first output terminal of the reference voltage generation module is connected to the input terminal of the environmental calibration module, and the second output terminal of the reference voltage generation module is connected to the first input terminal of the touch detection module; The control module is electrically connected to the control terminal and output terminal of the environmental calibration module, the output terminal of the touch detection module, and the control terminal of the reference voltage generation module, respectively. The control module is configured to control the first and second output terminals of the reference voltage generation module to output reference voltages of the same amplitude during the environmental calibration phase, and to adjust the adjustable capacitor of the environmental calibration module according to the difference in response timing between the environmental calibration module and the touch detection module until the response times of the environmental calibration module and the touch detection module are consistent.
[0006] In some embodiments, the environmental calibration module further includes: A first current source, one end of which is connected to a power source, and the other end of which is connected to the output terminal of the adjustable capacitor; A first comparator has its first input terminal connected to the other end of the first current source, its second input terminal used to input the first reference voltage, and its output terminal connected to the control module.
[0007] In some embodiments, the touch detection module includes: A second current source, one end of which is connected to a power source, and the other end of which is used to connect to at least one of the touch electrodes to be tested; The second comparator has its first input terminal connected to the other end of the second current source, its second input terminal used to input the second reference voltage, and its output terminal connected to the control module.
[0008] In some embodiments, the first current source is an adjustable current source, and the environmental calibration module further includes a first adjustable bias current source, which is electrically connected to the power supply terminal of the first comparator.
[0009] In some embodiments, the second current source is an adjustable current source, and the touch detection module further includes a second adjustable bias current source, which is electrically connected to the power supply terminal of the second comparator.
[0010] In some embodiments, the reference voltage generation module includes a digital-to-analog converter.
[0011] Secondly, embodiments of this application provide a capacitive touch detection method, wherein the detection method is applied to the capacitive touch detection circuit as described in the first aspect above, comprising: During the environmental calibration phase, the control reference voltage generation module provides a reference voltage of the same amplitude to the environmental calibration module and the touch detection module. Based on the difference in response timing between the environmental calibration module and the touch detection module, adjust the adjustable capacitor of the environmental calibration module until the response times of the environmental calibration module and the touch detection module are consistent. During the touch detection phase, the reference voltage generation module is controlled to apply a stepped voltage to the touch detection module; The response sequence of the environmental calibration module and the touch detection module corresponding to each step voltage is collected to form a digital sequence, and a touch event is determined based on the digital sequence.
[0012] In some embodiments, the sequence of responses from the environmental calibration module and the touch detection module corresponding to each step voltage is collected to form a digital sequence, and the determination of whether a touch event has occurred based on the digital sequence includes: The flipping order of the first comparator of the environmental calibration module and the second comparator of the touch detection module corresponding to each step voltage is collected. When the second comparator flips first, a logic one is generated; otherwise, a logic zero is generated, resulting in an n-bit binary number sequence, where n is a positive integer. Convert the n-bit binary sequence into a decimal value D; Calculate 2 n If the difference between D and the threshold is greater than the preset touch detection threshold, then the touch event is determined to have occurred.
[0013] In some embodiments, the stepped voltage is generated using a successive approximation method, including: The initial voltage is set to half of the first reference voltage, and the initial voltage step size is one-quarter of the first reference voltage; If, at the current voltage, the second comparator flips before the first comparator, then the next voltage is the current voltage plus the current step size; If the first comparator flips first, the next-order voltage is the current voltage minus the current step size; After determining the next voltage level, the current step size is halved, and the comparison and voltage adjustment operations are repeated with the updated voltage and step size until n voltage comparisons are completed to obtain the n-bit binary number sequence.
[0014] Thirdly, embodiments of this application provide a capacitive touch detection chip, which includes the capacitive touch detection circuit described in the first aspect above.
[0015] The embodiments of this application have the following beneficial effects: The circuit of this application includes: an environmental calibration module, a touch detection module, a reference voltage generation module, and a control module. The environmental calibration module receives a first reference voltage at its input terminal, and the touch detection module receives a second reference voltage at its first input terminal. The second input terminal of the touch detection module is connected to at least one touch electrode under test. The first output terminal of the reference voltage generation module is connected to the input terminal of the environmental calibration module, and the second output terminal of the reference voltage generation module is connected to the first input terminal of the touch detection module. During the environmental calibration phase, the control module controls the first and second output terminals of the reference voltage generation module to output reference voltages of the same amplitude. Based on the difference in response timing between the environmental calibration module and the touch detection module, the control module adjusts the adjustable capacitor of the environmental calibration module until the response times of the environmental calibration module and the touch detection module are consistent. This application introduces an environmental calibration module to match external parasitic capacitance in real time, eliminate common-mode interference, and make the system insensitive to environmental fluctuations. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 A schematic diagram of a capacitive touch detection circuit according to an embodiment of this application is shown; Figure 2 A circuit diagram of a capacitive touch detection circuit according to an embodiment of this application is shown; Figure 3 A schematic flowchart of a capacitive touch detection method according to an embodiment of this application is shown.
[0018] Explanation of key component symbols: 10: Environmental calibration module; 20: Touch detection module; 30: Reference voltage generation module; 40: Control module; 50: Touch electrode under test. Detailed Implementation
[0019] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0020] The components of the embodiments of this application described and illustrated in the accompanying drawings can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0021] In the following text, the terms "comprising," "having," and their cognates, which may be used in various embodiments of this application, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more combinations thereof. Furthermore, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.
[0022] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.
[0023] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0024] Performance improvements in existing capacitive touch technology primarily rely on optimizations to touch algorithm libraries and anti-interference algorithms to maintain system stability in complex environments such as humidity, dust, and electromagnetic interference. To achieve this, the touch module needs to collect multiple sets of raw data for algorithm processing, such as using multiple sampling averaging to suppress noise, which requires a relatively long detection time window. However, mainstream solutions often employ a capacitor charging / discharging frequency counting method, counting the charging / discharging frequency within a fixed time T to reflect capacitance changes. Due to its reliance on time accumulation, a single detection cycle is typically on the order of milliseconds, and can even take tens of milliseconds to obtain an accurate result when parasitic capacitance is large. For applications with n touch channels, the total detection time is nT, resulting in significant overall response delays and a perceived sluggishness for users. To improve response speed, the traditional approach is to increase the charging current, but this significantly increases power consumption, negatively impacting battery life. Another solution uses a variable current source in conjunction with a comparator for rapid detection, but to achieve high resolution such as 12-bit, up to 4096 bias current sources are required, leading to severe layout matching challenges and a dramatic increase in power consumption. Meanwhile, parasitic capacitance is prone to drift due to temperature, humidity, and circuit board manufacturing processes, leading to unstable reference values. Weak touch signals are easily drowned out by environmental noise, causing false detections or decreased sensitivity. In addition, the algorithm relies on a large amount of raw data for noise reduction, further encroaching on controller resources and compressing the time window for advanced processing.
[0025] To address the aforementioned issues, this application proposes a high-speed, low-power capacitive touch detection circuit, method, and chip. Based on the principle of capacitor charging and discharging, this solution abandons traditional frequency counting and multi-channel current array structures, introducing a dynamic reference voltage generation and successive approximation voltage comparison mechanism. Combined with an environmental calibration module 10, it achieves common-mode balance between the reference path and the detection path. The control module 40 coordinates the operation of each unit, completing the digital quantization of capacitance changes in n rapid comparisons, significantly shortening the single detection cycle. The system adopts a single constant current source architecture, coupled with an adjustable capacitor and a programmable digital-to-analog converter, avoiding the high-power, large-area multi-bias branch design. The output is a pre-processed digital sequence with high signal-to-noise ratio and good stability, which can be directly used for subsequent judgment, effectively freeing up the main control computing power to support more complex intelligent recognition and anti-interference algorithms.
[0026] The capacitive touch detection circuit will be described below with reference to some specific embodiments.
[0027] Figure 1A schematic diagram of a capacitive touch detection circuit according to an embodiment of this application is shown. It is understood that this circuit can be integrated into any type of integrated circuit chip, and is particularly suitable for touch control chips in consumer electronics products, such as smart home panels, wearable device main controllers, or human-machine interaction modules of mobile terminals. Exemplarily, the capacitive touch detection circuit includes an environmental calibration module 10, a touch detection module 20, a reference voltage generation module 30, and a control module 40. These modules work together to achieve high-speed, low-power, and highly interference-resistant capacitive touch detection functionality.
[0028] The environmental calibration module 10 is used to track and match the parasitic capacitance of the external touch channel in real time. Its input is used to input a first reference voltage VREF, exemplarily, such as... Figure 2 As shown, the environmental calibration module 10 includes an adjustable capacitor Cref. The adjustable capacitor Cref can be composed of multiple unit capacitors connected in parallel via a switch array, employing a binary weighted or unit incremental structure. One end of each unit capacitor is grounded, and the other end is connected to a control node via a switching transistor. The switching transistor's on / off state is driven by a digital control signal output from the control module 40, thereby achieving fine adjustment of the capacitance value. The environmental calibration module 10 also includes a first current source IDC0 and a first comparator I0. Exemplarily, the first current source IDC0 is an adjustable current source, with one end connected to a power supply and the other end connected to the output of the adjustable capacitor Cref. The first current source IDC0 is used to perform constant current charging of the adjustable capacitor Cref. The non-inverting input of the first comparator I0 is connected to the connection node V1 between the first current source IDC0 and the adjustable capacitor Cref. The inverting input of the first comparator I0 is used to input a first reference voltage VREF. The output of the first comparator is connected to the control module 40 to determine whether the voltage at node V1 reaches the first reference voltage VREF. To further improve the response consistency of the first comparator I0 under different temperature and power conditions, the environmental calibration module 10 also includes a first adjustable bias current source Ibias0. The first adjustable bias current source Ibias0 is connected to the power supply terminal of the first comparator I0 and is used to adjust the operating current of the differential pair inside the first comparator I0, thereby optimizing the propagation delay and noise suppression capabilities.
[0029] The environmental calibration module 10 dynamically adjusts the adjustable capacitor Cref to match its charging characteristics with those of external parasitic capacitance, achieving real-time tracking and common-mode elimination of external parasitic capacitance. This structure replaces the traditional design that requires a large bias current source to achieve high resolution, greatly simplifying the analog front-end and reducing layout matching difficulty and static power consumption. The system is highly robust to parameter fluctuations caused by temperature drift, humidity, and differences in circuit board processes.
[0030] The touch detection module 20 is used to sense and quantify external touch actions. The first input terminal of the touch detection module 20 is used to input a second reference voltage VX, and the second input terminal of the touch detection module 20 is used to connect at least one touch electrode 50 to be tested. The touch electrode 50 to be tested is represented by C1, C2, etc., and the electrode is equivalent to a capacitor that increases as the finger approaches, with a typical value of about 5pF to 20pF when not touched.
[0031] Exemplarily, the touch detection module 20 includes a second current source IDC1 and a second comparator I1. The second current source IDC1 is an adjustable current source, and its current value can be adjusted via digital codewords to adapt to different application scenarios: in battery-powered devices, the current can be reduced to extend charging time in exchange for higher resolution, while in high-performance mode, the current can be increased to speed up response. One end of the second current source IDC1 is connected to the power supply, and the other end is connected to the currently selected touch electrode. The equivalent capacitance of the touch electrode includes the parasitic capacitance of the circuit and the incremental capacitance introduced by the finger. The total capacitance is approximately 5pF to 20pF when not touched, and increases by 0.1pF to 2pF after touching. Since the charging current is constant, the larger the capacitance, the slower the voltage rises; therefore, the voltage slope of node V2 directly reflects the current capacitance size.
[0032] The second comparator I1 is used to determine whether the voltage at node V2 reaches a set threshold. The non-inverting input of the second comparator I1 is connected to the other end of the second current source IDC1, i.e., node V2. The inverting input of the second comparator I1 is used to input the second reference voltage VX. The output of the second comparator I1 is connected to the control module 40. When the voltage at node V2 exceeds the second reference voltage VX, the second comparator I1 outputs a high-level toggle signal. To improve the operational consistency of the second comparator I1 over a wide voltage and temperature range, the touch detection module 20 also includes a second adjustable bias current source Ibias1. The second adjustable bias current source Ibias1 is connected to the power supply of the second comparator I1 and is used to adjust the operating current of the differential amplifier stage inside the second comparator I1, optimizing offset voltage, noise performance, and response speed. The second adjustable bias current source Ibias1 is also controlled by the control module 40 and can be dynamically adjusted according to environmental conditions to ensure stable toggle under low temperature or low voltage conditions.
[0033] Furthermore, the second input terminal of the touch detection module 20 is connected to multiple touch electrodes 50 under test via a selection switch array. Each touch electrode 50 under test corresponds to an independent physical button or sensing area, such as a touch button with 6 channels in a smart home panel. These touch electrodes 50 under test cannot be directly connected in parallel to the same current source, otherwise it will cause signal crosstalk and make it impossible to distinguish the specific trigger channel. Therefore, time-division isolation can be achieved through a multiplexed switch structure. The switch array consists of a set of low on-resistance switching transistor transmission gates. One end of each transmission gate is connected to an external touch electrode 50 under test, and the other end is connected to the output node V2 of the second current source. The control terminal of the switching transistor is connected to the channel selection signal of the control module 40 to ensure that only one touch electrode 50 under test is connected to the detection loop at any given time, while the rest are in a high blocking state, thereby realizing channel-by-channel polling detection.
[0034] This architecture allows a single detection circuit to serve multiple touch channels, significantly saving chip area and power consumption, making it suitable for applications with high integration requirements. Combined with an adjustable current source and a second adjustable bias current source (Ibias1), the system can flexibly adapt to different sensor sizes, dielectric thicknesses, and environmental conditions, enhancing product versatility. With the environmental calibration module 10, even if there are differences in parasitic capacitance between channels, dynamic balancing can be achieved in the initial stage, ensuring consistency and fairness in subsequent detection.
[0035] The first output terminal of the reference voltage generation module 30 is connected to the input terminal of the environmental calibration module 10, and the second output terminal of the reference voltage generation module 30 is connected to the first input terminal of the touch detection module 20. The reference voltage generation module 30 is used to provide a precise and programmable reference voltage signal for the entire capacitive touch detection circuit. Exemplarily, the reference voltage generation module 30 includes a digital-to-analog converter (DAC). The DAC has a first output terminal and a second output terminal, providing a first reference voltage VREF and a second reference voltage VX to the first comparator I0 and the second comparator I1, respectively. The DAC can be implemented using a capacitor array structure or an R-2R resistor network. The input terminal of the DAC receives a digital control signal from the control module 40, dynamically outputting a constant voltage or a stepped voltage according to the operating stage. To isolate mutual interference between the two outputs, an independent buffer amplifier can be configured at each output terminal of the DAC, and an analog switch can be added for on / off control when necessary, ensuring that the output is in a high-impedance state during the inactive stage, avoiding load effects on the operating module.
[0036] The control module 40 is the decision-making center of the entire system. It can be implemented using digital logic circuits, including a state machine, a counter, a register, and a logic operation unit. It is electrically connected to the control terminal and output terminal of the environmental calibration module 10, the output terminal of the touch detection module 20, and the control terminal of the reference voltage generation module 30, respectively. Specifically, the control module 40 is connected to the switch array Cref of the adjustable capacitor, the adjustment interface of the two current sources, the control terminal of the two bias current sources, and the input terminal of the digital-to-analog converter DAC. At the same time, it receives the comparison results from the first comparator I0 and the second comparator I1 as feedback signals.
[0037] After the system is initially powered on or reset, it enters the environmental calibration phase. The control module 40 issues a command to simultaneously output a reference voltage of the same amplitude at the first and second output terminals of the digital-to-analog converter (DAC), for example, both set to 3.3V. At this time, VREF equals VX. Simultaneously, the first current source IDC0 and the second current source IDC1 are started to charge the adjustable capacitor Cref and the parasitic capacitance Cpcb of the external touch electrode with constant current, respectively, with the charging start time of the two being synchronized. Since the initial value of the adjustable capacitor Cref is unknown, there is a difference in the voltage rise rate between charging node V1 and V2 on the touch path, resulting in inconsistent flip times of the first comparator I0 and the second comparator I1. The control module 40 adjusts the adjustable capacitor of the environmental calibration module 10 according to the difference in response timing between the environmental calibration module 10 and the touch detection module 20. Specifically, the control module 40 continuously monitors the output switching order of the two comparators. If the second comparator I1 flips first, it means that node V2 rises faster, i.e., the parasitic capacitance Cpcb is smaller, and it is determined that the adjustable capacitor Cref needs to be increased; if the first comparator I0 flips first, the adjustable capacitor Cref is decreased. The adjustable capacitor Cref is adjusted according to the flipping result, so that the voltage slopes of nodes V1 and V2 are basically the same, and the response time of the environmental calibration module 10 and the touch detection module 20 are consistent. The two comparators flip simultaneously, thereby achieving precise matching between the adjustable capacitor Cref and the parasitic capacitor Cpcb.
[0038] During the touch detection phase, the control reference voltage generation module 30 applies a stepped voltage to the touch detection module 20. The stepped voltage is generated in a successive approximation manner, including: setting the initial voltage to half of the first reference voltage and the initial voltage step size to one-quarter of the first reference voltage; if the second comparator flips before the first comparator at the current voltage, the next step voltage is the current voltage plus the current step size; if the first comparator flips first, the next step voltage is the current voltage minus the current step size; after each determination of the next step voltage, the current step size is halved, and the comparison and voltage adjustment operations are repeated with the updated voltage and step size until n voltage comparisons are completed to obtain an n-bit binary number sequence.
[0039] Specifically, after environmental calibration, the system enters the touch detection phase. The digital-to-analog converter (DAC) begins generating a series of stepped detection voltages according to successive approximation logic. The initial voltage is set to half of VREF, and the initial step size is one-quarter of VREF. The DAC applies the initial voltage to the inverting input of the second comparator I1 through the second output terminal, while continuing to charge the touch electrode capacitor Ctch of the currently selected channel with a constant current. The touch electrode capacitor includes the parasitic capacitance Cpcb and the additional capacitance ΔCfinger introduced by finger touch. Because the additional capacitance ΔCfinger slows down the voltage rise of node V2, it is lower than that of node V1 in the same amount of time. Therefore, when the detection voltage is low, the second comparator I1 is difficult to flip, while the first comparator I0 flips first. As the detection voltage gradually increases, the second comparator I1 flips only when it reaches a certain critical point. The control module 40 records the order in which the first comparator I0 and the second comparator I1 flip in each comparison: if the second comparator I1 flips before the first comparator I0, then a logic 1 is recorded; otherwise, a logic 0 is recorded, thus forming an n-bit binary number sequence Dx.
[0040] The generation of this sequence follows a typical successive approximation algorithm: Initially, VX is detected with half of VREF. If the second comparator I1 flips first, the next voltage is increased by one-quarter of the current step size VREF, making VX's voltage three-quarters of VREF. If the first comparator I0 flips first, the current step size is decreased by one-quarter of VREF, making VX's voltage one-quarter of VREF. Then, the step size is halved to one-eighth of VREF, and the above comparison operation is repeated until the first and second comparators flip simultaneously, completing the detection. This process is repeated n times to obtain a complete n-bit binary code. This code value is decoded and converted into a decimal value D. The actual change in touch capacitance is represented by 2... n D indicates that if the difference exceeds the preset touch detection threshold, a valid touch event is determined to have occurred.
[0041] By introducing a programmable reference voltage generated by a digital-to-analog converter (DAC) and a successive approximation detection mechanism, the reliance on long-term integration in traditional frequency counting methods is completely eliminated. A single detection can be completed within tens of microseconds, significantly improving response speed. The environmental calibration module 10 enables real-time tracking and balancing of external parasitic capacitance, effectively eliminating common-mode errors caused by temperature drift, humidity, and differences in circuit board manufacturing processes, making the system insensitive to environmental fluctuations. Compared to the traditional solution using 4096 current sources to achieve 12-bit accuracy, this embodiment only requires a single constant current source with adjustable capacitors and a DAC, greatly simplifying the analog front-end design and reducing power consumption and layout complexity. The output is a digitized touch value, eliminating the need for extensive raw data acquisition and averaging processing by the control module 40. This frees up main control resources for advanced anti-interference algorithms, making it suitable for consumer electronics applications with stringent requirements for low power consumption and high reliability, such as smart wearable devices, TWS earphones, and home appliance panels.
[0042] Figure 3 A schematic flowchart of a capacitive touch detection method according to an embodiment of this application is shown. Exemplarily, the capacitive touch detection method provided in this application embodiment is applied to the capacitive touch detection circuit of the above embodiment, including: In step S101, during the environmental calibration phase, the control reference voltage generation module 30 provides a reference voltage of the same amplitude to the environmental calibration module 10 and the touch detection module 20.
[0043] Step S102: Based on the difference in response timing between the environmental calibration module 10 and the touch detection module 20, adjust the adjustable capacitor of the environmental calibration module 10 until the response times of the environmental calibration module 10 and the touch detection module 20 are consistent.
[0044] In step S103, during the touch detection phase, the reference voltage generation module 30 is controlled to apply a stepped voltage to the touch detection module 20.
[0045] Step S104: Collect the response sequence of the environmental calibration module 10 and the touch detection module 20 corresponding to each step voltage, form a digital sequence, and determine whether a touch event has occurred based on the digital sequence.
[0046] In an optional implementation, the sequence of responses from the environmental calibration module 10 and the touch detection module 20 corresponding to each step voltage is collected to form a digital sequence. Determining whether a touch event has occurred based on this digital sequence includes: collecting the toggling sequence of the first comparator of the environmental calibration module 10 and the second comparator of the touch detection module 20 corresponding to each step voltage; generating a logic 1 when the second comparator toggles first, and generating a logic 0 otherwise, resulting in an n-bit binary sequence where n is a positive integer; converting the n-bit binary sequence to a decimal value D; and calculating 2... nIf the difference between D and the threshold is greater than the preset touch detection threshold, then a touch event is determined to have occurred.
[0047] In an optional implementation, the stepped voltage is generated using a successive approximation method, including: setting the initial voltage to half of the first reference voltage and the initial voltage step size to one-quarter of the first reference voltage; if the second comparator flips before the first comparator at the current voltage, the next step voltage is the current voltage plus the current step size; if the first comparator flips first, the next step voltage is the current voltage minus the current step size; after each determination of the next step voltage, the current step size is halved, and the comparison and voltage adjustment operations are repeated with the updated voltage and step size until n voltage comparisons are completed to obtain an n-bit binary number sequence.
[0048] The capacitive touch detection method provided in this application can realize the function of the capacitive touch detection circuit corresponding to the above embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0049] This application also provides a capacitive touch detection chip, which, by way of example, includes the capacitive touch detection circuit described above.
[0050] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, in alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0051] In addition, the functional modules or units in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0052] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0053] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A capacitive touch detection circuit, characterized in that, include: An environmental calibration module, wherein the input terminal of the environmental calibration module is used to input a first reference voltage; A touch detection module, wherein the first input terminal of the touch detection module is used to input a second reference voltage, and the second input terminal of the touch detection module is used to connect at least one touch electrode to be tested; A reference voltage generation module, wherein the first output terminal of the reference voltage generation module is connected to the input terminal of the environmental calibration module, and the second output terminal of the reference voltage generation module is connected to the first input terminal of the touch detection module; The control module is electrically connected to the control terminal and output terminal of the environmental calibration module, the output terminal of the touch detection module, and the control terminal of the reference voltage generation module, respectively. The control module is configured to control the first and second output terminals of the reference voltage generation module to output reference voltages of the same amplitude during the environmental calibration phase, and to adjust the adjustable capacitor of the environmental calibration module according to the difference in response timing between the environmental calibration module and the touch detection module until the response times of the environmental calibration module and the touch detection module are consistent.
2. The capacitive touch detection circuit according to claim 1, characterized in that, The environmental calibration module also includes: A first current source, one end of which is connected to a power source, and the other end of which is connected to the output terminal of the adjustable capacitor; A first comparator has its first input terminal connected to the other end of the first current source, its second input terminal used to input the first reference voltage, and its output terminal connected to the control module.
3. The capacitive touch detection circuit according to claim 1, characterized in that, The touch detection module includes: A second current source, one end of which is connected to a power source, and the other end of which is used to connect to at least one of the touch electrodes to be tested; The second comparator has its first input terminal connected to the other end of the second current source, its second input terminal used to input the second reference voltage, and its output terminal connected to the control module.
4. The capacitive touch detection circuit according to claim 2, characterized in that, The first current source is an adjustable current source, and the environmental calibration module further includes a first adjustable bias current source, which is electrically connected to the power supply terminal of the first comparator.
5. The capacitive touch detection circuit according to claim 3, characterized in that, The second current source is an adjustable current source, and the touch detection module also includes a second adjustable bias current source, which is electrically connected to the power supply terminal of the second comparator.
6. The capacitive touch detection circuit according to claim 1, characterized in that, The reference voltage generation module includes a digital-to-analog converter.
7. A capacitive touch detection method, characterized in that, The detection method is applied to the capacitive touch detection circuit as described in any one of claims 1 to 6, and includes: During the environmental calibration phase, the control reference voltage generation module provides a reference voltage of the same amplitude to the environmental calibration module and the touch detection module. Based on the difference in response timing between the environmental calibration module and the touch detection module, adjust the adjustable capacitor of the environmental calibration module until the response times of the environmental calibration module and the touch detection module are consistent. During the touch detection phase, the reference voltage generation module is controlled to apply a stepped voltage to the touch detection module; The response sequence of the environmental calibration module and the touch detection module corresponding to each step voltage is collected to form a digital sequence, and a touch event is determined based on the digital sequence.
8. The capacitive touch detection method according to claim 7, characterized in that, The process of collecting the response sequence of the environmental calibration module and the touch detection module corresponding to each step voltage, forming a digital sequence, and determining whether a touch event has occurred based on the digital sequence includes: The order of flipping of the first comparator of the environmental calibration module and the second comparator of the touch detection module corresponding to each step voltage is collected. When the second comparator flips first, a logic one is generated; otherwise, a logic zero is generated, resulting in an n-bit binary number sequence, where n is a positive integer. Convert the n-bit binary sequence into a decimal value D; Calculate 2 n If the difference between D and the threshold is greater than the preset touch detection threshold, then the touch event is determined to have occurred.
9. The capacitive touch detection method according to claim 8, characterized in that, The stepped voltage is generated using a successive approximation method, including: The initial voltage is set to half of the first reference voltage, and the initial voltage step size is one-quarter of the first reference voltage; If, at the current voltage, the second comparator flips before the first comparator, then the next voltage is the current voltage plus the current step size; If the first comparator flips first, the next-order voltage is the current voltage minus the current step size; After determining the next voltage level, the current step size is halved, and the comparison and voltage adjustment operations are repeated with the updated voltage and step size until n voltage comparisons are completed to obtain the n-bit binary number sequence.
10. A capacitive touch detection chip, characterized in that, The capacitive touch detection chip includes the capacitive touch detection circuit described in any one of claims 1 to 6.