Anti-interference key detection circuit

By introducing RC filter and Schmidt inverting output filter circuit into the key detection circuit, the problem of poor anti-interference ability in the existing technology is solved, higher detection accuracy and signal stability are achieved, and the risk of misjudgment is reduced.

CN221597863UActive Publication Date: 2024-08-23SCI RES TRAINING CENT FOR CHINESE ASTRONAUTS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202322831032.3
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2023-10-20
Publication Date
2024-08-23
Estimated Expiration
2033-10-20

AI Technical Summary

Technical Problem

The existing key detection circuit has poor anti-interference ability, especially when low-frequency clutter appears in the input signal, resulting in low detection accuracy and the risk of misjudgment.

Method used

An anti-interference key detection circuit is designed, including key action, RC filter circuit, Schmidt inverting output filter circuit, OR gate circuit, monostable trigger circuit and microcontroller signal identification circuit. Through RC filter and Schmidt The inverting output filter circuit processes the signal to improve the anti-interference ability and detection accuracy.

Benefits of technology

Through the combination of RC filtering and Schmidt inverting output filter circuit, interference signals can be effectively filtered, making the output waveform voltage more stable, improving the accuracy and anti-interference ability of key detection, and reducing the risk of misjudgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN221597863U
    Figure CN221597863U
Patent Text Reader

Abstract

An anti-interference key detection circuit comprises a key action and RC filter circuit, a Schmidt inverted output filter circuit, an OR gate circuit, a monostable trigger circuit and a single-chip microcomputer signal identification circuit which are connected in sequence. The Schmidt inverted output filter circuit is connected with the single-chip microcomputer signal identification circuit. According to the utility model, interference signals are filtered through the RC filter circuit, so that the anti-interference capability is improved; the signals are filtered and shaped through the Schmidt inverted output filter circuit, so that the output waveform voltage is more stable, and the precision of the detection result is higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model relates to the technical field of key detection circuits, in particular to an anti-interference key detection circuit. Background Art

[0002] Buttons are widely used in various food heating devices, and the success rate of button detection directly affects the use of electronic products. Button detection usually refers to detecting the operation of a button to determine whether the button is pressed. When the user presses the button, a low-level signal is generated, and if it is not pressed, a high-level signal is maintained. The button signal is filtered by a simple RC low-pass filter and then directly connected to the ordinary IO port of the microcontroller. The microcontroller recognizes the signal of this level. If it is a low level, it can be identified that the button has been pressed. If it is a high level, it can be identified that the button has not been moved. However, this type of button detection circuit has poor anti-interference ability, especially when low-frequency noise appears in the input signal, such as large fluctuations in high-level voltage or large fluctuations in low-level voltage. The circuit itself cannot filter out the noise and directly inputs it to the microcontroller. Although the microcontroller can make judgments through delay debouncing, there is also a certain risk of misjudgment. Utility Model Content

[0003] In order to solve the problem that the key detection circuit in the prior art has poor anti-interference ability and low detection accuracy, the utility model proposes an anti-interference key detection circuit, including: a key action and RC filter circuit, a Schmidt inverting output filter circuit, an OR gate circuit, a monostable trigger circuit and a single-chip signal recognition circuit connected in sequence;

[0004] The Schmidt inverting output filter circuit is connected to the single chip microcomputer signal recognition circuit.

[0005] Preferably, the key action and RC filter circuit include: a plurality of keys and a plurality of RC filter circuits;

[0006] One end of the button is grounded, and the other end is connected to the RC filter circuit.

[0007] Preferably, the RC filter circuit comprises: a clamping diode, a pull-up resistor, a filter resistor and a filter capacitor;

[0008] The cathode of the clamping diode is connected to the button;

[0009] The positive electrode of the clamping diode is connected to one end of the pull-up resistor and one end of the filter resistor respectively;

[0010] The other end of the pull-up resistor is connected to one end of the filter capacitor;

[0011] The other end of the filter resistor is connected to the other end of the filter capacitor and is also connected to the Schmidt inverting output filter circuit.

[0012] Preferably, the Schmidt inverting output filter circuit comprises: a plurality of Schmidt inverters;

[0013] The input end of the Schmidt inverter is connected to the RC filter circuit;

[0014] The output end of the Schmidt inverter is connected to the OR gate circuit and the single chip microcomputer signal recognition circuit.

[0015] Preferably, the OR gate circuit comprises: a plurality of OR gate chips;

[0016] The two input terminals of the OR gate chip are respectively connected to the output terminals of two different Schmitt inverters;

[0017] The output end of the OR gate chip is connected to the monostable trigger circuit.

[0018] Preferably, the monostable trigger circuit comprises: a monostable trigger chip, a pulse width adjustment resistor and a capacitor;

[0019] Pin 1 of the monostable trigger chip is grounded and also connected to one end of the capacitor;

[0020] The other end of the capacitor is connected to pin 2 of the monostable trigger chip and is also connected to one end of the pulse width adjustment resistor;

[0021] Pin 16 of the monostable trigger chip is connected to electricity and is also connected to the other end of the pulse width adjustment resistor;

[0022] Pin 4 of the monostable trigger chip is connected to the output end of the OR gate chip;

[0023] Pin 8 of the monostable trigger chip is grounded;

[0024] Pin 7 of the monostable trigger chip is connected to the single-chip microcomputer signal recognition circuit.

[0025] Preferably, the single-chip signal recognition circuit comprises: a single-chip;

[0026] The single chip microcomputer is connected to the pin 7 of the monostable trigger chip and the output end of the Schmitt inverter.

[0027] Preferably, the multiple Schmitt inverters are implemented as integrated chips or independent chips.

[0028] Preferably, the multiple OR gate chips are integrated chips or independent chips.

[0029] Compared with the prior art, the beneficial effects of the utility model are:

[0030] An anti-interference key detection circuit comprises: a key action and RC filter circuit, a Schmidt inverting output filter circuit, an OR gate circuit, a monostable trigger circuit and a single-chip signal recognition circuit connected in sequence; the Schmidt inverting output filter circuit is connected to the single-chip signal recognition circuit; the utility model filters out interference signals through the RC filter circuit, thereby improving the anti-interference ability; and filters and shapes the signal through the Schmidt inverting output filter circuit, thereby making the output waveform voltage more stable and making the detection result more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 The utility model is an anti-interference key detection circuit diagram. DETAILED DESCRIPTION

[0032] The key input signal in the utility model is filtered through an RC low-pass filter to filter out a part of high-frequency noise, and then passes through a Schmidt inverter to shape the signal so that the waveform voltage is more stable, and then passes through an OR gate circuit. At this time, if no key is pressed, the output end of the OR gate circuit will maintain a low level, and the monostable trigger cannot be triggered to output a certain pulse width signal, and the output end of the monostable trigger is maintained at a low level, and the single-chip microcomputer will always recognize that no key is pressed; if a key is pressed, the level at the output end of the OR gate circuit changes from low to high, and a rising edge signal is generated, which is input to the monostable trigger. When the monostable trigger receives the rising edge signal, it outputs a waveform with a certain positive pulse width, which is then recognized by the single-chip microcomputer. When the pulse width length set by itself is recognized, it is considered that there is a key action. At this time, the output signal level of the Schmidt inverter corresponding to each key is read. If the corresponding signal is a high level, it can be recognized that the key has been pressed. If it is recognized as low, the key has not been pressed. Key detection can be realized, and the signal is more stable, so that the key detection has a stronger anti-interference ability; in order to better understand the utility model, the content of the utility model is further explained below in combination with the drawings and embodiments of the specification.

[0033] Embodiment 1:

[0034] An anti-interference key detection circuit comprises: a key action and RC filter circuit 1, a Schmidt inverting output filter circuit 2, an OR gate circuit 3, a monostable trigger circuit 4 and a single-chip signal recognition circuit 5 connected in sequence, such as Figure 1 ;

[0035] The Schmidt inverting output filter circuit 2 is connected to the single chip microcomputer signal recognition circuit 5 .

[0036] In this embodiment, the buttons in the button action and RC filter circuit 1 include: button S1, button S2, button S3 and button S4.

[0037] In this embodiment, the clamping diodes in the key action and RC filter circuit 1 include: clamping diode V2, clamping diode V3, clamping diode V4 and clamping diode V5; the pull-up resistors include: pull-up resistor R2, pull-up resistor R3, pull-up resistor R4 and pull-up resistor R5; the RC filter resistors include: filter resistor R6, filter resistor R7, filter resistor R8 and filter resistor R9; the filter capacitors include: filter capacitor C1, filter capacitor C2, filter capacitor C3 and filter capacitor C4.

[0038] The cathode of the clamping diode V2 is connected to the button S1; the anode of the clamping diode V2 is respectively connected to one end of the pull-up resistor R2 and one end of the filter resistor R6; the other end of the pull-up resistor R2 is connected to one end of the filter capacitor C1; the other end of the filter resistor R6 is connected to the other end of the filter capacitor C1, and is also connected to the Schmidt inverting output filter circuit 2.

[0039] The cathode of the clamping diode V3 is connected to the button S2; the anode of the clamping diode V3 is respectively connected to one end of the pull-up resistor R3 and one end of the filter resistor R7; the other end of the pull-up resistor R3 is connected to one end of the filter capacitor C2; the other end of the filter resistor R7 is connected to the other end of the filter capacitor C2, and is also connected to the Schmidt inverting output filter circuit 2.

[0040] The cathode of the clamping diode V4 is connected to the button S3; the anode of the clamping diode V4 is respectively connected to one end of the pull-up resistor R4 and one end of the filter resistor R8; the other end of the pull-up resistor R4 is connected to one end of the filter capacitor C3; the other end of the filter resistor R8 is connected to the other end of the filter capacitor C3, and is also connected to the Schmidt inverting output filter circuit 2.

[0041] The cathode of the clamping diode V5 is connected to the button S4; the anode of the clamping diode V5 is respectively connected to one end of the pull-up resistor R5 and one end of the filter resistor R9; the other end of the pull-up resistor R5 is connected to one end of the filter capacitor C4; the other end of the filter resistor R9 is connected to the other end of the filter capacitor C4, and is also connected to the Schmidt inverting output filter circuit 2.

[0042] The RC filter circuit can filter out some high-frequency noise for the key input signal through RC low-pass filtering.

[0043] The Schmidt inverters of the Schmidt inversion output filter circuit 2 in this embodiment include: a Schmidt inverter IC1, a Schmidt inverter IC2, a Schmidt inverter IC3 and a Schmidt inverter IC4.

[0044] The input end of the Schmidt inverter IC1 is connected to the filter resistor R6; the output end is connected to the OR gate circuit 3 and the single chip computer signal recognition circuit 5.

[0045] The input end of the Schmidt inverter IC2 is connected to the filter resistor R7; the output end is connected to the OR gate circuit 3 and the single chip computer signal recognition circuit 5.

[0046] The input end of the Schmidt inverter IC3 is connected to the filter resistor R8; the output end is connected to the OR gate circuit 3 and the single chip computer signal recognition circuit 5.

[0047] The input end of the Schmidt inverter IC4 is connected to the filter resistor R8; the output end is connected to the OR gate circuit 3 and the single chip signal recognition circuit 5.

[0048] Schmidt inverter IC1, Schmidt inverter IC2, Schmidt inverter IC3 and Schmidt inverter IC4 may be integrated together or may be used as independent chips.

[0049] The Schmidt inverting output filter circuit 2 can shape and filter the signal output by the key action and the RC filter circuit to make the waveform voltage more stable.

[0050] In this embodiment, the OR gate chips of the OR gate circuit 3 include: an OR gate chip IC5, an OR gate chip IC6 and an OR gate chip IC7.

[0051] The input end of the OR gate chip IC5 is connected to the output end of the Schmidt inverter IC1 and the output end of the Schmidt inverter IC2; and the output end is connected to the input end of the OR gate chip IC7.

[0052] The input end of the OR gate chip IC6 is connected to the output end of the Schmidt inverter IC3 and the output end of the Schmidt inverter IC4; the output end is connected to the input end of the OR gate chip IC7.

[0053] The input end of the OR gate chip IC7 is connected to the output end of the OR gate chip IC5 and the output end of the OR gate chip IC6; the output end is connected to the monostable trigger circuit 4.

[0054] OR gate chip IC5, OR gate chip IC6 and OR gate chip IC7 can be integrated together or used as independent chips.

[0055] If a key is pressed, the level at the output end of the OR gate circuit changes from low to high, generating a rising edge signal and sending it to the monostable trigger circuit 4.

[0056] In this embodiment, the monostable trigger circuit 4 includes: a monostable trigger chip IC8, a pulse width adjustment resistor R1 and a capacitor C5.

[0057] Pin 1 of the monostable trigger chip IC8 is grounded and is also connected to one end of the capacitor C5;

[0058] The other end of the capacitor C5 is connected to the pin 2 of the monostable trigger chip IC8, and is also connected to one end of the pulse width adjustment resistor R1;

[0059] Pin 16 of the monostable trigger chip IC8 is connected to power and is also connected to the other end of the pulse width adjustment resistor R1;

[0060] Pin 4 of the monostable trigger chip IC8 is connected to the output end of the OR gate chip IC7;

[0061] Pin 8 of the monostable trigger chip IC8 is grounded;

[0062] Pin 7 of the monostable trigger chip IC8 is connected to the single chip microcomputer signal recognition circuit 5 .

[0063] When receiving a rising edge signal, the monostable trigger circuit 4 outputs a waveform with a certain positive pulse width and sends it to the single chip microcomputer signal recognition circuit 5 .

[0064] In this embodiment, the single chip computer signal recognition circuit 5 includes: a single chip computer signal recognition module circuit U1.

[0065] The single chip signal recognition module circuit 5 is connected to the pin 7 of the monostable trigger chip IC8, the output end of the Schmidt inverter IC1, the output end of the Schmidt inverter IC2, the output end of the Schmidt inverter IC3 and the output end of the Schmidt inverter IC4.

[0066] The single-chip signal recognition circuit 5 performs recognition. If it recognizes the pulse width length set by itself, it is considered that a key action has been performed. At this time, the output signal level of the Schmitt inverter corresponding to each key is read. If the corresponding signal is a high level, it can be identified which specific key is pressed; if it is identified as a low level, it is considered that no key is pressed.

[0067] The circuit composition in this embodiment only reflects the recognition of 4 keys. In actual application, similar circuits can be deleted or added according to the number of keys.

[0068] Embodiment 2:

[0069] The utility model is described in detail below:

[0070] After the food heating device is working, when any button is activated, the positive electrode signal of the diode next to the corresponding button will be pulled low. For example, when the button S1 is pressed, the positive electrode level of the clamping diode V2 is pulled low. Then the low-level signal is passed through a filter resistor and a filter capacitor, such as a filter resistor R6 and a filter capacitor C1, for high-frequency filtering, and then input to the Schmidt inverter.

[0071] The button that is not pressed corresponds to the positive electrode of the clamping diode next to it. Since the pull-up resistor is connected to VCC, it maintains a high level. For example, if the button S2 is not pressed, the positive electrode level of the clamping diode V3 remains high, and then passes through the filter resistor and filter capacitor, such as the filter resistor R7 and the filter capacitor C2 for high-frequency filtering, and then is input to the Schmidt inverter;

[0072] The key signal after RC filtering is input to the Schmitt inverter, and its logical relationship is: if the input is high level, the output is low level, and if the input is low level, the output is high level. If a key is pressed and the input is low level, the output signal of the Schmitt inverter becomes high level. If no key is pressed and the input is high level, the output signal of the Schmitt inverter remains low level. For example, when key S1 is pressed, the output signal IN1 of Schmitt inverter IC1 becomes high level; when key S2 is not pressed, the output signal IN2 of Schmitt inverter IC2 remains low level. In this process, the Schmitt inverter filters the input signal again and outputs a very stable signal to the OR gate circuit.

[0073] After shaping and filtering, the key signal is input to the 2-input OR gate circuit. The logical relationship of the OR gate circuit is: if any one of the inputs has a high level, the output is high, otherwise the output is low. If any key is pressed, the signal input to the OR gate circuit has a high level, then after the OR gate circuit performs a level OR operation, the level of the 6th pin of the OR gate chip IC7 changes from low to high output, generating a rising edge pulse; if all keys are not pressed, the input signals are all low, then after the OR gate circuit performs a level OR operation, the 6th pin of the OR gate chip IC7 maintains a low level, and then the 6th pin signal of the OR gate chip IC7 is input to the monostable trigger circuit.

[0074] The key signal output by the OR gate circuit enters the monostable trigger of the monostable trigger circuit. If any key is pressed, a rising edge pulse is generated by the 6th pin of the OR gate chip IC7, causing the 7th pin of the monostable trigger chip IC8 to output a high-level fixed pulse, and the pulse length is determined by the parameters of the pulse width adjustment resistor R1 and the capacitor C5; if no key is pressed, the 6th pin of the OR gate chip IC7 always outputs a low level, and then the monostable trigger chip IC8 will maintain a low level at its 7th pin because there is no rising edge signal input.

[0075] The output signal KG_INT of the monostable trigger chip IC8 enters the 5th pin of the single-chip signal recognition module circuit U1. If a key is pressed, the output signal KG_INT of the monostable trigger chip IC8 is a signal with a certain pulse width. After being recognized by the 5th pin, it is considered that a key is pressed. At this time, the 1st, 2nd, 3rd, and 4th pins of the single-chip computer read the signals IN1, TN2, TN3, and IN4 output by the Schmidt inverter IC1, Schmidt inverter IC2, Schmidt inverter IC3, and Schmidt inverter IC4 of the Schmidt inverter circuit respectively; according to the high and low levels of the IN1, TN2, TN3, and IN4 signals, it can be determined which specific key is pressed. Obviously, at this time, if the IIN1, TN2, TN3, and IN4 signals are high, the corresponding key is pressed, and if they are low, the corresponding key is not pressed. If no key is pressed, the IN1, TN2, TN3, and IN4 signals are all low. The output signal KG_INT of the steady-state trigger chip IC8 is always low, so the microcontroller will recognize that the key is not pressed.

[0076] Through the above signal filtering and processing process, the key action can be identified more accurately.

[0077] The above are merely embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are included in the scope of the claims of the present invention to be approved.

Claims

1. An anti-interference key detection circuit, characterized in that: include: The key action and RC filter circuit, Schmidt inverting output filter circuit, OR gate circuit, monostable trigger circuit and single chip signal recognition circuit are connected in sequence; The Schmidt inverting output filter circuit is connected to the single chip microcomputer signal recognition circuit.

2. The anti-interference key detection circuit according to claim 1, characterized in that: The key action and RC filter circuit include: a plurality of keys and a plurality of RC filter circuits; One end of the button is grounded, and the other end is connected to the RC filter circuit.

3. The anti-interference key detection circuit according to claim 2, characterized in that: The RC filter circuit includes: a clamping diode, a pull-up resistor, a filter resistor and a filter capacitor; The cathode of the clamping diode is connected to the button; The positive electrode of the clamping diode is connected to one end of the pull-up resistor and one end of the filter resistor respectively; The other end of the pull-up resistor is connected to one end of the filter capacitor; The other end of the filter resistor is connected to the other end of the filter capacitor and is also connected to the Schmidt inverting output filter circuit.

4. The anti-interference key detection circuit according to claim 3, characterized in that: The Schmidt inverting output filter circuit comprises: a plurality of Schmidt inverters; The input end of the Schmitt inverter is connected to the RC filter circuit; The output end of the Schmidt inverter is connected to the OR gate circuit and the single chip microcomputer signal recognition circuit.

5. The anti-interference key detection circuit according to claim 4, characterized in that: The OR gate circuit comprises: a plurality of OR gate chips; The two input terminals of the OR gate chip are respectively connected to the output terminals of two different Schmitt inverters; The output end of the OR gate chip is connected to the monostable trigger circuit.

6. The anti-interference key detection circuit according to claim 5, characterized in that: The monostable trigger circuit comprises: a monostable trigger chip, a pulse width adjustment resistor and a capacitor; Pin 1 of the monostable trigger chip is grounded and also connected to one end of the capacitor; The other end of the capacitor is connected to pin 2 of the monostable trigger chip and is also connected to one end of the pulse width adjustment resistor; Pin 16 of the monostable trigger chip is connected to electricity and is also connected to the other end of the pulse width adjustment resistor; Pin 4 of the monostable trigger chip is connected to the output end of the OR gate chip; Pin 8 of the monostable trigger chip is grounded; Pin 7 of the monostable trigger chip is connected to the single-chip microcomputer signal recognition circuit.

7. The anti-interference key detection circuit according to claim 6, characterized in that: The single-chip signal recognition circuit comprises: a single-chip; The single chip microcomputer is connected to the pin 7 of the monostable trigger chip and the output end of the Schmitt inverter.

8. The anti-interference key detection circuit according to claim 4, characterized in that: The multiple Schmitt inverters are implemented in an integrated chip or an independent chip.

9. The anti-interference key detection circuit according to claim 5, characterized in that: The multiple OR gate chips are integrated chips or independent chips.