Intelligent charging and discharging band main and standby power supply switching band double-way output system
The intelligent charging and discharging system solves the problems of unstable power switching, fragmented protection, and lack of unified management of dual outputs in portable and embedded devices. It realizes coordinated switching of power paths and automatic fault recovery, thereby improving the stability and efficiency of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI LINGZE INFORMATION TECH CO LTD
- Filing Date
- 2026-03-27
- Publication Date
- 2026-06-16
AI Technical Summary
In existing portable and embedded devices, the switching between primary and backup power supplies is unstable, the charging and discharging protection and switching logic are fragmented, and the dual outputs lack unified management, resulting in system resets, peripheral malfunctions, and low efficiency.
Design an intelligent charging and discharging system with main/backup power switching and dual-output, including an external power input module, a charging management module, a battery protection module, a power path switching module, a boost regulator module, a dual-output network, a power effective detection and enable control unit, and fault and recovery processing logic, to achieve coordinated switching of power paths and automatic fault recovery.
It achieves stable power switching, coordinated protection and switching, improves the management efficiency of dual outputs, reduces system transient drops and ripple, and enhances immunity and fault recovery capabilities.
Smart Images

Figure CN122225645A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power management and battery power supply system technology, specifically to an intelligent charging and discharging system with main and backup power switching and dual-output. Background Technology
[0002] In portable and embedded devices, common power supply methods include: external 5V power supply, single-cell lithium battery power supply, or a combination of both. Existing solutions often implement the "charging chip + battery protection board + power switching + boost module" in a discrete manner, which presents the following problems:
[0003] 1) Unstable switching between main and backup power supplies: When the external power supply is plugged in or unplugged or the battery voltage fluctuates, the main power rail of the system may experience transient drops, reverse power supply, or multiple jittering switches, which may cause system reset or peripheral abnormalities.
[0004] 2) Disconnection between charge / discharge protection and switching logic: When overcharge, over-discharge, overcurrent, short circuit, over-temperature and other protection conditions occur, there is a lack of coordination with power path switching, which can easily lead to problems such as "the wrong power supply path is still maintained after protection is triggered" or "the recovery conditions are unclear, resulting in a deadlock".
[0005] 3) Lack of unified management for dual outputs: When a battery direct voltage (such as 3.7V bus) is needed to supply part of the load, and a stable 5V is needed to supply peripherals, the common practice is to simply add a boost module. There is a lack of overall design for output filtering, fault isolation, enable timing and load requirements matching, resulting in low efficiency, large ripple and poor noise immunity.
[0006] Therefore, a power supply system is needed that can uniformly implement charging management, discharge protection, primary and backup power priority switching, dual-output coordination, and fault latching / automatic recovery in terms of structure and control process. Summary of the Invention
[0007] The purpose of this invention is to provide an intelligent charging and discharging system with main and backup power switching and dual-output to solve the problems mentioned in the background art.
[0008] To achieve the above objectives, the present invention provides the following technical solution: an intelligent charging and discharging system with main / backup power switching and dual-output, comprising:
[0009] An external power input module is used to connect to an external 5V power supply and includes a reverse connection protection / backflow protection unit and an input filtering unit.
[0010] The charging management module is connected to the external power input module and is used to perform constant current / constant voltage charging on a single lithium battery, and provides charging status indication output and temperature detection input.
[0011] A battery protection module, connected to the lithium battery, is used to cut off the battery circuit under conditions of overcharge, over-discharge, overcurrent or short circuit, and output the protected battery power.
[0012] The power path switching module has a first input terminal, a second input terminal, and an output terminal. The first input terminal is connected to the external power input module, and the second input terminal is connected to the power supply of the protected battery of the battery protection module. The power path switching module selects the first input terminal or the second input terminal to supply power to the output terminal according to a priority strategy, forming the main power bus of the system.
[0013] The boost regulator module has its input terminal connected to the main power bus of the system and its output terminal outputting a stable 5V voltage.
[0014] The dual-output network includes a first output terminal for outputting the main power bus of the system and a second output terminal for outputting the stable 5V voltage, and at least one output terminal is equipped with a filtering and protection network.
[0015] The power supply validity detection and enable control unit is used to determine the validity of the external power supply and output an enable control signal to control the enable terminal of the power path switching module and / or the boost regulator module, thereby achieving switching jitter suppression and fault output isolation.
[0016] The fault and recovery process determines the protection trigger conditions based on battery voltage, temperature, charging current, discharging current, and short circuit status, and enters the protection latching state; when the preset recovery conditions are met, it performs an automatic reset to restore the system to a state where charging / discharging and stable power supply are allowed.
[0017] Preferably, the power supply validity detection and enable control unit includes two types of judgment logic: external power supply validity judgment and battery status judgment. The external power supply validity judgment adopts a voltage threshold and time window method: when the external power supply voltage is continuously higher than the external power supply validity threshold and maintained for 20ms to 500ms, the external power supply is determined to be valid; when the external power supply voltage is continuously lower than the external power supply invalid threshold and maintained for 20ms to 500ms, the external power supply is determined to be invalid.
[0018] Preferably, the priority strategy is an external power priority strategy: when the power effective detection and enable control unit determines that the external power is effective, the power path switching module selects the external power supply at the first input terminal to supply power to the output terminal; when the external power is determined to be invalid, the protected battery power supply at the second input terminal is selected to supply power to the output terminal.
[0019] Preferably, the main power bus of the system is equipped with an output holding capacitor to provide a holding time for the system during power path switching, thereby reducing the transient sag of the main power bus.
[0020] Preferably, the protection triggering conditions of the fault and recovery processing logic include: charging protection triggering conditions: the battery voltage exceeds the overcharge threshold in the range of 4.20V to 4.30V, the temperature exceeds the overtemperature threshold in the range of 40℃ to 60℃, or the charging current exceeds 1.0 to 1.2 times the set current; discharging protection triggering conditions: the battery voltage is lower than the undervoltage threshold in the range of 2.3V to 2.8V, the discharging current exceeds the overcurrent threshold in the range of 2A to 5A, or a short circuit is detected.
[0021] Preferably, the overcharge threshold is 4.25V, the overtemperature threshold is 45°C, the undervoltage threshold is 2.5V, and the discharge overcurrent threshold is 3A.
[0022] Preferably, the preset recovery conditions include at least one of the following: external power supply being reconnected and determined to be effective and stable, undervoltage being resolved and the battery voltage rising to above the recovery threshold and remaining therefor a preset time, and short-circuit / overload being removed and remaining therefor a preset time.
[0023] Preferably, the charging management module uses a charging management chip with constant current / constant voltage characteristics. The charging current is configured by setting a resistor, and the charging current satisfies the formula I_CHG=1200V / R_PROG.
[0024] Preferably, the boost regulator module generates a stable 5V output through an inductor and a feedback voltage divider network, and the output terminal is equipped with a capacitor array for filtering.
[0025] Preferably, it also includes a battery health management module and a graded protection mechanism; the battery health management module accurately calculates SOC and SOH using the coulomb calculation method, records the number of cycles, supports up to 1000 cycles, and intervenes in advance through early warning logic, such as reducing the charging current by 10% when SOH≤80% to extend the lifespan;
[0026] Battery health management features tiered protection, including:
[0027] For minor faults, such as overcurrent ≤ 1.5 times the threshold and overtemperature ≤ 40℃: the charging and discharging current is halved to reduce power operation and status indication;
[0028] For moderate faults with overcurrent of 1.5 to 2 times the threshold and overtemperature of 40°C to 45°C: pause charging and discharging, maintain output power supply, and automatically resume after the fault is cleared;
[0029] Severe faults, overcurrent ≥ 2 times the threshold, short circuit, overtemperature ≥ 45℃: cut off all circuits, latch, manual reset or recovery after 30 seconds of stable external power supply connection.
[0030] Compared with the prior art, the beneficial effects of the present invention are:
[0031] 1) Stable switching: Through effective external power supply determination (threshold + time window) + external power supply priority strategy + output holding capacitor / filter collaborative design, repeated switching caused by plugging and unplugging transients is suppressed, thereby reducing the drop and jitter of the system's main power bus; it can be described in engineering test terms as: the system's main power bus does not experience repeated jitter switching when the external 5V is plugged and unplugged, or the drop duration is significantly shortened.
[0032] 2) Protection coordination and recovery: The charging protection (overcharge / overtemperature / overcurrent) and discharging protection (undervoltage / overcurrent / short circuit) are linked with the power path switching and boost output enable. After the protection is triggered, it enters latch and isolates the output. After the recovery conditions are met, it automatically resets and restores power supply, avoiding the oscillation and jamming of protection trigger-recovery-re-trigger.
[0033] 3) Dual-channel controllable output: The system simultaneously provides battery direct bus output and stable 5V output, and manages the filtering, protection and enable timing of the two outputs in a unified manner, improving ripple performance and immunity, and reducing the risk of peripheral power failure and malfunction.
[0034] 4) The examineable structural features are clearly defined: the charging management + battery protection + power path switching + boost regulation + dual output + fault latch / reset state machine are defined by structural relationships, and the threshold, time window, priority strategy and enable control are written into the dependent claims, which makes it easier to distinguish from the prior art and increases the probability of being granted. Attached Figure Description
[0035] Figure 1 This is a block diagram of the system structure of the present invention;
[0036] Figure 2 This is a schematic diagram of the charge / discharge protection logic of the present invention;
[0037] Figure 3 This is a schematic diagram of power path switching and output management of the present invention;
[0038] Figure 4 This is a flowchart of the fault and recovery process of the present invention. Detailed Implementation
[0039] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0040] In the description of this invention, it should be understood that the terms "upper", "lower", "front", "rear", "left", "right", "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 invention 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 invention.
[0041] Example:
[0042] Please see Figure 1-4 The present invention provides the following technical solution: an intelligent charging and discharging system with main / backup power switching and dual-output, comprising:
[0043] An external power input module is used to connect to an external 5V power supply and includes a reverse connection protection / backflow protection unit and an input filtering unit.
[0044] The charging management module is connected to the external power input module and is used to perform constant current / constant voltage charging on a single lithium battery, and provides charging status indication output and temperature detection input.
[0045] A battery protection module, connected to the lithium battery, is used to cut off the battery circuit under conditions of overcharge, over-discharge, overcurrent or short circuit, and output the protected battery power.
[0046] The power path switching module has a first input terminal, a second input terminal, and an output terminal. The first input terminal is connected to the external power input module, and the second input terminal is connected to the power supply of the protected battery of the battery protection module. The power path switching module selects the first input terminal or the second input terminal to supply power to the output terminal according to a priority strategy, forming the main power bus of the system.
[0047] The boost regulator module has its input terminal connected to the main power bus of the system and its output terminal outputting a stable 5V voltage.
[0048] The dual-output network includes a first output terminal for outputting the main power bus of the system and a second output terminal for outputting the stable 5V voltage, and at least one output terminal is equipped with a filtering and protection network.
[0049] The power supply validity detection and enable control unit is used to determine the validity of the external power supply and output an enable control signal to control the enable terminal of the power path switching module and / or the boost regulator module, thereby achieving switching jitter suppression and fault output isolation.
[0050] The fault and recovery processing logic is used to determine the protection trigger conditions based on battery voltage, temperature, charging current, discharging current and short circuit status, and enter the protection latching state; when the preset recovery conditions are met, it performs automatic reset to restore the system to a state that allows charging / discharging and stable power supply.
[0051] The power supply validity detection and enable control unit includes two types of judgment logic: external power supply validity judgment and battery status judgment. The external power supply validity judgment adopts a voltage threshold and time window method: when the external power supply voltage is continuously higher than the external power supply validity threshold and maintained for 20ms to 500ms, the external power supply is determined to be valid; when the external power supply voltage is continuously lower than the external power supply invalid threshold and maintained for 20ms to 500ms, the external power supply is determined to be invalid.
[0052] The priority strategy is an external power priority strategy: when the power effective detection and enable control unit determines that the external power is effective, the power path switching module selects the external power at the first input terminal to supply power to the output terminal; when the external power is determined to be invalid, the protected battery power at the second input terminal is selected to supply power to the output terminal.
[0053] The system's main power bus is equipped with an output holding capacitor, which provides a holding time for the system during power path switching, thereby reducing transient drops in the main power bus.
[0054] The protection triggering conditions of the fault and recovery processing logic include: charging protection triggering conditions: the battery voltage exceeds the overcharge threshold in the range of 4.20V to 4.30V, the temperature exceeds the overtemperature threshold in the range of 40℃ to 60℃, or the charging current exceeds 1.0 to 1.2 times the set current; discharging protection triggering conditions: the battery voltage is lower than the undervoltage threshold in the range of 2.3V to 2.8V, the discharging current exceeds the overcurrent threshold in the range of 2A to 5A, or a short circuit is detected.
[0055] The overcharge threshold is 4.25V, the overtemperature threshold is 45℃, the undervoltage threshold is 2.5V, and the discharge overcurrent threshold is 3A.
[0056] The preset recovery conditions include at least one of the following: external power supply is reconnected and determined to be effective and stable, undervoltage is resolved and the battery voltage rises to above the recovery threshold and remains there for a preset time, and short-circuit / overload load is removed and remains there for a preset time.
[0057] The charging management module uses a charging management chip with constant current / constant voltage characteristics. The charging current is configured by setting a resistor, and the charging current satisfies the formula I_CHG=1200V / R_PROG.
[0058] The set resistor R_PROG = 4.0kΩ, and the configured charging current is approximately 300mA.
[0059] The boost regulator module generates a stable 5V output through an inductor and a feedback voltage divider network, and the output terminal is equipped with a capacitor array for filtering.
[0060] It also includes a battery health management (BMS) module and a graded protection mechanism, replacing the traditional one-size-fits-all cut-off protection.
[0061] The battery health management module accurately calculates SOC and SOH using coulomb calculation, records the number of cycles, supports up to 1000 cycles, and intervenes in advance through early warning logic. For example, when SOH ≤ 80%, the charging current is reduced by 10% to extend the battery life.
[0062] Graded protection:
[0063] For minor faults, such as overcurrent ≤ 1.5 times the threshold and overtemperature ≤ 40℃: the charging and discharging current is halved to reduce power operation and status indication;
[0064] For moderate faults with overcurrent of 1.5 to 2 times the threshold and overtemperature of 40°C to 45°C: pause charging and discharging, maintain output power supply, and automatically resume after the fault is cleared;
[0065] Severe faults (overcurrent ≥ 2 times the threshold, short circuit, overtemperature ≥ 45℃): All circuits are disconnected and latched. Manual reset or recovery after 30 seconds of stable external power supply connection is required. To avoid equipment downtime due to non-fatal faults, users can obtain battery health status through status indicators or communication interfaces, reducing losses from unexpected faults.
[0066] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or basic characteristics. Therefore, the embodiments should be considered exemplary and non-limiting in all respects. The scope of the invention is defined by the appended claims rather than the foregoing description. Therefore, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention, and no reference numerals in the claims should be construed as limiting the scope of the claims.
[0067] Example 1: Power Supply System for Portable Intelligent Testing Instruments
[0068] This system is used for portable water quality testing instruments. The instruments require a stable 5V power supply and main power bus power supply to operate. It supports continuous indoor operation with power supply and outdoor mobile testing. It is required to balance power supply stability, battery life and fault tolerance to avoid data loss due to non-fatal failures during the testing process.
[0069] External power input module: Connects to a 5V / 1A power supply output from an AC-DC adapter. The reverse connection protection unit uses an SS34 Schottky diode. The input filter unit consists of a 10μF electrolytic capacitor and a 0.1μF ceramic capacitor to suppress grid ripple and reverse connection risk.
[0070] Charging management module: The TP4056 charging management chip is selected, which supports constant current / constant voltage characteristics. According to the scheme, R_PROG=4.0kΩ and I_CHG=1200V / R_PROG, the charging current is configured to be 300mA to match the charging requirements of a single 18650 lithium battery with a capacity of 2000mAh. The charging status is indicated by red LED and green LED, and the temperature is detected by using an NTC thermistor mounted on the battery surface.
[0071] Battery protection module: integrates DW01 and MOSFET protection circuits, and links with the BMS module to achieve graded protection instead of directly cutting off the circuit; the lithium battery is an 18650 cylindrical battery with a nominal voltage of 3.7V and a capacity of 2000mAh. The battery protection module outputs the battery power after protection, with a voltage range of 2.5V~4.25V.
[0072] Power path switching module: The LTC4412 power path management chip is used. The first input terminal is connected to the external 5V power supply, and the second input terminal is connected to the battery power supply after protection, following the strategy of external power priority. The main power bus of the system is equipped with a 470μF / 16V tantalum capacitor as the output holding capacitor to ensure that the switching instant is ≤20ms and the bus voltage drop is ≤0.3V, so as to avoid instrument restart.
[0073] Boost regulator module: XL6009 boost chip is used, paired with a 10μH power inductor and feedback voltage divider resistors (R1=10kΩ, R2=2.2kΩ) to regulate the output voltage to a stable 5V; the output is equipped with a capacitor array consisting of a 100μF electrolytic capacitor, a 10μF ceramic capacitor, and a 0.1μF ceramic capacitor, with a filtered ripple ≤50mV, meeting the low-noise power supply requirements of the detection module.
[0074] Dual-output network: The first output terminal (main power bus) directly outputs 3.7V~5V voltage to supply the auxiliary sensing module, with an operating current ≤500mA; the second output terminal (stable 5V) supplies the core detection module, with an operating current ≤800mA. The second output terminal is additionally equipped with a PPTC self-resetting fuse and a common mode inductor to achieve overcurrent protection and EMI suppression.
[0075] Power supply validity detection and enable control unit: A voltage detection circuit is built using an LM393 comparator. The external power supply validity threshold is set to 4.7V, and the invalid threshold is set to 4.2V. The time window is configured to 100ms. When the external power supply voltage is ≥4.7V and lasts for 100ms, it is determined to be valid, and the power path switching module is enabled to select the external power supply. At the same time, the boost regulator module is enabled. When the voltage is ≤4.2V and lasts for 100ms, it switches to battery power supply to suppress switching jitter.
[0076] BMS Module and Hierarchical Protection: The BMS module uses an STM32L051 microcontroller and a MAX17048 coulomb counter chip to accurately calculate SOC and SOH, recording the number of cycles, up to a maximum of 1000. When SOH ≤ 80%, the TP4056 is controlled via I2C communication to reduce the charging current to 270mA. Hierarchical protection execution:
[0077] For minor faults, such as discharge current 3.5A ≤ 1.5 times the threshold 3A and temperature 38℃ ≤ 40℃: charge and discharge current are halved, charging is 150mA and discharging is ≤ 1.5A, indicated by a flashing yellow LED.
[0078] For moderate faults, such as discharge current of 4A~6A and temperature of 42℃: pause charging and discharging, maintain dual-output power supply, and automatically resume 30s after the fault is cleared;
[0079] For severe faults, such as discharge current ≥6A, short circuit, or temperature ≥45℃: disconnect the battery circuit and lock it. It needs to be restored after stabilizing for 30 seconds by reconnecting to an external power source.
[0080] Indoor power-on operation: When an external 5V power supply is connected, after filtering and reverse connection protection by the input module, the power effective detection unit determines that the voltage is 4.9V ≥ 4.7V and lasts for 100ms. The enable path switching module selects the external power supply to supply the main power bus, and at the same time, the boost regulator module is started to output 5V. The charging management module charges the lithium battery with a constant current of 300mA. After the voltage rises to 4.25V, it switches to constant voltage charging. When fully charged, the green LED lights up, and the BMS records the number of charging cycles.
[0081] Outdoor mobile operation: When the external power supply is disconnected, the detection unit determines that the voltage is ≤4.2V and lasts for 100ms. The path switching module switches to battery power, and the main power bus is supplied with 3.7V~4.25V voltage by the battery. The boost module maintains a stable 5V output. The instrument's operating current is about 1A, and the battery discharge current is ≤1A, which is far below the 3A overcurrent threshold. The BMS calculates the SOC in real time, and when the SOC is ≤20%, it indicates low battery via LED.
[0082] Fault handling scenario: When used outdoors, a short circuit in the auxiliary sensing module causes the discharge current to suddenly rise to 7A, which is ≥2 times the overcurrent threshold of 3A. The system judges this as a severe fault, immediately cuts off the battery circuit and latches it. After the user removes the short-circuited load and reconnects the external power supply, the system automatically resets after 30 seconds and restores normal power supply. The BMS records the fault information.
[0083] Example 2: Backup Power System for Outdoor Security Cameras
[0084] This system serves as a backup power source for outdoor bullet cameras. The main power supply for the cameras is a PoE switch with a stable 5V. The system needs to automatically switch to battery power when the PoE power fails, ensuring continuous recording for at least 4 hours. It must also be adaptable to outdoor high and low temperature environments, ranging from -10℃ to 50℃. It requires strong self-recovery capabilities, eliminating the need for frequent manual maintenance, and uses a BMS to monitor battery health, thus reducing replacement costs.
[0085] External power input module: Connects to the 5V / 2A power supply output from the POE splitter. The reverse connection protection unit uses a P-channel MOSFET (AO3401). The input filtering unit consists of a 22μF electrolytic capacitor, a 0.1μF ceramic capacitor, and a common-mode inductor to resist outdoor electromagnetic interference.
[0086] Charging management module: The MCP73871 charging management chip is selected, with R_PROG=4.0kΩ and a charging current of 300mA. It performs constant current / constant voltage charging for a single 21700 lithium battery with a capacity of 5000mAh. The temperature detection adopts a waterproof NTC thermistor, which is mounted on the battery shell. The charging status is uploaded to the backend via the camera RS485 interface.
[0087] Battery protection module: integrates S-8261 battery protection IC, linked to BMS module, 21700 lithium battery nominal voltage 3.7V, capacity 5000mAh, after protection the battery power output range 2.5V~4.25V.
[0088] Power path switching module: The TPS2115A power path controller is used. The first input terminal is connected to the POE 5V power supply, and the second input terminal is connected to the battery power supply after protection. The main power bus is equipped with a 1000μF / 16V electrolytic capacitor. The instantaneous switching time is ≥50ms to ensure that the camera does not restart with a black screen.
[0089] Boost regulator module: It uses a TPS61088 boost chip, paired with a 22μH power inductor and feedback voltage divider resistors (R1=15kΩ, R2=3.3kΩ), and provides a stable 5V output. The output is equipped with a 220μF electrolytic capacitor, a 22μF ceramic capacitor, and a 0.1μF ceramic capacitor array, with ripple ≤30mV, which meets the power supply requirements of the camera image sensor.
[0090] Dual-output network: The first output (main power bus) supplies the infrared fill light of the camera with an operating voltage of 3.7V~5V and a current of ≤1A; the second output supplies the main control board of the camera with an operating current of ≤800mA. Both outputs are equipped with PPTC self-resetting fuses and TVS diodes, with the first output at 1.5A and the second output at 1.2A, to achieve overcurrent and surge protection.
[0091] Power supply effective detection and enable control unit: The external power supply voltage is detected by the built-in ADC of the STM32G031 microcontroller. The effective threshold is 4.6V and the ineffective threshold is 4.1V. The time window is configured to be 200ms. The detection result is output as an enable signal through GPIO to control the path switching module and the boost module to avoid erroneous switching caused by POE voltage fluctuations.
[0092] BMS Module and Graded Protection: The BMS uses an ATmega328P microcontroller and an INA219 coulomb counter chip to calculate SOC and SOH, with a maximum cycle count of 1000. When SOH ≤ 80%, the charging current drops to 270mA. Graded protection is implemented as follows:
[0093] Minor faults, such as short circuit of infrared fill light causing discharge current 4A≤1.5 times threshold 3A, battery temperature 39℃: charging and discharging current halved, charging 150mA, discharging ≤1.5A, infrared fill light working with reduced power, background prompts minor fault;
[0094] For moderate faults, such as a discharge current of 5A and a battery temperature of 43℃: pause charging and discharging, maintain power supply to the camera, and automatically resume 60 seconds after the fault is cleared;
[0095] For severe faults, such as discharge current ≥6A, battery temperature ≥45℃, or main control board short circuit: all circuits are cut off and latched. Recovery is required 30 seconds after stable POE power supply connection. The background sends a severe fault alarm.
[0096] Normal power supply status: PoE power is normally connected. The detection unit determines that the voltage is 4.8V ≥ 4.6V and lasts for 200ms. The path switching module selects PoE power supply. The boost module outputs 5V to supply the main control board. The main power bus supplies infrared fill light. The charging management module charges the lithium battery at 300mA. The BMS calculates the SOC in real time. When the SOC ≥ 100%, the charging module automatically stops. The background displays that the battery is fully charged and SOH = 95%.
[0097] PoE power failure switching: When the PoE power supply is interrupted, the detection unit determines that the voltage is ≤4.1V and lasts for 200ms. The path switching module switches to battery power within 50ms. The main power bus and boost module continue to output, and the camera records without interruption. The battery discharges at a total current of 1.8A, the main control board at 0.8A, and the fill light at 1A. The BMS calculates the battery life to be about 2.8 hours, and the background updates the SOC in real time.
[0098] Fault Handling and Recovery: In outdoor high-temperature environments, if the battery temperature rises to 44℃, a moderate fault is triggered. The system suspends charging and discharging, maintains power supply to the camera, and sends a moderate over-temperature alarm in the background. If the temperature drops to 38℃ in the evening, the fault is eliminated, and the system automatically resumes charging and discharging functions. If the temperature continues to rise to 45℃, triggering a severe fault, the system cuts off all circuits. After the POE power is restored and stably connected for 30 seconds, the system resets and restores normal power supply.
[0099] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A smart charging and discharging system with main / backup power switching and dual-output, characterized in that, include: An external power input module is used to connect to an external 5V power supply and includes a reverse connection protection / backflow protection unit and an input filtering unit. The charging management module is connected to the external power input module and is used to perform constant current / constant voltage charging on a single lithium battery, and provides charging status indication output and temperature detection input. A battery protection module, connected to the lithium battery, is used to cut off the battery circuit under conditions of overcharge, over-discharge, overcurrent or short circuit, and output the protected battery power. The power path switching module has a first input terminal, a second input terminal, and an output terminal. The first input terminal is connected to the external power input module, and the second input terminal is connected to the power supply of the protected battery of the battery protection module. The power path switching module selects the first input terminal or the second input terminal to supply power to the output terminal according to a priority strategy, forming the main power bus of the system. The boost regulator module has its input terminal connected to the main power bus of the system and its output terminal outputting a stable 5V voltage. The dual-output network includes a first output terminal for outputting the main power bus of the system and a second output terminal for outputting the stable 5V voltage, and at least one output terminal is equipped with a filtering and protection network. The power supply validity detection and enable control unit is used to determine the validity of the external power supply and output an enable control signal to control the enable terminal of the power path switching module and / or the boost regulator module, thereby achieving switching jitter suppression and fault output isolation. The fault and recovery process determines the protection trigger conditions based on battery voltage, temperature, charging current, discharging current, and short circuit status, and enters the protection latching state; when the preset recovery conditions are met, it performs an automatic reset to restore the system to a state where charging / discharging and stable power supply are allowed.
2. The intelligent charging and discharging system with main / backup power switching and dual-output as described in claim 1, characterized in that: The power supply validity detection and enable control unit includes two types of judgment logic: external power supply validity judgment and battery status judgment. The external power supply validity judgment adopts a voltage threshold and time window method: when the external power supply voltage is continuously higher than the external power supply validity threshold and maintained for 20ms to 500ms, the external power supply is determined to be valid; when the external power supply voltage is continuously lower than the external power supply invalid threshold and maintained for 20ms to 500ms, the external power supply is determined to be invalid.
3. The intelligent charging and discharging system with main / backup power switching and dual-output as described in claim 1, characterized in that: The priority strategy is an external power priority strategy: when the power effective detection and enable control unit determines that the external power is effective, the power path switching module selects the external power at the first input terminal to supply power to the output terminal; when the external power is determined to be invalid, the protected battery power at the second input terminal is selected to supply power to the output terminal.
4. The intelligent charging and discharging system with main / backup power switching and dual-output as described in claim 1, characterized in that: The system's main power bus is equipped with an output holding capacitor, which provides a holding time for the system during power path switching, thereby reducing transient drops in the main power bus.
5. The intelligent charging and discharging system with main / backup power switching and dual-output as described in claim 1, characterized in that: The protection triggering conditions of the fault and recovery processing logic include: charging protection triggering conditions: the battery voltage exceeds the overcharge threshold in the range of 4.20V to 4.30V, the temperature exceeds the overtemperature threshold in the range of 40℃ to 60℃, or the charging current exceeds 1.0 to 1.2 times the set current; discharging protection triggering conditions: the battery voltage is lower than the undervoltage threshold in the range of 2.3V to 2.8V, the discharging current exceeds the overcurrent threshold in the range of 2A to 5A, or a short circuit is detected.
6. The intelligent charging and discharging system with main / backup power switching and dual-output as described in claim 5, characterized in that: The overcharge threshold is 4.25V, the overtemperature threshold is 45℃, the undervoltage threshold is 2.5V, and the discharge overcurrent threshold is 3A.
7. The intelligent charging and discharging system with main / backup power switching and dual-output as described in claim 1, characterized in that: The preset recovery conditions include at least one of the following: external power supply is reconnected and determined to be effective and stable, undervoltage is resolved and the battery voltage rises to above the recovery threshold and remains there for a preset time, and short-circuit / overload load is removed and remains there for a preset time.
8. The intelligent charging and discharging system with main / backup power switching and dual-output as described in claim 1, characterized in that: The charging management module uses a charging management chip with constant current / constant voltage characteristics. The charging current is configured by setting a resistor, and the charging current satisfies the formula I_CHG=1200V / R_PROG.
9. A smart charging and discharging system with main / backup power switching and dual-output as described in claim 8, characterized in that: The boost regulator module generates a stable 5V output through an inductor and a feedback voltage divider network, and the output terminal is equipped with a capacitor array for filtering.
10. The intelligent charging and discharging system with main / backup power switching and dual-output according to claim 1, characterized in that: It also includes a battery health management module and a graded protection mechanism; the battery health management module accurately calculates SOC and SOH using the coulomb calculation method, records the number of cycles, supports up to 1000 cycles, and intervenes in advance through early warning logic, such as reducing the charging current by 10% when SOH≤80% to extend lifespan; Battery health management features tiered protection, including: For minor faults, such as overcurrent ≤ 1.5 times the threshold and overtemperature ≤ 40℃: the charging and discharging current is halved to reduce power operation and status indication; For moderate faults with overcurrent of 1.5 to 2 times the threshold and overtemperature of 40°C to 45°C: pause charging and discharging, maintain output power supply, and automatically resume after the fault is cleared; Severe faults, overcurrent ≥ 2 times the threshold, short circuit, overtemperature ≥ 45℃: cut off all circuits, latch, manual reset or recovery after 30 seconds of stable external power supply connection.