Key detection and power-on / off circuit with single IO port multiplexing

CN224909469UActive Publication Date: 2026-10-27SHENZHEN F&R ELECTRONICS TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202522534662.3
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-10-27
Estimated Expiration
2035-11-28

AI Technical Summary

Technical Problem

然而需要占用该电子设备至少2个输入/输出(I/O)口,占用了较多的I/O端口资源

Benefits of technology

[0013]本申请提出的单IO口复用的按键检测及开关机电路,其通过在开关机按键模块被按压时驱动第一开关模块和第二开关模块导通,以利用供电输入端的输入电压给控制模块供电,使控制模块的开关控制端口处于开关机自锁状态,这样可以在开机后维持电源通路(比如维持第一开关模块和第二开关模块导通),避免因按键松开导致控制模块断电。并且,通过控制模块按照预设的定时间隔周期,主动将开关控制端口在开关机自锁状态和检测状态之间进行周期性切换,使得该端口兼具两种功能:在自锁状态下维持供电通路导通,在检测状态下执行电压采样。这种时分复用机制使得仅需占用单一端口(也即开关控制端口),就可以实现开机自锁以及检测开关机按键模块状态的多种功能,从而在确保按键状态可被较为及时地捕获的同时,不影响开机后的供电稳定性。具体而言,当开关控制端口处于检测状态时,通过开关控制端口进行高低电平检测,以根据电平检测结果(比如高电平或低电平)来判断开关机按键模块的按压状态,也即开关机按键模块是否被按压。这样能够减少单IO口复用的按键检测及开关机电路占用的电子设备端口的数量,节省了硬件成本,适用于电子设备的I/O端口资源紧张的应用场景。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN224909469U_ABST
    Figure CN224909469U_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a single IO port multiplexing key detection and switching-on and -off circuit, and relates to the technical field of key detection. The circuit comprises a switching-on and -off key module, a first switching module, a second switching module and a control module; the switching control port of the control module is electrically connected with the second switching module; the first switching module is electrically connected with a power supply input end and the control module, and the second switching module is electrically connected with the power supply input end; the switching-on and -off key module is used for driving the first switching module and the second switching module to conduct in response to a pressing operation, and supplying power to a load device and the control module; the control module switches the state of the switching control port between a switching-on and -off self-locking state and a detection state according to a preset fixed time interval period; the switching control port is used for high and low level detection when in the detection state, so as to obtain the pressing state of the switching-on and -off key module according to the level detection result. The embodiment of the application can reduce the electronic device I / O port resources occupied by the switching-on and -off key detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of button detection technology, and in particular to button detection and power-on / off circuits using a single I / O port multiplexing. Background Technology

[0002] The process of powering on and off electronic devices requires detection and control of the power button. However, this necessitates the use of at least two input / output (I / O) ports, consuming significant I / O port resources. When the microcontroller's I / O port resources are insufficient, it becomes a pressing technical problem that needs to be addressed. Utility Model Content

[0003] The main objective of this application is to propose a single I / O port multiplexed button detection and power-on / off circuit, which aims to reduce the electronic device I / O port resources occupied by power-on / off button detection.

[0004] To achieve the above objectives, a first aspect of this application provides a single I / O port multiplexed key detection and power-on / off circuit, the single I / O port multiplexed key detection and power-on / off circuit comprising: The system includes a power button module, a first switch module, a second switch module, and a control module; wherein the control module has a switch control port. The power on / off button module is electrically connected to the first switch module and the second switch module; the switch control port of the control module is electrically connected to the second switch module and the power on / off button module; the first switch module is electrically connected to the power supply input terminal and the second switch module, and the second switch module and the power on / off button module are electrically connected to the power supply input terminal; The power on / off button module is used to respond to a pressing operation, driving the first switch module and the second switch module to conduct, so as to supply power to the load device and the control module based on the input voltage of the power supply input terminal, and so that the switch control port of the control module is in a power on / off self-locking state; the control module is used to switch the switch control port between the power on / off self-locking state and the detection state according to a preset time interval period; the switch control port is used to perform high and low level detection when in the detection state, so as to obtain the pressing state of the power on / off button module based on the level detection result.

[0005] In some embodiments, the power on / off button module includes a power on / off button, the first switch module includes a MOSFET, the second switch module includes a transistor, and the control module includes a microcontroller. The power supply input terminal is electrically connected to one end of the power switch button, and the other end of the power switch button is electrically connected to the switch control port of the microcontroller and the base of the transistor; the emitter of the transistor is grounded, and the collector of the transistor is electrically connected to the gate of the MOSFET and the power supply input terminal; the source of the MOSFET is electrically connected to the power supply input terminal; the drain of the MOSFET is electrically connected to the power supply output terminal; wherein, the power supply output terminal is used to supply power to the load device and the microcontroller.

[0006] In some embodiments, the single I / O port multiplexed button detection and power-on / off circuit further includes: A time-delay shutdown module; the time-delay shutdown module is electrically connected to the first switch module and the power on / off button; The delayed shutdown module is used to delay the shutdown of the first switch module.

[0007] In some embodiments, the delay shutdown module includes a first capacitor and a first resistor; The first capacitor is connected in parallel with the first resistor; one end of the first capacitor is electrically connected to the source of the MOS transistor and the power button; the other end of the first capacitor is electrically connected to the gate of the MOS transistor; wherein, the first capacitor is used to delay the turn-off of the MOS transistor.

[0008] In some embodiments, the single I / O port multiplexed button detection and power-on / off circuit further includes: Overvoltage protection module; the overvoltage protection module is electrically connected to the first switch module and the second switch module; The overvoltage protection module is used to provide overvoltage protection for the first switch module.

[0009] In some embodiments, the overvoltage protection module includes a Zener diode and a second resistor; One end of the second resistor is electrically connected to the collector of the transistor; the other end of the second resistor is electrically connected to the anode of the Zener diode and the gate of the MOSFET; the cathode of the Zener diode is electrically connected to the source of the MOSFET and the power supply input terminal.

[0010] In some embodiments, the first switching module further includes a second capacitor; One end of the second capacitor is electrically connected to the drain of the MOS transistor, and the other end of the second capacitor is grounded.

[0011] In some embodiments, the second switching module further includes a diode, a third resistor, and a fourth resistor; The anode of the diode is electrically connected to the switch control port of the microcontroller, and the cathode of the diode is electrically connected to one end of the third resistor and one end of the fourth resistor; the other end of the third resistor is electrically connected to the base of the transistor; the other end of the fourth resistor is grounded. The diode is used to respond to the pressing operation of the power button. When the button is pressed, it is in a reverse isolation state to avoid potential damage to the microcontroller due to voltage backflow when the power supply voltage of the microcontroller is lower than the voltage of the power supply input terminal.

[0012] In some embodiments, the MOSFET includes a P-channel MOSFET, and the transistor includes an NPN transistor; wherein the withstand voltage of the P-channel MOSFET is greater than the input voltage of the power supply input terminal, and the withstand voltage of the NPN transistor is greater than the input voltage of the power supply input terminal.

[0013] The single-IO-port multiplexed button detection and power-on / off circuit proposed in this application drives the first and second switch modules to conduct when the power-on / off button module is pressed, thereby using the input voltage at the power supply input terminal to power the control module. This puts the switch control port of the control module in a power-on / off self-locking state, maintaining the power supply path after power-on (e.g., keeping the first and second switch modules conducting), preventing the control module from losing power due to button release. Furthermore, the control module actively switches the switch control port periodically between the power-on / off self-locking state and the detection state according to a preset time interval, giving the port two functions: maintaining the power supply path in the self-locking state and performing voltage sampling in the detection state. This time-division multiplexing mechanism allows multiple functions, including power-on self-locking and detecting the power-on / off button module state, to be achieved using only a single port (i.e., the switch control port). This ensures that the button state is captured relatively quickly without affecting the stability of the power supply after power-on. Specifically, when the switch control port is in detection mode, high and low level detection is performed through the switch control port. The pressed state of the power button module is determined based on the level detection result (e.g., high or low level), i.e., whether the power button module is pressed. This reduces the number of electronic device ports occupied by button detection and power-on / off circuits multiplexed by a single I / O port, saving hardware costs and making it suitable for application scenarios where I / O port resources are scarce in electronic devices. Attached Figure Description

[0014] Figure 1 This is a block diagram of a single I / O port multiplexed button detection and power-on / off circuit provided in an embodiment of this application; Figure 2 This is a circuit schematic diagram of a single I / O port multiplexed button detection and power on / off circuit provided in an embodiment of this application; Figure 3This is a block diagram of a single I / O port multiplexed button detection and power-on / off circuit provided in another embodiment of this application; Figure 4 This is a block diagram of a single I / O port multiplexed button detection and power-on / off circuit provided in another embodiment of this application.

[0015] Reference numerals: Power on / off button module 10; First switch module 20; Second switch module 30; Control module 40; Delayed shutdown module 50; Overvoltage protection module 60; Power button K1; MOSFET Q1; transistor Q2; Zener diode ZD1; diode D1; first capacitor C1; second capacitor C2; first resistor R1; second resistor R2; third resistor R3; fourth resistor R4; switch control port ON / OFF; power input terminal VCC; power output terminal VOUT. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0017] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit the scope of this application.

[0019] The single I / O port multiplexed key detection and power-on / off circuit provided in this application embodiment is specifically described through the following embodiments. First, the single I / O port multiplexed key detection and power-on / off circuit in this application embodiment is described.

[0020] Figure 1 This is an optional module block diagram of the single I / O port multiplexed button detection and power on / off circuit provided in the embodiments of this application. Figure 1 The single I / O port multiplexing key detection and power on / off circuit in the system may include, but is not limited to: The system includes a power on / off button module 10, a first switch module 20, a second switch module 30, and a control module 40; wherein the control module 40 has a switch control port ON / OFF. The power on / off button module 10 is electrically connected to the first switch module 20 and the second switch module 30; the switch control port ON / OFF of the control module 40 is electrically connected to the second switch module 30 and the power on / off button module 10; the first switch module 20 is electrically connected to the power supply input terminal VCC and the second switch module 30, and the second switch module 30 is electrically connected to the power on / off button module 10. The power on / off button module 10 is used to respond to a pressing operation, driving the first switch module 20 and the second switch module 30 to conduct, so as to supply power to the load device and the control module 40 based on the input voltage of the power supply input terminal VCC, so that the switch control port ON / OFF of the control module 40 is in the power on / off self-locking state; the control module 40 is used to switch the switch control port ON / OFF between the power on / off self-locking state and the detection state according to a preset time interval period; the switch control port ON / OFF is used to perform high and low level detection when in the detection state, so as to obtain the pressing state of the power on / off button module 10 based on the level detection result.

[0021] The beneficial effects of this application embodiment include, but are not limited to: by driving the first switch module 20 and the second switch module 30 to conduct when the power-on / off button module 10 is pressed, the input voltage of the power supply input terminal VCC is used to supply power to the load device and the control module 40, so that the switch control port ON / OFF of the control module 40 is in a power-on / off self-locking state. This can maintain the power supply path after power-on (e.g., maintain the conduction of the first switch module 20 and the second switch module 30), and prevent the load device and the control module 40 from losing power due to the release of the button. Furthermore, by the control module 40 actively switching the switch control port ON / OFF between the power-on / off self-locking state and the detection state according to a preset time interval, the port has two functions: maintaining the power supply path in the self-locking state and performing voltage sampling in the detection state. This time-division multiplexing mechanism allows multiple functions such as power-on self-locking and detecting the state of the power-on / off button module 10 to be realized by occupying only a single port (i.e., the switch control port ON / OFF), thereby ensuring that the button state can be captured relatively in a timely manner without affecting the power supply stability after power-on. Specifically, when the switch control port ON / OFF is in the detection state, high and low level detection is performed through the switch control port ON / OFF. The pressed state of the power on / off button module 10 is determined based on the level detection result (e.g., high level or low level), that is, whether the power on / off button module 10 is pressed. This reduces the number of electronic device I / O ports occupied by the button detection and power on / off circuits multiplexed by a single I / O port, saving hardware costs and making it suitable for application scenarios where electronic devices have limited I / O port resources.

[0022] In some embodiments, it should be noted that the control module 40 may be a microcontroller, a central processing unit (CPU), a programmable logic controller (PLC), or the like.

[0023] In some embodiments, the preset timing interval period may include, but is not limited to, 10 microseconds (ms). For example, the control module 40 may switch back and forth between the power-on / off self-locking state and the detection state every 10ms.

[0024] In some embodiments, it should be noted that the ON / OFF switch control port can be an input / output port of the microcontroller, i.e., an I / O port. In some embodiments, the I / O port needs to be configured with an internal pull-up.

[0025] In some embodiments, specifically, the input voltage (i.e., the supply voltage) at the power input terminal VCC can be any voltage in the range of 3.5 volts (V) to 30V. For example, the supply voltage can be 3.5V or 30V.

[0026] In some embodiments, for example, when the power button module 10 is pressed by an external operation (such as by an operator), it drives the first switch module 20 and the second switch module 30 to conduct, so that the input voltage of the power supply input terminal VCC supplies power to the load device and the control module 40 (such as a microcontroller). When the control module 40 is powered on, the switch control port ON / OFF outputs a high level to drive the second switch module 30 to conduct, thereby achieving power supply self-locking.

[0027] In some embodiments, the switch control port ON / OFF is used to perform high / low level detection when in a detection state to obtain a level detection result, wherein the level detection result is used to characterize whether the voltage detected by the switch control port ON / OFF is high or low. The pressing state of the power button module 10 can be either a pressed state or a released state.

[0028] Specifically, if the level detection result indicates that the voltage detected by the ON / OFF switch control port is high, then the power on / off button module 10 is pressed, i.e., the power on / off button module 10 is in the pressed state. If the level detection result indicates that the voltage detected by the ON / OFF switch control port is low, then the power on / off button module 10 is not pressed, i.e., the power on / off button module 10 is in the released state. In some embodiments, it should be noted that when the power on / off button module 10 is pressed, the voltage at the power supply input terminal VCC is greater than the power supply voltage of the control module 40 (such as a microcontroller). At this time, diode D1 (see...) Figure 2The switch control port ON / OFF of the control module 40 is in reverse isolation. Because the ON / OFF switch control port of the control module 40 is configured with a built-in pull-up, a high level is detected when the power button module 10 is pressed. When the power button module 10 is not pressed, the ON / OFF switch control port is activated through the fourth resistor R4 (see...). Figure 2 The signal is grounded, so the ON / OFF switch control port detects a low level.

[0029] Please see Figure 2 In some embodiments, the power on / off button module 10 includes a power on / off button K1, the first switch module 20 includes a MOSFET Q1, the second switch module 30 includes a transistor Q2, and the control module 40 includes a microcontroller (not shown in the figure). The power input terminal VCC is electrically connected to one end of the power switch button K1, and the other end of the power switch button K1 is electrically connected to the ON / OFF switch control port of the microcontroller and the base of transistor Q2; the emitter of transistor Q2 is grounded, and the collector of transistor Q2 is electrically connected to the gate of MOSFET Q1 and the power input terminal VCC; the source of MOSFET Q1 is electrically connected to the power input terminal VCC; the drain of MOSFET Q1 is electrically connected to the power output terminal VOUT; among them, the power output terminal VOUT is used to supply power to the load device and the microcontroller.

[0030] The advantage of this embodiment is that a first switching module 20 is formed by MOSFET Q1, a second switching module 30 is formed by transistor Q2, and a control module 40 is formed by a microcontroller. The microcontroller can then actively switch the ON / OFF of the switch control port between the power-on self-locking state and the detection state according to a preset time interval. This reduces the number of electronic device I / O ports occupied by the button detection and power-on circuits that use a single I / O port, saving hardware costs and making it suitable for application scenarios where electronic devices have limited I / O port resources.

[0031] In some embodiments, Figure 2 It should be noted that the power output terminal VOUT is electrically connected to the load device (not shown in the figure) and the microcontroller. For example, the power output terminal VOUT can be electrically connected to a buck switching power supply or a buck voltage regulator LDO (not shown in the figure), and the buck switching power supply or buck voltage regulator LDO is electrically connected to the microcontroller. The buck switching power supply or buck voltage regulator LDO can step down the voltage at the power output terminal VOUT, for example, converting the voltage to any voltage value between 3.3V and 5V to power the microcontroller.

[0032] In some embodiments, when the ON / OFF switch control port detects that the power button K1 has been pressed for the first time, it switches to output a high level to achieve power-on self-locking. When the ON / OFF switch control port detects that the power button K1 has been pressed again, it switches to output a low level to disconnect the MOSFET Q1, thereby powering off the microcontroller and shutting down the electronic device to which the microcontroller belongs.

[0033] Please see Figure 3 In some embodiments, the single I / O port multiplexed button detection and power-on / off circuit further includes: Delayed shutdown module 50; Delayed shutdown module 50 is electrically connected to the first switch module 20 and the power on / off button K1; The delayed shutdown module 50 is used to delay the shutdown of the first switch module 20.

[0034] The advantage of this embodiment is that by delaying the shutdown of the first switch module 20 through the delay shutdown module 50, the reliability of the button detection and power-on / off circuit with single I / O port multiplexing is improved. For example, the conduction of MOSFET Q1 and the power supply of the microcontroller can be maintained by delaying shutdown during the ON / OFF switch of the switch control port to the detection state.

[0035] Please see Figure 2 In some embodiments, the delay shutdown module 50 includes a first capacitor C1 and a first resistor R1; The first capacitor C1 is connected in parallel with the first resistor R1; one end of the first capacitor C1 is electrically connected to the source of the MOSFET Q1 and the power button K1; the other end of the first capacitor C1 is electrically connected to the gate of the MOSFET Q1; wherein, the first capacitor C1 is used to delay the turn-off of the MOSFET Q1.

[0036] The advantage of this embodiment is that the first capacitor C1 and the first resistor R1 together form a delayed shutdown module 50, thereby delaying the shutdown of the first switch module 20. In this way, even when the microcontroller's switch control port ON / OFF is in the detection state, i.e., when the switch control port ON / OFF is not outputting a high level to maintain power-on self-locking, the energy stored in the first capacitor C1 can still maintain the conduction of the MOSFET Q1, thereby improving the reliability of the single-IO port multiplexed button detection and power-on / off circuit.

[0037] In some embodiments, it should be noted that the first resistor R1 can be a voltage divider resistor.

[0038] Please see Figure 4 In some embodiments, the single I / O port multiplexed button detection and power-on / off circuit further includes: Overvoltage protection module 60; Overvoltage protection module 60 is electrically connected to first switch module 20 and second switch module 30; The overvoltage protection module 60 is used to provide overvoltage protection for the first switch module 20.

[0039] The advantage of this embodiment is that the overvoltage protection module 60 provides overvoltage protection for the first switch module 20, thereby improving the safety and reliability of the button detection and power-on / off circuit of the single IO port multiplexing.

[0040] Please see Figure 2 In some embodiments, the overvoltage protection module 60 includes a Zener diode ZD1 and a second resistor R2; One end of the second resistor R2 is electrically connected to the collector of transistor Q2; the other end of the second resistor R2 is electrically connected to the anode of Zener diode ZD1 and the gate of MOSFET Q1; the cathode of Zener diode ZD1 is electrically connected to the source of MOSFET Q1 and the power supply input terminal VCC.

[0041] The advantage of this embodiment is that the overvoltage protection module 60, composed of Zener diode ZD1 and second resistor R2, provides overvoltage protection for the switch module, thereby improving the safety and reliability of the button detection and power-on / off circuit of the single IO port multiplexing.

[0042] In some embodiments, specifically, the second resistor R2 can be a current-limiting resistor. It should be noted that the second resistor R2 and the Zener diode ZD1 form a series protection circuit to provide overvoltage protection for the MOS, which can reduce the risk of breakdown and damage between the gate and source of the MOS transistor Q1 due to excessive supply voltage (i.e., the input voltage of the power supply input terminal VCC).

[0043] Please see Figure 2 In some embodiments, the first switching module 20 further includes a second capacitor C2; One end of the second capacitor C2 is electrically connected to the drain of the MOSFET Q1, and the other end of the second capacitor C2 is grounded.

[0044] Please see Figure 2 In some embodiments, the second switching module 30 further includes a diode D1, a third resistor R3, and a fourth resistor R4; The anode of diode D1 is connected to the ON / OFF switch control port of the microcontroller, and the cathode of diode D1 is connected to one end of the third resistor R3 and one end of the fourth resistor R4; the other end of the third resistor R3 is connected to the base of transistor Q2; the other end of the fourth resistor R4 is grounded. Diode D1 is used in response to the pressing of the power button K1. When the button is pressed, it is in a reverse isolation state to prevent voltage backflow that could damage the microcontroller when the power supply voltage is lower than the voltage at the power supply input terminal.

[0045] The advantage of this embodiment is that the second switch module 30 is composed of diode D1, third resistor R3, fourth resistor R4 and transistor Q2. Then, the single I / O port multiplexed button detection and power-on circuit composed of the second switch module 30 and switch control port ON / OFF modules can actively switch the switch control port ON / OFF periodically between the power-on self-locking state and the detection state. This reduces the number of electronic device I / O ports occupied by the single I / O port multiplexed button detection and power-on circuit, saving hardware costs.

[0046] In some embodiments, it should be noted that when the power button is pressed, the voltage at the power input terminal VCC is greater than the power supply voltage of the microcontroller, and diode D1 is in reverse isolation state.

[0047] In some embodiments, it should be noted that the third resistor R3 can be a current-limiting resistor, and the fourth resistor R4 can be a pull-down resistor.

[0048] In some embodiments, MOSFET Q1 includes a P-channel MOSFET, and transistor Q2 includes an NPN transistor; wherein the withstand voltage of the P-channel MOSFET is greater than the input voltage of the power supply input terminal VCC, and the withstand voltage of the NPN transistor is greater than the input voltage of the power supply input terminal VCC.

[0049] The advantage of this embodiment is that it avoids damage to the button detection and power-on / off circuit of a single I / O port due to excessive voltage, thereby further improving the safety and reliability of the button detection and power-on / off circuit of a single I / O port.

[0050] In some embodiments, for example, for applications where the input voltage of the power supply input terminal VCC is between 3.5V and 30V, transistor Q2 can be selected as an NPN transistor with a voltage rating higher than the input voltage, such as an NPN transistor with a voltage rating greater than or equal to 40V. Furthermore, MOSFET Q1 can be selected as a P-channel MOSFET with a voltage rating greater than or equal to 40V, a current rating greater than the maximum operating current in a single I / O port multiplexed button detection and power-on / off circuit, and a gate-source threshold voltage (VGS) greater than 2.5V, to reduce the risk of MOSFET Q1 being damaged by the input voltage of the power supply input terminal VCC.

[0051] In some embodiments, for example, the operating voltage of the Zener diode ZD1 can be 12V and 0.5W. The resistance of the first resistor R1 can be 100 kΩ (K), the resistance of the second resistor R2 can be any value from 2K to 4.7K, the resistance of the third resistor R3 can be any value from 10K to 51K, and the resistance of the fourth resistor R4 can be 4.7K. The capacitance of the first capacitor C1 can be 100nF. The capacitance of the second capacitor C2 can be any value from 10uF to 220uF, and the voltage rating of the second capacitor C2 is at least 10V higher than the supply voltage.

[0052] The embodiments described in this application are intended to more clearly illustrate the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will know that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0053] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0054] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0055] Those skilled in the art will understand that the systems and functional modules / units in the devices disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof.

[0056] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0057] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0058] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. The coupling or direct coupling or communication connection between the shown or discussed units may be through some interfaces, or indirect coupling or communication connection between the apparatus or units, and may be electrical, mechanical, or other forms.

[0059] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0060] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0061] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A single I / O port multiplexed button detection and power on / off circuit, characterized in that, The single I / O port multiplexed button detection and power on / off circuit includes: The system includes a power button module, a first switch module, a second switch module, and a control module; wherein the control module has a switch control port. The power on / off button module is electrically connected to the first switch module and the second switch module; the switch control port of the control module is electrically connected to the second switch module and the power on / off button module; the first switch module is electrically connected to the power supply input terminal and the second switch module, and the second switch module and the power on / off button module are electrically connected to the power supply input terminal; The power on / off button module is used to respond to a pressing operation, driving the first switch module and the second switch module to conduct, so as to supply power to the load device and the control module based on the input voltage of the power supply input terminal, and so that the switch control port of the control module is in a power on / off self-locking state; the control module is used to switch the switch control port between the power on / off self-locking state and the detection state according to a preset time interval period; the switch control port is used to perform high and low level detection when in the detection state, so as to obtain the pressing state of the power on / off button module based on the level detection result.

2. The single I / O port multiplexed button detection and power-on / off circuit according to claim 1, characterized in that, The power on / off button module includes a power on / off button, the first switch module includes a MOSFET, the second switch module includes a transistor, and the control module includes a microcontroller. The power supply input terminal is electrically connected to one end of the power switch button, and the other end of the power switch button is electrically connected to the switch control port of the microcontroller and the base of the transistor; the emitter of the transistor is grounded, and the collector of the transistor is electrically connected to the gate of the MOSFET and the power supply input terminal; the source of the MOSFET is electrically connected to the power supply input terminal; the drain of the MOSFET is electrically connected to the power supply output terminal; wherein, the power supply output terminal is used to supply power to the load device and the microcontroller.

3. The single I / O port multiplexing button detection and power on / off circuit according to claim 2, characterized in that, The single I / O port multiplexed button detection and power on / off circuit also includes: Delayed shutdown module; the delayed shutdown module is electrically connected to the first switch module; The delayed shutdown module is used to delay the shutdown of the first switch module.

4. The single I / O port multiplexing button detection and power on / off circuit according to claim 3, characterized in that, The delayed shutdown module includes a first capacitor and a first resistor; The first capacitor is connected in parallel with the first resistor; one end of the first capacitor is electrically connected to the source of the MOS transistor and the power button; the other end of the first capacitor is electrically connected to the gate of the MOS transistor; wherein, the first capacitor is used to delay the turn-off of the MOS transistor.

5. The single I / O port multiplexing button detection and power on / off circuit according to claim 2, characterized in that, The single I / O port multiplexed button detection and power on / off circuit also includes: Overvoltage protection module; the overvoltage protection module is electrically connected to the first switch module and the second switch module; The overvoltage protection module is used to provide overvoltage protection for the first switch module.

6. The single I / O port multiplexing button detection and power on / off circuit according to claim 5, characterized in that, The overvoltage protection module includes a Zener diode and a second resistor; One end of the second resistor is electrically connected to the collector of the transistor; the other end of the second resistor is electrically connected to the anode of the Zener diode and the gate of the MOSFET; the cathode of the Zener diode is electrically connected to the source of the MOSFET and the power supply input terminal.

7. The single I / O port multiplexing button detection and power on / off circuit according to claim 2, characterized in that, The first switching module also includes a second capacitor; One end of the second capacitor is electrically connected to the drain of the MOS transistor, and the other end of the second capacitor is grounded.

8. The single I / O port multiplexing button detection and power on / off circuit according to claim 2, characterized in that, The second switching module also includes a diode, a third resistor, and a fourth resistor; The anode of the diode is electrically connected to the switch control port of the microcontroller, and the cathode of the diode is electrically connected to one end of the third resistor and one end of the fourth resistor; the other end of the third resistor is electrically connected to the base of the transistor; the other end of the fourth resistor is grounded. The diode is used to respond to the pressing operation of the power button. When the button is pressed, it is in a reverse isolation state to prevent voltage backflow that could damage the microcontroller when the power supply voltage of the microcontroller is lower than the voltage of the power supply input terminal.

9. The single I / O port multiplexing button detection and power on / off circuit according to claim 2, characterized in that, The MOSFET includes a P-channel MOSFET, and the transistor includes an NPN transistor; wherein the withstand voltage of the P-channel MOSFET is greater than the input voltage of the power supply input terminal, and the withstand voltage of the NPN transistor is greater than the input voltage of the power supply input terminal.