A detection circuit, a detection method, a device, electronic equipment and a storage medium
Patent Information
- Application Number
- CN202311249428.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-25
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2043-09-25
AI Technical Summary
[0003]当前对电子产品的静电容触摸按键进行是否触摸检测,检测准确性较低
[0049]在本发明实施例中,检测电路包括:第一输入端、第二输入端、电压检测电路和电压输出端;电压检测电路包括电流镜电路;第一输入端与按键连接,按键处于被触摸状态时,第一输入端与第二输入端形成电压差;电流镜电路,用于复制电流以从电压输出端中输出检测电压。其中,所要输出的检测电压为第一输入端与第二输入端形成的电压差。通过采用上述方法,实现对触摸按键进行是否触摸检测,输出两个输入端的电压差值,检测电路简单、占用面积小,且电流镜使得输出电阻增大了本征增益倍,可以使得电流更加稳定,检测结果具有更高的准确性。
Smart Images

Figure CN117388678B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic technology, and in particular to a detection circuit, a detection method, a detection device, an electronic device, and a computer-readable storage medium. Background Technology
[0002] With the development of technology, the demand for human-computer interaction in electronic products is increasing. Traditional rubber buttons have hindered the development of portable and miniaturized controllers. Therefore, electrostatic capacitive touch buttons have become the mainstream solution. Electrostatic capacitive touch buttons use changes in capacitance to determine whether the button is on or off. After the button is pressed, the capacitance in the switch changes, thereby triggering the switch.
[0003] Currently, the accuracy of detecting whether an electrostatic capacitive touch button on an electronic product is low. Summary of the Invention
[0004] In view of the above problems, embodiments of the present invention are proposed to provide a detection circuit, a detection method and corresponding detection device, an electronic device, and a computer-readable storage medium that overcome or at least partially solve the above problems.
[0005] This invention discloses a detection circuit, the method comprising:
[0006] First input terminal, second input terminal, voltage detection circuit, and voltage output terminal;
[0007] The voltage detection circuit includes a current mirror circuit;
[0008] The first input terminal is connected to the button. When the button is in a touched state, a voltage difference is formed between the first input terminal and the second input terminal.
[0009] The current mirror circuit is used to replicate the current to output the detection voltage from the voltage output terminal.
[0010] Optionally,
[0011] The voltage detection circuit further includes a first operational amplifier, a second operational amplifier, a third operational amplifier, a first resistor, a second resistor, a third resistor, and a fourth resistor;
[0012] The input terminal of the first operational amplifier is connected to the first input terminal, and the output terminal is connected to the first resistor and the second resistor;
[0013] The input terminal of the second operational amplifier is connected to the second input terminal, and the output terminal is connected to the second resistor and the third resistor;
[0014] The input terminal of the third operational amplifier is connected to the current mirror circuit and the fourth resistor, and the output terminal is connected to the voltage output terminal.
[0015] One end of the current mirror circuit is connected to the first resistor, and the other end is connected to the fourth resistor;
[0016] The first resistor, the second resistor, and the third resistor are connected in series;
[0017] When the button is in a touched state, the first input terminal generates a first voltage, and the second input terminal generates a second voltage.
[0018] The first voltage passes through the first operational amplifier, and the second voltage passes through the second operational amplifier, forming the voltage difference between the output terminals of the first and second operational amplifiers.
[0019] The voltage difference acts on the second resistor, resulting in a first current flowing through the second resistor;
[0020] The current mirror circuit replicates the first current to obtain the second current;
[0021] The second current passes through the fourth resistor to obtain the detection voltage, and the detection voltage is output from the voltage output terminal.
[0022] Optionally, it also includes:
[0023] Comparator,
[0024] The input terminal of the comparator is connected to the first input terminal and the second input terminal, and the output terminal is connected to the voltage detection circuit.
[0025] The comparator is used to control the voltage detection circuit to not operate when the voltage at the first input terminal is lower than the voltage at the second input terminal, and to control the voltage detection circuit to operate when the voltage at the first input terminal is higher than the voltage at the second input terminal.
[0026] Optionally,
[0027] The current mirror circuit includes at least one transistor;
[0028] The output of the comparator is connected to the current mirror circuit.
[0029] The comparator is further configured to turn off at least one of the at least one transistors when the voltage at the first input terminal is lower than the voltage at the second input terminal; and to turn on all of the at least one transistors when the voltage at the first input terminal is higher than the voltage at the second input terminal.
[0030] Optionally, it also includes:
[0031] Delay circuit;
[0032] One end of the delay circuit is connected to the first input terminal, and the other end is connected to the second input terminal;
[0033] The delay circuit is used to convert the touch signal generated when the button is in a touched state into a delayed signal;
[0034] The second input terminal is used to generate the second voltage based on the delayed signal.
[0035] Optionally, the second resistor and the fourth resistor have the same resistance value.
[0036] This invention also discloses a detection method applied to the detection circuit described above, the method comprising:
[0037] In response to user operation, control the button to be in a touched state or a non-touched state;
[0038] When the button is in a touched state, the detected voltage output from the voltage output terminal is collected to obtain the third voltage;
[0039] When the button is not touched, the detected voltage output from the voltage output terminal is collected to obtain the fourth voltage;
[0040] The button is checked to see if it meets the requirements based on the third voltage and the fourth voltage.
[0041] This invention also discloses a detection device, including the detection circuit described above, the device further comprising:
[0042] The control module is used to respond to user operations and control the button to be in a touched state or a non-touched state;
[0043] The first acquisition module is used to acquire the detection voltage output by the voltage output terminal when the button is in the touched state, and obtain the third voltage;
[0044] The second acquisition module is used to acquire the detection voltage output by the voltage output terminal when the button is not touched, and obtain the fourth voltage.
[0045] The verification module is used to verify whether the button meets the requirements based on the third voltage and the fourth voltage.
[0046] This invention also discloses an electronic device, including: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements a detection method as described above.
[0047] This invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the detection method described above.
[0048] The embodiments of the present invention have the following advantages:
[0049] In this embodiment of the invention, the detection circuit includes: a first input terminal, a second input terminal, a voltage detection circuit, and a voltage output terminal; the voltage detection circuit includes a current mirror circuit; the first input terminal is connected to a button, and when the button is touched, a voltage difference is formed between the first input terminal and the second input terminal; the current mirror circuit is used to replicate the current to output the detection voltage from the voltage output terminal. The detection voltage to be output is the voltage difference formed between the first input terminal and the second input terminal. By employing the above method, the touch button is detected to determine whether it is touched, and the voltage difference between the two input terminals is output. The detection circuit is simple, occupies a small area, and the current mirror increases the output resistance by a factor of 1, resulting in a more stable current and higher accuracy of the detection results. Attached Figure Description
[0050] Figure 1 This is a structural block diagram of a detection circuit provided in an embodiment of the present invention;
[0051] Figure 2 This is a partial structural schematic diagram of a detection circuit provided in an embodiment of the present invention;
[0052] Figure 3 This is a partial structural schematic diagram of a detection circuit provided in an embodiment of the present invention;
[0053] Figure 4 This is a partial structural schematic diagram of a detection circuit provided in an embodiment of the present invention;
[0054] Figure 5 This is a circuit diagram of a detection circuit according to an embodiment of the present invention;
[0055] Figure 6 This is a flowchart of the steps of a detection method provided in an embodiment of the present invention;
[0056] Figure 7 This is a structural block diagram of a detection device provided in an embodiment of the present invention.
[0057] Figure label:
[0058] The detection circuit 100 has a first input terminal 110 and a second input terminal 120; the voltage detection circuit 130 has a voltage output terminal 140; the comparator 150 has a delay circuit 160.
[0059] The current mirror circuit is 131, the first op-amp is 132, the second op-amp is 133, the third op-amp is 134, the first resistor is 135, the second resistor is 136, the third resistor is 137, and the fourth resistor is 138. Detailed Implementation
[0060] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art are within the scope of protection of the present invention.
[0061] This invention designs a detection scheme for whether an electrostatic capacitive touch button has been touched. The voltage of the two states, touching and not touching, is sampled and subtracted by a logic circuit to obtain the voltage difference between the touching and not touching states. This invention can make the detection result of whether the electrostatic capacitive touch button has been touched more accurate.
[0062] In this embodiment of the invention, the detection circuit includes: a first input terminal, a second input terminal, a voltage detection circuit, and a voltage output terminal. The voltage detection circuit includes a current mirror circuit. The first input terminal is connected to a button; when the button is touched, a voltage difference is formed between the first input terminal and the second input terminal. The current mirror circuit is used to replicate the current to output the detection voltage from the voltage output terminal. By employing the above method, the touch button is detected to determine whether it is touched, and the voltage difference between the two input terminals is output. The detection circuit is simple, occupies a small area, and the current mirror increases the output resistance by a factor of 1, resulting in a more stable current and higher accuracy of the detection results.
[0063] Reference Figure 1 The diagram illustrates a structural block diagram of a detection circuit according to an embodiment of the present invention. The detection circuit 100 may include:
[0064] First input terminal 110, second input terminal 120, voltage detection circuit 130 and voltage output terminal 140;
[0065] The voltage detection circuit 130 includes a current mirror circuit 131;
[0066] The first input terminal 110 is connected to the button. When the button is in the touched state, a voltage difference is formed between the first input terminal 110 and the second input terminal 120.
[0067] The current mirror circuit 131 is used to replicate the current to output the detection voltage from the voltage output terminal 140.
[0068] In practical implementation, a current mirror circuit can be set in the voltage detection circuit. By replicating the current, the voltage difference between the two input terminals is output at the voltage output terminal, and the key touch detection is performed by the output detection voltage.
[0069] Regarding the detection circuit 100 with the above-described structure, in an optional embodiment of the present invention,
[0070] The voltage detection circuit 130 also includes a first operational amplifier 132, a second operational amplifier 133, a third operational amplifier 134, a first resistor 135, a second resistor 136, a third resistor 137, and a fourth resistor 138, as follows: Figure 2 As shown;
[0071] The input terminal of the first operational amplifier 132 is connected to the first input terminal 110, and the output terminal is connected to the first resistor 135 and the second resistor 136.
[0072] The input terminal of the second operational amplifier 133 is connected to the second input terminal 120, and the output terminal is connected to the second resistor 136 and the third resistor 137.
[0073] The input terminal of the third operational amplifier 134 is connected to the current mirror circuit 131 and the fourth resistor 138, and the output terminal is connected to the voltage output terminal 140.
[0074] One end of the current mirror circuit 131 is connected to the first resistor 135, and the other end is connected to the fourth resistor 138;
[0075] The first resistor 135, the second resistor 136, and the third resistor 137 are connected in series;
[0076] When the button is in the touched state, the first input terminal 110 generates a first voltage and the second input terminal 120 generates a second voltage.
[0077] The first voltage passes through the first operational amplifier 132, and the second voltage passes through the second operational amplifier 133, forming a voltage difference between the output terminals of the first operational amplifier 132 and the second operational amplifier 133.
[0078] The voltage difference is applied to the second resistor 136, resulting in the first current flowing through the second resistor 136;
[0079] The current mirror circuit 131 replicates the first current to obtain the second current;
[0080] The second current passes through the fourth resistor 138 to obtain the detection voltage, and the detection voltage is output from the voltage output terminal 140.
[0081] In this embodiment of the invention, the first voltage generated at the first input terminal 110 is transmitted to the output terminal of the first operational amplifier 132 through the first operational amplifier 132. Similarly, the second voltage generated at the second input terminal 120 is transmitted to the output terminal of the second operational amplifier 133 through the second operational amplifier 133. Thus, a voltage difference is formed between the output terminals of the first operational amplifier 132 and the second operational amplifier 133. Since the voltage difference between the output terminals of the first operational amplifier 132 and the second operational amplifier 133 acts on the second resistor 136, a first current I1 = (V1 - V2) / R2 is obtained flowing through the second resistor 136. The current mirror circuit 131 replicates the current I1, and I2 is the second current replicated by the current mirror circuit 131.
[0082] In this embodiment of the invention, the width-to-length ratio and number of transistors in the current mirror circuit 131 can be set to be the same, such that I2 = I1. The detection voltage OUT output from the voltage output terminal 140 can be obtained as I2 * R4 = (V1 - V2) * R4 / R2. The resistance values of the fourth resistor 138 and the second resistor 136 can be set to be the same, i.e., R4 = R2. Thus, OUT = V1 - V2 can be obtained. That is, the output detection voltage is the sampled voltage difference, which provides an analog circuit for the touch detection of the trigger button, and outputs the capacitor voltage difference OUT after the touch.
[0083] In an optional embodiment of the present invention, the detection circuit 100 with the above-described structure further includes:
[0084] Comparator 150,
[0085] The input terminals of comparator 150 are connected to the first input terminal 110 and the second input terminal 120, and its output terminal is connected to the voltage detection circuit 130, such as... Figure 3 As shown;
[0086] The comparator 150 is used to control the voltage detection circuit 130 to not work when the voltage at the first input terminal 110 is lower than the voltage at the second input terminal 120, and to control the voltage detection circuit 130 to work when the voltage at the first input terminal 110 is higher than the voltage at the second input terminal 120.
[0087] Specifically, comparator 150 can be an analog comparator (ACMP). The first input terminal 110 and the second input terminal 120 serve as inputs to comparator 150. It compares the voltage at the first input terminal 110 with the voltage at the second input terminal 120. When the voltage at the first input terminal 110 is higher than the voltage at the second input terminal 120, comparator 150 outputs a control signal EN. EN controls the voltage detection circuit 130 to operate, and the output detection voltage OUT = V1 - V2. When the voltage at the first input terminal 110 is not higher than the voltage at the second input terminal 120, comparator 150 does not output a control signal, the voltage detection circuit 130 does not operate, and the output detection voltage OUT = 0. This invention reduces false triggering of the detection circuit and lowers the power consumption of the detection circuit through the comparator.
[0088] In this embodiment of the invention, comparator 150 can output a signal to provide a comparison signal to subsequent digital circuits, thus providing the comparison state of the analog circuit to the subsequent digital circuitry. The detection circuit experiences a 5µs delay when switching between different states; the digital circuitry needs to be aware of this and set appropriate sampling or detection times.
[0089] Regarding the detection circuit 100 with the above-described structure, in an optional embodiment of the present invention,
[0090] The current mirror circuit 131 includes at least one transistor;
[0091] The output of comparator 150 is connected to the current mirror circuit 131;
[0092] The comparator is also configured to turn off at least one of at least one transistor when the voltage at the first input terminal 110 is lower than the voltage at the second input terminal 120; and to turn on all at least one transistor when the voltage at the first input terminal 110 is higher than the voltage at the second input terminal 120.
[0093] The transistor can be a PMOS transistor, which refers to an n-type substrate, p-channel MOSFET that carries current through the flow of holes. In this invention, the switching on and off of the transistor in the current mirror circuit 131 can be controlled by the comparator 150.
[0094] In an optional embodiment of the present invention, the detection circuit 100 with the above-described structure further includes:
[0095] Delay circuit 160;
[0096] One end of the delay circuit 160 is connected to the first input terminal 110, and the other end is connected to the second input terminal 120, as shown below. Figure 4 As shown;
[0097] Delay circuit 160 is used to convert the touch signal generated when the button is in the touched state into a delayed signal;
[0098] The second input terminal 120 is used to generate a second voltage based on the delayed signal.
[0099] In practical applications, when the button is in the touched state, the voltage of the first input terminal 110 rises to 1.5V based on the touch signal. The touch signal is converted into a delayed signal by the delay circuit 160. The delayed signal is transmitted to the second input terminal 120. Based on the delayed signal, the second input terminal generates a 1V voltage. The voltage difference generated between the first input terminal 110 and the second input terminal 120 is the manifestation of the trigger action in the circuit.
[0100] In an optional embodiment of the present invention, for the detection circuit 100 with the above structure, the second resistor and the fourth resistor have the same resistance value.
[0101] like Figure 5 The diagram shows a circuit diagram of a detection circuit according to an embodiment of the present invention, including IO1INPUT (first input terminal), IO2INPUT (second input terminal), OUTPUT (voltage output terminal), a current mirror circuit composed of transistors PM1, PM2, PM3 and PM4 (the part in the dashed box in the figure), OP1 (first operational amplifier), OP2 (second operational amplifier), OP3 (third operational amplifier), R1 (first resistor), R2 (second resistor), R3 (third resistor), R4 (fourth resistor), and ACMP (comparator). The analog circuit part has only one ACMP, three OPs, one current mirror and four resistors, which are then connected to the digital circuit part. Compared with the previous detection which may have required the entire ADC module, the circuit is simpler and has a smaller area. The current mirror increases the intrinsic gain by a factor of 1, making the current more stable and the circuit matching better. There is less interference from other circuit signal lines in the layout, and the replicated current is more accurate.
[0102] In summary, in this embodiment of the invention, the detection circuit includes: a first input terminal, a second input terminal, a voltage detection circuit, and a voltage output terminal; the voltage detection circuit includes a current mirror circuit; the first input terminal is connected to the button, and when the button is touched, a voltage difference is formed between the first input terminal and the second input terminal; the current mirror circuit is used to replicate the current to output the detection voltage from the voltage output terminal. By adopting the above method, the touch button is detected to determine whether it is touched, and the voltage difference between the two input terminals is output. The detection circuit is simple, occupies a small area, and the current mirror increases the output resistance by a factor of 1, which makes the current more stable and the detection result more accurate.
[0103] Based on the above detection circuit, the present invention also provides a detection method, referring to... Figure 6The diagram illustrates a flowchart of a detection method provided by an embodiment of the present invention, which may specifically include the following steps:
[0104] Step 601: In response to the user's operation, the control button is either in a touched state or not touched state.
[0105] In this embodiment of the invention, in response to a user operation, the button can be controlled to be in a touched state, or the button can be controlled to be in a non-touched state.
[0106] Step 602: When the button is in the touched state, the detection voltage output by the voltage output terminal is collected to obtain the third voltage.
[0107] Step 603: When the button is not touched, the detection voltage output from the voltage output terminal is collected to obtain the fourth voltage.
[0108] Step 604: Check whether the button meets the requirements based on the third and fourth voltages.
[0109] By collecting the output voltage of the button when it is being touched and the output voltage of the button when it is not being touched, it can be determined whether the button meets the production / sales requirements.
[0110] In this embodiment of the invention, the detection circuit includes: a first input terminal, a second input terminal, a voltage detection circuit, and a voltage output terminal; the voltage detection circuit includes a current mirror circuit; the first input terminal is connected to the button, and when the button is in a touched state, a voltage difference is formed between the first input terminal and the second input terminal; the current mirror circuit is used to replicate the current to output the detection voltage from the voltage output terminal. By adopting the above method, the touch button is detected to determine whether it is touched, and the voltage difference between the two input terminals is output. The detection circuit is simple, occupies a small area, and the current mirror increases the output resistance by a factor of 1, which makes the current more stable and the detection result more accurate. This invention samples the voltage in both touched and untouched states, and subtracts them through a logic circuit to obtain the voltage difference between touched and untouched states. This invention can make the detection result of whether the electrostatic capacitive touch button is touched more accurate.
[0111] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0112] Reference Figure 7The diagram shows a structural block diagram of a detection device provided in an embodiment of the present invention, including the detection circuit described above, and may further include the following modules:
[0113] Control module 701 is used to respond to user operation and control the button to be in a touched state or a non-touched state;
[0114] The first acquisition module 702 is used to acquire the detection voltage output by the voltage output terminal when the button is in a touched state, and obtain the third voltage;
[0115] The second acquisition module 703 is used to acquire the detection voltage output by the voltage output terminal when the button is in an untouched state, and obtain a fourth voltage;
[0116] The inspection module 704 is used to inspect whether the button meets the requirements based on the third voltage and the fourth voltage.
[0117] In summary, in this embodiment of the invention, the detection circuit includes: a first input terminal, a second input terminal, a voltage detection circuit, and a voltage output terminal; the voltage detection circuit includes a current mirror circuit; the first input terminal is connected to the button, and when the button is in a touched state, a voltage difference is formed between the first input terminal and the second input terminal; the current mirror circuit is used to replicate the current to output the detection voltage from the voltage output terminal. By adopting the above method, the touch button is detected to determine whether it is touched, and the voltage difference between the two input terminals is output. The detection circuit is simple, occupies a small area, and the current mirror increases the output resistance by a factor of 1, which makes the current more stable and the detection result more accurate. This invention samples the voltage in both touched and untouched states, and subtracts them through a logic circuit to obtain the voltage difference between touched and untouched states. This invention can make the detection result of whether the electrostatic capacitive touch button is touched more accurate.
[0118] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0119] This invention also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described detection method embodiment and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0120] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described detection method embodiment and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0121] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0122] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0123] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0124] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0125] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0126] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.
[0127] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device 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, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0128] The detection circuit, detection method, detection device, electronic device, and computer-readable storage medium provided by the present invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A detection circuit, characterized in that, include: First input terminal, second input terminal, voltage detection circuit, and voltage output terminal; The voltage detection circuit includes a current mirror circuit; The first input terminal is connected to the button. When the button is in a touched state, a voltage difference is formed between the first input terminal and the second input terminal. The current mirror circuit is used to replicate the current to output the detection voltage from the voltage output terminal; The voltage detection circuit further includes a first operational amplifier, a second operational amplifier, a third operational amplifier, a first resistor, a second resistor, a third resistor, and a fourth resistor; The input terminal of the first operational amplifier is connected to the first input terminal, and the output terminal is connected to the first resistor and the second resistor; The input terminal of the second operational amplifier is connected to the second input terminal, and the output terminal is connected to the second resistor and the third resistor; The input terminal of the third operational amplifier is connected to the current mirror circuit and the fourth resistor, and the output terminal is connected to the voltage output terminal. One end of the current mirror circuit is connected to the first resistor, and the other end is connected to the fourth resistor; The first resistor, the second resistor, and the third resistor are connected in series; When the button is in a touched state, the first input terminal generates a first voltage, and the second input terminal generates a second voltage. The first voltage passes through the first operational amplifier, and the second voltage passes through the second operational amplifier, forming the voltage difference between the output terminals of the first and second operational amplifiers. The voltage difference acts on the second resistor, resulting in a first current flowing through the second resistor; The current mirror circuit replicates the first current to obtain the second current; The second current passes through the fourth resistor to obtain the detection voltage, and the detection voltage is output from the voltage output terminal.
2. The detection circuit according to claim 1, characterized in that, Also includes: Comparator, The input terminal of the comparator is connected to the first input terminal and the second input terminal, and the output terminal is connected to the voltage detection circuit. The comparator is used to control the voltage detection circuit to not operate when the voltage at the first input terminal is lower than the voltage at the second input terminal, and to control the voltage detection circuit to operate when the voltage at the first input terminal is higher than the voltage at the second input terminal.
3. The detection circuit according to claim 2, characterized in that, The current mirror circuit includes at least one transistor; The output of the comparator is connected to the current mirror circuit. The comparator is further configured to turn off at least one of the at least one transistors when the voltage at the first input terminal is lower than the voltage at the second input terminal; and to turn on all of the at least one transistors when the voltage at the first input terminal is higher than the voltage at the second input terminal.
4. The detection circuit according to claim 1, characterized in that, Also includes: Delay circuit; One end of the delay circuit is connected to the first input terminal, and the other end is connected to the second input terminal; The delay circuit is used to convert the touch signal generated when the button is in a touched state into a delayed signal; The second input terminal is used to generate the second voltage based on the delayed signal.
5. The detection circuit according to any one of claims 1-3, characterized in that, The second resistor and the fourth resistor have the same resistance value.
6. A detection method, characterized in that, Applied to the detection circuit as described in any one of claims 1-5, the method comprises: In response to user operation, control the button to be in a touched state or a non-touched state; When the button is in a touched state, the detected voltage output from the voltage output terminal is collected to obtain the third voltage; When the button is not touched, the detected voltage output from the voltage output terminal is collected to obtain the fourth voltage; The button is checked to see if it meets the requirements based on the third voltage and the fourth voltage.
7. A detection device, characterized in that, The device includes the detection circuit as described in any one of claims 1-5, and further includes: The control module is used to respond to user operations and control the button to be in a touched state or a non-touched state; The first acquisition module is used to acquire the detection voltage output by the voltage output terminal when the button is in the touched state, and obtain the third voltage; The second acquisition module is used to acquire the detection voltage output by the voltage output terminal when the button is not touched, and obtain the fourth voltage. The verification module is used to verify whether the button meets the requirements based on the third voltage and the fourth voltage.
8. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the detection method as described in claim 6.
9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the detection method as described in claim 6.
Citation Information
Patent Citations
Detection circuit of capacitor touch key
CN103475352A
Low-power-consumption capacitive touch sensing detection circuit
CN114900175A