Detection circuit, chip and electronic device
Patent Information
- Application Number
- CN202310990551.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-07
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-08-07
AI Technical Summary
[0002]随着科技的发展,电器的人机交互也日益增加,传统的橡胶按键已经对控制器便携化以及小型化发展产生了阻碍,静电容的触碰按键成为了目前的主流方案,现在对静电容的触碰按键进行检测时,采用差分电荷再分配方案来对按键是否按压进行检测,但是差分电荷再分配方案是通过在芯片上设置电容阵列和外部电容,通过电容阵列和外部电容的电荷变化来进行按键的检测,但是现有的检测精度并不高,且由于需要设置电容阵列,使得芯片的面积较大
[0024]本申请提供的一种检测电路、芯片及电子设备,通过设置采样电路、放大电路、比较电路和滤波输出电路,采样电路用于获取触摸按键两个输出端的输出端电压,对所述输出端电压进行高频滤波处理,并计算两个输出端电压的差值,得到电压差值;放大电路与所述采样电路的输出端连接,用于将所述电压差值放大至预设阈值;所述比较电路的正输入端与所述放大电路的输出端连接,所述比较电路的负输入端用于输入比较电压,所述比较电路用于比较所述预设阈值与所述比较电压的大小关系,得到比较结果,并基于所述比较结果输出电平信号,滤波输出电路,与所述比较电路的输出端连接,所述滤波输出电路用于对所述电平信号进行计时,得到计时结果,并基于所述计时结果输出取触摸按键的检测结果,能够提高检测精度。
Smart Images

Figure CN117459048B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic equipment technology, and in particular to a detection circuit, chip, and electronic equipment. Background Technology
[0002] With the development of technology, human-computer interaction in electrical appliances is increasing. Traditional rubber buttons have hindered the development of portable and miniaturized controllers. Electrostatic capacitive touch buttons have become the mainstream solution. Currently, when detecting electrostatic capacitive touch buttons, a differential charge redistribution scheme is used to detect whether the button is pressed. However, the differential charge redistribution scheme detects the button by setting a capacitor array and an external capacitor on the chip and detecting the change in charge of the capacitor array and the external capacitor. However, the existing detection accuracy is not high, and the chip area is large due to the need to set up a capacitor array. Summary of the Invention
[0003] In view of the problems in the above-mentioned related technologies, this application provides a detection circuit, chip and electronic device that can improve detection accuracy.
[0004] This application provides a detection circuit, including:
[0005] The sampling circuit is used to acquire the output voltage of the two output terminals of the touch button, perform high-frequency filtering on the output voltage, and calculate the difference between the two output voltages to obtain the voltage difference.
[0006] An amplifier circuit, connected to the output of the sampling circuit, is used to amplify the voltage difference to a preset threshold.
[0007] A comparator circuit is provided, wherein the positive input terminal of the comparator circuit is connected to the output terminal of the amplifier circuit, the negative input terminal of the comparator circuit is used to input a comparison voltage, the comparator circuit is used to compare the magnitude relationship between the preset threshold and the comparison voltage, obtain a comparison result, and output a level signal based on the comparison result;
[0008] A filtering output circuit is connected to the output terminal of the comparison circuit. The filtering output circuit is used to time the level signal, obtain a timing result, and output the detection result of the touch button based on the timing result.
[0009] In some embodiments, the amplification circuit includes:
[0010] An evaluation unit, connected to the output of the sampling circuit, is used to determine the amplification factor based on the voltage difference and a preset threshold.
[0011] An amplification unit, connected to the output of the evaluation unit, is used to amplify the voltage difference to a preset threshold based on the amplification factor.
[0012] In some embodiments, the detection circuit further includes:
[0013] A digital circuit, connected to the negative input terminal of the comparator circuit, is used to output the comparison voltage.
[0014] In some embodiments, the detection circuit further includes a digital circuit and an adjustable resistor, wherein the output terminal of the digital circuit is connected to one end of the adjustable resistor, and the other end of the adjustable resistor is connected to the negative input terminal of the comparison circuit. The digital circuit is used to output a voltage and adjust the resistance value of the adjustable resistor to adjust the comparison voltage.
[0015] In some embodiments, the adjustable resistor comprises a plurality of resistors of the same resistance value connected in series.
[0016] In some embodiments, the comparison circuit includes:
[0017] The comparison unit has its positive input terminal connected to the output terminal of the amplifier circuit, and its negative input terminal connected to a comparison voltage. The comparison unit is used to compare the magnitude relationship between the preset threshold and the comparison voltage to obtain a comparison result.
[0018] The output unit, connected to the comparison unit, is used to output a high-level signal when the comparison result is that the comparison voltage is greater than a preset threshold, and to output a low-level signal when the comparison result is that the comparison voltage is less than the preset threshold.
[0019] In some embodiments, the filtered output circuit includes:
[0020] A timing unit is used to time the change when the level signal output by the comparator circuit changes;
[0021] An output unit is used to compare the magnitude relationship between the timer and the timer threshold, and output a detection result based on the magnitude relationship. When the magnitude relationship indicates that the timer is less than the timer threshold, the first output result of the previous output is output, and when the magnitude relationship indicates that the timer is equal to the timer threshold, a second output result is output. The first output result and the second output result are different.
[0022] This application provides a chip that includes the detection circuit described in any of the above claims.
[0023] This application provides an electronic device, including the chip described above.
[0024] This application provides a detection circuit, chip, and electronic device. By setting up a sampling circuit, an amplification circuit, a comparison circuit, and a filtering output circuit, the sampling circuit acquires the output voltages of the two output terminals of a touch button, performs high-frequency filtering on the output voltages, and calculates the difference between the two output voltages to obtain a voltage difference value. The amplification circuit is connected to the output terminal of the sampling circuit and amplifies the voltage difference value to a preset threshold. The positive input terminal of the comparison circuit is connected to the output terminal of the amplification circuit, and the negative input terminal of the comparison circuit is used to input a comparison voltage. The comparison circuit compares the preset threshold with the comparison voltage to obtain a comparison result and outputs a level signal based on the comparison result. The filtering output circuit is connected to the output terminal of the comparison circuit and times the level signal to obtain a timing result. Based on the timing result, it outputs the detection result of the touch button, thereby improving detection accuracy. Attached Figure Description
[0025] The present application will be described in more detail below based on embodiments and with reference to the accompanying drawings.
[0026] Figure 1 This is a schematic diagram of a detection circuit provided in an embodiment of this application;
[0027] Figure 2 This is a schematic diagram of the connection structure of a comparator provided in an embodiment of this application;
[0028] Figure 3 This is a schematic diagram of an adjustable resistance circuit provided in an embodiment of this application.
[0029] In the accompanying drawings, the same parts are referred to by the same reference numerals, and the drawings are not drawn to scale. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0031] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0032] If the application documents contain similar descriptions such as "first, second, third", the following explanation shall be added: In the following description, the terms "first, second, third" are used only to distinguish similar objects and do not represent a specific order of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0033] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0034] Based on the problems existing in related technologies, this application provides a detection circuit, including: a sampling circuit, an amplification circuit, a comparison circuit, and a filtering output circuit. The sampling circuit acquires the output voltages of the two output terminals of a touch button and calculates the difference between them to obtain a voltage difference. The amplification circuit is connected to the output terminal of the sampling circuit and amplifies the voltage difference to a preset threshold. The positive input terminal of the comparison circuit is connected to the output terminal of the amplification circuit, and the negative input terminal of the comparison circuit is used to input a comparison voltage. The comparison circuit compares the preset threshold with the comparison voltage to obtain a comparison result and outputs a level signal based on the comparison result. The filtering output circuit is connected to the output terminal of the comparison circuit and times the level signal to obtain a timing result. Based on the timing result, it outputs a detection result for the touch button.
[0035] In this embodiment, the touch button is an electrostatic capacitive touch button. The sampling circuit can be connected to two I / O pins of the touch button. Both I / O pins are externally connected to the touch button. When the user presses the electrostatic capacitive touch button, a voltage is generated, and the two I / O pins output a voltage difference, thereby obtaining the output voltage of the two output terminals from the touch button. When the user does not press the touch button, the difference between the two I / O pins is fixed and close to 0.
[0036] In this embodiment, a filter can be used to perform high-frequency filtering on the output voltage. Since high-frequency interference can affect the detection results, it is necessary to filter the components of the output voltage. High-frequency filtering of the output voltage can improve detection accuracy.
[0037] In this embodiment of the application, the difference between the two output terminal voltages can be calculated to obtain the voltage difference value at the output voltage terminal.
[0038] In this embodiment of the application, the preset threshold may be 80% to 95% of the chip voltage of the touch button, for example, 90% of the chip voltage.
[0039] In this embodiment, by amplifying the voltage, the noise range can be increased, and the detectable range can be expanded. This allows for a larger input comparison voltage, and the larger the amplified noise voltage difference, the better the noise can be filtered, further reducing its impact on the detection results.
[0040] In this embodiment, the comparison voltage can be directly input via digital circuitry. In some embodiments, the comparison voltage can also be input via digital circuitry and an adjustable resistor.
[0041] In this embodiment, the comparison result may include: a preset threshold being less than the comparison voltage, or a preset threshold being greater than or equal to the comparison voltage. The level signal may include a low-level signal and a high-level signal. When the comparison result is that the comparison voltage is greater than the preset threshold, a high-level signal is output, and when the comparison result is that the comparison voltage is less than the preset threshold, a low-level signal is output.
[0042] In this embodiment, the timing result can be compared with a timing threshold to output the detection result of the touch button. The detection result can be represented by a numerical value. For example, a detection result of 1 indicates that the user has pressed the touch button, and a detection result of 0 indicates that the user has not pressed the touch button.
[0043] In this embodiment, the output terminal of the filtered output current can be connected to the CPU of the electronic device, thereby sending the touch button's touch information to the CPU, which can then control the corresponding device to execute instructions.
[0044] This application provides a detection circuit that includes a sampling circuit, an amplification circuit, a comparison circuit, and a filtering output circuit. The sampling circuit acquires the output voltages of the two output terminals of a touch button, performs high-frequency filtering on the output voltages, and calculates the difference between the two output voltages to obtain a voltage difference value. The amplification circuit is connected to the output terminal of the sampling circuit and amplifies the voltage difference value to a preset threshold. The positive input terminal of the comparison circuit is connected to the output terminal of the amplification circuit, and the negative input terminal of the comparison circuit is used to input a comparison voltage. The comparison circuit compares the preset threshold value with the comparison voltage value to obtain a comparison result and outputs a level signal based on the comparison result. The filtering output circuit is connected to the output terminal of the comparison circuit and times the level signal to obtain a timing result. Based on the timing result, it outputs a detection result for the touch button. Compared with the prior art, the detection circuit provided in this application can detect whether a touch button has been touched with fewer capacitor arrays, thereby reducing the chip area and improving detection accuracy by filtering the signal.
[0045] In some embodiments, the sampling circuit is further configured to perform high-frequency filtering on the output voltage, and after performing high-frequency filtering on the output voltage, the sampling circuit calculates the difference between the two output voltages.
[0046] In some embodiments, the amplification circuit includes:
[0047] An evaluation unit, connected to the output of the sampling circuit, is used to determine the amplification factor based on the voltage difference and a preset threshold.
[0048] An amplification unit, connected to the output of the evaluation unit, is used to amplify the voltage difference to a preset threshold based on the amplification factor.
[0049] In this embodiment of the application, the amplification unit may be an amplifier.
[0050] In some embodiments, the detection circuit further includes:
[0051] A digital circuit, connected to the negative input terminal of the comparator circuit, is used to output the comparison voltage.
[0052] In this embodiment, the digital circuit can be a digital-to-analog converter used to output a comparison voltage to the negative input terminal. Using a digital circuit for control facilitates debugging and makes it easier to determine the comparison voltage.
[0053] In this embodiment, the comparison voltage is output through a digital circuit, which has higher adjustable precision and greater flexibility, resulting in a higher accuracy of the final result.
[0054] In some embodiments, the detection circuit further includes a digital circuit and an adjustable resistor, wherein the output terminal of the digital circuit is connected to one end of the adjustable resistor, and the other end of the adjustable resistor is connected to the negative input terminal of the comparison circuit. The digital circuit is used to output a voltage and adjust the resistance value of the adjustable resistor to adjust the comparison voltage.
[0055] In some embodiments, the adjustable resistor comprises a plurality of resistors of the same resistance value connected in series.
[0056] In this embodiment, multiple resistors with the same resistance value can divide the voltage output by the digital circuit, thereby achieving a stepped voltage value with proportionally varying output.
[0057] In this embodiment, multiple resistors with the same resistance value are used for output, which saves area compared to using digital circuit control output.
[0058] In this embodiment, the adjustable circuit is designed to be adjustable because the capacitance of the external touch capacitor is not fixed during the production process, and the amplified range will also change accordingly. In order to achieve higher detection accuracy, the comparison voltage is set to be adjustable. Different voltage values can be adjusted during the testing phase to improve the product detection accuracy. After a suitable voltage is tested, the comparison voltage remains unchanged during the use of the adjustable circuit.
[0059] In some embodiments, the comparison circuit includes:
[0060] The comparison unit has its positive input terminal connected to the output terminal of the amplifier circuit, and its negative input terminal connected to a comparison voltage. The comparison unit is used to compare the magnitude relationship between the preset threshold and the comparison voltage to obtain a comparison result.
[0061] The output unit, connected to the comparison unit, is used to output a high-level signal when the comparison result is that the comparison voltage is greater than a preset threshold, and to output a low-level signal when the comparison result is that the comparison voltage is less than the preset threshold.
[0062] In this embodiment of the application, the comparison unit may be a comparator.
[0063] In this embodiment of the application, a high-level signal can be represented by the numerical value 1, and a low-level signal can be represented by the digital number 0.
[0064] In some embodiments, the filtered output circuit includes:
[0065] A timing unit is used to time the change when the level signal output by the comparator circuit changes;
[0066] An output unit is used to compare the magnitude relationship between the timer and the timer threshold, and output a detection result based on the magnitude relationship. When the magnitude relationship indicates that the timer is less than the timer threshold, the first output result of the previous output is output, and when the magnitude relationship indicates that the timer is equal to the timer threshold, a second output result is output. The first output result and the second output result are different.
[0067] For example, timing begins when the voltage level changes from 0 to 1. In this embodiment, the shortest duration of the human body time touch button is several hundred milliseconds. However, this is a very long time for the chip's nanosecond-level operating cycle. Therefore, when we touch it, for chips operating at tens of megaHz or even several GHz, the voltage remains constant for a certain period. Allowing the chip to continuously detect voltage changes for a certain duration can prevent the detection of abnormal touch noise as a touch, since voltage changes caused by noise typically last for nanoseconds or microseconds. Setting a reasonable timing value can prevent it from being mistaken for a touch. The timing threshold needs to be designed based on the actual chip's operating frequency and the test results of the actual product; it is a dynamically set value.
[0068] In some embodiments, the detection circuit further includes a filter circuit disposed between the amplifier circuit and the comparator circuit, the filter circuit being used to filter the voltage output by the amplifier circuit.
[0069] In this embodiment, by amplifying the voltage, the noise range can be increased, the detectable direction can be expanded, and the input comparison voltage can be set to be larger. Furthermore, the larger the amplified voltage difference, the more effectively the irradiation can be filtered, further reducing the impact on the detection results.
[0070] Based on the foregoing embodiments, this application further provides a detection circuit. Figure 1 This is a schematic diagram of a detection circuit provided in an embodiment of this application, such as... Figure 1As shown, the detection circuit includes: a first-stage analog voltage detection and output circuit (same as the sampling circuit in the above embodiment), a second-stage analog voltage amplification circuit (same as the amplification circuit in the above embodiment), a third-stage analog comparator circuit (same as the comparison circuit in the above embodiment), and a fourth-stage digital filter circuit, connected in sequence. The first-stage analog voltage detection and output circuit is connected to the I / O of the touch button chip, and the output of the fourth-stage digital filter circuit is connected to the internal register of the chip. The voltage of the I / O is detected by the analog circuit (same as the sampling circuit in the above embodiment), and then the voltage difference between the two inputs is output. The difference is then amplified, and the amplified voltage is output to the positive terminal of the analog comparator (same as the comparison circuit in the above embodiment). A controllable voltage (same as the comparison voltage in the above embodiment) is input to the negative terminal of the comparator. The output of the comparator is then filtered. When the output of the fourth-stage digital filter circuit (same as the filter output circuit in the above embodiment) is 1, it is considered that a touch has occurred.
[0071] In this embodiment, voltage detection is performed on two sampling channels (chip I / O) through a first-stage analog voltage detection and output circuit. Both I / Os are external touch button I / Os. When no touch occurs, the voltage difference between the two I / Os is fixed and very small. If a touch occurs, the voltage difference between the two I / Os changes. Then, high-frequency filtering is performed on the outputs of the two I / Os to reduce the influence of high-frequency signals on the detection results. After that, the first-stage analog voltage detection and output circuit calculates the voltage difference between the two input terminals and outputs the difference.
[0072] The input of the second-stage analog voltage amplifier circuit is the output of the first-stage analog voltage detection and output circuit. The second-stage analog voltage amplifier circuit amplifies the voltage of the first-stage analog voltage detection and output circuit. By estimating and adjusting the amplification factor of the second-stage analog voltage amplifier circuit based on the input range of the first-stage analog voltage detection and output circuit, the upper threshold voltage of the output result after the second-stage analog voltage amplifier circuit amplifies the input signal is about 90% of the chip's VCC.
[0073] In this embodiment, when the maximum output after amplification is 90% VCC, the noise range will also increase, and the adjustable detection range will be larger. At the same time, the voltage selection range of the adjustable voltage circuit used to detect whether a touch has occurred is larger, and the difference between the voltage and the amplified noise voltage is larger, which can further filter the noise and avoid the noise affecting the accuracy of the detection results.
[0074] The third-stage analog comparator circuit, which can be a comparator itself. Figure 2 This is a schematic diagram of the connection structure of a comparator provided in an embodiment of this application, as shown below. Figure 2As shown, the positive input of the third-stage analog comparator circuit is the output of the second-stage analog voltage amplifier circuit, and the negative input of the third-stage analog comparator circuit is a voltage input adjustable by a digital circuit, such as the output of a DAC circuit controlled by a digital circuit, the voltage output of a digital-to-analog converter, or, for example, a smaller digital circuit controlling an adjustable resistance circuit to output a variable voltage output. Figure 3 This is a schematic diagram of an adjustable resistance circuit provided in an embodiment of this application, as shown below. Figure 3 As shown, the overall circuit uses multiple identical resistors connected in series to divide the voltage, thus outputting progressively increasing stepped voltage values. The MUX circuit in the digital signal control circuit allows selection of various controllable output voltage values. When the output voltage of the second-stage analog voltage amplifier circuit is greater than the comparison voltage of the adjustable voltage output circuit, the third-stage analog circuit (comparator circuit) outputs a high level; otherwise, it outputs a low level.
[0075] The fourth-stage digital filter circuit takes the output of the third-stage analog comparator circuit as its input. Its main function is to perform timing filtering on the output of the third-stage analog comparator circuit and to latch the output of the third-stage comparator circuit. When the output of the third-stage analog comparator circuit flips, the adjustable timing threshold timer circuit inside the fourth-stage digital filter output circuit starts timing. When the timing threshold is reached, the output of the fourth-stage digital filter output circuit flips; otherwise, it continues with the previous output result. The output of the fourth-stage digital filter circuit is sent to an internal register of the chip for access and reading by the CPU.
[0076] The detection circuit provided in this application embodiment can detect electrostatic capacitive touch buttons, and can make the chip area smaller, have stronger anti-interference ability, and improve detection accuracy.
[0077] This application provides a chip including a detection circuit, wherein the detection circuit includes:
[0078] The sampling circuit is used to acquire the output voltage of the two output terminals of the touch button, perform high-frequency filtering on the output voltage, and calculate the difference between the two output voltages to obtain the voltage difference.
[0079] An amplifier circuit, connected to the output of the sampling circuit, is used to amplify the voltage difference to a preset threshold.
[0080] A comparator circuit is provided, wherein the positive input terminal of the comparator circuit is connected to the output terminal of the amplifier circuit, the negative input terminal of the comparator circuit is used to input a comparison voltage, the comparator circuit is used to compare the magnitude relationship between the preset threshold and the comparison voltage, obtain a comparison result, and output a level signal based on the comparison result;
[0081] A filtering output circuit is connected to the output terminal of the comparison circuit. The filtering output circuit is used to time the level signal, obtain a timing result, and output the detection result of the touch button based on the timing result.
[0082] In some embodiments, the amplification circuit includes:
[0083] An evaluation unit, connected to the output of the sampling circuit, is used to determine the amplification factor based on the voltage difference and a preset threshold.
[0084] An amplification unit, connected to the output of the evaluation unit, is used to amplify the voltage difference to a preset threshold based on the amplification factor.
[0085] In some embodiments, the detection circuit further includes:
[0086] A digital circuit, connected to the negative input terminal of the comparator circuit, is used to output the comparison voltage.
[0087] In some embodiments, the detection circuit further includes a digital circuit and an adjustable resistor, wherein the output terminal of the digital circuit is connected to one end of the adjustable resistor, and the other end of the adjustable resistor is connected to the negative input terminal of the comparison circuit. The digital circuit is used to output a voltage and adjust the resistance value of the adjustable resistor to adjust the comparison voltage.
[0088] In some embodiments, the adjustable resistor comprises a plurality of resistors of the same resistance value connected in series.
[0089] In some embodiments, the comparison circuit includes:
[0090] The comparison unit has its positive input terminal connected to the output terminal of the amplifier circuit, and its negative input terminal connected to a comparison voltage. The comparison unit is used to compare the magnitude relationship between the preset threshold and the comparison voltage to obtain a comparison result.
[0091] The output unit, connected to the comparison unit, is used to output a high-level signal when the comparison result is that the comparison voltage is greater than a preset threshold, and to output a low-level signal when the comparison result is that the comparison voltage is less than the preset threshold.
[0092] In some embodiments, the filtered output circuit includes:
[0093] A timing unit is used to time the change when the level signal output by the comparator circuit changes;
[0094] An output unit is used to compare the magnitude relationship between the timer and the timer threshold, and output a detection result based on the magnitude relationship. When the magnitude relationship indicates that the timer is less than the timer threshold, the first output result of the previous output is output, and when the magnitude relationship indicates that the timer is equal to the timer threshold, a second output result is output. The first output result and the second output result are different.
[0095] This application provides an electronic device, which includes a chip provided by the above facts.
[0096] In this embodiment, the electronic device can be a household appliance. The household appliance can be a washing machine, water heater, air conditioner, television, etc. The household appliance is equipped with an electrostatic touch button, which is connected to the chip.
[0097] It should be noted that the description of the electronic device embodiments is similar to the description of the method embodiments described above, and has similar beneficial effects. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0098] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above-described embodiments are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0099] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, object, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, object, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, object, or apparatus that includes that element.
[0100] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.
[0101] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0102] In addition, each functional unit in the various embodiments of this application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0103] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.
[0104] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to the prior art, 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 controller to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0105] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations 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. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A detection circuit, characterized in that, include: The sampling circuit is used to acquire the output voltage of the two output terminals of the touch button, perform high-frequency filtering on the output voltage, and calculate the difference between the two output voltages to obtain the voltage difference. An amplifier circuit, connected to the output of the sampling circuit, is used to amplify the voltage difference to a preset threshold. A comparator circuit is provided, wherein the positive input terminal of the comparator circuit is connected to the output terminal of the amplifier circuit, the negative input terminal of the comparator circuit is used to input a comparison voltage, the comparator circuit is used to compare the magnitude relationship between the preset threshold and the comparison voltage, obtain a comparison result, and output a level signal based on the comparison result; A filtering output circuit, connected to the output terminal of the comparison circuit, is used to time the level signal, obtain a timing result, and output the detection result of the touch button based on the timing result. The filtering output circuit includes: a timing unit for filtering the level signal and timing when the level signal output by the comparison circuit changes; and an output unit for comparing the timing with a timing threshold and outputting a detection result based on the comparison. Specifically, when the comparison indicates that the timing is less than the timing threshold, a first output result is output; when the comparison indicates that the timing is equal to the timing threshold, a second output result is output. The first and second output results are different. The detection circuit further includes: The system includes a digital circuit and an adjustable resistor. The output of the digital circuit is connected to one end of the adjustable resistor, and the other end of the adjustable resistor is connected to the negative input of the comparator circuit. The digital circuit is used to output a voltage and adjust the resistance value of the adjustable resistor to adjust the comparison voltage.
2. The detection circuit according to claim 1, characterized in that, The amplifier circuit includes: An evaluation unit, connected to the output of the sampling circuit, is used to determine the amplification factor based on the voltage difference and a preset threshold. An amplification unit, connected to the output of the evaluation unit, is used to amplify the voltage difference to a preset threshold based on the amplification factor.
3. The detection circuit according to claim 2, characterized in that, The preset threshold is 80% to 95% of the chip voltage of the touch button.
4. The detection circuit according to claim 1, characterized in that, The detection circuit further includes: A digital circuit, connected to the negative input terminal of the comparator circuit, is used to output the comparison voltage.
5. The detection circuit according to claim 1, characterized in that, The adjustable resistor comprises multiple resistors of the same resistance value connected in series.
6. The detection circuit according to claim 1, characterized in that, The comparison circuit includes: The comparison unit has its positive input terminal connected to the output terminal of the amplifier circuit, and its negative input terminal used to input a comparison voltage. The comparison unit is used to compare the magnitude relationship between the preset threshold and the comparison voltage to obtain a comparison result. The output unit, connected to the comparison unit, is used to output a high-level signal when the comparison result is that the comparison voltage is greater than a preset threshold, and to output a low-level signal when the comparison result is that the comparison voltage is less than the preset threshold.
7. A chip, characterized in that, include: The detection circuit according to any one of claims 1-6.
8. An electronic device, characterized in that, include: The chip according to claim 7.
Citation Information
Patent Citations
Button detection and filtering method, relevant circuit and external device button detection chip
CN103364718A
Electric energy meter and surge counting method
CN109884357A