CN-122026888-A - High-precision anti-interference key input circuit
Abstract
The embodiment of the invention discloses a high-precision anti-interference key input circuit, which realizes the combination of hardware jitter elimination and software jitter elimination through a key detection circuit, a signal conditioning circuit, a power management circuit and a main control circuit, suppresses key jitter in the hardware circuit by means of resistance current limiting, diode protection, capacitance filtering and the like, prevents signal interference, ensures the stability and reliability of output signals, reduces the jitter elimination burden of micro control unit software, supports multi-key input, realizes multi-key simultaneous detection or path-by-path scanning detection through shunt processing, meets the requirement of complex input scenes, connects a diode in series in a signal transmission path, prevents reverse voltage from damaging a circuit, improves the anti-interference capability, connects a capacitor in parallel with a key node, filters high-frequency interference such as key jitter, power noise and the like, ensures the purity of signals, and improves the accuracy of case input identification.
Inventors
- ZHOU SHILONG
- GONG YING
Assignees
- 康卓电子(无锡)有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251230
Claims (5)
- 1. The high-precision anti-interference key input circuit is characterized by comprising a key detection circuit, a signal conditioning circuit, a power management circuit and a main control circuit, wherein the output end of the key detection circuit is connected with the input end of the signal conditioning circuit and used for converting on-off of a mechanical contact into a stable level signal, the signal conditioning circuit is connected with the power management circuit and used for realizing voltage following, level conversion and signal amplification by using an operational amplifier and adapting the key signal to a level identifiable by the main control circuit, the power management circuit is connected with the main control circuit and used for providing a stable power supply for the circuit and realizing on-off control of the power supply, and the main control circuit is used for converting mechanical key operation into a digital signal identifiable by a micro control unit.
- 2. The high-precision anti-interference key input circuit of claim 1, comprising diodes D1-D4, resistors R1-R17, capacitors C1-C4, a triode Q1 and an operational amplifier U1B, wherein the anode of the diode D1 is connected with the key input end, the cathode of the diode D1 is connected with one end of the resistor R1, one end of the resistor R3-R8 and one end of the resistor R15-R16, the other end of the resistor R3-R8 is connected with the ground GND after being connected, the other end of the resistor R8 is connected with one end of the resistor R9, the other end of the resistor R9 is connected with one end of the resistor R10, one end of the capacitor C3 and one end of the resistor R11 are connected with the same-direction input end of the operational amplifier U1B, the other end of the resistor R15 is connected with the cathode of the diode D3 and the base of the triode Q1, the collector of the triode Q1 is connected with the other end of the resistor R16, and the emitter of the triode Q1 is connected with the output end of the operational amplifier U1B after being connected with the resistor R17 in series.
- 3. The high-precision anti-interference key input circuit according to claim 2, further comprising diodes D5-D6, resistors R18-R33, capacitors C5-C8 and transistors Q2-Q5, wherein the diode D6 is connected to one end of a resistor R24, a collector of a transistor Q2, one end of a resistor R23, the other end of the resistor R24 is grounded GND, the other end of the resistor R23 is connected to the key input end, a base of the transistor Q2 is connected to one end of the resistor R22, one end of the resistor R21, the other end of the resistor R21 is connected to one end of the resistor R20, a collector of the transistor Q3 is connected to the ground, an emitter of the transistor Q3 is connected to one end of the resistor R25, the other end of the resistor R25 is connected to one end of the resistor R26, one end of the resistor C18, one end of the resistor C5 is connected to one end of the resistor R19, one end of the resistor R26 is connected to the other end of the resistor R23, the other end of the resistor C5 is grounded, the other end of the resistor R26 is connected to the ground GND, the other end of the resistor R26 is connected to the other end of the resistor Q4, the base of the resistor Q4 is connected to the GND 4, one end of the resistor R22 is connected to the other end of the resistor R27, the other end of the resistor R31 is connected to the other end of the resistor R3 is connected to the other end of the resistor C30, the resistor C31 is connected to the other end of the resistor C30, the resistor C7 is connected to the other end of the resistor C30, the other end of the resistor is connected to the resistor, the other end of the resistor is connected to the other end, and the resistor is connected to the other end 3, and the other end 3.
- 4. The high-precision anti-interference key input circuit according to claim 3, wherein the triodes Q1, Q3 and Q4 are PNP triodes.
- 5. The high-precision anti-interference key input circuit according to any one of claims 2 to 4, wherein the triode Q2 and the triode Q5 are NPN type triodes.
Description
High-precision anti-interference key input circuit Technical Field The embodiment of the invention relates to the technical field of electronic circuits, in particular to a high-precision anti-interference key input circuit. Background A traditional mechanical/film keyboard is easy to be interfered in a complex electromagnetic environment, so that false triggering and missed triggering is caused to , and the key problem is that firstly, signal noise is sensitive , a key scanning signal is easy to be interfered by power supply ripples, space radiation and the like, particularly in an industrial control scene, peak interference of a switching power supply can be coupled to a signal wire, secondly, mechanical jitter delay , mechanical contact bounce time reaches 5-20 ms, extra jitter elimination circuit or software delay is needed, response speed is influenced, thirdly, industrial control is needed to work stably under-40-85 ℃ and strong electromagnetic interference (such as beside a frequency converter), and a common keyboard circuit cannot meet , fourthly, medical equipment , key response delay is required to be less than 1ms and no missing report, and a traditional scheme is difficult to reach standards. The existing key input circuit has a large evolution space, the combination effect of hardware and software debouncing is poor, the parallel processing efficiency is low for the requirement of multi-key input, the application scene is limited, and the electromagnetic compatibility, the signal stability and the environmental adaptability are all in need of improvement. Disclosure of Invention In order to solve the related technical problems, the invention provides a high-precision anti-interference key input circuit which solves the problems mentioned in the background art section. In order to achieve the above purpose, the embodiment of the present invention adopts the following technical scheme: The invention provides a high-precision anti-interference key input circuit which comprises a key detection circuit, a signal conditioning circuit, a power management circuit and a main control circuit, wherein the output end of the key detection circuit is connected with the input end of the signal conditioning circuit and used for converting the on-off of a mechanical contact into a stable level signal, the signal conditioning circuit is connected with the power management circuit and used for realizing voltage following, level conversion and signal amplification by using an operational amplifier and adapting the key signal to the level identifiable by the main control circuit, the power management circuit is connected with the main control circuit and used for providing a stable power supply for the circuit and realizing on-off control of the power supply, and the main control circuit is used for converting the mechanical key operation into a digital signal identifiable by a micro control unit. As an optional implementation manner, the high-precision anti-interference key input circuit comprises diodes D1-D4, resistors R1-R17, capacitors C1-C4, a triode Q1 and an operational amplifier U1B, wherein the positive electrode of the diode D1 is connected with the key input end, the negative electrode of the diode D1 is connected with one end of the resistor R1, one end of the resistor R3-R8 and one end of the resistor R15-R16, the other end of the resistor R3-R8 is connected with the ground GND after being connected, the other end of the resistor R8 is connected with one end of the resistor R9, the other end of the resistor R9 is connected with one end of the resistor R10, one end of the capacitor C3 and one end of the resistor R11 are connected with the homodromous input end of the operational amplifier U1B, the other end of the resistor R15 is connected with the negative electrode of the diode D3 and the base electrode of the triode Q1, the collector of the triode Q1 is connected with the other end of the resistor R16, and the emitter of the triode Q1 is connected with the output end of the operational amplifier U1B after being connected in series. As an alternative implementation manner, the high-precision anti-interference key input circuit further comprises diodes D5-D6, resistors R18-R33, capacitors C5-C8 and triodes Q2-Q5; the diode D6 is connected to one end of the resistor R24, the collector of the triode Q2, one end of the resistor R23, the other end of the resistor R24 is grounded GND, the other end of the resistor R23 is connected to the key input end, the base of the triode Q2 is connected to one end of the resistor R22, one end of the resistor R21 is connected to one end of the resistor R20, the collector of the triode Q3, the emitter of the triode Q3 is grounded, the base of the triode Q2 is connected to one end of the resistor R25, the other end of the resistor R25 is connected to one end of the resistor R26, one end of the resistor R18, one end of the capacitor C5, one end of the resistor R19