Charging / discharging switching device, charging / discharging switching method, and charging / discharging system

By using a charge-discharge switching device and method, the system automatically switches to energy storage power supply when the mains power is abnormal, solving the problem of insufficient power supply continuity for terminal equipment and ensuring the stable operation of the load.

CN122246923APending Publication Date: 2026-06-19SHENZHEN HELLO TECH ENERGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN HELLO TECH ENERGY CO LTD
Filing Date
2026-03-19
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Terminal devices in home and office settings cannot achieve grid-connected charging and off-grid inverter when the mains power is interrupted, resulting in insufficient power supply continuity. Furthermore, manually switching to the power supply mode may lead to the risk of power failure and restart.

Method used

A charge/discharge switching device is provided, including an adapter, a charge/discharge module, and a control module. It automatically controls the switching between charging, pre-discharging, and discharging under mains power conditions, ensuring flexible scheduling of current flow.

🎯Benefits of technology

It enables automatic switching when the mains power is abnormal, ensuring continuous power supply to the load, avoiding power failure and restart, and improving the continuity and reliability of power supply.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122246923A_ABST
    Figure CN122246923A_ABST
Patent Text Reader

Abstract

This application discloses a charge / discharge switching device, a charge / discharge switching method, and a charge / discharge system. The charge / discharge switching device includes an adapter, a charge / discharge module, and a control module. The adapter is used to connect to mains power and a load. The charge / discharge module is connected to an energy storage power source and the adapter. The control module is connected to both the mains power and the charge / discharge module, and is used to: acquire the status of the mains power; when the mains power is in an on state, control the charge / discharge module to be in a charging state so that the mains power charges the energy storage power source through the adapter and the charge / discharge module; during a preset time period when the mains power switches from an on state to an off state, control the charge / discharge module to be in a pre-discharge state so that a preset energy in the energy storage power source supplies power to the load through the charge / discharge module and the adapter; and after the preset time period when the mains power switches from an on state to an off state, control the charge / discharge module to be in a discharging state so that the energy storage power source supplies power to the load through the charge / discharge module and the adapter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of energy storage technology, specifically to a charge-discharge switching device, a charge-discharge switching method, and a charge-discharge system. Background Technology

[0002] In home and office settings, terminal devices such as optical modems, routers, and smart access control electronic locks have extremely high requirements for power supply continuity. Regular power outages, as well as unconventional mains power interruptions caused by extreme weather, grid disasters, or equipment failures, will directly lead to these loads becoming disconnected from the grid or failing. Portable energy storage power supplies are often used as backup emergency solutions in such situations; however, energy storage power supplies typically only draw power from the mains through an adapter and cannot simultaneously achieve bidirectional energy flow of "grid-connected charging" and "off-grid inversion" while connected to the mains. Furthermore, these devices require manual switching to power supply mode during mains power outages, which may expose these loads to the risk of power loss and restart. Summary of the Invention

[0003] This application provides a charge / discharge switching device, a charge / discharge switching method, and a charge / discharge system.

[0004] This application provides a charge / discharge switching device. The device includes an adapter, a charge / discharge module, and a control module. The adapter is used to connect to mains power and a load, enabling the mains power to charge the load. The charge / discharge module is connected to an energy storage power source and the adapter. The energy storage power source is used to store and / or release electrical energy. The control module is connected to both the mains power source and the charge / discharge module, and is used to: acquire the state of the mains power source; when the mains power source is in an on state, control the charge / discharge module to be in a charging state, so that the mains power source charges the energy storage power source through the adapter and the module; during a preset time period when the mains power source switches from the on state to the off state, control the charge / discharge module to be in a pre-discharge state, so that a preset energy in the energy storage power source supplies power to the load through the module and the adapter, wherein the preset energy is less than the capacity of the energy storage power source; and after the preset time period when the mains power source switches from the on state to the off state, control the charge / discharge module to be in a discharging state, so that the energy storage power source supplies power to the load through the module and the adapter.

[0005] In some embodiments, the adapter includes an AC power port, a load port, and a bus port. The bus port is used to connect to a bus, and the energy storage power supply is electrically connected to the bus via the charging / discharging module. The adapter includes a DC-DC converter module, a rectifier module, and an inverter module. The DC-DC converter module is electrically connected to the bus port and is used to convert DC power with a first voltage to DC power with a second voltage. The rectifier module is electrically connected to both the AC power port and the DC-DC converter module, and is used to convert the AC power from the AC power supply to DC power and then transmit it to the DC-DC converter module. The inverter module is electrically connected to both the load port and the DC-DC converter module, and is used to convert the DC power from the DC-DC converter module to AC power and then transmit it to the load.

[0006] In some embodiments, the adapter further includes a switching module. The switching module is connected to the DC-DC converter module and is used to: transmit DC power from the rectifier module to the DC-DC converter module when the mains power is on; and, when the mains power is off, transmit DC power from the energy storage power source to the bus port via the charging / discharging module to the DC-DC converter module.

[0007] In some embodiments, the charging / discharging module is electrically connected to both the energy storage power supply and the bus. The charging / discharging module includes an inductor, a first switching unit, and a second switching unit. A first terminal of the inductor is electrically connected to the positive terminal of the energy storage power supply. The first and second switching units are connected in series between the bus and ground, and a second terminal of the inductor is electrically connected to the series connection point of the first and second switching units. Each of the first and second switching units includes a switching transistor and a diode connected in parallel, and in the charging state, the conduction direction of the diode is opposite to the conduction direction of the corresponding switching transistor.

[0008] In some embodiments, the control module includes a first controller and a second controller. The second controller is electrically connected to the first controller, the first switching unit, and the second switching unit, respectively. The first controller is used to acquire the state of the mains power and determine an operating mode based on the state of the mains power. The operating mode includes a charging mode, a pre-discharge mode, and a discharging mode. The second controller is used to output a first drive signal to the switching transistor of the first switching unit and a second drive signal to the switching transistor of the second switching unit according to the operating mode determined by the first controller, so as to control the charging / discharging module to be in the charging state, the pre-discharge state, and the discharging state respectively.

[0009] In some embodiments, the first controller has a first enable interface, and the second controller has a second enable interface, with the first enable interface connected to the second enable interface. The first controller transmits an enable signal to the second controller through the first enable interface and the second enable interface to start the second controller to operate according to the operating mode determined by the first controller.

[0010] In some embodiments, the first controller is further provided with a first communication interface, and the second controller is further provided with a second communication interface, the first communication interface and the second communication interface being communicatively connected. The second controller transmits parameter signals of the energy storage power supply to the first controller through the first communication interface and the second communication interface. The parameter signals include at least one of voltage, current, and temperature signals. The first controller is used to determine the operating state of the energy storage power supply based on the parameter signals, and when the operating state meets preset conditions, sends a stop signal to the second controller through the first enable interface and the second enable interface. The second controller is also used to, in response to the stop signal, stop outputting the first drive signal and the second drive signal to disconnect the electrical connection between the energy storage power supply and the bus.

[0011] In some implementations, the preset conditions include at least one of the following: the voltage signal is lower than a first voltage threshold or higher than a second voltage threshold, wherein the first voltage threshold is lower than the second voltage threshold; the current signal is higher than a current threshold; and the temperature signal is higher than a temperature threshold.

[0012] In some embodiments, the switching transistors of the first switching unit and the second switching unit are both MOSFETs. Specifically: the drain of the MOSFET in the first switching unit is electrically connected to the bus, and the source is electrically connected to the second terminal of the inductor; the drain of the MOSFET in the second switching unit is electrically connected to the second terminal of the inductor, and the source is grounded; the diode in the first switching unit is the body diode of the MOSFET in the first switching unit, and the diode in the second switching unit is the body diode of the MOSFET in the second switching unit.

[0013] In some embodiments, during the charging state, the mains power supplies DC power to the bus via the adapter. The first drive signal output by the second controller is a PWM signal, and the second drive signal is also a PWM signal, to enable the charging / discharging module to form a first charging current path and a second charging current path. Specifically: when the switch of the first switching unit is turned on, the first charging current path is formed, with current flowing out from the bus, sequentially through the switch of the first switching unit, the inductor, the energy storage power source, and then back to ground; when the switch of the first switching unit is turned off, the second charging current path is formed, with current flowing out from the inductor to the energy storage power source and then back to ground; the first charging current path and the second charging current path are alternately formed under the high-frequency on and off drive of the switch of the first switching unit, causing current to flow continuously in the inductor to charge the energy storage power source.

[0014] In some embodiments, during the discharge state, the energy storage power supply releases electrical energy to the bus through the charge / discharge module. The first drive signal output by the second controller is a PWM signal, and the second drive signal is also a PWM signal, causing the charge / discharge module to form a first discharge current path and a second discharge current path. Specifically: when the switching transistor of the first switching unit is turned on, the first discharge current path is formed, with current flowing from the energy storage power supply, sequentially through the inductor and the switching transistor of the first switching unit, and then to the bus; when the switching transistor of the first switching unit is turned off, the second discharge current path is formed, with current flowing from the energy storage power supply, sequentially through the inductor and the diode of the first switching unit, and then to the bus; the first and second discharge current paths are alternately formed under the high-frequency on and off driving of the switching transistor of the second switching unit, causing current to flow continuously in the inductor, thus delivering the electrical energy of the energy storage power supply to the bus.

[0015] In some embodiments, during the pre-discharge state, the energy storage power supply releases the preset energy to the bus through the charge / discharge module. Before the second controller outputs the first drive signal and the second drive signal, the energy storage power supply discharges to the bus through the inductor and the diode of the first switching unit at a power less than the rated discharge power.

[0016] In some embodiments, the charge / discharge switching device further includes a power failure detection module, which is electrically connected to the rectifier module and the first controller respectively. The first controller is further configured to determine whether the mains power is on or off based on whether it receives the induced current transmitted by the power failure detection module.

[0017] Secondly, this application provides a charge / discharge switching method, which is applied to the charge / discharge switching device described in any of the above embodiments. The charge / discharge switching method includes: acquiring the state of the mains power; when the mains power is in an on state, controlling the charge / discharge module to be in a charging state, so that the mains power charges the energy storage power supply through the adapter and the charge / discharge module; during a preset time period when the mains power switches from the on state to the off state, controlling the charge / discharge module to be in a pre-discharge state, so that a preset energy in the energy storage power supply supplies power to the load through the charge / discharge module and the adapter, wherein the preset energy is less than the capacity of the energy storage power supply; and after the preset time period when the mains power switches from the on state to the off state, controlling the charge / discharge module to be in a discharging state, so that the energy storage power supply supplies power to the load through the charge / discharge module and the adapter.

[0018] In some embodiments, the control charging and discharging module is in a charging state, including: outputting a PWM signal to the switching transistor of the first switching unit and outputting a PWM signal to the switching transistor of the second switching unit; when the switching transistor of the first switching unit is turned on, a first charging current path is formed, with current flowing out from the bus, sequentially flowing through the switching transistor of the first switching unit, the inductor, the energy storage power supply, and then returning to ground; when the switching transistor of the first switching unit is turned off, a second charging current path is formed, with current flowing out from the inductor to the energy storage power supply and then returning to ground; and the first charging current path and the second charging current path are alternately formed under the drive of the switching transistor of the first switching unit being turned on and off at a high frequency, with current continuously flowing in the inductor to charge the energy storage power supply.

[0019] In some embodiments, the control charging and discharging module is in a discharging state, including: outputting a PWM signal to the switching transistor of the first switching unit and outputting a PWM signal to the switching transistor of the second switching unit; when the switching transistor of the first switching unit is turned on, forming a first discharge current path, with current flowing out from the energy storage power supply, passing through the inductor and the switching transistor of the first switching unit in sequence, and reaching the bus; when the switching transistor of the first switching unit is turned off, forming a second discharge current path, with current flowing out from the energy storage power supply, passing through the inductor and the diode of the first switching unit in sequence, and reaching the bus; and causing the first discharge current path and the second discharge current path to alternately form under the drive of the switching transistor of the second switching unit to be turned on and off at a high frequency, with current continuously flowing in the inductor, thereby delivering the electrical energy of the energy storage power supply to the bus.

[0020] In some embodiments, the control module includes a second controller. The control charge / discharge module is in a pre-discharge state, comprising: before the second controller outputs a first drive signal and a second drive signal, causing the energy storage power supply to discharge to the bus through the inductor and the diode of the first switching unit at a power less than the rated discharge power.

[0021] In some embodiments, obtaining the state of the mains power includes: determining that the mains power is in an on state when an induced current is received from the power failure detection module; and determining that the mains power is in an off state when no induced current is received from the power failure detection module.

[0022] Thirdly, this application provides a charging and discharging system. The charging and discharging system includes at least one energy storage power source and a charging and discharging switching device as described in any of the above embodiments. The energy storage power source is used to store and release electrical energy. The energy storage power source can be electrically connected to the charging and discharging switching device to exchange electrical energy with the mains power or with the load.

[0023] In the charge / discharge switching device, method, and system of this application, the adapter is connected to the mains power and the load, and can charge the load through the mains power. The energy storage power supply is connected to the adapter through the charge / discharge module and is used to store and / or release electrical energy. The control module is electrically connected to the mains power and the charge / discharge module respectively, and can obtain the status of the mains power and control the current flow between the mains power, the energy storage power supply, and the load according to the status of the mains power. Specifically, when the mains power is in the on state, the control module controls the charge / discharge module to be in the charging state, and the mains power charges the energy storage power supply through the adapter and the charge / discharge module; during a preset time period when the mains power switches from the on state to the off state, the control module controls the charge / discharge module to be in the pre-discharge state, and the preset energy in the energy storage power supply supplies power to the load through the charge / discharge module and the adapter; after the preset time period when the mains power switches from the on state to the off state, the control module controls the charge / discharge module to be in the discharging state, and the energy storage power supply supplies power to the load through the charge / discharge module and the adapter. At this time, the energy storage power supply can not only obtain power from the mains power through the adapter, but also supply power to the load when the mains power is abnormal. Moreover, this switching process can be carried out automatically, and the load can maintain a continuous and reliable working state without the risk of power failure and restart.

[0024] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0025] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, wherein: Figure 1 This is a flowchart illustrating the charge / discharge switching method of some embodiments of this application; Figure 2 This is a schematic diagram of the charging and discharging system according to some embodiments of this application; Figure 3 This is a flowchart illustrating the charge / discharge switching method of some embodiments of this application; Figure 4 This is a schematic diagram of the current flow in the charging and discharging system of other embodiments of this application when the charging and discharging module is in the charging state; Figure 5 This is a flowchart illustrating the charge / discharge switching method of some embodiments of this application; Figure 6 yes Figure 5 The diagram shows the current flow direction of the charging and discharging system when the charging and discharging module is in the discharging state. Figure 7 This is a flowchart illustrating the charge / discharge switching method of some embodiments of this application; Figure 8 yes Figure 5 The diagram shows the current flow direction of the charging and discharging system when the charging and discharging module is in the pre-discharge state. Figure 9 This is a flowchart illustrating the charge / discharge switching method of some embodiments of this application; Figure 10 This is a simplified structural diagram of a charging and discharging system according to some embodiments of this application.

[0026] The reference numerals in the detailed embodiments are as follows: Charging and discharging system 1000; energy storage power supply 300; load 500; Charge / discharge switching device 100; Adapter 10; AC power port 11; Load port 12; Bus port 13; DC-DC converter module 14; Rectifier module 15; Inverter module 16; Charge / discharge module 30; inductor 31; first switching unit 33; switching transistor 331 of the first switching unit; diode 333 of the first switching unit; second switching unit 35; switching transistor 351 of the second switching unit; diode 353 of the second switching unit; Control module 50; First controller 51; First enable interface 511; First communication interface 513; Second controller 53; Second enable interface 531; Second communication interface 533; Switch module 70; Power failure detection module 90. Detailed Implementation

[0027] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the specific embodiments of this application are described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of this application. Therefore, this application is not limited to the specific embodiments disclosed below.

[0028] In the description of this application, it should be understood that the terms "center", "length", "upper", "lower", "front", "rear", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.

[0029] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0030] In this application, unless otherwise expressly specified and limited, the terms "installation," "connection," "joining," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components, unless otherwise expressly limited. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.

[0031] In this application, unless otherwise expressly specified and limited, "above" or "below" the second feature can mean that the first feature is in direct contact with the second feature, or that the first feature is in indirect contact with the second feature through an intermediate medium. Furthermore, "above," "on top of," and "over" the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.

[0032] In home and office settings, terminal devices such as optical modems, routers, and smart access control electronic locks have extremely high requirements for power supply continuity. Regular power outages, as well as unconventional mains power interruptions caused by extreme weather, grid disasters, or equipment failures, will directly lead to these loads being disconnected from the grid or failing. Portable energy storage power supplies are often used as backup emergency solutions in such situations; however, energy storage power supplies can typically only draw power from the mains through an adapter and cannot simultaneously achieve bidirectional energy flow of "grid-connected charging" and "off-grid inverter" while connected to the mains. Furthermore, these devices require manual switching to power supply mode during mains power outages, which may lead to the aforementioned loads facing the risk of power loss and restart. To address this issue, this application provides a charge / discharge switching device 100 (… Figure 2 , Figure 4 , Figure 6 and Figure 8 As shown), charge / discharge switching method ( Figure 1 , Figure 3 , Figure 5 , Figure 7 and Figure 9 (as shown) and charging / discharging system 1000 ( Figure 2 , Figure 4 , Figure 6 , Figure 8 and Figure 10 (As shown).

[0033] Please refer to Figure 1 and Figure 2 This application provides a charge / discharge switching method, which is applied to a charge / discharge switching device 100. The charge / discharge switching method includes: 01: Obtain the status of mains power; 03: When the mains power is on, control the charging and discharging module 30 to be in the charging state so that the mains power charges the energy storage power supply 300 through the adapter 10 and the charging and discharging module 30; 05: During a preset time period when the mains power switches from the on state to the off state, the charging / discharging module 30 is controlled to be in a pre-discharge state, so that the preset energy in the energy storage power supply 300 supplies power to the load 500 through the charging / discharging module 30 and the adapter 10. The preset energy is less than the capacity of the energy storage power supply 300; and, 07: After a preset time period during which the mains power state switches from the on state to the off state, the charge / discharge module 30 is controlled to be in the discharge state so that the energy storage power supply 300 supplies power to the load 500 through the charge / discharge module 30 and the adapter 10.

[0034] Correspondingly, the above charging method can be applied to the charge / discharge switching device 100 provided in this application. The charge / discharge switching device 100 includes an adapter 10, a charge / discharge module 30, and a control module 50. The adapter 10 is used to connect to mains power and a load 500, so that the load 500 can be charged by mains power. The charge / discharge module 30 is connected to the energy storage power supply 300 and the adapter 10. The energy storage power supply 300 is used to store and / or release electrical energy. The control module 50 is connected to both the mains power supply and the charging / discharging module 30, and is used to: acquire the status of the mains power supply; when the mains power supply is in the on state, control the charging / discharging module 30 to be in the charging state, so that the mains power supply charges the energy storage power supply 300 through the adapter 10 and the charging / discharging module 30; during a preset time period when the mains power supply switches from the on state to the off state, control the charging / discharging module 30 to be in the pre-discharge state, so that a preset energy in the energy storage power supply 300 supplies power to the load 500 through the charging / discharging module 30 and the adapter 10, wherein the preset energy is less than the capacity of the energy storage power supply 300; and after the preset time period when the mains power supply switches from the on state to the off state, control the charging / discharging module 30 to be in the discharging state, so that the energy storage power supply 300 supplies power to the load 500 through the charging / discharging module 30 and the adapter 10.

[0035] Specifically, in both residential and industrial settings, terminal devices such as optical modems, routers, and smart access control electronic locks are highly dependent on power continuity. Power continuity is defined as the ability of a load to maintain normal operation under conditions of fluctuating or interrupted mains power input. Taking a smart access control electronic lock as an example, this lock integrates biometric modules and remote control functions to ensure user safety. A power outage in a smart access control electronic lock will directly lead to network service interruption, security function failure, and even serious security risks.

[0036] There are many possible causes for mains power outages, such as routine outages caused by planned maintenance or load limitations, and unconventional outages caused by extreme weather (such as typhoons or blizzards leading to grid paralysis), grid disasters (such as transformer overload and burnout), or internal short circuits in equipment. All of these can cause these loads to stop operating. In the event of a mains power outage and the lack of backup power, the smart access control electronic lock system will be unable to drive the electromagnet, rendering the access control function ineffective and potentially causing people to be trapped or creating a security vulnerability.

[0037] To alleviate such problems, energy storage power supplies are often used as backup emergency solutions. However, some energy storage power supplies have significant limitations in their technical architecture. First, their energy flow mode is unidirectional, and they can only achieve "grid-connected charging" through an adapter—that is, when the energy storage power supply is connected to the mains power, it receives electrical energy from the mains power and stores it in its internal battery modules. But these devices cannot achieve "off-grid inversion" when connected to the mains power—that is, after the mains power is interrupted, they cannot convert the DC power from the internal battery modules into AC power to supply the load.

[0038] Furthermore, at the operational level, energy storage power supplies typically require manual switching to power mode when mains power is interrupted. Users must manually unplug the load from the mains outlet, connect it to the energy storage power supply's output port, and activate the inverter switch. This process involves a time delay, potentially exposing loads sensitive to transient interruptions to the risk of restarting after a power outage. For example, if a smart access control electronic lock restarts after a power outage, it may lose temporary authorization information or trigger false alarms, affecting access management and system stability. Due to these issues, continuous operation of the load cannot be effectively guaranteed. To address this problem, this application provides a charge / discharge switching device 100 capable of intelligent control, and a corresponding charge / discharge switching method.

[0039] The charge / discharge switching device 100 is used to switch between the charging and discharging processes of the energy storage power supply 300, thereby coordinating the current flow direction among the mains power, the energy storage power supply 300, and the load 500. The charge / discharge switching device 100 connects the energy storage power supply 300 and the load 500 simultaneously, enabling long-term stable operation after connection without requiring the user to perform plugging / unplugging or connection steps again.

[0040] Energy storage power supply 300 is a device for storing and releasing energy. In some embodiments, energy storage power supply 300 can be a large-capacity, high-power, multi-functional portable energy storage device. Energy storage power supply 300 can also be applied to various scenarios such as home life, industrial production, outdoor camping, emergency disaster relief, and professional operations (such as photography and engineering), achieving flexible power supply functions while also addressing the power needs of areas without power grids or with unstable power. Based on different application scenarios, energy storage power supply 300 has different capacities and forms, and is equipped with different interfaces or other supporting structures.

[0041] It is understood that the number of energy storage power sources 300 can be set to any number, and the charge / discharge switching device 100 has a corresponding structure (such as the number of charge / discharge modules 30). Please refer to... Figure 2 This application illustrates the number of energy storage power sources 300 as three, and the illustration does not constitute a limitation on the number of energy storage power sources 300 or the structure of the charge / discharge switching device 100.

[0042] Load 500 refers to a device or system capable of receiving and utilizing electrical energy to perform work or achieve specific functions. The core function of load 500 is to convert electrical energy into other forms of energy (such as light energy, heat energy, and mechanical energy). Here, load 500 is not limited to electrical equipment that actually consumes electrical energy, but can also include downstream sockets that can assist in the implementation of the electrical process and the electrical equipment connected to them.

[0043] Electrical equipment can be, but is not limited to, vehicles, smart wearable devices, mobile terminals, home appliances, and medical devices; this application does not limit this. Vehicles include, but are not limited to, cars, buses, trains, ships, and aircraft. Smart wearable devices include, but are not limited to, smartwatches, smart bracelets, and neck massagers. Mobile terminals include, but are not limited to, smartphones, laptops, tablets, and POS (point-of-sales) machines. Home appliances include, but are not limited to, televisions, washing machines, air conditioners, rice cookers, smart robot vacuums, and smart lights. Medical devices include, but are not limited to, infrared electronic thermometers, pulse oximeters, and body composition analyzers. It is understood that electrical equipment can directly connect to the output terminal to obtain electrical energy, or it can obtain electrical energy through the connection of a downstream socket to the output terminal. For ease of description, the electrical equipment (a load in the conventional sense) and the downstream socket and the electrical equipment connected to it are collectively referred to as load 500 below.

[0044] It is understood that the charge / discharge switching device 100 includes connection ports adapted to the energy storage power supply 300 and the load 500, respectively. In some embodiments, the charge / discharge switching device 100 includes sockets for connecting to the energy storage power supply 300 and the load 500, respectively, with the energy storage power supply 300 and the load 500 connected to their respective sockets via plugs. In other embodiments, the charge / discharge switching device 100 includes plugs for connecting to the energy storage power supply 300 and the load 500, with the energy storage power supply 300 and the load 500 each including sockets for connecting to the charge / discharge switching device 100, and the plugs and sockets being plugged into each other. In still some embodiments, the charge / discharge switching device 100 includes sockets for connecting to the energy storage power supply 300 and the load 500, with the energy storage power supply 300 and the load 500 each including sockets for connecting to the charge / discharge switching device 100, and the two corresponding sockets being connected via a connecting cable with a double plug.

[0045] Adapter 10 is a device in charge / discharge switching device 100 used to charge load 500 and / or energy storage power supply 300. Adapter 10 is connected to at least mains power and load 500, and is capable of converting mains AC voltage into specific AC or AC voltage and current to realize the charging process of mains power to load 500. In some embodiments, adapter 10 internally uses a high-frequency transformer for electrical isolation and voltage reduction, and then outputs constant AC or DC power through a rectifier circuit and a voltage regulator circuit, thereby providing stable power to load 500.

[0046] The charge / discharge module 30 is a module in the charge / discharge switching device 100 used to realize the charging and discharging functions. The charge / discharge module 30 is connected to the energy storage power supply 300 and the adapter 10 respectively, so that the energy storage power supply 300 can obtain electrical energy from the mains power supply of the adapter 10 through the charge / discharge module 30, or provide electrical energy to the adapter 10 so that the adapter 10 can supply power to the load 500.

[0047] The control module 50 is the core module of the charge-discharge switching device 100, used to implement control functions. The control module 50 is connected to the mains power supply to obtain the mains power status and executes a preset control program accordingly. The control module 50 is also connected to the charge-discharge module 30 to control the operating mode of the charge-discharge module 30 based on the mains power status, i.e., controlling the charge-discharge module 30 to perform a charging or discharging process on the energy storage power supply 300, thereby realizing the charge-discharge switching method of this application.

[0048] The status of the mains power indicates whether the mains power can be connected and supply power to the outside at the current moment. The status of the mains power includes the connected state and the disconnected state. It should be noted that the disconnected state includes two situations: one is that the mains power is abnormal, and under good contact, no mains power is input to the charge / discharge switching device 100; the other is that, regardless of whether the mains power is actually on or off, poor contact between the mains power and the charge / discharge switching device 100, or a malfunction of the charge / discharge switching device 100, results in no mains power output to the charge / discharge switching device 100.

[0049] In some embodiments, when connected to mains power, the control module 50 directly detects the status of the mains power through internal functional circuits or components; in other embodiments, the control module 50 includes a structure with communication capabilities and obtains the status of the mains power by communicating with the outside through this structure.

[0050] When the mains power is on, it can provide normal power to the energy storage power supply 300 and the load 500. At this time, the control module 50 controls the charging / discharging module 30 to be in a charging state. The charging state is the operating mode in which the charging / discharging module 30 charges the connected energy storage power supply 300 using the power supplied by the mains power. When the charging / discharging module 30 is in the charging state, the mains power supply converts the AC power to a preset DC power level through the adapter 10. The charging / discharging module 30 then converts the DC power supplied by the adapter 10 into a voltage value compatible with the charging voltage of the energy storage power supply 300, thereby achieving efficient and safe charging of the energy storage power supply 300.

[0051] It is understandable that when the mains power is on, the control module 50 also controls the charging and discharging module 30 to provide normal power to the load 500.

[0052] When the mains power switches from the on state to the off state, the mains power cannot supply power to the energy storage power supply 300 and the load 500 normally. At this time, during the initial preset time period after switching to the off state, the control module 50 controls the charging and discharging module 30 to be in the pre-discharge state. The pre-discharge state is the operating mode in which the charging and discharging module 30 briefly charges the load 500 with the DC power provided by the energy storage power supply 300. When the charging and discharging module 30 is in the pre-discharge state, the charging and discharging module 30 converts the DC power provided by the energy storage power supply 300 into a current that can supply power to the load 500, so as to provide the preset energy in the energy storage power supply 300 to the load 500 in a timely manner, ensuring that the operation of the load 500 is not interrupted.

[0053] Because the preset energy is less than the capacity of the energy storage power supply 300, the charging and discharging module 30 is in the pre-discharge state for a very short time. During this process, the energy storage power supply 300 can only provide limited electrical energy to the load 500. In order to ensure that the load 500 continues to operate reliably, after a preset period of time in the initial stage of switching to the disconnect state, the control module 50 controls the charging and discharging module 30 to be in the discharging state.

[0054] The discharge state is the operating mode in which the charge / discharge module 30 charges the load 500 stably and continuously using the DC power supplied by the energy storage power supply 300. When the charge / discharge module 30 is in the discharge state, it converts the DC power supplied by the energy storage power supply 300 into a rated voltage that is compatible with the supply voltage of the load 500, so as to continuously and stably supply the energy in the energy storage power supply 300 to the load 500, ensuring that the load 500 can maintain continuous and stable operation even without mains power.

[0055] In the charge / discharge switching device 100 and method of this application, the adapter 10 is connected to the mains power and the load 500, and can charge the load 500 through the mains power. The energy storage power supply 300 is connected to the adapter 10 through the charge / discharge module 30, and is used to store and / or release electrical energy. The control module 50 is electrically connected to the mains power and the charge / discharge module 30 respectively, and can obtain the status of the mains power and control the current flow between the mains power, the energy storage power supply 300 and the load 500 according to the status of the mains power. When the mains power is on, the control module 50 controls the charging / discharging module 30 to be in a charging state, and the mains power charges the energy storage power supply 300 through the adapter 10 and the charging / discharging module 30. During a preset time period when the mains power switches from on to off, the control module 50 controls the charging / discharging module 30 to be in a pre-discharge state, and the preset energy in the energy storage power supply 300 supplies power to the load 500 through the charging / discharging module 30 and the adapter 10. After the preset time period when the mains power switches from on to off, the control module 50 controls the charging / discharging module 30 to be in a discharging state, and the energy storage power supply 300 supplies power to the load 500 through the charging / discharging module 30 and the adapter 10. At this time, the energy storage power supply 300 can not only obtain power from the mains power through the adapter 10, but also supply power to the load 500 when the mains power is abnormal. Moreover, this switching process can be carried out automatically, and the load 500 can maintain a continuous and reliable working state without the risk of power failure and restart.

[0056] Please refer to Figure 2 and Figure 4 In some embodiments, the adapter 10 is provided with an AC power port 11, a load port 12, and a bus port 13. The bus port 13 is used to connect to a bus, and the energy storage power supply 300 is electrically connected to the bus via a charge / discharge module 30. The adapter 10 includes a DC-DC converter module 14, a rectifier module 15, and an inverter module 16. The DC-DC converter module 14 is electrically connected to the bus port 13 and is used to convert DC power with a first voltage to DC power with a second voltage. The rectifier module 15 is electrically connected to the AC power port 11 and the DC-DC converter module 14, respectively, and is used to convert AC power from the AC power supply to DC power and then transmit it to the DC-DC converter module 14. The inverter module 16 is electrically connected to the load port 12 and the DC-DC converter module 14, respectively, and is used to convert DC power from the DC-DC converter module 14 to AC power and then transmit it to the load 500.

[0057] Specifically, mains port 11 is the port in adapter 10 used to connect to mains power. Load port 12 is the port in adapter 10 used to connect to load 500. Bus port 13 is the port in adapter 10 used to connect to the bus. The bus is the common DC path in the charge / discharge switching device 100 used to collect and distribute electrical energy. The energy storage power supply 300 is electrically connected to the bus through the charge / discharge module 30. At this time, the DC power output by adapter 10 is transmitted through the bus, and can simultaneously power multiple energy storage devices through the charge / discharge module 30, realizing centralized scheduling and efficient distribution of energy.

[0058] The rectifier module 15 is a module in the adapter 10 used to rectify the alternating current (AC) input through the mains port 11, converting it into direct current (DC). The rectifier module 15 is electrically connected to the mains port 11; the mains power is input to the rectifier module 15 through the mains port 11 and converted into DC by the rectifier module 15. For example, the rectifier module 15 consists of a bridge rectifier circuit composed of fast recovery diodes to convert the high-frequency AC pulses output from the secondary winding of the high-frequency transformer of the adapter 10 into pulsating DC, thereby realizing the conversion of AC to DC.

[0059] The DC-DC converter module 14 is a structure in the adapter 10 used to convert the voltage of DC power. The DC-DC converter module 14 is electrically connected to the rectifier module 15. The rectifier module 15 converts AC mains power into DC power, which, when transmitted to the DC-DC converter module 14, is converted into DC power with a different voltage value. For example, the DC-DC converter module 14 converts DC power with a first voltage to DC power with a second voltage.

[0060] Inverter module 16 is a module in adapter 10 used to invert the DC power input via DC-DC converter module 14 to convert it into AC power. Inverter module 16 is electrically connected to DC-DC converter module 14. The DC power provided by DC-DC converter module 14 is input to inverter module 16 and converted into AC power by inverter module 16. It can be understood that the DC power input to DC-DC converter module 14 can be provided by mains power, as described above; or it can be provided by energy storage power source 300 through charge / discharge module 30 in a pre-discharge or discharge state. The AC power output by inverter module 16 typically has a different voltage and / or frequency than the AC power input from mains power; this change is achieved by adapter 10.

[0061] For example, the inverter module 16 typically uses pulse width modulation control technology through the high-frequency switching action of power semiconductor devices to convert direct current into pure sinusoidal alternating current. At the same time, the inverter module 16 is electrically connected to the load port 12 to transmit the converted alternating current to the load 500, thereby providing power to the load 500.

[0062] Therefore, in the charge / discharge switching device 100 of this application, the DC-DC conversion module 14, rectifier module 15 and inverter module 16 of the adapter 10 cooperate with each other to realize the conversion and matching between the AC power supplied by the mains and the AC power supplied to the load 500, as well as the conversion and matching between the DC power supplied by the energy storage power supply 300 and the AC power supplied to the load 500. The adapter 10 provides the load 500 with clean and constant AC power, ensuring that the current supplied to the load 500 can drive the load 500 to work efficiently and safely.

[0063] It is understood that, when the load 500 is a DC load, the adapter 10 may include a DC-DC converter module 14 and a rectifier module 15. The rectifier module 15 is electrically connected to the AC power port 11 and the DC-DC converter module 14 respectively, and is used to convert the AC power from the AC power supply to DC power before transmitting it to the DC-DC converter module 14. The DC-DC converter module 14 is electrically connected to the bus port 13 and the rectifier module 15 respectively, and is used to convert the DC power with a first voltage to a second voltage, so as to transmit the DC power with an appropriate voltage value to the load 500.

[0064] Please refer to Figure 2 and Figure 4 In some embodiments, the adapter 10 further includes a switching module 70. The switching module 70 is connected to the DC-DC converter 14 and is used to: transmit DC power from the rectifier module 15 to the DC-DC converter 14 when the mains power is on; and transmit DC power from the energy storage power supply 300 to the bus port 13 via the charge / discharge module 30 to the DC-DC converter 14 when the mains power is off.

[0065] Specifically, the switching module 70 is a module in the adapter 10 used to control the source of DC power for the DC-DC converter module 14. The switching module 70 is connected to the DC-DC converter module 14. In some embodiments, the switching module 70 is connected to the control module 50 to indirectly obtain the mains power status through the control module 50. In other embodiments, the switching module 70 is connected to the mains power to directly obtain the mains power status.

[0066] When the mains power is on, the mains power can provide normal power to the load 500. At this time, the AC power from the mains is rectified by the rectifier module 15 and converted into DC power. The switching module 70 transmits the DC power from the rectifier module 15 to the DC-DC converter module 14, and then the inverter module 16 converts the DC power (sourced from the mains power) from the DC-DC converter module 14 into AC power and transmits it to the load 500.

[0067] When the mains power is disconnected, the mains power cannot supply power to the load 500 normally. At this time, the charge / discharge module 30 supplies power to the load 500 in either a pre-discharge or discharge state. Meanwhile, the energy storage power supply 300 provides DC power to the bus port 13 through the charge / discharge module 30. The switching module 70 transmits this portion of DC power from the energy storage power supply 300 to the DC-DC converter module 14, and then the inverter module 16 converts the DC power from the DC-DC converter module 14 (originating from the energy storage power supply 300) into AC power before transmitting it to the load 500.

[0068] It should be noted that users can also manually control the operating mode of the switching module 70 to flexibly select the power source for the load 500. For example, if the mains power is on but the user wants to use the energy storage power supply 300, the user can manually control the switching module 70 to transfer the DC power from the energy storage power supply 300 to the bus port 13 via the charging and discharging module 30 to the DC-DC converter module 14.

[0069] Therefore, in the charge / discharge switching device 100 of this application, the switching module 70 can flexibly and intelligently control the source of DC power supplied to the DC conversion module 14, so as to ensure that when the mains power of the load 500 becomes disconnected, the adapter 10 can quickly switch to be powered by the energy storage power supply 300, thereby ensuring that the load 500 can continue to work continuously and stably in the event of a sudden abnormality in the mains power, and improving the reliability and safety of the load 500.

[0070] Please refer to Figure 2 and Figure 4 In some embodiments, the charging / discharging module 30 is electrically connected to the energy storage power supply 300 and the bus. The charging / discharging module 30 includes an inductor 31, a first switching unit 33, and a second switching unit 35. The first end of the inductor 31 is electrically connected to the positive terminal of the energy storage power supply 300. The first switching unit 33 and the second switching unit 35 are connected in series between the bus and ground, and the second end of the inductor 31 is electrically connected to the series node of the first switching unit 33 and the second switching unit 35. The first switching unit 33 and the second switching unit 35 each include a switching transistor and a diode connected in parallel, and in the charging state, the conduction direction of the diode is opposite to the conduction direction of the corresponding switching transistor.

[0071] Specifically, the charging / discharging module 30 is a Buck-Boost hybrid circuit located between the energy storage power supply 300 and the busbar, and includes an inductor 31, a first switching unit 33, and a second switching unit 35. The inductor 31 is a passive energy storage element operating based on the principle of electromagnetic induction. The inductor 31 includes windings. When current flows through the windings of the inductor 31, the inductor 31 can convert electrical energy into magnetic energy for storage and has the physical characteristic of impeding changes in current. The first end of the inductor 31 is electrically connected to the positive terminal of the energy storage power supply 300, and the second end is electrically connected to the series connection point of the first switching unit 33 and the second switching unit 35. At this time, inductor 31 can maintain the continuity of current and smooth the current ripple by storing and releasing magnetic energy when the charging and discharging module 30 is in charging mode (charging and discharging module 30 is in Buck working mode), and can increase the voltage supplied to the bus by storing magnetic energy and superimposing it with the voltage output by the energy storage power supply 300 when the charging and discharging module 30 is in discharging mode (charging and discharging module 30 is in Boost working mode).

[0072] The first switching unit 33 and the second switching unit 35 are designed to cooperate with each other to exhibit complementary characteristics, thereby ensuring that the energy in the charging and discharging module 30 can flow efficiently in both directions (charging or discharging) over a wide voltage range. The first switching unit 33 and the second switching unit 35 are connected in series and sequentially connected between the busbar and ground.

[0073] When the charging / discharging module 30 is in charging mode (or Buck operating mode), the first switching unit 33 controls the transfer of input energy to the inductor 31 through high-frequency chopping, and its duty cycle determines the step-down ratio. The second switching unit 35 provides a low-impedance freewheeling path for the current in the inductor 31 during the off-state of the first switching unit 33, maintaining the power supply from the inductor 31 to the energy storage power supply 300. When the charging / discharging module 30 is in discharging mode (or Boost operating mode), during the on-state, the first switching unit 33 superimposes the energy released by the inductor 31 with the voltage output from the energy storage power supply 300 and delivers it to the bus, while simultaneously reducing rectification losses with its extremely low on-resistance. The second switching unit 35 is responsible for controlling the discharge of the inductor 31 to the bus.

[0074] The first switching unit 33 includes a switching transistor and a diode connected in parallel, and the second switching unit 35 also includes a switching transistor and a diode connected in parallel. In the charging state, the conduction direction of the diodes in the first switching unit 33 and the second switching unit 35 is opposite to the conduction direction of the corresponding switching transistors, so that current is transmitted only through the switching transistors during charging. In the pre-discharge and discharging states, current can be selectively transmitted through the switching transistors and / or diodes depending on the actual discharge conditions, which helps to reduce conduction losses and improve current transmission efficiency.

[0075] Therefore, in the charge / discharge switching device 100 of this application, the inductor 31, the first switching unit 33, and the second switching unit 35 of the charge / discharge module 30 can cooperate with each other to form a Buck-Boost composite circuit, thereby optimizing the power conversion efficiency. At this time, the energy conversion efficiency and energy utilization rate of the charge / discharge module 30 are high, and the charge / discharge switching device 100 can flexibly supply power to the load 500 without significantly increasing electricity costs.

[0076] Please refer to Figure 2 and Figure 4 In some embodiments, the control module 50 includes a first controller 51 and a second controller 53. The second controller 53 is electrically connected to the first controller 51, the first switching unit 33, and the second switching unit 35, respectively. The first controller 51 is used to acquire the status of the mains power and determine the operating mode based on the status of the mains power. The operating modes include a charging mode, a pre-discharge mode, and a discharging mode. The second controller 53 is used to output a first drive signal to the switching transistor 331 of the first switching unit and a second drive signal to the switching transistor 351 of the second switching unit, according to the operating mode determined by the first controller 51, to control the charging / discharging module 30 to be in the corresponding charging, pre-discharge, and discharging states.

[0077] Specifically, the first controller 51 is the core module in the control module 50. For example, the first controller 51 is a microcontroller unit (MCU), a microcomputer that integrates a central processing unit, memory, and programmable input / output interfaces onto a single chip, and can perform functions such as signal acquisition, logic operations, and component driving by running firmware programs. The first controller 51 obtains the status of the mains power through its connection to the mains power and can automatically determine the operating mode of the charging / discharging switching device 100 based on the status of the mains power.

[0078] The operating mode of the charge / discharge switching device 100 is the specific operating mode of the working process determined by the state of the mains power. It can be understood that the operating mode of the charge / discharge switching device 100 will determine the state of the charge / discharge module 30. When the operating mode of the charge / discharge switching device 100 is charging mode, the charge / discharge module 30 is in a charging state; when the operating mode of the charge / discharge switching device 100 is pre-discharge mode, the charge / discharge module 30 is in a pre-discharge state; when the operating mode of the charge / discharge switching device 100 is discharging mode, the charge / discharge module 30 is in a discharging state.

[0079] The second controller 53 is a module in the control module 50 that is controlled by the first controller 51 and is used to control the first switching unit 33 and the second switching unit 35 of the charging and discharging module 30. Exemplarily, the second controller 53 is a chip with preset functions. The second controller 53 is connected to the first controller 51. When the first controller 51 determines the operating mode based on the mains power status, the second controller 53, through its connection with the first controller 51, controls the first switching unit 33 and the second switching unit 35 based on the predetermined operating mode.

[0080] Specifically, the second controller 53 outputs a first drive signal to the switch tube 331 of the first switch unit and a second drive signal to the switch tube 351 of the second switch unit to control the conduction direction and conduction frequency of the switch tube 331 of the first switch unit and the switch tube 351 of the second switch unit, thereby controlling the charging and discharging module 30 to be in the charging state, pre-discharging state and discharging state respectively.

[0081] Therefore, in the charge / discharge switching device 100 of this application, when the first controller 51 acquires the status of the mains power and determines the working mode based on the status of the mains power, the second controller 53 can control the switching transistor 331 of the first switching unit and the switching transistor 351 of the second switching unit respectively based on the working mode, thereby controlling the charge / discharge module 30 to be in the charging state, pre-discharging state, and discharging state respectively. The charge / discharge switching device 100 can intelligently and efficiently realize flexible power supply to the load 500, and the working continuity and reliability of the load 500 are effectively guaranteed.

[0082] Please refer to Figure 2 and Figure 4 In some embodiments, the first controller 51 is provided with a first enable interface 511, and the second controller 53 is provided with a second enable interface 531. The first enable interface 511 and the second enable interface 531 are connected. The first controller 51 transmits an enable signal to the second controller 53 through the first enable interface 511 and the second enable interface 531 to start the second controller 53 to work according to the working mode determined by the first controller 51.

[0083] Specifically, the first enable interface 511 is a structure in the first controller 51 used to cooperate with the second enable interface 531 of the second controller 53 to transmit an enable signal to the second controller 53. The first enable interface 511 is one or more logic input pins on the first controller 51, used to transmit enable signals for power management and functional timing control. It can be understood that the enable signal is the signal that starts the second controller 53 and controls the second controller 53 to operate according to the working mode determined by the first controller 51.

[0084] The second enable interface 531 is a structure in the second controller 53 used to cooperate with the first enable interface 511 of the first controller 51 to receive the enable signal transmitted by the first controller 51. The second enable interface 531 is one or more logic input pins on the second controller 53 and is connected to the first enable interface 511 to receive the enable signal transmitted via the first enable interface 511.

[0085] At this time, the second controller 53 can start according to the received enable signal and operate according to the working mode determined by the first controller 51. It can be understood that the transmission process of the above-mentioned enable signal is extremely fast (usually less than milliseconds). When the state of the mains power switches between the on and off states, the power source of the load 500 can be quickly switched between the mains power and the energy storage power supply 300, that is, uninterrupted and seamless power supply switching is achieved for the load 500.

[0086] Please refer to Figure 2 and Figure 4 The number of energy storage power supply 300, charging / discharging module 30, and second controller 53 is the same, and there can be one or more. In the case where there are multiple energy storage power supply 300, charging / discharging module 30, and second controller 53, for example, Figure 2 The diagram shows that the number of energy storage power supply 300, charging / discharging module 30, and second controller 53 are all 3. In this case, the number of first enable interfaces 511 and second enable interfaces 531 are also 3, and any one of the first enable interfaces 511 is connected to the corresponding second enable interface 531. It can be understood that in... Figure 4 When the number of energy storage power supply 300, charging and discharging module 30 and second controller 53 shown is 1, the number of first enable interface 511 and second enable interface 531 is 1.

[0087] It should be noted that the number of first enable interfaces 511 may not be equal to the number of second enable interfaces 531. For example, [the following text is incomplete and likely refers to a different topic:] Figure 2 The charge / discharge switching device 100 shown can be modified without replacing the first controller 51 to... Figure 4 The charge / discharge switching device 100 shown reduces the number of energy storage power supply 300, charge / discharge module 30, and second controller 53. In this case, some first enable interfaces 511 are left floating, and the number of first enable interfaces 511 is greater than the number of second enable interfaces 531. For example, in... Figure 2 In the charge / discharge switching device 100 shown, there may also be partially suspended first enable interfaces 511 or partially suspended second enable interfaces 531. The number of first enable interfaces 511 and the number of second enable interfaces 531 may not be equal.

[0088] Therefore, in the charge / discharge switching device 100 of this application, the first enable interface 511 is connected to the second enable interface 531 and can transmit an enable signal to the second controller 53 to start the second controller 53 to work according to the working mode determined by the first controller 51. At this time, the switching process of the working mode takes less time and the switching efficiency is high. The charge / discharge switching device 100 can perform uninterrupted and seamless switching power supply to the load 500, effectively ensuring the working continuity and reliability of the load 500.

[0089] Please refer to Figure 2 and Figure 4 In some embodiments, the first controller 51 is further provided with a first communication interface 513, and the second controller 53 is further provided with a second communication interface 533. The first communication interface 513 and the second communication interface 533 are communicatively connected. The second controller 53 transmits parameter signals of the energy storage power supply 300 to the first controller 51 through the first communication interface 513 and the second communication interface 533. The parameter signals include at least one of voltage signals, current signals, and temperature signals. The first controller 51 is used to determine the operating state of the energy storage power supply 300 based on the parameter signals, and when the operating state meets preset conditions, sends a stop signal to the second controller 53 through the first enable interface 511 and the second enable interface 531. The second controller 53 is also used to stop outputting the first drive signal and the second drive signal in response to the stop signal, so as to disconnect the electrical connection between the energy storage power supply 300 and the bus.

[0090] Specifically, the first communication interface 513 is a structure in the first controller 51 used to communicate with the second communication interface 533 of the second controller 53 to receive parameter signals transmitted by the second controller 53 from the energy storage power supply 300. The first communication interface 513 is one or more logic input pins on the first controller 51 and is used to receive communication signals. The second communication interface 533 is a structure in the second controller 53 used to communicate with the first communication interface 513 of the first controller 51 to transmit parameter signals to the first controller 51. The second communication interface 533 is one or more logic input pins on the second controller 53 and is connected to the first communication interface 513 to transmit parameter signals to the first communication interface 513. It is understood that the first communication interface 513 and the second communication interface 533 can also transmit other signals, at least partially related to other structures of the energy storage power supply 300, the load 500, the mains power, or the charge / discharge switching device 100; this application does not limit this.

[0091] The parameter signals are signals used to reflect at least part of the current state of the energy storage power supply 300 during the process of the energy storage power supply 300 outputting current to the bus. Among them, the voltage signal is a signal used to characterize the output voltage of the energy storage power supply 300, the current signal is a signal used to characterize the output current of the energy storage power supply 300, and the temperature signal is a signal used to characterize the current temperature of the energy storage power supply 300.

[0092] In some embodiments, the energy storage power supply 300 includes a battery management system (BMS), and the second controller 53 is communicatively connected to the BMS to acquire parameter signals. In other embodiments, the energy storage power supply 300 includes sensors for acquiring voltage, current, or temperature, and the second controller 53 acquires parameter signals by acquiring data from the sensors.

[0093] At this time, the first controller 51 can determine the operating state of the energy storage power supply 300 based on the received parameter signals. It can be understood that the operating state of the energy storage power supply 300 reflects whether the process of the energy storage power supply 300 supplying power to the load 500 is normal. When the operating state meets preset conditions, it indicates that the process of the energy storage power supply 300 supplying power to the load 500 is abnormal. At this time, the first controller 51 sends a stop signal to the second controller 53 through the connection of the first enable interface 511 and the second enable interface 531. The stop signal is used to instruct the second controller 53 to interrupt the process of the energy storage power supply 300 supplying power to the load 500. The preset conditions are conditions indicating that the process of the energy storage power supply 300 supplying power to the load 500 is abnormal. The setting of the preset conditions is mainly to protect the energy storage power supply 300, and can also, to a certain extent, protect the charge / discharge switching device 100 and / or the load 500.

[0094] When the second controller 53 responds to the stop signal, the second controller 53 will stop outputting the first drive signal to the switch tube 331 of the first switch unit and stop outputting the second drive signal to the switch tube 351 of the second switch unit, so as to cut off the electrical connection between the energy storage power supply 300 and the bus, thereby interrupting the power supply from the energy storage power supply 300 to the load 500.

[0095] Please refer to Figure 2 and Figure 4 The number of energy storage power supply 300, charging / discharging module 30, and second controller 53 is the same, and there can be one or more. In the case where there are multiple energy storage power supply 300, charging / discharging module 30, and second controller 53, for example, Figure 2The diagram shows that the number of energy storage power supply 300, charging / discharging module 30, and second controller 53 are all 3. At this time, the number of first communication interfaces 513 and second communication interfaces 533 are also 3, and any one of the first communication interfaces 513 is connected to the corresponding second communication interface 533. It can be understood that in... Figure 4 When the number of energy storage power supply 300, charging and discharging module 30 and second controller 53 shown are all 1, the number of first communication interface 513 and second communication interface 533 are both 1.

[0096] It should be noted that the number of first communication interfaces 513 may not be equal to the number of second communication interfaces 533. For example, [the following text is incomplete and likely refers to a different scenario]. Figure 2 The charge / discharge switching device 100 shown can be modified without replacing the first controller 51 to... Figure 4 The charge / discharge switching device 100 shown reduces the number of energy storage power supply 300, charge / discharge module 30, and second controller 53. In this case, some of the first communication interfaces 513 are left unconnected, and the number of first communication interfaces 513 is greater than the number of second communication interfaces 533. For example, in... Figure 2 In the charge / discharge switching device 100 shown, there may also be a partially suspended first communication interface 513 or a partially suspended second communication interface 533. The number of first communication interfaces 513 and the number of second communication interfaces 533 may not be equal.

[0097] Therefore, in the charge / discharge switching device 100 of this application, the first communication interface 513 is connected to the second communication interface 533 and can transmit parameter signals to the first controller 51, so that the first controller 51 can send a stop signal to the second controller 53 in a timely manner when the parameter signal is abnormal, thereby interrupting the power supply from the energy storage power supply 300 to the load 500, avoiding damage caused by long-term abnormal operation of the energy storage power supply 300, ensuring the safety of the cooperation process between the charge / discharge switching device 100 and the energy storage power supply 300, and extending the service life of the charge / discharge switching device 100 and the energy storage power supply 300.

[0098] Please refer to Figure 2 and Figure 4 In some implementations, the preset conditions include at least one of the following: the voltage signal is lower than a first voltage threshold or higher than a second voltage threshold, wherein the first voltage threshold is lower than the second voltage threshold; the current signal is higher than a current threshold; and the temperature signal is higher than a temperature threshold.

[0099] Specifically, the first voltage threshold is the minimum voltage of the energy storage power supply 300 under normal discharge conditions, and the second voltage threshold is the maximum voltage of the energy storage power supply 300 under normal discharge conditions. It can be understood that the first voltage threshold is less than the second voltage threshold. If the voltage signal is lower than the first voltage threshold, the energy storage power supply 300 may experience an abnormality, such as undervoltage. To avoid further exacerbating the abnormality of the energy storage power supply 300 or affecting the charge / discharge switching device 100 and / or the load 500, the first controller 51 promptly sends a stop signal to the second controller 53, thereby interrupting the power supply from the energy storage power supply 300 to the load 500.

[0100] If the voltage signal is higher than the second voltage threshold, the energy storage power supply 300 may be abnormal, such as overvoltage or over-discharge. In order to avoid further aggravating the abnormality of the energy storage power supply 300 or affecting the charge-discharge switching device 100 and / or the load 500, the first controller 51 promptly sends a stop signal to the second controller 53, thereby interrupting the power supply from the energy storage power supply 300 to the load 500.

[0101] The current threshold is the maximum current of the energy storage power supply 300 under normal discharge conditions. If the current signal is higher than the current threshold, the energy storage power supply 300 may be abnormal, such as overcurrent or over-discharge. In order to avoid further aggravating the abnormality of the energy storage power supply 300 or affecting the charge-discharge switching device 100 and / or the load 500, the first controller 51 promptly sends a stop signal to the second controller 53, thereby interrupting the power supply of the energy storage power supply 300 to the load 500.

[0102] The temperature threshold is the maximum temperature of the energy storage power supply 300 under normal discharge conditions. If the temperature signal is higher than the temperature threshold, the energy storage power supply 300 may be abnormal, such as thermal runaway. In order to avoid further aggravating the abnormality of the energy storage power supply 300 or affecting the charge / discharge switching device 100 and / or the load 500, the first controller 51 promptly sends a stop signal to the second controller 53, thereby interrupting the power supply from the energy storage power supply 300 to the load 500.

[0103] Therefore, in the charge / discharge switching device 100 of this application, by setting at least one of the first voltage threshold, the second voltage threshold, the current threshold, and the temperature threshold, it is possible to effectively prevent the energy storage power supply 300 from being damaged due to being in an abnormal working state for a long time. This ensures the safety and service life of the energy storage power supply 300 and avoids the adverse effects of abnormalities of the energy storage power supply 300 on the charge / discharge switching device 100 and / or the load 500, thereby improving the overall safety performance.

[0104] Please refer to Figure 2 and Figure 4In some embodiments, the switching transistor 331 of the first switching unit and the switching transistor 351 of the second switching unit are both MOSFETs. Specifically: the drain of the MOSFET 331 in the first switching unit 33 is electrically connected to the bus, and the source is electrically connected to the second terminal of the inductor 31; the drain of the MOSFET 351 in the second switching unit 35 is electrically connected to the second terminal of the inductor 31, and the source is grounded; the diode 333 of the first switching unit is the body diode 333 of the MOSFET 331 in the first switching unit 33, and the diode 353 of the second switching unit is the body diode 353 of the MOSFET 351 in the second switching unit 35.

[0105] Specifically, a MOSFET (Metal-Oxide-Semiconductor Field-Effect Transistor) is a voltage-controlled switching device. A MOSFET consists of a gate, a drain, and a source. The MOSFET controls the conduction and cutoff of the conductive channel between the drain and source by modulating the electric field on the semiconductor surface using the gate voltage. MOSFETs offer advantages such as high switching speed, high input impedance, and low drive power.

[0106] The MOSFET 331 of the first switching unit 33 is disposed between the bus and the second end of the inductor 31. The drain of the MOSFET 331 of the first switching unit 33 is electrically connected to the bus, the source is electrically connected to the second end of the inductor 31, and the gate is electrically connected to the second controller 53. Under the action of the first drive signal output by the second controller 53, the current conduction direction between the bus and the inductor 31 can be selectively realized.

[0107] The MOSFET 351 of the second switching unit 35 is disposed between ground and the second terminal of the inductor 31. The drain of the MOSFET is electrically connected to the second terminal of the inductor 31, the source is grounded, and the gate is electrically connected to the second controller 53. Under the action of the second drive signal output by the second controller 53, the conduction direction of the current between ground and the inductor 31 can be selectively realized. It cooperates with the MOSFET of the first switching unit 33 to jointly realize the switching of the charging / discharging module 30 between the charging state, pre-discharging state, and discharging state.

[0108] The body diode of a MOSFET is a parasitic diode of the internal PN junction, located between the source and drain. The conduction direction of the body diode is fixed, pointing from the source to the drain. The diode 333 in the first switching unit is the body diode 333 of the MOSFET 331 in the first switching unit 33, and the diode 353 in the second switching unit is the body diode 353 of the MOSFET 351 in the second switching unit 35. These two body diodes typically perform reverse freewheeling and are used to transfer at least a portion of the energy in both the pre-discharge and discharge states.

[0109] Therefore, in the charge / discharge switching device 100 of this application, the switching transistor 331 of the first switching unit and the switching transistor 351 of the second switching unit are both MOSFETs. The diode 333 of the first switching unit is the body diode 333 of the MOSFET 331 of the first switching unit 33, and the diode 353 of the second switching unit is the body diode 353 of the MOSFET 351 of the second switching unit 35. Since MOSFETs have high-frequency switching characteristics and low on-resistance, they effectively improve the power density of the charge / discharge module 30 and significantly reduce voltage drop and losses. In addition, the voltage control method of MOSFETs is simple, which is conducive to precise adjustment of the duty cycle and optimization of dynamic response.

[0110] Please refer to Figures 1 to 4 In some embodiments, controlling the charge / discharge module 30 to be in a charging state includes: 031: Output PWM signal to the switching transistor 331 of the first switching unit and output PWM signal to the switching transistor 351 of the second switching unit; 033: When the switching transistor 331 of the first switching unit is turned on, a first charging current path is formed. The current flows out from the bus and flows through the switching transistor 331, inductor 31, and energy storage power supply 300 of the first switching unit in sequence before returning to ground. 035: When the switching transistor 331 of the first switching unit is turned off, a second charging current path is formed, and the current flows from the inductor 31 to the energy storage power supply 300 and then back to ground; and, 037: The first charging current path and the second charging current path are alternately formed under the drive of the switching transistor 331 of the first switching unit to conduct and turn off at high frequency, and the current flows continuously in the inductor 31 to charge the energy storage power supply 300.

[0111] Correspondingly, the above charging method can be applied to the charge / discharge switching device 100 provided in this application. In the charging state, mains power supplies DC power to the bus via adapter 10. The first drive signal output by the second controller 53 is a PWM signal, and the second drive signal is a PWM signal, so that the charge / discharge module 30 forms a first charging current path and a second charging current path. Specifically: when the switch transistor 331 of the first switching unit is turned on, a first charging current path is formed, with current flowing out from the bus, sequentially passing through the switch transistor 331 of the first switching unit, the inductor 31, and the energy storage power supply 300 before returning to ground; when the switch transistor 331 of the first switching unit is turned off, a second charging current path is formed, with current flowing out from the inductor 31 to the energy storage power supply 300 before returning to ground; the first charging current path and the second charging current path are alternately formed under the high-frequency on and off drive of the switch transistor 331 of the first switching unit, causing current to flow continuously in the inductor 31 to charge the energy storage power supply 300.

[0112] Specifically, a pulse-width modulation (PWM) signal is a digital signal that controls power by modulating the width of a square wave pulse. The core parameters of a PWM signal include frequency and duty cycle. The second controller 53 can output a PWM signal upon receiving an enable signal from the first controller 51 to drive the switching transistors 331 of the first switching unit and 351 of the second switching unit to turn on and off. This offers advantages of high precision and fast response, enabling efficient energy conversion.

[0113] When the first drive signal output by the second controller 53 is a PWM signal, the second controller 53 can accurately and quickly control the switching transistor 331 of the first switching unit to turn on and off through the PWM signal. When the second drive signal output by the second controller 53 is a PWM signal, the second controller 53 can accurately and quickly control the switching transistor 351 of the second switching unit to turn on and off through the PWM signal.

[0114] When the charging / discharging module 30 is in the charging state, as described above, the charging / discharging module 30 is in Buck operating mode. At this time, the duty cycle of the PWM signal corresponds to the voltage drop ratio between the charging voltage of the energy storage power supply 300 and the bus voltage. Under the control of the PWM signal, the switching transistor 331 of the first switching unit regularly alternates between being turned on and off.

[0115] When the switching transistor 331 of the first switching unit is turned on under the PWM signal, a first charging current path is formed in the charging and discharging module 30. At this time, the DC current flowing out of the bus flows sequentially through the switching transistor 331 and the inductor 31 of the first switching unit, and returns to ground after supplying power to the energy storage power supply 300, as shown below. Figure 4 As shown by the dashed line. During this process, the switching transistor 351 of the second switching unit is turned off under the PWM signal.

[0116] When the switching transistor 331 of the first switching unit is turned off under the PWM signal, a second charging current path is formed in the charging and discharging module 30. At this time, at least part of the energy of the DC current previously flowing out of the bus is stored in the inductor 31, and the current provided by the inductor 31 returns to ground after supplying power to the energy storage power supply 300, such as... Figure 4 As shown by the solid line. During this process, the switching transistor 351 of the second switching unit is turned on under the PWM signal, and plays the role of providing a low-impedance freewheeling path for the current of the inductor 31, so as to maintain the power supply of the energy storage power supply 300 by the inductor 31.

[0117] The switching transistor 331 of the first switching unit alternately experiences being turned on and off under the PWM signal. That is, the first charging current path and the second charging current path are alternately formed under the drive of the switching transistor 331 of the first switching unit to be turned on and off at high frequency. At this time, the current flows continuously in the inductor 31 and continuously charges the energy storage power supply 300.

[0118] Therefore, in the charge / discharge switching device 100 of this application, the switching transistor 331 of the first switching unit and the switching transistor 351 of the second switching unit alternately undergo conduction and turn-off at a preset frequency under the control of the PWM signal. The first charging current path and the second charging current path are alternately formed to efficiently charge the energy storage power supply 300. At this time, the energy transfer path in the charge / discharge module 30 is simple, which helps to improve the energy conversion efficiency and the working stability of the charge / discharge switching device 100 is good.

[0119] Please refer to Figure 1 , Figure 2 , Figure 5 and Figure 6 In some embodiments, controlling the charge / discharge module 30 to be in a discharge state includes: 051: Output PWM signal to the switching transistor 331 of the first switching unit and output PWM signal to the switching transistor 351 of the second switching unit; 053: When the switching transistor 331 of the first switching unit is turned on, a first discharge current path is formed. The current flows out from the energy storage power supply 300, flows through the inductor 31 and the switching transistor 331 of the first switching unit in sequence, and then reaches the bus. 055: When the switching transistor 331 of the first switching unit is turned off, a second discharge current path is formed. The current flows out from the energy storage power supply 300, passes through the inductor 31 and the diode 333 of the first switching unit in sequence, and then reaches the bus; and, 057: The first discharge current path and the second discharge current path are alternately formed under the drive of the switching tube 351 of the second switching unit to conduct and turn off at high frequency, and the current flows continuously in the inductor 31 to deliver the electrical energy of the energy storage power supply 300 to the bus.

[0120] Correspondingly, the above charging method can be applied to the charge / discharge switching device 100 provided in this application. In the discharge state, the energy storage power supply 300 releases electrical energy to the bus through the charge / discharge module 30. The first drive signal output by the second controller 53 is a PWM signal, and the second drive signal is a PWM signal, so that the charge / discharge module 30 forms a first discharge current path and a second discharge current path. Specifically: when the switching transistor 331 of the first switching unit is turned on, a first discharge current path is formed, and the current flows out of the energy storage power supply 300, flows through the inductor 31 and the switching transistor 331 of the first switching unit in sequence, and then reaches the bus; when the switching transistor 331 of the first switching unit is turned off, a second discharge current path is formed, and the current flows out of the energy storage power supply 300, flows through the inductor 31 and the diode 333 of the first switching unit in sequence, and then reaches the bus; the first discharge current path and the second discharge current path are alternately formed under the high-frequency turn-on and turn-off drive of the switching transistor 351 of the second switching unit, so that the current flows continuously in the inductor 31, and the electrical energy of the energy storage power supply 300 is delivered to the bus.

[0121] Specifically, when the first drive signal output by the second controller 53 is a PWM signal, the second controller 53 can accurately and quickly control the switching transistor 331 of the first switching unit to turn on and off through the PWM signal. When the second drive signal output by the second controller 53 is a PWM signal, the second controller 53 can accurately and quickly control the switching transistor 351 of the second switching unit to turn on and off through the PWM signal.

[0122] When the charging / discharging module 30 is in the discharging state, as described above, the charging / discharging module 30 is in Boost operating mode. At this time, the duty cycle of the PWM signal corresponds to the ratio of the discharge voltage of the energy storage power supply 300 to the rise / fall ratio of the bus voltage. Under the control of the PWM signal, the switching transistor 331 of the first switching unit regularly alternates between being turned on and off.

[0123] When the switching transistor 331 of the first switching unit is turned on under the PWM signal, a first discharge current path is formed in the charging and discharging module 30. At this time, the DC current flowing out of the energy storage power supply 300 flows sequentially through the inductor 31, the switching transistor 331 of the first switching unit, and then reaches the bus, and is transmitted to the DC-DC converter module 14 through the bus port 13, as shown below. Figure 6 As shown by the dashed line. During this process, the switching transistor 351 of the second switching unit is turned off under the PWM signal.

[0124] When the switching transistor 331 of the first switching unit is turned off under the PWM signal, a second discharge current path is formed in the charging and discharging module 30. At this time, the DC current flowing from the energy storage power supply 300 flows sequentially through the inductor 31, the diode 333 of the first switching unit, and then reaches the bus, and is transmitted to the DC-DC converter module 14 through the bus port 13, as shown below. Figure 6 As shown by the solid line. During this process, the switching transistor 351 of the second switching unit is turned on under the PWM signal and plays the role of controlling the discharge of inductor 31 to the bus. It can be understood that at this time, at least part of the electrical energy in inductor 31 is also released and transferred to the bus.

[0125] The switching transistor 331 of the first switching unit alternately experiences being turned on and off under the PWM signal. That is, the first discharge current path and the second discharge current path are alternately formed under the drive of the switching transistor 331 of the first switching unit to be turned on and off at high frequency. At this time, the current flows continuously in the inductor 31, and the energy storage power supply 300 can continuously provide power to the bus.

[0126] Therefore, in the charge / discharge switching device 100 of this application, the switching transistor 331 of the first switching unit and the switching transistor 351 of the second switching unit alternately undergo conduction and turn-off at a preset frequency under the control of the PWM signal. The first discharge current path and the second discharge current path are alternately formed to achieve efficient discharge of the energy storage power supply 300. At this time, the charge / discharge module 30 can easily achieve voltage boosting and efficiently transfer energy to the bus with low conduction loss, thereby ensuring stable power supply to the load 500.

[0127] Please refer to Figure 1 , Figure 2 , Figure 7 and Figure 8 In some embodiments, the control module 50 includes a second controller 53. Controlling the charge / discharge module 30 to be in a pre-discharge state includes: 071: Before the second controller 53 outputs the first drive signal and the second drive signal, the energy storage power supply 300 discharges to the bus through the inductor 31 and the diode 333 of the first switching unit with a power less than the rated discharge power.

[0128] Correspondingly, the above-described charging method can be applied to the charge / discharge switching device 100 provided in this application. In the pre-discharge state, the energy storage power supply 300 releases preset energy to the bus through the charge / discharge module 30. Before the second controller 53 outputs the first drive signal and the second drive signal, the energy storage power supply 300 discharges to the bus through the inductor 31 and the diode 333 of the first switching unit at a power less than the rated discharge power.

[0129] Specifically, since the first controller 51 needs time to detect the status of the mains power and the communication between the first controller 51 and the second controller 53, the second controller 53 outputs a PWM signal to the switching transistor 331 of the first switching unit and to the switching transistor 351 of the second switching unit. This ensures that the energy storage power supply 300 is in a state without energy source before the charging and discharging module 30 is in a discharging state and supplies power to the load 500. For this short time period, the charging and discharging module 30 of this application can provide preset energy to the adapter 10 in a pre-discharge state to ensure that the operation of the load 500 is not interrupted.

[0130] It is understood that the pre-discharge state of the charging / discharging module 30 occurs before the second controller 53 outputs the first and second drive signals. At this time, the switching transistor 331 of the first switching unit is turned off due to the lack of a drive signal. The DC power supplied by the energy storage power supply 300 flows sequentially through the inductor 31, the diode 333 of the first switching unit, and then reaches the bus, and is transmitted to the DC-DC converter module 14 through the bus port 13, as shown below. Figure 8 As shown by the solid line. During this process, the discharge power of the energy storage power supply 300 is less than the rated discharge power, and the load 500 can continue to work for a short time at a power lower than the rated operating power. That is, the pre-discharge state is only maintained for a short time, usually from a few milliseconds to hundreds of milliseconds.

[0131] Therefore, in the charge / discharge switching device 100 of this application, before the charge / discharge module 30 enters the discharge state, the charge / discharge module 30 also includes a pre-discharge state. At this time, the energy storage power supply 300 discharges to the bus through the inductor 31 and the diode 333 of the first switching unit. The load 500 can obtain energy from the energy storage power supply 300 immediately after the mains power is disconnected, avoiding the interruption of the load 500's operation during the response time and effectively ensuring that the load 500 can work continuously and stably.

[0132] Please refer to Figure 1 , Figure 2 and Figure 9 In some implementations, obtaining the status of the mains power includes: 011: Upon receiving the induced current transmitted by the power failure detection module 90, determine that the mains power is on; and, 013: If no induced current is received from the power failure detection module 90, the mains power is determined to be disconnected.

[0133] Correspondingly, the above-described charging method can be applied to the charge / discharge switching device 100 provided in this application. The charge / discharge switching device 100 also includes a power failure detection module 90, which is electrically connected to the rectifier module 15 and the first controller 51 respectively. The first controller 51 is also used to determine whether the mains power is on or off based on whether it receives the induced current transmitted by the power failure detection module 90.

[0134] Specifically, the power failure detection module 90 is a module in the charge / discharge switching device 100 used to detect the state of the mains power. The rectifier module 15 is the upstream module connecting the mains power to the charge / discharge switching device 100. The power failure detection module 90, through its electrical connection with the rectifier module 15, detects whether current flows through the rectifier module 15, thereby determining the state of the mains power. When the mains power is on, the power failure detection module 90 detects current in the rectifier module 15 and outputs an induced current; when the mains power is on, the power failure detection module 90 detects no current in the rectifier module 15 and therefore does not output an induced current.

[0135] In some embodiments, the power failure detection module 90 is an induction coil that can generate an induced current when there is current in the rectifier module 15. In other embodiments, the power failure detection module 90 is a current sensor that can generate an induced current when there is current in the rectifier module 15.

[0136] The power failure detection module 90 is also electrically connected to the first controller 51 to transmit the signal corresponding to the status of the mains power to the first controller 51. When the first controller 51 receives the induced current from the power failure detection module 90, the first controller 51 can determine that the status of the mains power is on; when the first controller 51 does not receive the induced current from the power failure detection module 90, the first controller 51 can determine that the status of the mains power is off.

[0137] Therefore, in the charge / discharge switching device 100 of this application, the first controller 51 can quickly and accurately know the status of the mains power through the electrical connection with the power failure detection module 90, and then transmit a signal to the second controller 53 to control the charge / discharge module 30 to switch flexibly and quickly between the charging state and the discharging state. The data source of the switching process of the charge / discharge switching device 100 is reliable, and the charge / discharge switching device 100 can work stably and reliably.

[0138] Please refer to Figure 2 , Figure 4 , Figure 6 , Figure 8 and Figure 10In some embodiments, this application provides a charging and discharging system 1000. The charging and discharging system 1000 includes at least one energy storage power source 300 and a charging and discharging switching device 100 of any of the above embodiments. The energy storage power source 300 is used to store and release electrical energy. The energy storage power source 300 can be electrically connected to the charging and discharging switching device 100 to exchange electrical energy with mains power or with a load 500.

[0139] Specifically, the charging and discharging system 1000 is a system capable of flexibly controlling the charging and discharging process according to the state of the mains power. It should be noted that the specific structure and properties of the energy storage power supply 300 and the charging and discharging switching device 100 in this embodiment are exactly the same as those in the above embodiments, and will not be explained again here.

[0140] More specifically, the charging and discharging system 1000 controls the current flow between the mains power, the energy storage power supply 300, and the load 500 through the charging and discharging switching device 100, thereby achieving the following: when the mains power is on, the mains power charges the energy storage power supply 300 through the adapter 10 and the charging and discharging module 30, and supplies power to the load 500 through the adapter 10; when the mains power is off, the charging and discharging module 30 is in a pre-discharge or discharging state, and the energy storage power supply 300 supplies power to the load 500 through the charging and discharging module 30 and the adapter 10. Please refer to the embodiments described above for the above process; it will not be repeated here.

[0141] In the charging and discharging system 1000 of this application, the adapter 10 is connected to the mains power and the load 500, and can charge the load 500 through the mains power. The energy storage power supply 300 is connected to the adapter 10 through the charging and discharging module 30, and is used to store and / or release electrical energy. The control module 50 is electrically connected to the mains power and the charging and discharging module 30 respectively, and can obtain the status of the mains power and control the current flow between the mains power, the energy storage power supply 300 and the load 500 according to the status of the mains power. When the mains power is on, the control module 50 controls the charging / discharging module 30 to be in a charging state, and the mains power charges the energy storage power supply 300 through the adapter 10 and the charging / discharging module 30. During a preset time period when the mains power switches from on to off, the control module 50 controls the charging / discharging module 30 to be in a pre-discharge state, and the preset energy in the energy storage power supply 300 supplies power to the load 500 through the charging / discharging module 30 and the adapter 10. After the preset time period when the mains power switches from on to off, the control module 50 controls the charging / discharging module 30 to be in a discharging state, and the energy storage power supply 300 supplies power to the load 500 through the charging / discharging module 30 and the adapter 10. At this time, the energy storage power supply 300 can not only obtain power from the mains power through the adapter 10, but also supply power to the load 500 when the mains power is abnormal. Moreover, this switching process can be carried out automatically, and the load 500 can maintain a continuous and reliable working state without the risk of power failure and restart.

[0142] The technical features of the embodiments described above can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification. Furthermore, other implementation methods can be derived from the above embodiments, allowing for structural and logical substitutions and changes without departing from the scope of this disclosure.

[0143] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A charge / discharge switching device, characterized in that, include: An adapter for connecting to mains power and a load, so as to charge the load via the mains power; A charging / discharging module is connected to an energy storage power supply and the adapter, wherein the energy storage power supply is used to store and / or release electrical energy; and The control module is connected to both the mains power supply and the charging / discharging module, and is used for: Obtain the status of the mains power; When the mains power is on, the charging and discharging module is controlled to be in a charging state so that the mains power charges the energy storage power supply through the adapter and the charging and discharging module; During a preset time period when the mains power state switches from the on state to the off state, the charging and discharging module is controlled to be in a pre-discharge state so that the preset energy in the energy storage power supply supplies power to the load through the charging and discharging module and the adapter. The preset energy is less than the capacity of the energy storage power supply. and After the preset time period during which the mains power state switches from the on state to the off state, the charging and discharging module is controlled to be in the discharging state, so that the energy storage power supply supplies power to the load through the charging and discharging module and the adapter.

2. The charge / discharge switching device according to claim 1, characterized in that, The adapter has an AC power port, a load port, and a bus port. The bus port is used to connect to a bus. The energy storage power supply is electrically connected to the bus through the charging and discharging module. The adapter includes: A DC-DC converter module is electrically connected to the bus port and is used to convert DC power with a first voltage into DC power with a second voltage. A rectifier module is electrically connected to both the mains power port and the DC-DC converter module, and is used to convert the AC power from the mains power into DC power before transmitting it to the DC-DC converter module; and, The inverter module is electrically connected to the load port and the DC-DC converter module respectively, and is used to convert the DC power from the DC-DC converter module into AC power and transmit it to the load.

3. The charge / discharge switching device according to claim 2, characterized in that, The adapter also includes: A switching module, connected to the DC-DC converter module, is used to: transmit DC power from the rectifier module to the DC-DC converter module when the mains power is on; and, when the mains power is off, transmit DC power from the energy storage power source to the bus port via the charging / discharging module to the DC-DC converter module.

4. The charge / discharge switching device according to claim 2, characterized in that, The charging and discharging module is electrically connected to the energy storage power supply and the bus, respectively, and the charging and discharging module includes: An inductor, wherein the first terminal of the inductor is electrically connected to the positive terminal of the energy storage power source; and The first switching unit and the second switching unit are connected in series between the bus and ground, and the second end of the inductor is electrically connected to the series node of the first switching unit and the second switching unit. The first switching unit and the second switching unit each include a switching transistor and a diode connected in parallel, and in the charging state, the conduction direction of the diode is opposite to the conduction direction of the corresponding switching transistor.

5. The charge / discharge switching device according to claim 4, characterized in that, The control module includes: First controller; and The second controller is electrically connected to the first controller, the first switching unit, and the second switching unit, respectively. The first controller is used to acquire the status of the mains power and determine the working mode according to the status of the mains power. The working mode includes charging mode, pre-discharge mode and discharging mode. The second controller is used to output a first drive signal to the switch of the first switching unit and a second drive signal to the switch of the second switching unit according to the working mode determined by the first controller, so as to control the charging and discharging module to be in the charging state, the pre-discharging state and the discharging state respectively.

6. The charge / discharge switching device according to claim 5, characterized in that, The first controller is provided with a first enable interface, and the second controller is provided with a second enable interface, and the first enable interface is connected to the second enable interface; The first controller transmits an enable signal to the second controller through the first enable interface and the second enable interface to start the second controller to work according to the working mode determined by the first controller.

7. The charge / discharge switching device according to claim 6, characterized in that, The first controller is further provided with a first communication interface, and the second controller is further provided with a second communication interface, wherein the first communication interface and the second communication interface are communicatively connected; The second controller transmits parameter signals of the energy storage power supply to the first controller through the first communication interface and the second communication interface. The parameter signals include at least one of voltage signals, current signals and temperature signals. The first controller is used to determine the operating state of the energy storage power supply based on the parameter signal, and when the operating state meets the preset conditions, it sends a stop signal to the second controller through the first enable interface and the second enable interface; The second controller is also configured to, in response to the stop signal, stop outputting the first drive signal and the second drive signal to disconnect the energy storage power supply from the bus.

8. The charge / discharge switching device according to claim 7, characterized in that, The preset conditions include at least one of the following: The voltage signal is lower than a first voltage threshold or higher than a second voltage threshold, wherein the first voltage threshold is less than the second voltage threshold; The current signal is higher than the current threshold. The temperature signal is higher than the temperature threshold.

9. The charge / discharge switching device according to any one of claims 5-8, characterized in that, Both the switching transistor in the first switching unit and the switching transistor in the second switching unit are MOSFETs; wherein: The drain of the MOSFET in the first switching unit is electrically connected to the bus, and the source is electrically connected to the second terminal of the inductor. The drain of the MOSFET in the second switching unit is electrically connected to the second terminal of the inductor, and the source is grounded; The diode of the first switching unit is the body diode of the MOSFET of the first switching unit, and the diode of the second switching unit is the body diode of the MOSFET of the second switching unit.

10. The charge / discharge switching device according to claim 5, characterized in that, During the charging state, the mains power supplies DC power to the bus through the adapter; The first drive signal output by the second controller is a PWM signal, and the second drive signal is a PWM signal, so that the charging and discharging module forms a first charging current path and a second charging current path; wherein: When the switching transistor of the first switching unit is turned on, the first charging current path is formed. The current flows out from the bus, flows through the switching transistor of the first switching unit, the inductor, and the energy storage power source in sequence, and then returns to ground. When the switching transistor of the first switching unit is turned off, the second charging current path is formed, and the current flows from the inductor to the energy storage power source and then back to ground. The first charging current path and the second charging current path are alternately formed under the drive of the switching transistor of the first switching unit to conduct and turn off at high frequency, so that the current flows continuously in the inductor to charge the energy storage power supply.

11. The charge / discharge switching device according to claim 10, characterized in that, In the discharge state, the energy storage power supply releases electrical energy to the bus through the charge and discharge module; The first drive signal output by the second controller is a PWM signal, and the second drive signal is a PWM signal, so that the charging and discharging module forms a first discharge current path and a second discharge current path; wherein: When the switching transistor of the first switching unit is turned on, the first discharge current path is formed. The current flows out from the energy storage power source, flows through the inductor and the switching transistor of the first switching unit in sequence, and then reaches the bus. When the switching transistor of the first switching unit is turned off, the second discharge current path is formed. The current flows out from the energy storage power supply, flows through the inductor and the diode of the first switching unit in sequence, and then reaches the bus. The first discharge current path and the second discharge current path are alternately formed under the drive of the switching transistor of the second switching unit to conduct and turn off at high frequency, so that the current flows continuously in the inductor and delivers the electrical energy of the energy storage power supply to the bus.

12. The charge / discharge switching device according to claim 11, characterized in that, In the pre-discharge state, the energy storage power supply releases the preset energy to the bus through the charging and discharging module; Before the second controller outputs the first drive signal and the second drive signal, the energy storage power supply discharges to the bus at a power less than the rated discharge power through the inductor and the diode of the first switching unit.

13. The charge / discharge switching device according to claim 5, characterized in that, It also includes a power failure detection module, which is electrically connected to the rectifier module and the first controller respectively. The first controller is also used to determine whether the mains power is on or off based on whether it receives the induced current transmitted by the power failure detection module.

14. A charge / discharge switching method, applied to the charge / discharge switching device according to any one of claims 1-13, characterized in that, include: Obtain the status of the mains power; When the mains power is on, the charging and discharging module is controlled to be in a charging state so that the mains power charges the energy storage power supply through the adapter and the charging and discharging module. During a preset time period when the mains power state switches from the on state to the off state, the charging and discharging module is controlled to be in a pre-discharge state so that the preset energy in the energy storage power supply supplies power to the load through the charging and discharging module and the adapter. The preset energy is less than the capacity of the energy storage power supply. and, After the preset time period during which the mains power state switches from the on state to the off state, the charging and discharging module is controlled to be in the discharging state, so that the energy storage power supply supplies power to the load through the charging and discharging module and the adapter.

15. The charge / discharge switching method according to claim 14, characterized in that, The control charging and discharging module is in a charging state, including: A PWM signal is output to the switching transistor of the first switching unit, and a PWM signal is output to the switching transistor of the second switching unit. When the switching transistor of the first switching unit is turned on, a first charging current path is formed. The current flows out from the bus and flows through the switching transistor, inductor, and energy storage power supply of the first switching unit in sequence before returning to ground. When the switching transistor of the first switching unit is turned off, a second charging current path is formed, and the current flows from the inductor to the energy storage power source and then back to ground; and, The first charging current path and the second charging current path are alternately formed under the drive of the switching transistor of the first switching unit to be turned on and off at high frequency, and the current flows continuously in the inductor to charge the energy storage power supply.

16. The charge / discharge switching method according to claim 15, characterized in that, The control charging and discharging module is in a discharging state, including: A PWM signal is output to the switching transistor of the first switching unit, and a PWM signal is output to the switching transistor of the second switching unit; When the switching transistor of the first switching unit is turned on, a first discharge current path is formed. The current flows out from the energy storage power source, flows through the inductor and the switching transistor of the first switching unit in sequence, and then reaches the bus. When the switching transistor of the first switching unit is turned off, a second discharge current path is formed. The current flows out from the energy storage power source, passes sequentially through the inductor and the diode of the first switching unit, and then reaches the busbar; and, The first discharge current path and the second discharge current path are alternately formed under the drive of the switching transistor of the second switching unit to conduct and turn off at high frequency, and the current flows continuously in the inductor to deliver the electrical energy of the energy storage power supply to the bus.

17. The charge / discharge switching method according to claim 16, characterized in that, The control module includes a second controller; the control charging / discharging module is in a pre-discharge state, including: Before the second controller outputs the first drive signal and the second drive signal, the energy storage power supply discharges to the bus at a power less than the rated discharge power through the inductor and the diode of the first switching unit.

18. The charge / discharge switching method according to any one of claims 14-17, characterized in that, The process of obtaining the status of the mains power includes: Upon receiving the induced current transmitted by the power failure detection module, the state of the mains power is determined to be on; and, If no induced current is received from the power failure detection module, the mains power is determined to be disconnected.

19. A charging and discharging system, characterized in that, include: At least one energy storage power source for storing and releasing electrical energy; and The charge / discharge switching device according to any one of claims 1-13, wherein the energy storage power supply is electrically connected to the charge / discharge switching device to perform electrical energy interaction with the mains power or with the load.