Key detection circuit and electronic device

CN224745350UActive Publication Date: 2026-09-11SHENZHEN CARKU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202520963575.7
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2025-05-15
Publication Date
2026-09-11
Estimated Expiration
2035-05-15

AI Technical Summary

Technical Problem

[0003]本申请提供了一种按键检测电路和电子设备,可以解决相关技术在进行多按键检测时存在按键检测的可靠性较低和电路设计复杂的问题

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN224745350U_ABST
    Figure CN224745350U_ABST
Patent Text Reader

Abstract

The application relates to the field of electronic technology, in particular to a key detection circuit and an electronic device. The key detection circuit comprises a power supply, N key units connected in series between the power supply and the ground, N>=2, wherein each key unit comprises a key switch and a resistor connected in parallel, and a voltage detection unit connected to the first end or the second end of the resistor in any key unit. The voltage detection unit is used for collecting the voltage value of the connection point of the key unit connected to the detection unit, and determining the target key switch pressed according to the voltage value. In the application, when one or more key switches in the N key units connected in series are pressed, the resistor connected in parallel with the key switch is short-circuited, so that the pressed key switch can be determined by calculating the current effective resistance value of the series resistor, the problem of complex calculation of the parallel resistor and voltage overlap is avoided, and the reliability of key detection is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic technology, and in particular to a key detection circuit and an electronic device. Background Technology

[0002] In many electronic devices, it is often necessary to input data or commands using multiple key combinations on a keyboard. Existing keyboards typically employ either standalone or matrix keyboards. Standalone keyboards require a significant number of I / O interfaces, while matrix keyboards, although saving some I / O interfaces, suffer from several drawbacks. Matrix keyboards sample voltage using multiple resistors connected in parallel. When multiple keys are pressed simultaneously, the resistance values ​​of these parallel resistors need to be calculated, which is not only computationally complex but also prone to misjudgments due to voltage overlap, reducing the reliability of key detection. Furthermore, the circuit design of matrix keyboards is more complex. Utility Model Content

[0003] This application provides a key detection circuit and electronic device, which can solve the problems of low reliability and complex circuit design in related technologies when performing multi-key detection.

[0004] In a first aspect, this application provides a key detection circuit, the key detection circuit comprising:

[0005] Power supply;

[0006] N button units are connected in series between the power supply and the ground terminal, where N≥2, and each button unit includes a button switch and a resistor connected in parallel.

[0007] A processing unit, connected to any one of the button units, is used to collect the status information of the button unit and determine the triggered button switch based on the status information.

[0008] In some embodiments, the button detection circuit further includes a protective resistor connected in series between the power supply and the ground terminal, the protective resistor being used to prevent short circuits.

[0009] In some embodiments, the protective resistor is connected in series between the power supply and the button unit, or the protective resistor is connected in series between the button unit and the ground terminal.

[0010] In some embodiments, the button unit includes a power supply side and a ground side; when the protection resistor is connected in series between the power supply and the button unit, the processing unit is connected to the power supply side of any one of the button units; or, when the protection resistor is connected in series between the button unit and the ground terminal, the processing unit is connected to the ground side of any one of the button units.

[0011] In some embodiments, in the N button units, the resistance values ​​corresponding to each resistor are different.

[0012] In some embodiments, among the N button units, the sum of the resistance values ​​of any two or more resistors is not equal to the resistance value of any single resistor.

[0013] In some embodiments, the button detection circuit further includes a filtering unit; when the protection resistor is connected in series between the power supply and the button unit, the first end of the filtering unit is connected to the power supply side of any one of the button units, and the second end of the filtering unit is connected to the processing unit; or when the protection resistor is connected in series between the button unit and the ground terminal, the first end of the filtering unit is connected to the ground side of any one of the button units, and the second end of the filtering unit is connected to the processing unit.

[0014] In some embodiments, the filtering unit includes a filtering resistor and a filtering capacitor; when the protective resistor is connected in series between the power supply and the button unit, the first end of the filtering resistor is connected to the power supply side of any one of the button units, the second end of the filtering resistor is connected to the processing unit, the first end of the filtering capacitor is connected to the second end of the filtering resistor, and the second end of the filtering capacitor is grounded; or when the protective resistor is connected in series between the button unit and the ground terminal, the first end of the filtering resistor is connected to the ground side of any one of the button units, the second end of the filtering resistor is connected to the processing unit, the first end of the filtering capacitor is connected to the second end of the filtering resistor, and the second end of the filtering capacitor is grounded.

[0015] Secondly, this application also provides an electronic device, including the button detection circuit as described above, the button detection circuit being used for a triggered button switch.

[0016] In some embodiments, the electronic device includes at least one of a portable energy storage power supply, a mobile power supply, a power tool, a heating device, or a hair dryer.

[0017] The aforementioned key detection circuit and electronic device configure N key units connected in series between the power supply and ground. Each key unit includes a key switch and a resistor connected in parallel. The processing unit detects the voltage drop across the connection point and determines the pressed key switch based on the voltage drop. Since the resistor connected in parallel with one or more key switches in the N series-connected key units is short-circuited when one or more key switches are pressed, the series resistance in the N series-connected key units changes. Therefore, it is only necessary to calculate the current effective resistance value of the series resistance to determine the pressed key switch. The series structure makes the resistance calculation very simple, avoiding the complex calculation of parallel resistance and the problem of voltage overlap, effectively improving the reliability of key detection and simplifying circuit design. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0020] Figure 2 This is a schematic diagram of a key detection circuit provided in an embodiment of this application;

[0021] Figure 3 This is a schematic diagram of another key detection circuit provided in an embodiment of this application;

[0022] Figure 4 This is a schematic diagram of another key detection circuit provided in an embodiment of this application;

[0023] Figure 5 This is a schematic diagram of another key detection circuit provided in an embodiment of this application;

[0024] Figure 6 This is a schematic diagram of another key detection circuit provided in an embodiment of this application;

[0025] Figure 7 This is a schematic diagram of another key detection circuit provided in an embodiment of this application;

[0026] Figure 8 This is a schematic diagram of another key detection circuit provided in an embodiment of this application.

[0027] Explanation of reference numerals in the attached figures:

[0028] 10. Electronic devices;

[0029] 100. Key detection circuit;

[0030] 101. Power supply; 102. Button unit; 103. Processing unit; 104. Filtering unit. Detailed Implementation

[0031] 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 some embodiments of this application, not all 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.

[0032] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.

[0033] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0034] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0035] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0036] Currently, existing keyboards typically employ either standalone or matrix keyboards. When performing multi-key press detection, standalone keyboards require a significant number of I / O interfaces. While matrix keyboards save some I / O interfaces, they sample voltage using multiple resistors connected in parallel. When multiple keys are pressed simultaneously, the resistance values ​​of these parallel resistors need to be calculated, which is not only computationally complex but also prone to misjudgments due to voltage overlap, reducing the reliability of key press detection. Furthermore, the circuit design of matrix keyboards is more complex.

[0037] To address this, this application provides a key detection circuit and electronic device. By configuring N key units connected in series between the power supply and ground, each key unit includes a key switch and a resistor connected in parallel. A processing unit detects the voltage division value at the connection point and determines the pressed key switch based on the voltage division value. Since the resistor connected in parallel with one or more key switches in the N series-connected key units is short-circuited when pressed, the series resistance in the N series-connected key units changes. Therefore, it is only necessary to calculate the current effective resistance value of the series resistance to determine the pressed key switch. Calculating the resistance value using a series structure is very simple, avoiding the complex calculation of parallel resistance and the problem of voltage overlap, effectively improving the reliability of key detection, and also simplifying circuit design.

[0038] Please see Figure 1 , Figure 1 This is a schematic diagram of the structure of an electronic device 10 provided in an embodiment of this application. Figure 1 As shown, the electronic device 10 may include a key detection circuit 100, which is used for triggering key switches.

[0039] For example, electronic device 10 may include at least one of portable power storage devices, mobile power supplies, power tools, heating devices, or hair dryers, etc. This application embodiment does not limit the type of electronic device 10.

[0040] Please see Figure 2 , Figure 2 This is a schematic diagram of a key detection circuit 100 provided in an embodiment of this application. Figure 2 As shown, the button detection circuit 100 may include a power supply 101, N button units 102, and a processing unit 103. Where N ≥ 2, the N button units 102 are connected in series between the power supply 101 and the ground terminal SGND. Each button unit 102 includes a button switch and a resistor connected in parallel, for example, button switches K1, K2, ..., KN, and resistors K1, K2, ..., KN. The processing unit 103 is connected to any one of the button units 102 and is used to collect the status information of the button unit 102 and determine the triggered button switch based on the status information. The status information may be a voltage value.

[0041] For example, the power supply 101 can be a voltage source VCC or a current source. For instance, it can be a 3.3V voltage source or a 5V voltage source, and this application does not limit it in this way. The following description uses the power supply 101 as a voltage source VCC as an example.

[0042] It should be noted that when a button switch in the button detection circuit 100 is pressed, the parallel resistor corresponding to the button switch is short-circuited, causing the total resistance value of the series circuit in the N button units 102 to change. The processing unit 103 can calculate the current effective resistance value in the N button units 102 by detecting the voltage change at the voltage divider point, and calculate the reduced resistance difference based on the effective resistance value and the total resistance value. Thus, the specific button switch that was pressed can be determined based on the resistance difference.

[0043] In some embodiments, the processing unit 103 may be a microcontroller unit (MCU) in the electronic device 10. The MCU can store and execute instructions to implement the functions of the processing unit 103, including at least acquiring the status information of the button unit 102 and determining the triggered button switch based on the status information. The microcontroller unit is only one example and may be replaced by other components, such as a processor and a memory. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to implement the functions of the processing unit 103.

[0044] In other embodiments, the processing unit 103 may be the main controller in the electronic device 10, wherein the main controller may include, but is not limited to, a central processing unit (CPU), a digital signal processor (DSP), an ARM (Advanced RISC Machine) processor, an application-specific integrated circuit (ASIC), and a field-programmable gate array (FPGA), etc.

[0045] In some embodiments, the processing unit 103 may further include peripheral circuits connected to the microcontroller unit. The peripheral circuits may include one or more of power management circuits, protection circuits, interface circuits, reset circuits, etc. The peripheral circuits may be implemented by one or more components such as voltage regulators, DC-DC converters, resistors, capacitors, diodes, etc.

[0046] In the above embodiment, N button units 102 are configured in series between the power supply 101 and ground. Each button unit 102 includes a button switch and a resistor connected in parallel. The processing unit 103 detects the voltage division value at the connection point between the processing unit 103 and the button unit 102, and determines the pressed button switch based on the voltage division value. Since the resistor connected in parallel with one or more button switches in the N series-connected button units is short-circuited when one or more button switches in the N series-connected button units are pressed, the series resistance in the N series-connected button units changes. Therefore, it is only necessary to calculate the current effective resistance value of the series resistance to determine the pressed button switch. The series structure makes the resistance value calculation very simple, avoiding the complex calculation of parallel resistance and the problem of voltage overlap, effectively improving the reliability of button detection, while also reducing external components and simplifying circuit design.

[0047] Please see Figure 3 , Figure 3 This is a schematic diagram of another key detection circuit 100 provided in an embodiment of this application. For example... Figure 3 As shown, the key detection circuit 100 also includes a protection resistor R0 connected in series between the power supply 101 and the ground terminal SGND. The protection resistor R0 is used to prevent short circuits.

[0048] In some embodiments, a protection resistor R0 is connected in series between the power supply 101 and the button unit 102. For example... Figure 3 As shown, the protection resistor R0 is connected in series between the power supply 101 and the first button unit 102.

[0049] In other embodiments, the protection resistor R0 is connected in series between the power supply 101 and the ground terminal. See also... Figure 4 , Figure 4 This is a schematic diagram of another key detection circuit 100 provided in an embodiment of this application. For example... Figure 4 As shown, the protection resistor R0 is connected in series between the Nth button unit and the ground terminal SGND.

[0050] It should be noted that, in this embodiment, the position of the protection resistor R0 in the key detection circuit 100 can be flexibly set. For example, the protection resistor R0 can be connected in series between the power supply 101 and any key unit 102. Another example is that the protection resistor R0 can be connected in series between the power supply 101 and the ground terminal SGND.

[0051] In the above embodiment, by adding a protective resistor R0 connected in series between the power supply 101 and the ground terminal SGND, a short circuit can be avoided when all the key switches in the key detection circuit 100 are pressed.

[0052] In some embodiments, the button unit 102 includes a power supply side and a ground side; when the protection resistor R0 is connected in series between the power supply 101 and the button unit 102, the processing unit 103 is connected to the power supply side of any button unit 102.

[0053] For example, such as Figure 3 As shown, the protection resistor R0 is connected in series between the power supply 101 and the first button unit 102, and the processing unit 103 is connected to the power supply side of the first button unit 102. Of course, the processing unit 103 can also be connected to the power supply side of other button units 102.

[0054] In other embodiments, when the protection resistor R0 is connected in series between the button unit 102 and the ground terminal SGND, the processing unit 103 is connected to the near-ground side of any button unit 102.

[0055] For example, such as Figure 4 As shown, the protection resistor R0 is connected in series between the Nth button unit 102 and the ground terminal SGND, and the processing unit 103 is connected to the near-ground side of the Nth button unit 102. Of course, the processing unit 103 can also be connected to the near-ground side of other button units 102.

[0056] It should be noted that, in order to ensure that the processing unit 103 can detect the pressed button switch normally, the processing unit 103 cannot be directly connected to the power supply terminal or the ground terminal. Therefore, the processing unit 103 needs to be connected to resistors (e.g., protection resistor R0 and / or the resistor in the button unit 102) both above and below.

[0057] In the above embodiment, the processing unit 103 is connected to the power supply side or the ground side of any button unit 102. It can detect the voltage division value at the connection point, calculate the current effective resistance value of N button units 102 based on the voltage division value, calculate the reduced resistance difference based on the effective resistance value and the total resistance value, and then determine the specific button switch that has been pressed based on the resistance difference.

[0058] In some embodiments, in the N button units 102, the resistance values ​​of each resistor are different. It should be noted that, in order to accurately detect the pressed button switch, the resistance value of each resistor in all button units 102 is different.

[0059] In other embodiments, in the N button units 102, the sum of the resistance values ​​of any two or more resistors is not equal to the resistance value of any single resistor.

[0060] Please see Figure 5 , Figure 5 This is a schematic diagram of another key detection circuit 100 provided in an embodiment of this application. For example... Figure 5 As shown, the button detection circuit 100 includes four button units 102 connected in series. The first button unit includes a button switch K1 and a resistor R1 connected in parallel; the second button unit includes a button switch K2 and a resistor R2 connected in parallel; the third button unit includes a button switch K3 and a resistor R3 connected in parallel; and the fourth button unit includes a button switch K4 and a resistor R4 connected in parallel. The processing unit 103 is connected to the power supply side of the first button unit. To ensure that the resistance values ​​of each resistor in the button unit are different, and that the sum of the resistance values ​​of any two or more resistors is not equal to the resistance value of any single resistor, the resistance values ​​in the button unit 102 can be set as follows: R1 = 1kΩ, R2 = 2kΩ, R3 = 5kΩ, and R4 = 10kΩ.

[0061] In the above embodiment, by setting the resistance values ​​of each resistor in the button unit 102 to be different, and the sum of the resistance values ​​of any two or more resistors is not equal to the resistance value of any single resistor, it can be ensured that the voltage division value of each button switch 102 and combination is unique, effectively avoiding the voltage overlap problem, thereby accurately identifying various button combinations and improving the reliability of button detection.

[0062] In this embodiment, the processing unit 103 is used to collect the current voltage division value of the button unit 102 and determine the triggered button switch based on the current voltage division value. Specifically, the processing unit 103 can first collect the current voltage division value at the connection point, and based on a preset correspondence between voltage and resistance values, determine the effective resistance value between the power supply 101 and the button unit 102. Then, it compares the effective resistance value with the total resistance value between the power supply 101 and the ground terminal to determine the resistance value of the resistor that is short-circuited due to the button switch being pressed. Finally, it deduces the pressed button switch based on the resistance value of the short-circuited resistor. After determining the connection point between the processing unit 103 and the button unit 102, the voltage division value at the connection point can be measured when different button switches and combinations of button switches are pressed. Based on the resistance value of the resistor connected in parallel with the unpressed button switch, a correspondence between the voltage division value and the resistance value is constructed.

[0063] In some embodiments, when the protection resistor R0 is connected in series between the power supply 101 and the button unit 102, the processing unit 103 is used to determine the first effective resistance value between the power supply 101 and the button unit 102 based on the preset correspondence between voltage and resistance values, according to the current voltage division value, and to obtain the first total resistance value between the power supply 101 and the ground terminal SGND when no button switch is triggered, to determine the first resistance difference between the power supply 101 and the ground terminal SGND reduced according to the first total resistance value and the first effective resistance value, and to determine the at least one button switch that has been triggered according to the first resistance difference.

[0064] The process of determining at least one triggered push-button switch based on the first resistance difference may include: comparing the first resistance difference with the resistance value of a single resistor in the N push-button units 102; if there is a target resistor with the same resistance value as the first resistance difference, then the push-button switch in the push-button unit containing the target resistor is determined as the triggered push-button switch; if there is no target resistor with the same resistance value as the first resistance difference, then the first resistance difference is compared with the sum of the resistance values ​​of at least two resistors in the N push-button units, and the push-button switches in the push-button units containing at least two resistors whose sum of resistance values ​​is the same as the first resistance difference are both determined as the triggered push-button switches.

[0065] For example, such as Figure 5 As shown, the resistance values ​​in the button unit 102 can be set as follows: R1 = 1kΩ, R2 = 2kΩ, R3 = 5kΩ, R4 = 10kΩ. The protection resistor R0 is connected in series between the power supply 101 and the first button unit 102. The processing unit 103 is connected to the power supply side of the first button unit 102, with R0 = 20kΩ. The total resistance between the power supply 101 and the ground terminal SGND is (R1 + R2 + R3 + R4 + R0). For example, when the button switch K2 is pressed, R2 is short-circuited. At this time, the effective resistance value (R1 + R3 + R4 + R0) between the power supply 101 and the ground terminal SGND can be determined based on the detected current voltage division value. Then, the reduced resistance difference (R2) between the power supply 101 and the ground terminal SGND can be determined based on the effective resistance value and the total resistance value. Finally, the button switch corresponding to the resistance difference (R2) is determined to be K2.

[0066] In other embodiments, when the protection resistor R0 is connected in series between the button unit 102 and the ground terminal SGND, the processing unit 103 is used to determine the second effective resistance value between the power supply 101 and the button unit 102 based on the preset correspondence between voltage and resistance values ​​and the current voltage divider value, and to obtain the second total resistance value between the power supply 101 and the button unit 102 when no button switch is triggered, to determine the second resistance difference between the power supply 101 and the ground terminal SGND reduced based on the second total resistance value and the second effective resistance value, and to determine at least one button switch that has been triggered based on the second resistance difference.

[0067] like Figure 6As shown, the resistance values ​​in button unit 102 can be set as follows: R1 = 1kΩ, R2 = 2kΩ, R3 = 5kΩ, R4 = 10kΩ. The protection resistor R0 is connected in series between the fourth button unit and the ground terminal SGND. The processing unit is connected to the near-ground side of the fourth button unit, with R0 = 20kΩ. The total resistance between the power supply 101 and button unit 102 is (R1 + R2 + R3 + R4). For example, when button switch K1 is pressed, R1 is short-circuited. At this time, the effective resistance value (R2 + R3 + R4) between the power supply 101 and button unit 102 can be determined based on the detected current voltage division value. Then, the reduced resistance difference (R1) between the power supply 101 and the ground terminal SGND can be determined based on the effective resistance value and the total resistance value. Finally, the button switch corresponding to the resistance difference (R1) is determined to be K1.

[0068] In some embodiments, the key detection circuit 100 further includes a filtering unit 104 for filtering out noise signals and improving anti-interference capability. When the protection resistor R0 is connected in series between the power supply 101 and the key unit 102, the first end of the filtering unit 104 is connected to the power supply side of any key unit 102, and the second end of the filtering unit 104 is connected to the processing unit 103.

[0069] Please see Figure 7 , Figure 7 This is a schematic diagram of another key detection circuit 100 provided in an embodiment of this application. For example... Figure 7 As shown, when the protection resistor R0 is connected in series between the power supply 101 and the first button unit 102, the first end of the filter unit 104 is connected to the power supply side of the first button unit 102, and the second end of the filter unit 104 is connected to the processing unit 103.

[0070] The filter unit 104 includes a filter resistor Rf and a filter capacitor Cf. When the protection resistor R0 is connected in series between the power supply 101 and the button unit 102, the first end of the filter resistor Rf is connected to the power supply side of any button unit 102, the second end of the filter resistor Rf is connected to the processing unit 103, the first end of the filter capacitor Cf is connected to the second end of the filter resistor Rf, and the second end of the filter capacitor Cf is grounded.

[0071] In other embodiments, when the protection resistor R0 is connected in series between the button unit 102 and the ground terminal SGND, the first end of the filter unit 104 is connected to the near-ground side of any button unit 102, and the second end of the filter unit 104 is connected to the processing unit 103.

[0072] Please see Figure 8 , Figure 8 This is a schematic diagram of another key detection circuit 100 provided in an embodiment of this application. For example... Figure 8 As shown, when the protection resistor R0 is connected in series between the button unit 101 and the ground terminal SGND, the first end of the filter resistor Rf is connected to the near-ground side of the Nth button unit 102, the second end of the filter resistor Rf is connected to the processing unit 103, the first end of the filter capacitor Cf is connected to the second end of the filter resistor Rf, and the second end of the filter capacitor Cf is grounded.

[0073] In the above embodiment, by adding a filtering unit 104 to the key detection circuit 100, noise signals can be filtered out by the filtering unit 104, thereby improving the anti-interference capability of the key detection circuit 100.

[0074] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A key detection circuit, characterized by comprising: The key detection circuit includes: Power supply; N button units are connected in series between the power supply and the ground terminal, where N≥2, and each button unit includes a button switch and a resistor connected in parallel. A processing unit, connected to any one of the button units, is used to collect the status information of the button unit and determine the triggered button switch based on the status information.

2. The key detection circuit according to claim 1, characterized in that, The button detection circuit also includes a protective resistor connected in series between the power supply and the ground terminal, which is used to prevent short circuits.

3. The key detection circuit according to claim 2, characterized in that, The protective resistor is connected in series between the power supply and the button unit, or... The protective resistor is connected in series between the button unit and the ground terminal.

4. The key detection circuit according to claim 3, characterized in that, The button unit includes a power supply side and a ground side; When the protective resistor is connected in series between the power supply and the button unit, the processing unit is connected to the power supply side of any one of the button units; or, When the protective resistor is connected in series between the button unit and the ground terminal, the processing unit is connected to the near-ground side of any one of the button units.

5. The key detection circuit according to claim 1, characterized by In the N button units, the resistance values ​​of each resistor are different.

6. The key detection circuit according to claim 5, characterized in that, In the N button units, the sum of the resistance values ​​of any two or more resistors is not equal to the resistance value of any single resistor.

7. The key detection circuit according to claim 2, characterized by The key detection circuit also includes a filtering unit; When the protective resistor is connected in series between the power supply and the button unit, the first end of the filter unit is connected to the power supply side of any one of the button units, and the second end of the filter unit is connected to the processing unit; or When the protection resistor is connected in series between the button unit and the ground terminal, the first end of the filter unit is connected to the near-ground side of any one of the button units, and the second end of the filter unit is connected to the processing unit.

8. The key detection circuit according to claim 7, characterized in that, The filtering unit includes a filter resistor and a filter capacitor; When the protective resistor is connected in series between the power supply and the button unit, the first end of the filter resistor is connected to the power supply side of any button unit, the second end of the filter resistor is connected to the processing unit, the first end of the filter capacitor is connected to the second end of the filter resistor, and the second end of the filter capacitor is grounded; or When the protection resistor is connected in series between the button unit and the ground terminal, the first end of the filter resistor is connected to the near-ground side of any button unit, the second end of the filter resistor is connected to the processing unit, the first end of the filter capacitor is connected to the second end of the filter resistor, and the second end of the filter capacitor is grounded.

9. An electronic device, comprising: Includes a key detection circuit as described in any one of claims 1-8, wherein the key detection circuit is used for a triggered key switch.

10. The electronic device of claim 9, wherein, The electronic device includes at least one of a portable energy storage power supply, a mobile power supply, a power tool, a heating device, or a hair dryer.