A key circuit detection device
By introducing a single ADC module and multiple voltage divider paths into the button circuit detection device, combined with the main control module judgment unit and alarm module, the problems of low efficiency and high cost in the existing button circuit detection technology are solved, and efficient and accurate button circuit detection is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- BOSEN ELECTRONICS (DONGGUAN) CO LTD
- Filing Date
- 2025-05-09
- Publication Date
- 2026-06-26
AI Technical Summary
Existing button circuit detection devices require a large number of main control module ports, making it difficult to detect electrical characteristics and identify voltage deviation issues, resulting in low detection efficiency and high cost.
By employing a single ADC module and multiple voltage divider paths, the detection of the button circuit is achieved by judging the matching degree between the output voltage data of the button circuit and the standard voltage data, and by using the main control module's judgment unit and alarm module. This reduces the port usage of the main control module and improves the detection accuracy.
It significantly reduces the port usage and hardware cost of the main control module, improves detection efficiency and accuracy, and enables efficient differentiation and fault alarm of multi-button circuits.
Smart Images

Figure CN224416982U_ABST
Abstract
Description
Technical Field
[0001] This utility model belongs to the field of testing equipment technology, and specifically relates to a button circuit testing device. Background Technology
[0002] In various fields such as smart terminals, industrial control boards, and consumer electronics, physical buttons remain one of the fundamental human-computer interaction methods. However, during the manufacturing process, due to soldering issues, the reliability of button circuits often decreases, leading to defects such as unresponsive buttons and misidentification (mistakenly identifying buttons as other keys). Therefore, performing electrical consistency testing on the button circuit boards before product shipment can effectively eliminate circuits with deviations.
[0003] Currently, the widely used testing methods are mainly based on independent GPIO or switch matrix continuity testing schemes. The working principle is to connect each button in the circuit under test to a separate main control module GPIO, and confirm whether the button is pressed through software polling or interrupts. However, this technical solution requires a large number of main control module ports, makes it difficult to detect the actual voltage divider level, can only determine "continuity," and cannot identify electrical characteristics (such as resistance error); moreover, it cannot confirm voltage offset issues under a voltage divider structure.
[0004] Therefore, there is an urgent need to improve the existing key circuit detection device to address the aforementioned technical deficiencies. Utility Model Content
[0005] The purpose of this invention is to address the shortcomings of existing technologies by providing a device that can detect button circuits using a single ADC module, thereby reducing voltage deviation during the detection process.
[0006] To achieve the above objectives, this application implements the following technical solution:
[0007] A key circuit detection device includes at least one ADC module and a main control module electrically connected to the ADC module, the main control module being electrically connected to an alarm module;
[0008] The ADC module is equipped with multiple voltage divider paths. These paths are used to connect to the buttons of the circuit under test and output the corresponding button's output voltage data to the main control module. The voltage divider paths are configured to correspond to the button positions of the circuit.
[0009] The main control module is equipped with a storage unit and a judgment unit connected to the storage unit. The storage unit stores the standard voltage data of each key in the standard key circuit and the corresponding voltage divider path. The judgment unit is used to determine whether the output voltage data of the key circuit under test under the same key position matches the standard voltage data of the key circuit.
[0010] When the output voltage data does not match the standard voltage data, the judgment unit drives the alarm module to sound an alarm.
[0011] The above technical solution produces the following technical effects:
[0012] The button circuit detection device of this application not only significantly reduces the port occupation and hardware cost of the main control module, but also realizes the differentiation of buttons in different button circuits by setting multiple voltage divider paths in the ADC module. This enables a single ADC module to detect different key positions in multi-button circuits, thereby improving detection efficiency.
[0013] As a further improvement to the button circuit detection device of this application, each voltage divider path is connected to a voltage divider resistor with a different resistance value, and each voltage divider path is connected to one end of a first pull-up resistor, the other end of which is connected to a power supply.
[0014] As a further improvement to the button circuit detection device of this application, the resistance of the voltage divider resistor is 4.7kΩ.
[0015] As a further improvement to the button circuit detection device of this application, the resistance value of the voltage divider resistor satisfies any resistance value in the range of 800Ω-20kΩ.
[0016] As a further improvement to the button circuit detection device of this application, the ADC module is provided with at least one filter resistor, the resistance of which is 100nF or 4.7μF.
[0017] As a further improvement to the button circuit detection device of this application, the output terminal of the ADC module is provided with an isolation resistor, and the output terminal is electrically connected to the main control module.
[0018] As a further improvement to the button circuit detection device of this application, the ADC module is provided with two ADC modules.
[0019] As a further improvement to the button circuit detection device of this application, the storage unit and the judgment unit are connected through the IIC interface, the data terminal of the storage unit is connected to one end of the second pull-up resistor, and the other end of the second pull-up resistor is connected to the power supply.
[0020] As a further improvement to the button circuit detection device of this application, the main control module is provided with an ADC conversion unit, which converts the output voltage data into an ADC value and outputs the ADC value to the judgment unit.
[0021] As a further improvement to the button circuit detection device of this application, the alarm module is an LED buzzer. Attached Figure Description
[0022] The accompanying drawings, which are included to provide a further understanding of the present invention and constitute a part of this invention, illustrate exemplary embodiments of the present invention and are used to explain the present invention, but do not constitute an undue limitation of the present invention. In the drawings:
[0023] Figure 1 This is a schematic diagram of the structure of Embodiment 1 of this utility model;
[0024] Figure 2 This is one of the circuit diagrams of the ADC module in Embodiment 2 of this utility model;
[0025] Figure 3 This is a circuit diagram of the button circuit in Embodiment 2 of this utility model;
[0026] Figure 4 This is the second circuit diagram of the ADC module in Embodiment 2 of this utility model;
[0027] Figure 5 This is a circuit diagram of the storage module in Embodiment 3 of this utility model;
[0028] Figure 6 This is a circuit diagram of the main control module in Embodiment 3 of this utility model;
[0029] in:
[0030] 1-ADC module;
[0031] 2-Main control module;
[0032] 21-Storage unit;
[0033] 22-Judgment Unit;
[0034] 23-ADC conversion unit;
[0035] 3-Alarm module; Detailed Implementation
[0036] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terminology used in the specification of this application is for the purpose of describing specific embodiments only and is not intended to limit this application.
[0037] In the description of this utility model, unless otherwise explicitly specified and limited, the terms "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this utility model based on the specific circumstances.
[0038] Although this application discloses preferred embodiments as described above, it is not intended to limit the claims. Any person skilled in the art can make several possible changes and modifications without departing from the concept of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.
[0039] It is known that, in order to achieve large-scale button circuit detection, traditional solutions require at least one GPIO port of the main control module 2 (specifically, various types of MCUs) for each button. This technical solution works by outputting high and low level signals to the button circuit under test via the GPIO port, and then reading the level state of the GPIO port to determine whether the button is pressed. However, with the increasing number of buttons in electronic devices such as smart terminals and industrial control boards, the required number of GPIO ports of the main control module 2 also increases. This not only increases hardware costs but also makes the circuit layout more complex.
[0040] Having recognized the shortcomings of the aforementioned technical solutions, this application envisions converging N buttons onto the same ADC channel. This would save a significant number of GPIO ports when the number of buttons is ≥5, freeing up more peripheral interfaces for the main control module 2. Based on this, this application improves upon existing button circuit detection devices.
[0041] The present invention will be further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.
[0042] Implementation Method 1
[0043] like Figure 1 As shown, in order to address the technical deficiencies of existing button circuit detection devices, this application makes improvements to existing button circuit detection devices. Specifically, the button circuit detection device provided by this utility model achieves effective detection of large-scale button circuits by employing at least one ADC module 1 and a main control module 2 electrically connected to the ADC module 1.
[0044] Furthermore, ADC module 1 is responsible for collecting the output voltage data corresponding to each button in the circuit under test. Main control module 2 drives judgment unit 22 to make judgments based on the standard voltage data stored in the storage module. When the output voltage data of the button in the circuit under test does not match the standard voltage data, alarm module 3 is triggered to sound an alarm. This detection method not only significantly reduces the GPIO port usage of main control module 2, lowering hardware costs, but also improves the accuracy and efficiency of detection.
[0045] Furthermore, the voltage divider path generates a specific voltage after each button is pressed, providing a distinguishable electrical characteristic. The principle is based on the fact that each voltage divider path is connected to a voltage divider resistor with a different resistance value. Therefore, when a button in the circuit under test is pressed, the voltage divider path corresponding to the button position in the circuit under test outputs the corresponding output voltage data.
[0046] Implementation Method 2
[0047] like Figures 1-4 As shown, to further illustrate the circuit structure of the ADC module 1 of this application, in a specific implementation, one of the manifestations of the ADC module 1 of this application is as follows: Figure 2 As shown. In the Figure 2 In the above, the U9 interface (the interface terminal in ADC module 1) is a connector that connects to each button in the button circuit. Furthermore, due to the aforementioned... Figure 2 In this application, a seven-key standard button circuit is selected as the reference button circuit. Therefore, the ADC module 1 of this application is connected to the seven button matching interfaces (selection 2-selection 8) in a "common ground" manner to a voltage divider network composed of multiple voltage divider paths.
[0048] Furthermore, when the button in the standard button circuit is closed, it forms a unique resistive path with the voltage divider path of ADC module 1. C15 (100nF) and C18 (4.7μF) are capacitors used to decouple the power supply voltage and filter out possible high-frequency noise, ensuring the stability of the input and output of ADC module 1. In addition, the aforementioned capacitors (for decoupling) help improve the accuracy of the ADC signal and reduce the impact of power supply noise on sampling accuracy. Furthermore, the output terminal of ADC module 1 is equipped with an isolation resistor and is electrically connected to the main control module 2.
[0049] The isolation resistor R71 and capacitor C18 (4.7μF) are used to suppress high-frequency noise and prevent ADC sampling glitches. Furthermore, when the clamping diode inside the main control module 2 is turned on or when the sampling and holding capacitor of the ADC module 1 is reverse-sinking, the 1kΩ isolation resistor R71 limits transient current and protects the associated pins.
[0050] Specifically, the standard button circuit that matches the aforementioned ADC module 1 is as follows: Figure 3As shown. In the Figure 3 In a standard keypad, there are 7 keys. In the current technology, it is not possible to distinguish the key positions by using only one ADC to collect the signal. It is necessary to divide the voltage to the corresponding pin through resistors and use the signal collected by ADC module 1 to determine which key was pressed.
[0051] Furthermore, all voltage divider paths are connected to one end of the first pull-up resistor, the other end of which is connected to the power supply. The resistance of the voltage divider resistor is 4.7kΩ. Figure 2 As shown in the figure, this application mentions that each voltage divider path is equipped with a resistor of a different value. Although no resistor is set on the voltage divider path corresponding to interface 2, it is essentially equivalent to setting a 0Ω resistor in that voltage divider path. R76 corresponds to the resistor in ADC module 12 for interface 3; R80 corresponds to the resistor in ADC module 12 for interface 4; R75 corresponds to the resistor in ADC module 12 for interface 5; R74 corresponds to the resistor in ADC module 12 for interface 6; R72 corresponds to the resistor in ADC module 12 for interface 7; and R73 corresponds to the resistor in ADC module 12 for interface 8.
[0052] Furthermore, the resistance value of the aforementioned voltage divider resistors meets any resistance value between 800Ω and 20kΩ. Specifically, the resistance value of the voltage divider circuit is determined based on the voltage value generated when each button in the standard key circuit is pressed and turned on. Therefore, the resistance value of the voltage divider resistors on each voltage divider path is different, so that each button can generate different output voltage data when pressed, thereby distinguishing different key positions in the key circuit under test. In addition, the resistance value of the voltage divider resistors has a wide selection range and can be flexibly adjusted according to actual needs to adapt to the key circuit testing requirements in different application scenarios.
[0053] Furthermore, in this application, the number of ADC modules 1 is two in the specific implementation, wherein the circuit design of the second ADC module 12 is referenced. Figure 4 As shown, its design principle is the same as Figure 2 The ADC module 12 shown is the same, and will not be described again in this embodiment.
[0054] Other aspects that are the same as in Implementation Method 1 will not be described again in this implementation method.
[0055] Implementation Method 3
[0056] like Figures 1-6 As shown, in order to further improve the stability of the key detection circuit structure of this application, the storage unit 21 and the judgment unit 22 are connected through the IIC interface. The data terminals of the storage unit 21 are all connected to one end of the second pull-up resistor, and the other end of the second pull-up resistor is connected to the power supply.
[0057] like Figure 5 The diagram shows the circuit structure of the storage module. The SCL data input is the clock tick provided internally by the main control module 2. All data bits, ACK bits, and start / stop bits are referenced to the edge of the SCL data input. The SDA data input is a bidirectional data signal terminal, used to connect to the judgment unit 22 and output standard voltage data to it, or the user can import standard voltage data from the outside into the storage module. Simultaneously, C6 (100nF) + C7 (10μF) are configured. The 100nF absorbs the high-frequency spikes from the IIC clock edge, while the 10μF maintains energy for several milliseconds during a momentary power failure or hot-swapping of the keyboard, ensuring the storage module does not lose power while writing pages.
[0058] Furthermore, the main control module 2 is equipped with an ADC conversion unit 23, which converts the output voltage data into an ADC value and outputs the ADC value to the judgment unit 22. The ADC value is the value converted by the analog-to-digital converter (ADC), and this value is proportional to the output voltage data corresponding to the button in the circuit under test. The judgment unit 22 compares the received ADC value with the standard ADC value pre-stored in the storage unit 21 to determine whether the button state in the circuit under test is normal.
[0059] Furthermore, if the ADC value corresponding to the button in the circuit under test differs significantly from the standard ADC value, it is judged as an abnormal state. In this case, the judgment unit 22 will send an alarm signal to the alarm module 3 to trigger an alarm, reminding the operator to pay attention and take appropriate measures. This design not only improves the automation level of button circuit detection but also effectively reduces the possibility of false alarms and missed alarms, improving the overall reliability and stability. It is worth noting that the alarm module 3 used in this application is specifically an LED buzzer, which improves the visibility of the fault.
[0060] Furthermore, Figure 6 This is the circuit diagram of the main control module 21 in this application, where PC1-ADC1 is the main sampling channel and PA1-ADC2 is idle by default. In specific implementation, the circuit under test can be connected to the ADC module 12 with interface U9 and then to the ADC module 12 with interface U10. By cross-comparing the detection results of the two different ADC modules 12, it can be confirmed whether the two references are consistent. This leaves "voltage drift" to hardware redundancy as a fallback. In addition, setting up two ADC modules 12 can further improve working efficiency and enable simultaneous detection of multiple button circuits.
[0061] Other aspects that are the same as in Implementation Method 1 will not be described again in this implementation method.
[0062] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A button circuit detection device, characterized in that, It includes at least one ADC module (1) and a main control module (2) electrically connected to the ADC module (1), wherein the main control module (2) is electrically connected to an alarm module (3); The ADC module (1) is provided with multiple voltage divider paths. The voltage divider paths are used to connect to the buttons of the button circuit under test and output the corresponding button's output voltage data to the main control module (2). The voltage divider paths are set to correspond to the button positions of the button circuit. The main control module (2) is provided with a storage unit (21) and a judgment unit (22) connected to the storage unit (21). The storage unit (21) stores the standard voltage data of each key in the standard key circuit and the corresponding voltage divider path. The judgment unit (22) is used to determine whether the output voltage data of the key circuit under test under the same key position matches the standard voltage data of the key circuit. When the output voltage data does not match the standard voltage data, the judgment unit (22) drives the alarm module (3) to sound an alarm.
2. The button circuit detection device according to claim 1, characterized in that, Each voltage divider path is connected to a voltage divider resistor with a different resistance value. Each voltage divider path is connected to one end of a first pull-up resistor, and the other end of the first pull-up resistor is connected to a power supply.
3. The button circuit detection device according to claim 2, characterized in that, The resistance of the voltage divider resistor is 4.7kΩ.
4. The button circuit detection device according to claim 2, characterized in that, The resistance value of the voltage divider resistors is any value between 800Ω and 20kΩ.
5. The button circuit detection device according to claim 1, characterized in that, The ADC module (1) is provided with at least one filter resistor, the resistance of which is 100nF or 4.7μF.
6. The button circuit detection device according to claim 1, characterized in that, The output terminal of the ADC module (1) is equipped with an isolation resistor, and the output terminal is electrically connected to the main control module.
7. The button circuit detection device according to claim 1, characterized in that, The ADC module (1) has two units.
8. A button circuit detection device according to claim 1, characterized in that, The storage unit (21) and the judgment unit (22) are connected through the IIC interface. The data terminals of the storage unit (21) are all connected to one end of the second pull-up resistor, and the other end of the second pull-up resistor is connected to the power supply.
9. A button circuit detection device according to claim 1, characterized in that, The main control module is equipped with an ADC conversion unit (23), which converts the output voltage data into an ADC value and outputs the ADC value to the judgment unit (22).
10. A button circuit detection device according to claim 1, characterized in that, The alarm module (3) is an LED buzzer.