Wide voltage input push button switch debounce circuit

By designing a wide voltage input button switch debounce circuit using comparator, resistor and capacitor, the problem of high voltage input button switch jitter is solved, stable high and low level output is achieved, and anti-interference ability is enhanced, and it is suitable for mass production.

CN222706496UActive Publication Date: 2025-04-01QINGDAO HAOJIANG ELECTRONIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202420853350.1
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-04-23
Publication Date
2025-04-01
Estimated Expiration
2034-04-23

AI Technical Summary

Technical Problem

It is difficult to directly connect to the high-voltage input button switch of the microcontroller control port in the prior art, resulting in mechanical contact jitter affecting the acquisition and processing of the subsequent circuit.

Method used

A wide voltage input button switch debounce circuit is designed, consisting of comparator U6A, resistor and capacitor, setting a 1/2VCC voltage comparison reference, and combining an RC filter circuit to achieve stable high and low level output.

Benefits of technology

It effectively removes the jitter of the button switch, generates stable high and low level signals, has strong anti-interference ability, stable and reliable circuit, low cost, and is suitable for mass production of products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN222706496U_ABST
    Figure CN222706496U_ABST
Patent Text Reader

Abstract

The utility model relates to a wide voltage input key switch de-jitter circuit, which includes a double-pole key switch KEY, a comparator U6A, a resistor R1, a resistor R2, a resistor R3, a resistor R4, a resistor R5, a capacitor C1, a capacitor C2 and a capacitor C3; one end of the resistor R1 is connected to VCC, one end of the resistor R2 is connected to GND, the other end of the resistor R1 and the other end of the resistor R2 are commonly connected to the 2nd pin of the comparator U6A; one end of the resistor R3 is respectively connected to the 3rd pin of the comparator U6A, the capacitor C3 and the double-pole key switch KEY, and the other end of the resistor R3 is connected to the voltage VCC; the 4th pin of the comparator U6A is grounded; the 1st pin of the comparator U6A is used to connect the corresponding port of the comparator MCU. The utility model has reasonable design, compact structure and convenient use.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model relates to a de-jitter circuit for a wide voltage input key switch. Background Art

[0002] Some key switches have an indicator light inside and require DC24V or DC12V power supply. The control port of the microcontroller is generally 5V or 3V3 and cannot be directly connected to the system. The switch used for the common key is a mechanical switch. When the mechanical contact is disconnected or closed, due to the elastic effect of the mechanical contact, a key switch will not be immediately and stably connected when closed, nor will it be disconnected all at once when disconnected. Therefore, there is a series of jitters at the moment of closing and disconnecting. Affecting the collection, judgment and processing of the subsequent circuit.

[0003] Current key de-jitter measures: 1. Software de-jitter method, which is to delay for a period of time and continuously perform port level detection. The disadvantage is that it increases the resources of the post-processor and the workload of the program. 2. Hardware de-jitter processing method, which uses delay circuits, triggers, etc., has more devices and more complex circuits.

[0004] Some key switches have indicator lights inside and require power supply of DC12V or DC24V, while the control port of the microcontroller is generally 5V or 3V3 and cannot be directly connected to the system. The utility model circuit can realize level conversion to solve this problem. Utility Model Content

[0005] The technical problem to be solved by the utility model is generally to provide a wide voltage input key switch de-jitter circuit.

[0006] In order to solve the above problems, the technical solution adopted by the utility model is:

[0007] A wide voltage input key switch debounce circuit, comprising a double-pole key switch KEY, a comparator U6A, a resistor R1, a resistor R2, a resistor R3, a resistor R4, a resistor R5, a capacitor C1, a capacitor C2 and a capacitor C3;

[0008] One end of resistor R1 is connected to VCC.

[0009] One end of the resistor R2 is connected to GND, and the other end of the resistor R1 and the other end of the resistor R2 are connected to pin 2 of the comparator U6A;

[0010] One end of the resistor R3 is connected to the 3rd pin of the comparator U6A, the capacitor C3 and the double-pole key switch KEY respectively, and the other end of the resistor R3 is connected to the voltage VCC;

[0011] Pin 4 of comparator U6A is grounded;

[0012] Pin 1 of comparator U6A is used to connect to the corresponding port of the comparator MCU.

[0013] As a further improvement of the above technical solution:

[0014] Resistors R1 and R2 are used for voltage division.

[0015] The resistor R1 is the same as the resistor R2, and the reference voltage is 1 / 2VCC.

[0016] Resistor R3 is the pull-up resistor of the key input port.

[0017] The push button switch KEY is a double-blade button.

[0018] Pin 1 of comparator U6A is connected to the comparator MCU 3V3 terminal through resistor R4 and to the comparator MCU I / O terminal through resistor R5;

[0019] The output end of resistor R5 is grounded through capacitor C2;

[0020] Resistor R4 is the pull-up resistor of the comparator MCU output port;

[0021] The resistor R5 and the capacitor C2, which are current limiting resistors, form an RC filter circuit;

[0022] Capacitor C1 filters the power supply of the comparator MCU 3V3 terminal, and capacitor C3 is the filter capacitor of the key input port.

[0023] Pin 8 of the comparator U6A is connected to VCC and grounded through capacitor C1.

[0024] The utility model provides a push button switch de-jitter circuit, which is composed of a comparator, a resistor and a capacitor, and sets a 1 / 2VCC voltage comparison reference, that is, a threshold voltage. Capacitors and RC filters are added. When the switch pins 1 and 2 are connected, a stable high level without jitter is output; when the switch pins 1 and 3 are connected, a stable low level without jitter is output; the material used is relatively small, the high and low levels generated are stable, the anti-interference ability is strong, the stability and reliability are low in cost, and it is suitable for mass production of products.

[0025] The utility model has the advantages of reasonable design, low cost, firmness and durability, safety and reliability, simple operation, time-saving, labor-saving, money-saving, compact structure and convenient use. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a schematic diagram of the ground circuit structure of the utility model. DETAILED DESCRIPTION

[0027] like Figure 1As shown, the wide voltage input key switch de-jitter circuit of this embodiment includes a double-pole key switch KEY, a comparator U6A, a resistor R1, a resistor R2, a resistor R3, a resistor R4, a resistor R5 and a capacitor C1, a capacitor C2, and a capacitor C3; one end of the resistor R1 is connected to VCC, one end of the resistor R2 is connected to GND, and the other end is connected to the other end of the resistor R2, and is connected to the 2nd pin of U6A at the same time. The voltage division of the two resistors R1 and R2 is used as the reference voltage. Here, R1 and R2 have equal values, and the reference voltage is 1 / 2VCC. Resistor R3 is a pull-up resistor for the key input port, connected to the key input port, and connected to the 3rd pin of U6A at the same time. Resistor R4 is a pull-up resistor for the comparator output port, because the output end of the comparator is an open-drain output, and an external pull-up resistor needs to be added. Resistor R5 current limiting resistor and capacitor C2 form an RC filter circuit. Capacitor C1 filters the comparator power supply, and capacitor C3 is a filter capacitor for the key input port.

[0028] When the button pins 2 and 1 are connected, the voltage of the U6A comparator pin 3 is VCC, which is greater than the reference voltage of pin 2 1 / 2VCC voltage, and the comparator outputs a high level. When the button pins 3 and 1 are connected, the voltage of the U6A comparator pin 3 is GND, which is less than the reference voltage of pin 2 1 / 2VCC voltage, and the comparator outputs a low level. Setting the reference voltage is equivalent to setting a safety threshold, making the circuit more stable and the output safer.

[0029] When switch pins 2 and 1 are connected, the level of U6A comparator pin 3 is VCC, which is greater than the threshold voltage 1 / 2VCC, and the comparator outputs a stable high level; when switch pins 3 and 1 are connected, the level of U6A comparator pin 3 is GND, which is less than the threshold voltage 1 / 2VCC, and the comparator outputs a stable low level;

[0030] Adding a threshold voltage can effectively filter out the glitch signal generated by jitter. C3 is placed at the switch input pin to effectively filter out the glitch signal generated by a certain jitter. Resistor R5 and capacitor C2 form an RC filter circuit to eliminate the glitch signal generated by jitter.

[0031] The utility model uses a small number of components and has a three-stage de-jitter filtering circuit design. The high and low levels generated are stable, support wide voltage signal input, have strong anti-interference ability, and a stable and reliable circuit, thus overcoming the current shortcoming of key switch jitter. The production process is simple, the material used is small and the cost is low, so it is suitable for multiple environment applications and is convenient for mass production.

[0032] The present invention is fully described for a clearer disclosure, and the prior art will not be listed one by one.

[0033] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the utility model, rather than to limit it; although the utility model is described in detail with reference to the above embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the above embodiments, or replace some of the technical features therein with equivalents; it is obvious for those skilled in the art to combine multiple technical solutions of the utility model. However, these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the utility model.

Claims

1. A wide voltage input key switch debounce circuit, characterized in that: It includes a double-pole key switch KEY, a comparator U6A, a resistor R1, a resistor R2, a resistor R3, a resistor R4, a resistor R5, a capacitor C1, a capacitor C2 and a capacitor C3; One end of resistor R1 is connected to VCC. One end of the resistor R2 is connected to GND, and the other end of the resistor R1 and the other end of the resistor R2 are connected to pin 2 of the comparator U6A; One end of the resistor R3 is connected to the 3rd pin of the comparator U6A, the capacitor C3 and the double-pole key switch KEY respectively, and the other end of the resistor R3 is connected to the voltage VCC; Pin 4 of comparator U6A is grounded; Pin 1 of comparator U6A is used to connect to the corresponding port of the comparator MCU.

2. The wide voltage input key switch debounce circuit according to claim 1, characterized in that: Resistors R1 and R2 are used for voltage division.

3. The wide voltage input key switch debounce circuit according to claim 2, characterized in that: Resistor R1 is the same as resistor R2, and the reference voltage is 1 / 2 VCC.

4. The wide voltage input key switch debounce circuit according to claim 3, characterized in that: Resistor R3 is the pull-up resistor of the key input port.

5. The wide voltage input key switch debounce circuit according to claim 3, characterized in that: The push button switch KEY is a double-blade button.

6. The wide voltage input key switch debounce circuit according to claim 3, characterized in that: Pin 1 of comparator U6A is connected to the comparator MCU 3V3 terminal through resistor R4 and to the comparator MCU I / O terminal through resistor R5; The output end of resistor R5 is grounded through capacitor C2; Resistor R4 is the pull-up resistor of the comparator MCU output port; The resistor R5 and the capacitor C2, which are current limiting resistors, form an RC filter circuit; Capacitor C1 filters the power supply of the comparator MCU 3V3 terminal, and capacitor C3 is the filter capacitor of the key input port.

7. The wide voltage input key switch debounce circuit according to claim 3, characterized in that: Pin 8 of the comparator U6A is connected to VCC and grounded through capacitor C1.