A touch button detection circuit based on input signal amplification
By designing a touch button detection circuit based on input signal amplification, using alternate working touch sensing circuits and op amp circuits, the problems of weak anti-interference ability and poor stability of the traditional capacitive touch button detection circuit are solved, and more efficient touch operation recognition is achieved.
Patent Information
- Application Number
- CN202010233539.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-27
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2040-03-27
AI Technical Summary
The traditional capacitive touch button detection circuit is susceptible to natural environments such as weather and humidity, has weak anti-interference ability, poor stability, and has poor detection results.
A touch button detection circuit based on input signal amplification is designed, including a touch sensing circuit, an op amp circuit and a microprocessor. The first part circuit and the second part circuit of the touch sensing circuit are alternately operated to sense the touch operation, and periodic waveforms are output through the op amp circuit. The microprocessor compares the waveform to recognize the touch operation.
The anti-interference ability and stability of the detection circuit are improved, touch operations can be more accurately identified, and detection results are improved.
Smart Images

Figure CN113452360B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a capacitive touch key, and in particular to a touch key detection circuit based on input signal amplification. Background Art
[0002] With the continuous development of Internet of Things technology, traditional electronic devices pay more and more attention to the innovation of human-computer interaction. The old mechanical switches are gradually replaced by touch switches. IoT devices such as smart door locks and smart lamps have already used touch buttons as the main interaction method. According to the principles of physics, touch buttons can be divided into capacitive, resistive, infrared induction, acoustic wave, etc. Among them, capacitive touch buttons have a wide range of applications. Since they do not have any mechanical parts and will not cause wear, they have a long life and low maintenance costs.
[0003] The traditional capacitive touch button detection circuit is composed of an RC oscillator and a shaping circuit. One end of the RC oscillator is grounded. Under normal conditions, the RC oscillator periodically outputs low-level signals and high-level signals to the shaping circuit, and the output end of the shaping circuit generates a periodic pulse signal containing high and low-level signals. When the human body touches the node between the resistor and the capacitor in the RC oscillator, since the human body has a certain capacitance to the ground, the appropriate design of the values of R and C can make the RC oscillator always output a low-level signal. In this way, the output end of the shaping circuit is often low-level, and the digital circuit is often low-level signals and pulse signals with a certain frequency are used to distinguish them, so as to achieve the purpose of detecting whether the touch operation occurs.
[0004] However, this circuit is easily affected by natural environments such as weather and humidity, has weak anti-interference ability, poor stability, and the detection results are not ideal. Summary of the invention
[0005] In view of this, the present invention provides a touch key detection circuit based on input signal amplification, the detection circuit has strong anti-interference ability and can improve detection stability.
[0006] The present invention is achieved through the following technical solutions:
[0007] A touch key detection circuit based on input signal amplification includes a touch sensing circuit, an operational amplifier circuit and a microprocessor, wherein:
[0008] The output end of the touch sensing circuit is connected to the input end of the operational amplifier circuit for sensing the operation of the touch key;
[0009] The output end of the operational amplifier circuit is connected to the microprocessor, and is used to amplify and process the input signal of the touch sensing circuit and output a corresponding waveform;
[0010] The microprocessor is used to collect the output waveform of the operational amplifier circuit and determine whether an operation occurs on the touch key.
[0011] Specifically, the touch sensing circuit includes a first capacitor, a first part of the circuit and a second part of the circuit. The first part of the circuit and the second part of the circuit are used to alternately output touch signals to the operational amplifier circuit. The output end of the first part of the circuit is respectively connected to the first capacitor, the input end of the second part of the circuit, and the input end of the operational amplifier circuit.
[0012] Specifically, the touch sensing circuit further includes a second capacitor, which is connected in parallel with the first capacitor.
[0013] Specifically, the first circuit includes a first transistor, a first resistor and a third resistor, wherein:
[0014] One end of the first resistor is connected to the bias voltage, and the other end is connected to the collector of the first transistor;
[0015] The base of the first transistor is connected to one end of the third resistor, and the emitter is connected to the first capacitor, the input end of the operational amplifier circuit, and the input end of the second circuit respectively;
[0016] The other end of the third resistor is connected to the output end of the operational amplifier circuit.
[0017] Specifically, the second circuit comprises a second transistor, a second resistor and a fourth resistor, wherein:
[0018] The base of the second transistor is connected to one end of the fourth resistor, the collector is grounded, and the emitter is connected to one end of the second resistor;
[0019] The other end of the second resistor is respectively connected to the output end of the first part of the circuit, the first capacitor and the input end of the operational amplifier circuit;
[0020] The other end of the fourth resistor is connected to the output end of the operational amplifier circuit.
[0021] Specifically, the operational amplifier circuit includes an amplifier and a bias voltage circuit, wherein:
[0022] The output end of the bias voltage circuit is connected to the non-inverting input end of the amplifier and is used as a bias voltage for the non-inverting input end of the amplifier;
[0023] The inverting input terminal of the amplifier is connected to the output terminal of the touch sensing circuit, and the output terminal is respectively connected to the base of the first transistor and the base of the second transistor, for controlling the alternating operation of the first circuit and the second circuit.
[0024] Specifically, the microprocessor is connected to the output end of the amplifier.
[0025] The touch button detection circuit based on input signal amplification provided by the present invention senses the occurrence of a touch operation by alternately operating the first part of the circuit and the second part of the circuit of the touch sensing circuit, and outputs a waveform with a certain period through the operational amplifier circuit. After the touch operation occurs, the period of the output waveform changes. The microprocessor compares the output waveform of the first capacitor before and after the touch operation occurs to identify whether the touch operation occurs. Compared with the prior art, the touch button detection circuit has strong anti-interference ability and high stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Attached Figure 1 This is a circuit block diagram of the touch key detection circuit provided by the present invention.
[0027] Attached Figure 2 The present invention provides a specific circuit diagram of the touch key detection circuit.
[0028] Attached Figure 3 for Figure 2 Equivalent circuit diagram of the touch button in the detection circuit shown when no touch operation occurs.
[0029] Attached Figure 4 for Figure 2 The equivalent circuit diagram of the first part of the circuit working when a touch operation occurs on the touch key in the detection circuit shown.
[0030] Attached Figure 5 for Figure 2 The equivalent circuit diagram of the second part of the circuit working when a touch operation occurs on the touch key in the detection circuit shown.
[0031] Attached Figure 6 for Figure 2 The sine wave waveform diagram outputted when a touch operation occurs on the touch button in the detection circuit shown.
[0032] Attached Figure 7 for Figure 2 The waveform diagram of the output before and after the touch operation occurs on the touch button in the detection circuit shown.
[0033] Attached Figure 8 This is another specific circuit diagram of the touch key detection circuit provided by the present invention.
[0034] Attached Fig. 9 for Figure 8 An equivalent circuit diagram of the operation of the first part of the circuit when no touch operation occurs on the touch button in the detection circuit shown.
[0035] Attached Fig.10 for Figure 8 The equivalent circuit diagram of the second part of the circuit working when no touch operation occurs on the touch key in the detection circuit shown.
[0036] Attached Fig.11 for Figure 8 The sine wave waveform output when no touch operation occurs on the touch key in the detection circuit shown.
[0037] Attached Fig.12 for Figure 8 The equivalent circuit diagram of the first part of the circuit working when a touch operation occurs on the touch key in the detection circuit shown.
[0038] Attached Fig.13 for Figure 8 The equivalent circuit diagram of the second part of the circuit working when a touch operation occurs on the touch key in the detection circuit shown.
[0039] Attached Fig.14 for Figure 8 The sine wave waveform diagram outputted when a touch operation occurs on the touch button in the detection circuit shown.
[0040] Attached Fig.15 for Figure 8 The waveform diagram of the output before and after the touch operation occurs on the touch button in the detection circuit shown. DETAILED DESCRIPTION
[0041] The technical solutions in the present invention will be described clearly and completely below in conjunction with the drawings in the present invention. Obviously, the described implementation is only a part of the present invention, not all of it. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents the selected implementation of the present invention. Based on the present invention, all other implementation means obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.
[0042] The present invention provides a touch key detection circuit based on input signal amplification, such as Figure 1 As shown, the detection circuit includes a touch sensing circuit, an operational amplifier circuit and a microprocessor, wherein:
[0043] The output end of the touch sensing circuit is connected to the input end of the operational amplifier circuit for sensing the operation of the touch key;
[0044] The output end of the operational amplifier circuit is connected to the microprocessor, and is used to amplify and process the input signal of the touch sensing circuit and output a corresponding waveform;
[0045] The microprocessor is used to collect the output waveform of the operational amplifier circuit and determine whether an operation occurs on the touch key.
[0046] As a specific embodiment of the present invention, refer to Figure 2, which shows a specific circuit diagram of the detection circuit provided by the present invention. The dotted box on the right side of the figure shows the above-mentioned operational amplifier circuit, which includes an amplifier AMP and a bias voltage circuit, wherein the output end of the bias voltage circuit is connected to the in-phase input end of the amplifier AMP, and is used as a bias voltage for the in-phase input end of the amplifier AMP; the inverting input end of the amplifier AMP is connected to the output end of the touch sensing circuit, and the output end is respectively connected to the base of the first transistor Q1 and the base of the second transistor Q2, and is used to control the alternating operation of the first circuit and the second circuit.
[0047] The microprocessor is connected to the output end of the amplifier AMP to collect the output waveform and determine whether the touch key is operated by identifying the sine wave period of the output end of the amplifier AMP.
[0048] As a specific embodiment of the above touch sensing circuit, continue to refer to Figure 2 The above-mentioned touch sensing circuit is shown in the left dotted box in the figure, including a first capacitor C, a first part of the circuit and a second part of the circuit. The first part of the circuit and the second part of the circuit are used to alternately output touch signals to the operational amplifier circuit. The output end of the first part of the circuit is respectively connected to the first capacitor C, the input end of the second part of the circuit, and the input end of the operational amplifier circuit.
[0049] The first circuit comprises a first transistor Q1, a first resistor R1 and a third resistor R3, wherein:
[0050] The emitter of the first transistor Q1 is connected to the bias voltage, the collector is connected to one end of the first resistor R1, and the base is connected to one end of the third resistor R3; the other end of the first resistor R1 is respectively connected to the input end of the second part of the circuit, the first capacitor and the input end of the operational amplifier circuit; the other end of the third resistor R3 is connected to the output end of the operational amplifier circuit.
[0051] The second circuit comprises a second transistor Q2, a second resistor R2 and a fourth resistor R4, wherein:
[0052] The collector of the second transistor Q2 is connected to one end of the second resistor R2, the emitter is grounded, and the base is connected to one end of the fourth resistor R4; the other end of the second resistor R2 is respectively connected to the output end of the first part of the circuit, the first capacitor and the input end of the operational amplifier circuit; the other end of the fourth resistor R4 is connected to the output end of the operational amplifier circuit.
[0053] Reference Figure 2The present invention divides the touch sensing circuit into a first circuit consisting of a first transistor Q1, a first resistor R1, and a third resistor R3, and a second circuit consisting of a second transistor Q2, a second resistor R2, and a fourth resistor R4. The first circuit and the second circuit work alternately in the circuit. After being amplified by the amplifier AMP, the detection circuit outputs a waveform, which is identified by the microprocessor to determine whether the touch button is operated.
[0054] The working principle of the above detection circuit is as follows:
[0055] When the detection circuit is powered on, the first transistor Q1 is turned off, the second transistor Q2 is turned off, the inverting input terminal and the non-inverting input terminal of the amplifier AMP are at the same potential, and a low voltage signal is output. Figure 2 The equivalent circuit diagram of the detection circuit shown is shown in Figure 3 As shown, when the touch operation does not occur, the first capacitor C is not connected to the detection circuit, the amplifier AMP outputs a steady-state low voltage, the detection circuit maintains this state, and the output is a DC waveform.
[0056] When a touch operation occurs, the first capacitor C is connected to the detection circuit. Figure 2 The equivalent circuit diagram of the detection circuit shown is shown in Figure 4 As shown, the first capacitor C enters the charging state, and at the same time, the voltage at the inverting input terminal of the amplifier AMP increases. When the inverting terminal voltage is greater than the non-inverting terminal voltage, the amplifier AMP outputs a low voltage signal, pulling down the base voltage of the first transistor Q1 and the base voltage of the second transistor Q2. The first transistor Q1 is turned off, the second transistor Q2 is turned on, the first part of the circuit is disconnected, and the second part of the circuit is working.
[0057] When the second part of the circuit is working, Figure 2 The equivalent circuit diagram of the detection circuit shown is shown in Figure 5 As shown, the first capacitor C enters the discharge state, and at the same time, the voltage at the inverting input terminal of the amplifier AMP decreases. When the inverting terminal voltage is less than the non-inverting terminal voltage, the amplifier AMP outputs a high voltage signal, which pulls up the base voltage of the first transistor Q1 and the base voltage of the second transistor Q2. The first transistor Q1 is turned on and the second transistor Q2 is turned off. The first part of the circuit works and the second part of the circuit is disconnected.
[0058] Thus, when a touch operation occurs, the detection circuit works alternately between the first circuit and the second circuit, and the waveform output by the detection circuit is as follows: Figure 6 shown.
[0059] After the touch operation is completed, the first capacitor C is disconnected from the detection circuit. Figure 2 The equivalent circuit diagram of the detection circuit shown is returned Figure 3As shown, when the above detection circuit is powered on, the amplifier AMP outputs a steady-state low voltage, and the detection circuit maintains this state and outputs a DC waveform.
[0060] The microprocessor of the detection circuit is connected to the output end of the amplifier AMP, and the output waveform of the detection circuit is collected and identified in real time. Whether a touch operation occurs is determined based on the sine wave waveform when a touch operation occurs and the DC waveform when no touch operation occurs.
[0061] In this specific embodiment, when no touch operation occurs, refer to the equivalent circuit diagram of the detection circuit at this time Figure 3 The first capacitor C has no charging and discharging process, which can save the problem of high circuit power consumption caused by frequent capacitor charging and discharging.
[0062] This specific embodiment is based on Figure 7 The above contents are further explained in the figure. T1 in the figure shows the stage where no touch operation occurs on the touch key. In this stage, the detection circuit outputs a stable voltage, which is expressed as a DC waveform. T2 in the figure shows the stage where the touch operation occurs on the touch key. In this stage, the first part of the circuit and the second part of the circuit of the detection circuit work alternately and output a sine wave. The microprocessor determines whether the touch operation occurs on the touch key according to the difference in the waveform.
[0063] As another specific embodiment of the present invention, refer to Figure 8 , which shows another specific circuit diagram of the detection circuit provided by the present invention, the operational amplifier circuit is shown in the right dashed box of the figure, and the operational amplifier circuit is consistent with the operational amplifier circuit of the previous embodiment, and the specific reference is made to the content and Figure 2 As shown, the present invention will not be described in detail here.
[0064] The microprocessor is also connected to the output end of the amplifier AMP to collect the output waveform and determine whether the touch key is operated by identifying the sine wave period of the output end of the amplifier AMP.
[0065] As a specific embodiment of the above touch sensing circuit, continue to refer to Figure 8 The above-mentioned touch sensing circuit is shown in the left dotted box in the figure. In addition to the first capacitor C, the first part of the circuit and the second part of the circuit in the previous embodiment, the touch sensing circuit also includes a second capacitor, and the second capacitor is connected in parallel with the first capacitor.
[0066] Continue to refer to Figure 8The present invention divides the touch sensing circuit into a first circuit composed of a first transistor Q1, a first resistor R1, and a third resistor R3, and a second circuit composed of a second transistor Q2, a second resistor R2, and a fourth resistor R4. The first circuit and the second circuit work alternately in the circuit. After being amplified by the amplifier AMP, the detection circuit outputs a sine wave. The microprocessor identifies the periodic changes before and after the touch operation to determine whether the touch key is operated.
[0067] The working principle of the above detection circuit is as follows:
[0068] When the detection circuit is powered on, the first capacitor C is not connected to the detection circuit. Figure 8 The equivalent circuit diagram of the detection circuit shown is shown in Fig. 9 As shown, the second capacitor C' enters the charging state, and at the same time, the voltage at the inverting input terminal of the amplifier AMP increases. When the inverting terminal voltage is greater than the non-inverting terminal voltage, the amplifier AMP outputs a low voltage signal, which lowers the base voltage of the first transistor Q1 and the base voltage of the second transistor Q2. The first transistor Q1 is turned off, the second transistor Q2 is turned on, the first part of the circuit is disconnected, and the second part of the circuit is working.
[0069] When the second part of the circuit is working, Figure 8 The equivalent circuit diagram of the detection circuit shown is shown in Fig.10 As shown, the second capacitor C' enters the discharge state, and at the same time, the voltage at the inverting input terminal of the amplifier AMP decreases. When the inverting terminal voltage is less than the non-inverting terminal voltage, the amplifier AMP outputs a high voltage signal, which pulls up the base voltage of the first transistor Q1 and the base voltage of the second transistor Q2. The first transistor Q1 is turned on, the second transistor Q2 is turned off, the first part of the circuit is working, and the second part of the circuit is disconnected.
[0070] Thus, when the touch operation does not occur, the detection circuit works alternately between the first circuit and the second circuit. When the touch button does not occur, the waveform output by the detection circuit is as follows: Fig.11 shown.
[0071] When a touch operation occurs, the first capacitor C is connected to the detection circuit. Figure 8 The equivalent circuit diagram of the detection circuit shown is shown in Fig.12 As shown, the first capacitor C and the second capacitor C' enter the charging state, and at the same time, the voltage at the inverting input terminal of the amplifier AMP increases. When the inverting terminal voltage is greater than the non-inverting terminal voltage, the amplifier AMP outputs a low voltage signal, which lowers the base voltage of the first transistor Q1 and the base voltage of the second transistor Q2. The first transistor Q1 is turned off, the second transistor Q2 is turned on, the first part of the circuit is disconnected, and the second part of the circuit is working.
[0072] When the second part of the circuit is working, Figure 8 The equivalent circuit diagram of the detection circuit shown is shown in Fig.13 As shown, the first capacitor C enters the discharge state, and at the same time, the voltage at the inverting input terminal of the amplifier AMP decreases. When the inverting terminal voltage is less than the non-inverting terminal voltage, the amplifier AMP outputs a high voltage signal, which pulls up the base voltage of the first transistor Q1 and the base voltage of the second transistor Q2. The first transistor Q1 is turned on and the second transistor Q2 is turned off. The first part of the circuit works and the second part of the circuit is disconnected.
[0073] Thus, when a touch operation occurs, the detection circuit works alternately between the first circuit and the second circuit. When a touch button operation occurs, the waveform output by the detection circuit is as follows: Fig.14 shown.
[0074] After the touch operation is completed, the first capacitor C is disconnected from the detection circuit. Figure 8 The equivalent circuit diagram of the detection circuit shown is returned Fig. 9 , 10 As shown, when the touch button does not have a touch operation, the first circuit and the second circuit work alternately, and the waveform output by the detection circuit is as follows: Fig.11 shown.
[0075] The microprocessor of the detection circuit is connected to the output end of the amplifier AMP, and the output waveform of the amplifier AMP is collected in real time. By identifying the waveform output by the detection circuit, it is determined whether a touch operation occurs based on the fact that the sine wave period of the touch operation on the touch key is different from the sine wave period of the touch operation not occurring.
[0076] This specific embodiment is based on Fig.15 The above contents are further explained in the figure. T3 in the figure shows the stage where no touch operation occurs on the touch key. In this stage, the first part of the circuit and the second part of the circuit of the detection circuit work alternately and output a sine wave with a period of P1. T4 in the figure shows the stage where the touch key occurs. In this stage, the first part of the circuit and the second part of the circuit of the detection circuit work alternately and output a sine wave with a period of P2. The microprocessor determines whether the touch operation occurs on the touch key according to the different periods of the waveform.
[0077] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A touch key detection circuit based on input signal amplification, comprising a touch sensing circuit, an operational amplifier circuit and a microprocessor, wherein: The output end of the touch sensing circuit is connected to the input end of the operational amplifier circuit for sensing the operation of the touch key; The output end of the operational amplifier circuit is connected to the microprocessor, and is used to amplify and process the input signal of the touch sensing circuit and output a corresponding waveform; The microprocessor is used to collect the output waveform of the operational amplifier circuit and determine whether the touch button is operated; the touch sensing circuit includes a first capacitor, a first part of the circuit and a second part of the circuit, the first part of the circuit and the second part of the circuit are used to alternately output touch signals to the operational amplifier circuit, and the output end of the first part of the circuit is respectively connected to the first capacitor, the input end of the second part of the circuit, and the input end of the operational amplifier circuit. 2 . The detection circuit as claimed in claim 1 , wherein the touch sensing circuit further comprises a second capacitor connected in parallel with the first capacitor.
3. The detection circuit according to claim 1 or 2, wherein the first circuit section comprises a first transistor, a first resistor and a third resistor, wherein: One end of the first resistor is connected to the bias voltage, and the other end is connected to the collector of the first transistor; The base of the first transistor is connected to one end of the third resistor, and the emitter is connected to the first capacitor, the input end of the operational amplifier circuit, and the input end of the second circuit respectively; The other end of the third resistor is connected to the output end of the operational amplifier circuit.
4. The detection circuit as claimed in claim 3, wherein the second circuit section comprises a second transistor, a second resistor and a fourth resistor, wherein: The base of the second transistor is connected to one end of the fourth resistor, the collector is grounded, and the emitter is connected to one end of the second resistor; The other end of the second resistor is respectively connected to the output end of the first part of the circuit, the first capacitor and the input end of the operational amplifier circuit; The other end of the fourth resistor is connected to the output end of the operational amplifier circuit.
5. The detection circuit as claimed in claim 4, wherein the operational amplifier circuit comprises an amplifier and a bias voltage circuit, wherein: The output end of the bias voltage circuit is connected to the non-inverting input end of the amplifier and is used as a bias voltage for the non-inverting input end of the amplifier; The inverting input terminal of the amplifier is connected to the output terminal of the touch sensing circuit, and the output terminal is respectively connected to the base of the first transistor and the base of the second transistor, for controlling the alternating operation of the first circuit and the second circuit.
6. The detection circuit as claimed in claim 1, wherein the microprocessor is connected to an output terminal of the amplifier.
Citation Information
Patent Citations
Detection circuit of capacitor touch key
CN103475352A
Touch key detection circuit based on input signal amplification
CN211321321U