A method and apparatus for delaying shutdown and automatically turning on
Patent Information
- Application Number
- CN202611120914.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-27
- Publication Date
- 2026-10-27
AI Technical Summary
[0003]现有技术通常直接复用主板BIOS原生的来电自启能力,或采用断电后固定时长延时关机的处理策略,然而该类方案控制逻辑简单固化,未结合系统运行状态做动态适配,存在较高的系统运行风险与数据安全风险
通过提供一种开关机控制装置,开关机控制装置设置有电源在位检测端、开漏输出端、储能供电单元与第一前置面板连接接口,开漏输出端与第一前置面板连接接口通过走线连通,形成控制通路,由此可以通过开漏输出端转换为待控设备主板可识别的按键动作电平,实现开关机信号的模拟。
Smart Images

Figure CN122984901A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of computer technology, and in particular relates to a method and apparatus for delayed shutdown and automatic power-on. Background Technology
[0002] As the application scenarios of computing devices such as industrial control hosts, edge computing nodes, and distributed monitoring terminals continue to expand, the industry's demand for a more convenient and user-friendly system power-on and power-off control mechanism is becoming increasingly urgent.
[0003] Existing technologies typically reuse the motherboard BIOS's native power-on auto-start capability or employ a fixed-duration delay shutdown strategy after power failure. However, such solutions have simple and rigid control logic that is not dynamically adapted to the system's operating status, posing significant system operation and data security risks. Summary of the Invention
[0004] This application provides a method and apparatus for delayed shutdown and automatic power-on, which can enable the controlled device to automatically power on and run after the mains power is restored, without the need for manual on-site pressing of the power button; at the same time, it supports a delayed automatic shutdown mechanism after the mains power is cut off, ensuring that the motherboard, hard drive and other hardware and operating system complete a complete and safe shutdown process, thereby avoiding problems such as hard drive bad sectors, system crashes and data loss caused by sudden power outages.
[0005] In a first aspect, this application provides a method for delayed shutdown and automatic power-on, which is implemented based on a power-on / off control device. The power-on / off control device includes an energy storage power supply unit, a power-on / off control unit, a DC input interface, a DC output interface, a power redundancy unit, and a first front panel connection interface. The power-on / off control unit is electrically connected to the energy storage power supply unit and the first front panel connection interface, and is provided with a power in-situ detection terminal and an open-drain output terminal. The open-drain output terminal is connected to the first front panel connection interface. The first input terminal of the power redundancy unit is connected to the DC input interface, the second input terminal is electrically connected to the discharge output terminal of the energy storage power supply unit, and the output terminal of the power redundancy unit is electrically connected to the DC output interface. The DC input interface is used to connect to an external DC power supply, the DC output interface is used to connect to the power input terminal of the motherboard of the device under control, and the first front panel connection interface is used to connect to the second front panel connection interface of the motherboard of the device under control. The methods for delayed shutdown and automatic power-on include: When the power supply is detected to be disconnected by the power supply in-situ detection terminal, the power redundancy unit is controlled to switch the power supply path, and the energy storage power supply unit continuously supplies power to the motherboard of the device under control through the power redundancy unit and the DC output interface. Start timing and execute corresponding control logic based on the timing of external DC power supply recovery: If the external DC power supply is detected to be restored within a time interval that is less than the first preset time, the shutdown trigger action will be stopped and the controlled device will remain in normal operation. If the external DC power supply is detected to be restored within the interval where the timing duration is greater than or equal to the first preset duration and less than or equal to the second preset duration, the shutdown trigger pulse will continue to be output to trigger the controlled device to perform the normal shutdown process. After the shutdown is completed, the power-on action will be automatically triggered after a delay. If the external DC power supply is detected to be restored after the timing duration exceeds the second preset duration, the power supply status of the power-on / off control unit is determined: if the power-on / off control unit is reset due to a power interruption, then after a third preset duration, a low-level trigger pulse of preset width is output through the open-drain output terminal to simulate the power-on button action and control the motherboard of the controlled device to start the system; if the power-on / off control unit continues to supply power and the controlled device has completed shutdown, then after a fourth preset duration, a trigger pulse is output through the open-drain output terminal to trigger the controlled device to start, wherein the fourth preset duration is greater than the third preset duration.
[0006] Secondly, this application provides a power-on / off control device, which includes an energy storage power supply unit, a power-on / off control unit, a DC input interface, a DC output interface, a power redundancy unit, and a first front panel connection interface. The power-on / off control unit is electrically connected to the energy storage power supply unit and the first front panel connection interface, and is provided with a power in-situ detection terminal and an open-drain output terminal. The open-drain output terminal is connected to the first front panel connection interface. The first input terminal of the power redundancy unit is connected to the DC input interface, the second input terminal is electrically connected to the discharge output terminal of the energy storage power supply unit, and the output terminal of the power redundancy unit is electrically connected to the DC output interface. The DC input interface is used to connect to an external DC power supply, the DC output interface is used to connect to the power input terminal of the motherboard of the device under control, and the first front panel connection interface is used to connect to the second front panel connection interface of the motherboard of the device under control. The power on / off control unit is used to perform the following steps: When the power supply is detected to be disconnected by the power supply in-situ detection terminal, the power redundancy unit is controlled to switch the power supply path, and the energy storage power supply unit continuously supplies power to the motherboard of the device under control through the power redundancy unit and the DC output interface. Start timing and execute corresponding control logic based on the timing of external DC power supply recovery: If the external DC power supply is detected to be restored within a time interval that is less than the first preset time, the shutdown trigger action will be stopped and the controlled device will remain in normal operation. If the external DC power supply is detected to be restored within the interval where the timing duration is greater than or equal to the first preset duration and less than or equal to the second preset duration, the shutdown trigger pulse will continue to be output to trigger the controlled device to perform the normal shutdown process. After the shutdown is completed, the power-on action will be automatically triggered after a delay. If the external DC power supply is detected to be restored after the timing duration exceeds the second preset duration, the power supply status of the power-on / off control unit is determined: if the power-on / off control unit is reset due to a power interruption, then after a third preset duration, a low-level trigger pulse of preset width is output through the open-drain output terminal to simulate the power-on button action and control the motherboard of the controlled device to start the system; if the power-on / off control unit continues to supply power and the controlled device has completed shutdown, then after a fourth preset duration, a trigger pulse is output through the open-drain output terminal to trigger the controlled device to start, wherein the fourth preset duration is greater than the third preset duration.
[0007] The delayed shutdown and automatic power-on method and apparatus provided in this application have at least the following beneficial effects: By providing a power on / off control device, the power on / off control device is provided with a power on / off detection terminal, an open-drain output terminal, an energy storage power supply unit and a connection interface with a first front panel. The open-drain output terminal and the connection interface with the first front panel are connected by wiring to form a control path. Thus, the open-drain output terminal can be converted into a button action level that can be recognized by the main board of the controlled device, thereby realizing the simulation of power on / off signals.
[0008] Upon detecting a power outage, the power supply mode is first switched from external DC power to energy storage power supply via the power redundancy unit, ensuring the complete judgment and execution of the power-on / off control logic. If power is restored within a timing interval shorter than the first preset duration, before the shutdown pulse is issued, the power-on / off control unit directly terminates the shutdown process, achieving seamless continuous operation and avoiding unnecessary service interruptions caused by brief voltage fluctuations. If external DC power is restored within the interval between the first and second preset durations, the shutdown process continues, and the power-on action is automatically triggered after the system shuts down normally. If power is restored after the second preset duration, when the system is completely shut down, the corresponding power-on logic is matched according to whether the control unit is reset: a third preset duration delayed power-on is executed in the scenario of power restoration after a complete power outage, and a fourth preset duration delayed power-on is executed in the scenario of power restoration after shutdown under continuous power supply. Through hierarchical timing design, the continuous operation of services is maintained to the greatest extent, while avoiding the impact of frequent power-on / off on the hardware, improving the overall operational stability and service life of the equipment.
[0009] Meanwhile, the device can be connected to the controllable device via the DC output interface and the first front panel connection interface. There is no need to modify the original hardware circuit, BIOS firmware and operating system of the controllable device. The open-drain output architecture can be adapted to the button level specifications of different motherboards. The device can automatically start and resume business operation when the power is turned on without the need for manual on-site pressing of the power button.
[0010] In addition, after a power outage, the device continues to provide a stable power supply through the energy storage power supply unit, rather than directly cutting off the power to the device. It also triggers the device's native soft shutdown mechanism by simulating button actions, which can fundamentally avoid problems such as hard drive bad sectors, file system corruption, and business data loss caused by sudden power outages. This effectively protects the motherboard, storage hardware, and system data security of the controlled device, reducing the probability of device failure and data recovery costs. Attached Figure Description
[0011] Figure 1 This is a structural diagram of the power on / off control device provided in the embodiments of this application; Figure 2 This is a flowchart illustrating the delayed shutdown and automatic power-on method provided in the embodiments of this application; Figure 3 This is a schematic diagram of the signal pins involved in the power on / off control unit provided in the embodiments of this application. Detailed Implementation
[0012] To make the technical problems, technical solutions, and beneficial effects to be solved by 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 are not intended to limit the scope of this application.
[0013] Please see Figure 1 , Figure 1 This is a structural block diagram of the power on / off control device upon which the delayed shutdown and automatic power on methods provided in this application are based. Figure 1 As shown, the power-on / off control device includes an energy storage power supply unit, a power-on / off control unit, a DC input interface, a DC output interface, a power redundancy unit, and a first front panel connection interface. The power-on / off control unit is electrically connected to the energy storage power supply unit and the first front panel connection interface. The power-on / off control unit is equipped with a power in-situ detection terminal and an open-drain output terminal, with the open-drain output terminal connected to the first front panel connection interface. The first input terminal of the power redundancy unit is electrically connected to the DC input interface, the second input terminal is electrically connected to the discharge output terminal of the energy storage power supply unit, and the output terminal of the power redundancy unit is electrically connected to the DC output interface. The DC input interface is used to connect to an external DC power supply, the DC output interface is used to connect to the power input terminal of the mainboard of the device under control, and the first front panel connection interface is used to connect to the second front panel connection interface of the mainboard of the device under control.
[0014] It should be noted that the power on / off control device adopts an independent external architecture, which is connected in series between the DC power adapter and the power supply link of the motherboard of the device under control. There is no need to modify the original hardware circuit and system firmware of the computer and other devices. Adaptation and deployment can be completed only through the relevant interfaces. It is compatible with various industrial control hosts, computers, edge computing nodes, monitoring hosts and other devices, which greatly reduces the transformation cost of solution deployment.
[0015] The open-drain output terminal is the signal generator for the power-on / off trigger pulse, and its level is directly controlled by the firmware program of the power-on / off control unit. The open-drain output terminal is directly connected to the first front panel connection interface via traces on the PCB board, forming a control path. This allows the output to be converted into a button action level recognizable by the motherboard of the device under control, and then transmitted to the first front panel connection interface through this control path. When the first front panel connection interface is connected to the second front panel connection interface of the motherboard of the device under control, the power-on / off trigger pulse signal can be transmitted to the motherboard of the device under control, thus simulating the power-on / off signal.
[0016] Conventional computer equipment requires manual pressing of the power button after being connected to mains power before the motherboard BIOS initiates the power-on self-test and system boot process. This application uses a signal link of "open-drain output terminal --- first front panel connection interface --- second front panel connection interface" to output a corresponding level signal after determining the trigger timing, thereby simulating the electrical action of manually pressing the power button and directly triggering the motherboard BIOS's native boot process. This eliminates the need to modify BIOS settings or install any accompanying software within the device system.
[0017] Optionally, the energy storage power supply unit includes a supercapacitor module, which may include one or more supercapacitors. The supercapacitor provides backup power through energy storage and, in conjunction with a simulated soft shutdown mechanism, ensures that the system can complete the shutdown process normally after a mains power outage, avoiding problems such as hard drive bad sectors, file system corruption, and loss of business data caused by sudden power failure.
[0018] Optionally, the power-on / off control device also includes a charging unit. The input of the charging unit is connected to a DC input interface or a boost / buck module (if any), and the output is connected to the power-on / off control unit to support the charging of the supercapacitor module. The charging unit may also be equipped with a power-on / off detection circuit to detect the on / off status of the external mains power, convert the on / off status signal (ACOK signal) of the external mains power into a standard high / low level digital signal, and input it to the power-on / off detection terminal of the power-on / off control unit.
[0019] Optionally, the power redundancy unit employs a diode-OR gate circuit. Its input terminals are connected to the DC input interface and the energy storage power supply unit, respectively, and its output terminal is connected to the DC output interface. This is used to compare the voltage amplitudes of the external DC input and the energy storage power supply output in real time, automatically switching on the higher voltage path and cutting off the other path. When the mains power is normal, the external power supply provides power and charges the energy storage power supply unit. When the mains power is disconnected, the path switching is performed, and the supercapacitor stores energy to continuously supply power.
[0020] Optionally, a boost unit is also provided between the energy storage power supply unit and the power redundancy unit to boost the supercapacitor to a 12V regulated output.
[0021] Optionally, the power-on / off control device also includes a boost / buck unit, which supports a wide input voltage range of 9~36V and a regulated 12V output. The input terminal of the boost / buck unit is connected to a DC input interface, and the first output terminal is connected to a power redundancy unit.
[0022] The power on / off control unit, as the core control unit, contains computer programs that execute delayed shutdown and automatic power-on methods.
[0023] like Figure 2 As shown, the methods for delayed shutdown and automatic power-on include: S10, when the external DC power supply is disconnected by the power supply in-place detection terminal, controls the power redundancy unit to switch the power supply path, and the energy storage power supply unit continuously supplies power to the main board of the device under control through the power redundancy unit and the DC output interface. S20, start timing and execute corresponding control logic according to the timing of external DC power supply recovery: S30: If the external DC power supply is detected to be restored within the interval where the timing duration is less than the first preset duration, the shutdown trigger action is stopped and the controlled device remains in normal operation. S40, if the external DC power supply is detected to be restored within the interval where the timing duration is greater than or equal to the first preset duration and less than or equal to the second preset duration, the power-off trigger pulse will continue to be output to trigger the controlled device to perform the normal power-off process. After the power-off is completed, the power-on action will be automatically triggered after a delay. S50, if the external DC power supply is detected to be restored after the timing duration exceeds the second preset duration, the power supply status of the power-on / off control unit is determined: if the power-on / off control unit is reset due to power interruption, after a third preset duration, a low-level trigger pulse of preset width is output through the open-drain output terminal to simulate the power-on button action and control the main board of the controlled device to start the system; if the power-on / off control unit continues to supply power and the controlled device has completed shutdown, after a fourth preset duration, a trigger pulse is output through the open-drain output terminal to trigger the controlled device to start, and the fourth preset duration is greater than the third preset duration.
[0024] Among them, "reset due to power interruption" refers to the situation where power is completely cut off and then restored. When the duration of the external DC power supply interruption exceeds the preset endurance threshold of the energy storage power supply unit, the power on / off control unit undergoes a hardware reset due to the power interruption. This situation is equivalent to the power-on scenario when the device is first connected to power. "Continuous power supply and the controlled device has completed shutdown" refers to the situation where power is restored after shutdown under continuous power supply. When the external DC power supply is disconnected, the energy storage power supply unit continuously supplies power to the power on / off control unit, and the power on / off control unit does not reset throughout the process. After the controlled device has completed the normal shutdown process, the external DC power supply is restored.
[0025] The third preset duration is the baseline delay for automatic power-on upon first power-on, used to avoid power surges and voltage instability. The fourth preset duration is the extended power-on delay after shutdown, used to ensure the motherboard is fully reset and the system is completely still before restarting, avoiding abnormal startup. As an example, the third preset duration is 4 seconds, and the fourth preset duration is 20 seconds.
[0026] The first and second preset durations are used to determine whether the shutdown process can be aborted after a power outage. As an example, the first preset duration is 2 seconds and the second preset duration is 3 seconds.
[0027] This application establishes differentiated hierarchical control strategies for shutdown after a power outage and startup after a power outage. Specifically, upon detecting a power outage, the power supply mode is first switched from external DC power supply to energy storage power supply via a power redundancy unit, ensuring that the startup and shutdown control logic can be fully judged and executed. If power is restored within a timing interval shorter than the first preset duration, the shutdown pulse has not yet been issued, and the startup and shutdown control unit directly terminates the shutdown process, allowing the system to continue running and achieving seamless recovery from a brief power outage. If external DC power is restored within the interval between the first and second preset durations, the shutdown process continues, and the startup action is automatically triggered after the system shuts down normally. If power is restored after the second preset duration, the system has already completely shut down, and the startup logic is matched according to whether the control unit is reset: a delayed startup of the third preset duration is executed in the scenario of power restoration after a complete power outage, and a delayed startup of the fourth preset duration is executed in the scenario of power restoration after shutdown under continuous power supply.
[0028] The shutdown action in this solution is not a direct power cut-off, and the power-on action is not a manual button press. Instead, it works in conjunction with the backup power supply of the energy storage unit and simulates the electrical action of a physical power button to trigger the native soft shutdown mechanism of the motherboard of the controlled device. This guides the operating system to execute a complete shutdown process, including terminating business processes, persisting data, unloading the file system, and returning the hard drive heads to their original positions. This ensures that the operating system completes the shutdown process, thus preventing hard drive damage, file system corruption, and data loss caused by sudden power outages.
[0029] Optionally, the following may also be included before starting the timing: Continuously acquire the power supply status at the power supply presence detection terminal; When the duration of the low-level state reaches the preset anti-shake duration, it is determined to be a real power failure and the power failure timer is started. If power is restored within the preset anti-shake duration, the shutdown sequence will not be activated, and normal monitoring will be maintained.
[0030] As an example, the preset anti-shake duration is 1 second. That is, a true power failure is only determined when the power supply is detected by maintaining a low level signal for 1 second, thus avoiding false triggering due to flickering.
[0031] Optionally, the power-on / off control device further includes a communication interface electrically connected to the power-on / off control unit; the delayed power-off and automatic power-on methods provided in this application embodiment further include: Once the anti-shake confirmation is completed and a genuine power outage is determined, the power on / off control unit sends a power outage alarm command to the host device under control via the communication interface, triggering the host device under control to execute a preset emergency handling script. Upon receiving a shutdown ready command from the host device, a shutdown trigger pulse is output. If no shutdown ready feedback is received within the preset timeout period, the backup logic for simulated button-triggered shutdown is executed.
[0032] Understandably, when the open-drain output terminal receives a low level, the host operating system of the controlled device cannot distinguish between manual operation and power failure triggering, and therefore cannot prioritize actions such as emergency data saving and secure business exit. By first sending a power failure alarm command to the host system, triggering the system's preset emergency handling scripts (such as critical data write-to-disk, secure shutdown of business processes, and log persistence), and then executing the formal shutdown pulse after receiving "shutdown ready" feedback from the system, the system will revert to the original simulated button shutdown logic if no feedback is received within the timeout period. In this way, the host device also participates in the shutdown process, which can significantly reduce the risk of data loss in scenarios such as industrial hosts and servers.
[0033] Alternatively, the methods for delayed shutdown and automatic power-on may also include: The power on / off control unit determines in real time whether the mainboard of the controlled device has completed shutdown by sampling the DC output current and detecting the standby power status of the mainboard. If the controlled device still fails to shut down within a preset time after the first shutdown trigger pulse is output, a second shutdown trigger pulse will be output. If the shutdown is not completed after a second trigger, the fault status is recorded, and the power supply output is cut off before the capacitor voltage of the energy storage power supply unit drops to a safe threshold.
[0034] Specifically, a sampling resistor is connected in series in the DC output circuit of the power-on / off control device. The power-on / off control unit collects the voltage difference across the sampling resistor through its built-in ADC and calculates the output current value of the main power supply circuit (i.e., the DC output current) in real time using Ohm's law. The first front panel connection interface is equipped with a pin connected in parallel to the power indicator pin of the second front panel connection interface of the device under control, thereby enabling the detection of whether the device under control has completed power-off. Only when the DC output current is continuously lower than the power-off threshold and the status signal of the device under control is in the power-off state is it determined that the device under control has completed normal power-off. Through cross-verification of current characteristics and operating status signals, single detection misjudgment in scenarios such as system hibernation and signal interference can be effectively avoided, significantly improving the accuracy of power-off status recognition.
[0035] If the controlled device fails to enter the shutdown state after the secondary output shutdown trigger pulse, a shutdown execution failure is determined. At this time, the power-on / off control unit continuously monitors the capacitor voltage of the energy storage power supply unit. When the capacitor voltage approaches the discharge safety threshold, the boost module will enter the undervoltage operating range, and its output power supply voltage will continuously drop and ripple will increase. The motherboard of the controlled device will experience irregular abnormal power loss due to power instability. This state is equivalent to a sudden power outage and will still cause problems such as abnormal hard drive head repositioning, file system corruption, and loss of business data. Therefore, this application sets up a mechanism to actively cut off the main power supply output before the capacitor voltage of the energy storage power supply unit drops to the safety threshold. This avoids disordered power loss damage caused by power instability and prevents irreversible performance degradation of the supercapacitor due to deep over-discharge. Simultaneously, it preserves the basic power supply circuit of the power-on / off control unit itself to complete fault state recording and event storage.
[0036] Optionally, the energy storage power supply unit also includes a current sampling circuit and a voltage sampling circuit. The methods for delayed shutdown and automatic startup may also include: The power on / off control unit collects the current and voltage data of the supercapacitor module in real time through current sampling circuit and voltage sampling circuit; Based on the collected current and voltage data, the remaining power of the supercapacitor module and the current system power consumption of the device under control are calculated to estimate the remaining battery life. Based on the estimated remaining battery life, the values of the first preset duration, the third preset duration, and the fourth preset duration are dynamically adjusted.
[0037] Specifically, a voltage sampling circuit connected in parallel across the supercapacitor module acquires the real-time total terminal voltage of the supercapacitor module; a current sampling circuit connected in series in the main charging / discharging circuit of the supercapacitor module acquires the real-time loop current of the supercapacitor module. The main charging / discharging circuit covers both the charging and discharging paths. During charging, the current path is DC input interface – boost / buck unit – charging unit – supercapacitor module; during discharging, the current path is supercapacitor module – boost module – power redundancy unit – DC output interface. Multiple sets of continuously acquired raw voltage and current data are processed using a moving average filter to obtain smoothed real-time capacitor terminal voltage and real-time loop current. Then, the current operating state is determined based on the current flow direction: when the current flows into the supercapacitor module, it is determined to be in charging mode; when the current flows out of the supercapacitor module, it is determined to be in discharging mode.
[0038] In the discharge state, the output power of the supercapacitor side is calculated based on the real-time capacitor terminal voltage and real-time loop current. Then, the actual operating power consumption of the main board of the controlled device is obtained by combining the pre-calibrated conversion efficiency of the boost module.
[0039] Based on the energy storage characteristics of supercapacitors, and combining the current terminal voltage with the preset safe discharge lower limit voltage, the remaining usable energy storage is calculated using the following formula: Remaining usable energy storage = 0.5 × Total capacity of supercapacitor module × (Current terminal voltage) 2 -Discharge safety lower limit voltage 2 ).
[0040] The power-on / off control unit divides the remaining available energy by the current actual power consumption of the system to obtain the theoretical remaining runtime. Simultaneously, it compares the theoretical remaining runtime with the baseline duration required for the system's standard shutdown to determine whether the current energy storage is sufficient to support a complete safe shutdown process. When the theoretical remaining battery life is greater than or equal to k1 × the shutdown baseline duration (k1 is the safety redundancy coefficient, usually taken as 3~5), it is determined to be in a state of sufficient energy storage. Within the allowable range, the first preset duration is extended to expand the power outage interruption window and maintain the continuous operation of the system as much as possible to avoid unnecessary business interruption caused by short-term power outages. When the shutdown reference duration < theoretical remaining battery life < k1 × shutdown reference duration, it is determined to be a state of energy shortage. The first preset duration is linearly shortened according to the remaining battery life ratio to trigger the shutdown action in advance and reserve sufficient shutdown execution time. When the theoretical remaining battery life is less than or equal to the shutdown baseline duration, it is determined that the energy storage can only barely support the shutdown process. The first preset duration is compressed to the minimum value, and the shutdown process is immediately triggered to ensure that the system can completely and safely shut down, avoiding system damage and data loss caused by power outages.
[0041] The third preset duration corresponds to the first power-on delay after a complete power-off reset, and the fourth preset duration corresponds to the power-on delay after the shutdown is completed under continuous power supply. The two are adjusted according to the remaining power of the supercapacitor, and the fourth preset duration is always greater than the third preset duration.
[0042] When an incoming call is detected that requires power-on and the remaining power of the supercapacitor module is less than a% of the rated capacity (e.g., 20%), the third and fourth preset durations are extended within the allowable range. The delay window before power-on is used to prioritize replenishing the supercapacitor's power, avoiding the large current surge at the moment of system startup from further reducing energy storage, while ensuring that the supercapacitor module has basic power-off endurance capability after power-on. When the remaining power of the supercapacitor module is higher than (100-a)% of the rated capacity, the third and fourth preset times are maintained or slightly shortened to accelerate the system power-on startup speed and improve the efficiency of business recovery.
[0043] The power on / off control unit pre-stores the default values and adjustment limits of the baseline power off time, the total capacity of the supercapacitor module, the first preset time, the second preset time, the third preset time, the fourth preset time, and the baseline power off time. The power on / off control unit repeatedly executes the complete process of sampling, calculation, and adjustment at a fixed cycle, updates the sampling data in real time, recalculates the battery life, and adjusts the timing parameters to continuously adapt to the scenario of dynamic changes in system power consumption.
[0044] Furthermore, methods for delayed shutdown and automatic power-on also include: Obtain the ambient temperature; Based on the current ambient temperature and the estimated remaining battery life, the values of the first preset duration, the third preset duration, and the fourth preset duration are dynamically adjusted.
[0045] Understandably, ambient temperature directly affects the usable capacity, internal resistance characteristics, and conversion efficiency of the supercapacitor module: at low temperatures, the effective capacity of the supercapacitor decreases, the internal resistance increases, and the actual release of stored energy decreases; at high temperatures, the capacitor aging rate accelerates, requiring control of the depth of discharge to ensure lifespan. The mapping relationship between ambient temperature, remaining runtime, and various preset durations can be pre-calibrated using test data under multiple operating conditions and stored in the power-on / off control unit. Through joint correction based on both temperature and remaining runtime, the reliability of timing logic under extreme temperature environments can be guaranteed, avoiding problems such as power outages during shutdown or insufficient timing redundancy due to changes in energy storage characteristics.
[0046] Alternatively, delayed shutdown and automatic power-on methods also include: When the external DC power supply is normal, the charging unit performs constant voltage charging on the supercapacitor module of the energy storage power supply unit. When the voltage difference between any individual capacitor in the supercapacitor module exceeds a set threshold, the electrical energy of the capacitor with the higher voltage is transferred to the capacitor with the lower voltage.
[0047] In practical implementation, a flying capacitor active balancing topology can be adopted: a flying capacitor is configured between every two adjacent capacitor cells, and a switching matrix composed of switching transistors is set up accordingly. The flying capacitor can be selectively connected in parallel across either the high-voltage or low-voltage cell by switching the transistors on and off. When the voltage difference between any two cells exceeds a set threshold, the balancing control process is as follows: In the first stage, the corresponding switch is turned on, so that the higher voltage capacitor is connected in parallel across the flying capacitor. The high voltage capacitor charges the flying capacitor, and electrical energy is transferred from the high voltage capacitor to the flying capacitor for storage until the voltage of the flying capacitor approaches the terminal voltage of the high voltage capacitor. In the second stage, the switching state is quickly switched to disconnect the high-voltage cell from the flying capacitor. The flying capacitor is then connected in parallel to the two ends of the low-voltage cell. The flying capacitor discharges to the low-voltage cell, and electrical energy is transferred from the flying capacitor to the low-voltage cell.
[0048] By performing the above two stages in a high-frequency cycle, excess energy from the high-voltage cells can be continuously transferred to the low-voltage cells until the voltage difference between the cells falls back to the allowable range, thus completing the charging and equalization process.
[0049] Alternatively, the methods for delayed shutdown and automatic power-on may also include: During the discharge process, the individual voltage of each supercapacitor in the supercapacitor module is continuously collected; When the voltage of any single supercapacitor drops to the preset discharge safety limit, a shutdown action is forcibly triggered and the discharge circuit of the energy storage power supply unit is cut off.
[0050] It is understandable that during discharge, the individual capacitors connected in series will exhibit inconsistent discharge rates due to inherent differences in internal resistance and capacitance. If deep discharge continues, the voltage of some individual cells will drop below the safe lower limit first, causing irreversible damage to the electrode materials, permanent capacitance decay, and in severe cases, leakage, bulging, and other failure problems. By using individual cell-level voltage monitoring and forced disconnection protection, over-discharge failure within individual cells can be avoided, ensuring the consistency and cycle life of the entire capacitor bank.
[0051] The following provides an exemplary description of the complete execution flow of this solution, using specific hardware parameters and pin definitions: In this embodiment, as... Figure 3As shown, the main control chip of the power-on / off control unit is UB1. GPIO_0 is the power-on detection terminal, connected to the ACOK signal output terminal of the charging module; GPIO_1 is the open-drain (OD) output terminal, connected to the first front panel connection interface, used to output the power-on / off trigger pulse, with a fixed pulse width of 500ms. The timing parameters are as follows: anti-jitter duration 1s, first preset duration (stoppable window duration) 2s, second preset duration 20s, third preset duration (first power-on delay) 4s, fourth preset duration (long delay power-on after power-off) 20s; after power failure, the default power-off action is triggered approximately 4s later.
[0052] In the following text, GPIO_0 is directly referred to as GPIO0, and GPIO_1 is directly referred to as GPIO1. The execution process includes: 1. After the power-on control device is powered on, it starts timing. When the timing reaches 4 seconds, it controls UB1 to output a low level for 500ms, and then returns to a continuous high level. This pulse is equivalent to the electrical action of pressing the power button, triggering the device to power on and enter the system.
[0053] 2. Power failure signal detection When the external adapter is unplugged or the mains power is interrupted, the ACOK signal of the charging module undergoes a level flip (from low level to high level); after UB1 detects the ACOK signal flip, the corresponding GPIO0 level flips from the normal high level to the low level, and UB1 then enters the power-off timing judgment process. The default overall power-off response time is about 4 seconds.
[0054] 3-1. Default shutdown branch When the power-off timer reaches 2 seconds, the control GPIO1 outputs a low level for 500ms, and then returns to a continuous high level, triggering the device to perform a soft shutdown action.
[0055] 3-2. Shutdown branch can be terminated. If, during the 2nd to 3rd second interval of the power-off timing, the GPIO_0 level is detected to return to a high level (external power supply restored), the pending action of "GPIO1 outputting a low level for 500ms and then returning to a high level" is immediately terminated. GPIO1 is then controlled to maintain a normal, continuous high level, preventing the power-off action from being executed, and the device continues to operate normally.
[0056] 3-3. Do not abort shutdown and automatically restart the branch. If, during the 4th to 20th second interval of the power-off timing, the GPIO0 level is detected to return to a high level (external power supply restored), the power-off trigger action has been issued and cannot be interrupted. After the power-off action is completed, the timing continues for 20 seconds, and the GPIO1 output is controlled to return to a high level after 500ms, and the power-on action is executed again.
[0057] 3-4. After completely shutting down, power on the branch. If GPIO0 is detected to return to a high level after 21 seconds of power-off timing (at which point the device has completed shutdown), then the corresponding power-on logic will be executed according to the power supply scenario: In the case of power-off recovery under continuous power supply (power is not interrupted when power is restored), after a 20-second delay from the detection of power restoration, control GPIO1 to output a 500-second low level and then restore the pull-up to trigger the power-on action; If it is a scenario of complete power failure followed by power restoration, then the 4-second power-on automatic startup logic will be executed.
[0058] Simultaneously set task priority rules: if it is detected that task 3-3 is currently being executed, execute that task logic first; if there is no execution conflict with task 3-3, execute the 4-second boot function.
[0059] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for delayed shutdown and automatic power-on, characterized in that, This is implemented using a power-on / off control device, which includes an energy storage power supply unit, a power-on / off control unit, a DC input interface, a DC output interface, a power redundancy unit, and a first front panel connection interface. The power-on / off control unit is electrically connected to the energy storage power supply unit and the first front panel connection interface, and is equipped with a power in-situ detection terminal and an open-drain output terminal. The open-drain output terminal is connected to the first front panel connection interface. The first input terminal of the power redundancy unit is connected to the DC input interface, the second input terminal is electrically connected to the discharge output terminal of the energy storage power supply unit, and the output terminal of the power redundancy unit is electrically connected to the DC output interface. The DC input interface is used to connect to an external DC power supply, the DC output interface is used to connect to the power input terminal of the motherboard of the device under control, and the first front panel connection interface is used to connect to the second front panel connection interface of the motherboard of the device under control. The methods for delayed shutdown and automatic power-on include: When the power supply is detected to be disconnected by the power supply in-situ detection terminal, the power redundancy unit is controlled to switch the power supply path, and the energy storage power supply unit continuously supplies power to the motherboard of the device under control through the power redundancy unit and the DC output interface. Start timing and execute corresponding control logic based on the timing of external DC power supply recovery: If the external DC power supply is detected to be restored within a time interval that is less than the first preset time, the shutdown trigger action will be stopped and the controlled device will remain in normal operation. If the external DC power supply is detected to be restored within the interval where the timing duration is greater than or equal to the first preset duration and less than or equal to the second preset duration, the shutdown trigger pulse will continue to be output to trigger the controlled device to perform the normal shutdown process. After the shutdown is completed, the power-on action will be automatically triggered after a delay. If the external DC power supply is detected to be restored after the timing duration exceeds the second preset duration, the power supply status of the power-on / off control unit is determined: if the power-on / off control unit is reset due to a power interruption, then after a third preset duration, a low-level trigger pulse of a preset width is output through the open-drain output terminal to simulate the power-on button action and control the motherboard of the device under control to start the system; if the power-on / off control unit continues to supply power and the device under control has completed shutdown, then after a fourth preset duration, a trigger pulse is output through the open-drain output terminal to trigger the device under control to start, wherein the fourth preset duration is greater than the third preset duration.
2. The method for delayed shutdown and automatic power-on as described in claim 1, characterized in that, The start timing also includes: Continuously acquire the power supply status at the power supply presence detection terminal; When the duration of the low-level state reaches the preset anti-shake duration, it is determined to be a real power failure and the power failure timer is started. If power is restored within the preset anti-shake duration, the shutdown sequence will not be activated, and normal monitoring will be maintained.
3. The method for delayed shutdown and automatic power-on as described in claim 2, characterized in that, The power-on / off control device further includes a communication interface connected to the power-on / off control unit; the method further includes: Once the anti-shake confirmation is completed and a genuine power outage is determined, the power on / off control unit sends a power outage alarm command to the host device under control through the communication interface, triggering the host device under control to execute a preset emergency handling script. Upon receiving a shutdown ready command from the host device, a shutdown trigger pulse is output. If no shutdown ready feedback is received within the preset timeout period, the backup logic for simulated button-triggered shutdown is executed.
4. The method for delayed shutdown and automatic power-on as described in claim 1, characterized in that, The method further includes: The power on / off control unit determines whether the mainboard of the controlled device has completed power off by sampling the DC output current and detecting the standby power status of the mainboard. If the controlled device still fails to shut down within a preset time after the first shutdown trigger pulse is output, a second shutdown trigger pulse will be output. If the shutdown is not completed after a second trigger, the fault status is recorded, and the power supply output is cut off before the capacitor voltage of the energy storage power supply unit drops to a safe threshold.
5. The method for delayed shutdown and automatic power-on as described in claim 1, characterized in that, The energy storage power supply unit includes a supercapacitor module, a current sampling circuit, and a voltage sampling circuit; the method further includes: The power-on / off control unit collects the current and voltage data of the supercapacitor module in real time through the current sampling circuit and the voltage sampling circuit. Based on the collected current and voltage data, the remaining power of the supercapacitor module and the current system power consumption of the device under control are calculated to estimate the remaining battery life. The values of the first preset duration, the third preset duration, and the fourth preset duration are dynamically adjusted based on the estimated remaining battery life.
6. The method for delayed shutdown and automatic power-on as described in claim 5, characterized in that, The step of dynamically adjusting the values of the first preset duration, the third preset duration, and the fourth preset duration based on the estimated remaining battery life includes: Obtain the ambient temperature; Based on the ambient temperature and the estimated remaining battery life, the values of the first preset duration, the third preset duration, and the fourth preset duration are dynamically adjusted.
7. The method for delayed shutdown and automatic power-on as described in any one of claims 1 to 6, characterized in that, The power on / off control device further includes a charging unit, and the method further includes: When the external DC power supply is normal, the supercapacitor module of the energy storage power supply unit is charged by the charging unit under constant voltage. When the voltage difference between any individual capacitor in the supercapacitor module exceeds a set threshold, the electrical energy of the capacitor with the higher voltage is transferred to the capacitor with the lower voltage.
8. The method for delayed shutdown and automatic power-on as described in any one of claims 1 to 6, characterized in that, The method further includes: During the discharge process, the individual voltage of each supercapacitor in the supercapacitor module is continuously collected; When the voltage of any single supercapacitor drops to the preset discharge safety limit, a shutdown action is forcibly triggered and the discharge circuit of the energy storage power supply unit is cut off.
9. A power on / off control device, characterized in that, The power-on / off control device includes an energy storage power supply unit, a power-on / off control unit, a DC input interface, a DC output interface, a power redundancy unit, and a first front panel connection interface. The power-on / off control unit is electrically connected to the energy storage power supply unit and the first front panel connection interface. The power-on / off control unit is provided with a power in-situ detection terminal and an open-drain output terminal. The open-drain output terminal is connected to the first front panel connection interface. The first input terminal of the power redundancy unit is connected to the DC input interface, the second input terminal is electrically connected to the discharge output terminal of the energy storage power supply unit, and the output terminal of the power redundancy unit is electrically connected to the DC output interface. The DC input interface is used to connect to an external DC power supply, the DC output interface is used to connect to the power input terminal of the motherboard of the device under control, and the first front panel connection interface is used to connect to the second front panel connection interface of the motherboard of the device under control. The power on / off control unit is used to perform the following steps: When the power supply is detected to be disconnected by the power supply in-situ detection terminal, the power redundancy unit is controlled to switch the power supply path, and the energy storage power supply unit continuously supplies power to the motherboard of the device under control through the power redundancy unit and the DC output interface. Start timing and execute corresponding control logic based on the timing of external DC power supply recovery: If the external DC power supply is detected to be restored within a time interval that is less than the first preset time, the shutdown trigger action will be stopped and the controlled device will remain in normal operation. If the external DC power supply is detected to be restored within the interval where the timing duration is greater than or equal to the first preset duration and less than or equal to the second preset duration, the shutdown trigger pulse will continue to be output to trigger the controlled device to perform the normal shutdown process. After the shutdown is completed, the power-on action will be automatically triggered after a delay. If the external DC power supply is detected to be restored after the timing duration exceeds the second preset duration, the power supply status of the power-on / off control unit is determined: if the power-on / off control unit is reset due to a power interruption, then after a third preset duration, a low-level trigger pulse of preset width is output through the open-drain output terminal to simulate the power-on button action and control the motherboard of the controlled device to start the system; if the power-on / off control unit continues to supply power and the controlled device has completed shutdown, then after a fourth preset duration, a trigger pulse is output through the open-drain output terminal to trigger the controlled device to start, wherein the fourth preset duration is greater than the third preset duration.
