A power supply automatic switching method and circuit
The automatic power switching circuit addresses issues of manual switching and leakage in power supply devices by automatically switching between batteries and detecting leakage, ensuring stable power supply and extending battery life.
Patent Information
- Application Number
- CN202411017184.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2044-07-29
AI Technical Summary
Existing power supply equipment cannot automatically switch batteries in harsh environments, resulting in rapid drop in power or leakage failure, affecting the stable operation of the equipment.
Design a power automatic switching circuit, including the main battery management circuit, the backup battery management circuit and the power supply switching circuit, and realize power detection and automatic switching through chips and magnetic holding relays, and perform power switching and leakage detection based on the preset power and load power.
It realizes automatic battery switching of power supply equipment in harsh environments, prevents rapid decline in power and leakage failures, ensures stable operation of the equipment, extends battery life and reduces replacement frequency.
Smart Images

Figure CN118971316B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of battery power supply, and particularly to a method and circuit for automatic power supply switching. Background Art
[0002] Currently, since it is difficult to lay cables for mains power supply, the use of portable battery power supply is increasingly advocated. With the widespread use of power supply devices such as batteries, there are also some problems in the process of using batteries. For example, it is impossible or very difficult to replace the battery in a harsh environment, or the battery power drops rapidly due to equipment leakage, or the battery charging speed is slow and other fault problems. Summary of the Invention
[0003] The present invention provides a method and circuit for automatic power supply switching. It solves the problem that the existing power supply device cannot achieve automatic switching during operation, resulting in equipment failure in case of accidental leakage.
[0004] To solve the above technical problems, the technical solution of the present invention is as follows:
[0005] An embodiment of the present invention provides an automatic power supply switching circuit, which is applied to a power supply device and includes:
[0006] A main battery management circuit electrically connected to the main battery;
[0007] A standby battery management circuit electrically connected to the standby battery;
[0008] The main battery management circuit and the standby battery management circuit are electrically connected;
[0009] The output ends of the main battery management circuit and the standby battery management circuit are both electrically connected to the input end of the power supply switching circuit;
[0010] The output end of the power supply switching circuit is electrically connected to the load;
[0011] Wherein, the standby battery management circuit, the main battery management circuit and the power supply switching circuit automatically switch the main battery and the standby battery to supply power to the load according to a preset power, and automatically detect the current leakage of the current power supply device according to the current power of the load, and control the on and off of the main battery according to the detection result.
[0012] Optionally, the main battery management circuit includes:
[0013] A first chip, a first magnetic latching relay and a seventh diode;
[0014] Among them, the switch input end of the first magnetic latching relay is connected to the positive electrode of the main battery through a first resistor, and the switch output end of the first magnetic latching relay is connected to the power supply switching circuit and the backup battery management circuit through a first diode;
[0015] The coil input end of the first magnetic latching relay is connected to the first pin of the first chip, and the coil output end of the first magnetic latching relay is grounded;
[0016] The cathode of the seventh diode is connected to the positive electrode of the main battery through an eighth resistor, and the anode is connected to the charging device port;
[0017] The second pin of the first chip is connected to the input end of the first resistor, and the third pin of the first chip is connected to the output end of the first resistor;
[0018] The fourth pin of the first chip is connected to the cathode of the seventh diode, the fifth pin of the first chip is connected to the backup battery management circuit, and the sixth pin of the first chip is connected to the backup battery management circuit;
[0019] In the use state, the first chip detects the power of the main battery through the second pin, the third pin and the fourth pin, and sends the detected first power to the backup battery management circuit. The backup battery management circuit controls the on-off of the first magnetic latching relay through the first chip according to the first power.
[0020] Optionally, the backup battery management circuit includes:
[0021] A second chip, a second magnetic latching relay, a third diode and a fourth diode;
[0022] Among them, the switch input end of the second magnetic latching relay is connected to the positive electrode of the backup battery through a third resistor, and the switch output end of the second magnetic latching relay is connected to the input end of the power supply switching circuit through a fifth diode;
[0023] The coil input end of the second magnetic latching relay is connected to the first pin of the second chip, and the coil output end of the second magnetic latching relay is grounded;
[0024] The anode of the third diode is connected to the negative electrode of the backup battery and the cathode is grounded;
[0025] The fourth diode is connected to the positive electrode of the backup battery through a seventh resistor, and the anode is connected to the cathode of the first diode;
[0026] The second pin of the second chip is connected to the input end of the third resistor, and the third pin of the second chip is connected to the output end of the third resistor;
[0027] The fourth pin of the second chip is connected to the cathode of the fourth diode, and the fifth pin of the second chip is connected to the fifth pin of the first chip; the sixth pin of the second chip is connected to the sixth pin of the first chip;
[0028] Wherein, the second chip receives the first power of the first chip, and detects the power of the backup battery through the second pin, the third pin and the fourth pin pair to obtain the second power;
[0029] When both the first power and the second power are greater than the preset power, the second chip and the first chip simultaneously turn on the main battery and the backup battery and supply power to the load;
[0030] When the first power is less than the preset power and the second power is greater than the preset power, the power supply switching circuit enables the second chip to control the backup battery management circuit to turn on through the self-locking function, supplies power to the load through the backup battery, and the second chip sends the current power of the main battery to the upper computer for early warning;
[0031] When the first power is greater than the preset power and the second power is less than the preset power, the second chip controls the main battery to charge the backup battery through the third diode and the fourth diode through the first chip, and supplies power to the load through the sixth diode.
[0032] Optionally, the power supply switching circuit includes:
[0033] The first tube, the second tube and the sixth diode;
[0034] Wherein, the anode of the sixth diode is connected to the cathode of the first diode, the cathode of the sixth diode is connected to the load, and is connected to the gate of the second tube through the fifth resistor;
[0035] The source of the second tube is grounded and is connected to the gate of the second tube through the sixth resistor;
[0036] The gate of the second tube is connected to the gate of the first tube through the fourth resistor and is connected to the source of the first tube through the second resistor;
[0037] The source of the first tube is connected to the cathode of the fifth diode, and the drain of the first tube is connected to the load through the second diode.
[0038] Wherein, when there is a voltage between the cathode of the sixth diode and the cathode of the second diode, the power supply switching circuit forms a self-lock.
[0039] An embodiment of the present invention also provides a power supply automatic switching method, which is applied to the power supply automatic switching circuit as described above. The method includes:
[0040] Obtain the current first power of the main battery and the current second power of the backup battery;
[0041] Automatically switch the main battery and the backup battery to supply power to the load according to the first power, the second power, and a preset power;
[0042] During the process of supplying power to the load, obtain the current power of the load;
[0043] Automatically detect the current leakage of the current power supply device according to the current power of the load to obtain a detection result;
[0044] Control the on / off of the main battery according to the detection result.
[0045] Optionally, automatically switching the main battery and the backup battery to supply power to the load according to the first power, the second power, and the preset power includes:
[0046] When both the first power and the second power are greater than the preset power, the second chip and the first chip simultaneously turn on the main battery and the backup battery and supply power to the load;
[0047] When the first power is less than the preset power and the second power is greater than the preset power, the power supply switching circuit uses the self-locking function to make the second chip control the backup battery management circuit to turn on, supply power to the load through the backup battery, and the second chip sends the current power of the main battery to the host computer for early warning;
[0048] When the first power is greater than the preset power and the second power is less than the preset power, the second chip controls the main battery to charge the backup battery through the third diode and the fourth diode through the first chip, and supplies power to the load through the sixth diode.
[0049] Optionally, obtaining the current first power of the main battery includes:
[0050] Through the formula Q 主 =Q 主额 +∫(I in_i -I in_o )dt, obtain the current first power Q 主 ;
[0051] Among them, Q 主额 is the initial rated power of the main battery, I in_i is the input current of the eighth resistor, I in_i =(U AI6 -U AI1 ) / r8, r8 is the resistance value of the eighth resistor; U AI6 is the output voltage of the eighth resistor, U AI1 is the input voltage of the first resistor, Iin_o is the output current of the first resistor, I in_o = (U AI1 - U AI2 ) / r1, where r1 is the resistance value of the first resistor, and U AI2 is the output terminal voltage of the first resistor.
[0052] Optionally, obtaining the current second battery level of the backup battery includes:
[0053] Obtaining the current second battery level Q 备用 of the backup battery through the formula Q 备额 = Q out_i + ∫(I out_o - I 备用 );
[0054] where Q 备额 is the initial rated battery level of the backup battery, I out_i is the input current of the seventh resistor, I out_i = (U AI5 - U AI3 ) / r7, where r7 is the resistance value of the seventh resistor; U AI5 is the output terminal voltage of the seventh resistor, U AI3 is the input terminal voltage of the third resistor, I out_o is the output current of the third resistor, I out_o = (U AI3 - U AI4 ) / r3, where r3 is the resistance value of the third resistor, and U AI4 is the output terminal voltage of the third resistor.
[0055] Optionally, during the process of powering the load, obtaining the current power of the load includes:
[0056] During the process of powering the load, obtaining the current power P RL of the load through the formula P R1H = P R7H - P R3H + P C ; RL where P
[0057] is the power at the output terminal of the first resistor; R1H
[0058] P R3H is the power at the output terminal of the third resistor;
[0059] P R7H is the power at the output terminal of the seventh resistor;
[0060] P C is the power when the power supply switching circuit is not connected to any load.
[0061] Optionally, controlling the on / off of the main battery according to the detection result includes:
[0062] When the detection result indicates that the standby battery management circuit detects that the change value of the current power of the load within a preset time is less than a preset value, and the current power of the load is equal to the power after disconnection of the load after the first magnetic latching relay is disconnected, the standby battery management circuit controls the main battery management circuit to turn on the main battery;
[0063] When the detection result indicates that the standby battery management circuit detects that the change value of the current power of the load within a preset time is less than a preset value, and the current power of the load is greater than the power after disconnection of the load after the first magnetic latching relay is disconnected, the standby battery management circuit controls the main battery management circuit to turn off the main battery.
[0064] The above solution of the present invention has at least the following beneficial effects:
[0065] The power supply automatic switching circuit of the present invention includes: a main battery management circuit electrically connected to the main battery; a standby battery management circuit electrically connected to the standby battery; the main battery management circuit and the standby battery management circuit are electrically connected; the output ends of the main battery management circuit and the standby battery management circuit are both electrically connected to the input end of the power supply switching circuit; the output end of the power supply switching circuit is electrically connected to the load; wherein, the standby battery management circuit, the main battery management circuit and the power supply switching circuit automatically switch the main battery and the standby battery to supply power to the load according to a preset power, and automatically detect the current leakage of the current power supply device according to the current power of the load, and control the on / off of the main battery according to the detection result. The automatic switching of the main battery and the standby battery during the power supply process of the power supply device and the automatic switching after an accidental leakage during the power supply process are realized, ensuring the stable operation of the power supply device. Description of the Drawings
[0066] Figure 1 is a schematic structural diagram of the main battery management circuit and the main battery of the power supply automatic switching circuit of the present invention;
[0067] Figure 2 is a schematic structural diagram of the main battery management circuit and the main battery of the power supply automatic switching circuit of the present invention;
[0068] Figure 3 is a schematic structural diagram of the power supply switching circuit of the power supply automatic switching circuit of the present invention;
[0069] Figure 4 is a schematic flow diagram of the power supply automatic switching method of the present invention. Detailed Embodiments
[0070] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present invention can be more thoroughly understood and the scope of the present invention can be fully conveyed to those skilled in the art.
[0071] As Figures 1 to 3 shown, an embodiment of the present invention provides a power supply automatic switching circuit, which is applied to a power supply device and includes:
[0072] A main battery management circuit electrically connected to the main battery BT - OUT1;
[0073] A backup battery management circuit electrically connected to the backup battery BT - IN1;
[0074] The main battery management circuit and the backup battery management circuit are electrically connected;
[0075] Output terminals of the main battery management circuit and the backup battery management circuit are both electrically connected to an input terminal of the power supply switching circuit;
[0076] An output terminal of the power supply switching circuit is electrically connected to the load RL1;
[0077] Wherein, the backup battery management circuit, the main battery management circuit, and the power supply switching circuit automatically switch between the main battery BT - OUT1 and the backup battery BT - IN1 to supply power to the load RL1 according to a preset power level, and automatically detect leakage of the current power supply device according to the current power of the load RL1, and control the on - off of the main battery BT - OUT1 according to the detection result.
[0078] In a preferred embodiment, the main battery management circuit and the backup battery management circuit are electrically connected through a first interface P1 and a second interface P2;
[0079] Wherein, a first pin of the first interface P1 is electrically connected to a first pin of the second interface P2;
[0080] A second pin of the first interface P1 is grounded and is electrically connected to a second pin of the second interface P2;
[0081] A third pin of the first interface P1 is connected to the first pin of the first interface P1 and is electrically connected to a third pin of the second interface P2;
[0082] A fourth pin of the first interface P1 is electrically connected to a fourth pin of the second interface P2;
[0083] A fifth pin of the first interface P1 is electrically connected to a fifth pin of the second interface P2.
[0084] In this embodiment, before the power supply device is used, first, the main battery BT-OUT1 and the inside of the main battery management circuit are potted and tested for stability, and the backup battery BT-IN1, the backup battery management circuit, and the inside of the power supply switching circuit are potted and tested for stability. This design can increase the safety of the circuit itself during the use of the power supply device. The main battery management circuit and the backup battery management circuit are electrically connected through the first interface P1 and the second interface P2. The power supply automatic switching circuit of the present invention realizes the automatic switching of the main battery BT-OUT1 and the backup battery BT-IN1 to supply power to the load RL1 by setting a preset power, and automatically detects the current leakage of the current power supply device according to the current power of the load RL1, and controls the on-off of the main battery BT-OUT1 according to the detection result, so as to realize the automatic switching of the main battery and the backup battery during the power supply process of the power supply device. At the same time, it solves the problems of rapid decline of battery power after current leakage occurs in battery-powered devices and failures caused by accidental leakage, realizes automatic switching after accidental leakage occurs during the power supply process (when the main battery of the power supply device leaks, it actively shuts down and switches to the internal backup battery for power supply), ensures the stable operation of the power supply device, and at the same time alleviates the trouble of frequently replacing batteries due to leakage, reduces the cost, and extends the service life of the battery.
[0085] In an optional embodiment of the present invention, the main battery management circuit includes:
[0086] The first chip MCU-OUT, the first magnetic latching relay K1, and the seventh diode D7;
[0087] Wherein, the switch input end of the first magnetic latching relay K1 is connected to the positive pole of the main battery BT-OUT1 through the first resistor R1, and the switch output end of the first magnetic latching relay K1 is connected to the power supply switching circuit and the backup battery management circuit through the first diode D1;
[0088] The coil input end of the first magnetic latching relay K1 is connected to the first pin of the first chip MCU-OUT, and the coil output end of the first magnetic latching relay K1 is grounded;
[0089] The cathode of the seventh diode D7 is connected to the positive pole of the main battery BT-OUT1 through the eighth resistor R8, and the anode is connected to the charging device port BAT-C;
[0090] The second pin of the first chip MCU-OUT is connected to the input end of the first resistor R1, and the third pin of the first chip MCU-OUT is connected to the output end of the first resistor R1;
[0091] The fourth pin of the first chip MCU-OUT is connected to the cathode of the seventh diode D7. The fifth pin of the first chip MCU-OUT is connected to the backup battery management circuit. The sixth pin of the first chip MCU-OUT is connected to the backup battery management circuit;
[0092] In the usage state, the first chip MCU-OUT detects the power of the main battery BT-OUT1 through the second pin, the third pin, and the fourth pin, and sends the detected first power to the backup battery management circuit. The backup battery management circuit controls the on / off of the first magnetic latching relay K1 through the first chip MCU-OUT according to the first power.
[0093] In this embodiment, the switch output terminal of the first magnetic latching relay K1 is connected to the backup battery management circuit by connecting to the first pin of the first interface P1 through the first diode D1; the fifth pin of the first chip MCU-OUT is connected to the backup battery management circuit by connecting to the fourth pin of the first interface P1; the sixth pin of the first chip MCU-OUT is connected to the backup battery management circuit by connecting to the fifth pin of the first interface P1.
[0094] In an optional embodiment of the present invention, the power supply switching circuit includes:
[0095] The first MOS transistor Q1, the second MOS transistor Q2, and the sixth diode D6;
[0096] Wherein, the anode of the sixth diode D6 is connected to the cathode of the first diode D1, the cathode of the sixth diode D6 is connected to the load RL1, and is connected to the gate of the second MOS transistor Q2 through the fifth resistor R5;
[0097] The source of the second MOS transistor Q2 is grounded and is connected to the gate of the second MOS transistor Q2 through the sixth resistor R6;
[0098] The gate of the second MOS transistor Q2 is connected to the gate of the first MOS transistor Q1 through the fourth resistor R4 and is connected to the source of the first MOS transistor Q1 through the second resistor R2;
[0099] The source of the first MOS transistor Q1 is connected to the cathode of the fifth diode D5, and the drain of the first MOS transistor Q1 is connected to the load RL1 through the second diode D2.
[0100] Wherein, when there is a voltage between the cathode of the sixth diode D6 and the cathode of the second diode D2, the power supply switching circuit forms a self-locking.
[0101] In an optional embodiment of the present invention, the backup battery management circuit includes:
[0102] The second chip MCU-IN, the second magnetic latching relay K2, the third diode D3, and the fourth diode D4;
[0103] Wherein, the switch input end of the second magnetic latching relay K2 is connected to the positive electrode of the backup battery BT-IN1 through the third resistor R3, and the switch output end of the second magnetic latching relay K2 is connected to the input end of the power supply switching circuit through the fifth diode D5;
[0104] The coil input end of the second magnetic latching relay K2 is connected to the first pin of the second chip MCU-IN, and the coil output end of the second magnetic latching relay K2 is grounded;
[0105] The anode of the third diode D3 is connected to the negative electrode of the backup battery BT-IN1 and the cathode is grounded;
[0106] The fourth diode D4 is connected to the positive electrode of the backup battery BT-IN1 through the seventh resistor R7, and the anode is connected to the cathode of the first diode D1;
[0107] The second pin of the second chip MCU-IN is connected to the input end of the third resistor R3, and the third pin of the second chip MCU-IN is connected to the output end of the third resistor R3;
[0108] The fourth pin of the second chip MCU-IN is connected to the cathode of the fourth diode D4, the fifth pin of the second chip MCU-IN is connected to the fifth pin of the first chip MCU-OUT; the sixth pin of the second chip MCU-IN is connected to the sixth pin of the first chip MCU-OUT;
[0109] Wherein, the second chip MCU-IN receives the first power of the first chip MCU-OUT, and detects the power of the backup battery BT-IN1 through the second pin, the third pin and the fourth pin to obtain the second power;
[0110] When both the first power and the second power are greater than the preset power, the second chip MCU-IN and the first chip MCU-OUT simultaneously turn on the main battery BT-OUT1 and the backup battery BT-IN1 and supply power to the load RL1;
[0111] When the first power is less than the preset power and the second power is greater than the preset power, the power supply switching circuit enables the second chip MCU-IN to control the backup battery management circuit to turn on through the self-locking function, supply power to the load RL1 through the backup battery BT-IN1, and the second chip MCU-IN sends the current power of the main battery BT-OUT1 to the upper computer for early warning;
[0112] When the first power is greater than a preset power and the second power is less than the preset power, the second chip MCU-IN controls the main battery BT-OUT1 through the first chip MCU-OUT to charge the backup battery BT-IN1 through the third diode D3 and the fourth diode D4, and supplies power to the load RL1 through the sixth diode D6.
[0113] In this embodiment, the first chip MCU-OUT and the second chip MCU-IN communicate through the CAN interfaces of the first interface P1 and the second interface P2 (i.e., the fifth pin and the sixth pin of both); when both the first power and the second power are greater than the preset power, the first MOS transistor Q1 and the second MOS transistor Q2 of the power supply switching circuit are all turned on. At this time, the main battery BT-OUT1 and the backup battery BT-IN1 are connected in parallel to supply power to the load RL1; when the first power is less than the preset power and the second power is greater than the preset power, when there is a voltage between the cathode voltage of the sixth diode D6 and the cathode of the second diode D2, the self-locking function of the power supply switching circuit is started at this time. At this time, the backup battery BT-IN1 supplies power to the load, and the second chip MCU-IN sends the current power of the main battery BT-OUT1 to the host computer for early warning. It is prompted that the main battery BT-OUT1 is out of power and needs to be charged or replaced; when the first power is greater than the preset power and the second power is less than the preset power, the second chip MCU-IN controls the main battery BT-OUT1 through the first chip MCU-OUT to charge the backup battery BT-IN1 through the third diode D3 and the fourth diode D4, and supplies power to the load RL1 through the sixth diode D6.
[0114] As Figure 4 shown, an embodiment of the present invention provides a method for automatic power supply switching, which is applied to the above-mentioned power supply switching circuit. The method includes:
[0115] Step 11, obtaining the current first power of the main battery BT-OUT1 and the current second power of the backup battery BT-IN1;
[0116] Step 12, automatically switching the main battery BT-OUT1 and the backup battery BT-IN1 to supply power to the load RL1 according to the first power, the second power, and the preset power;
[0117] Step 13, obtaining the current power of the load RL1 during the process of supplying power to the load RL1;
[0118] Step 14, automatically detecting the current power supply device for leakage according to the current power of the load RL1 to obtain a detection result;
[0119] Step 15, control the on / off of the main battery BT-OUT1 according to the detection result.
[0120] In this embodiment, the power supply automatic switching method is applied to the first chip MCU-OUT and the second chip MCU-IN of the power supply automatic switching circuit, and the automatic switching of the main battery BT-OUT1 and the backup battery BT-IN1 is realized through the first chip MCU-OUT and the second chip MCU-IN, thereby realizing the automatic switching during the power supply process of the power supply device and after accidental leakage, and ensuring the stable operation of the power supply device.
[0121] In an alternative embodiment of the present invention, step 12 may include:
[0122] When both the first power and the second power are greater than the preset power, the second chip MCU-IN and the first chip MCU-OUT simultaneously turn on the main battery BT-OUT1 and the backup battery BT-IN1, and supply power to the load RL1;
[0123] When the first power is less than the preset power and the second power is greater than the preset power, the power supply switching circuit uses the self-locking function to make the second chip MCU-IN control the backup battery management circuit to turn on, supply power to the load RL1 through the backup battery BT-IN1, and the second chip MCU-IN sends the current power of the main battery BT-OUT1 to the upper computer for early warning;
[0124] When the first power is greater than the preset power and the second power is less than the preset power, the second chip MCU-IN controls the main battery BT-OUT1 to charge the backup battery BT-IN1 through the third diode D3 and the fourth diode D4 through the first chip MCU-OUT, and supplies power to the load RL1 through the sixth diode D6.
[0125] In an alternative embodiment of the present invention, obtaining the current first power of the main battery BT-OUT1 includes:
[0126] Through the formula Q 主 =Q 主额 +∫(I in_i -I in_o )dt, obtain the current first power Q 主 ;
[0127] Wherein, Q 主额 is the initial rated power of the main battery BT-OUT1, I in_i is the input current of the eighth resistor R8, I in_i =(U AI6 -U AI1) / r8, where r8 is the resistance value of the eighth resistor R8; U AI6 is the voltage at the output terminal of the eighth resistor R8, U AI1 is the voltage at the input terminal of the first resistor R1, I in_o is the output current of the first resistor R1, I in_o =(U AI1 -U AI2 ) / r1, where r1 is the resistance value of the first resistor R1, U AI2 is the voltage at the output terminal of the first resistor R1.
[0128] In this embodiment, the initial rated power of the main battery BT-OUT1 can be determined according to the battery specifications, U AI1 , U AI2 , U AI6 can all be detected and obtained through the first chip MCU-OUT; when R1 = R8 = 100 mΩ, Q 主 =Q 额 +∫10×(U AI6 -2U AI1 +U AI2 )dt.
[0129] In an alternative embodiment of the present invention, obtaining the current second power of the backup battery BT-IN1 includes:
[0130] Through the formula Q 备用 =Q 备额 +∫(I out_i -I out_o )dt, obtain the current second power Q 备用 of the backup battery BT-IN1;
[0131] where Q 备额 is the initial rated power of the backup battery BT-IN1, I out_i is the input current of the seventh resistor R7, I out_i =(U AI5 -U AI3 ) / r7, where r7 is the resistance value of the seventh resistor R7; U AI5 is the voltage at the output terminal of the seventh resistor R7, U AI3 is the voltage at the input terminal of the third resistor R3, I out_o is the output current of the third resistor R3, I out_o =(U AI3 -U AI4 ) / r3, where r3 is the resistance value of the third resistor R3, U AI4 is the voltage at the output terminal of the third resistor R3.
[0132] In this embodiment, the initial rated power of the backup battery BT-IN1 can be determined according to the battery specifications, where U AI3 , U AI4 , U AI5 are detected and obtained by the second chip MCU-IN; when R3 = R7 = 100 mΩ, Q 备用 = Q 备额 + ∫10×(U AI5 - 2U AI3 + U AI4 )dt.
[0133] In an alternative embodiment of the present invention, step 13 may include;
[0134] During the process of supplying power to the load RL1, the current power P RL of the load RL1 is obtained through the formula P R1H = P R7H - P R3H + P C - P RL ;
[0135] where P R1H is the power at the output end of the first resistor R1;
[0136] P R3H is the power at the output end of the third resistor R3;
[0137] P R7H is the power at the output end of the seventh resistor R7;
[0138] P C is the power when the power supply switching circuit is not connected to any load. In this embodiment, P R1H = U AI2 × I R1 , I R1 = (U AI2 - U AI1 ) / r1, where r1 is the resistance value of the first resistor R1, U AI1 is the input voltage of the first resistor R1, and U AI2 is the output voltage of the first resistor R1; P R3H = U AI4 × I R3 , I R3 = (U AI3 - U AI4 ) / r3, where r3 is the resistance value of the third resistor R3, U AI4 is the output voltage of the third resistor R3, and U AI3 is the input voltage of the third resistor R3.
[0139] In a preferred embodiment, step 14 may include:
[0140] Controlling the main battery management circuit to disconnect through the backup battery management circuit, and determining the power after disconnection of the load (RL1);
[0141] Performing automatic leakage detection on the current power supply device according to the current power of the load RL1 and the power after disconnection of the load (RL1), and obtaining a detection result.
[0142] In this embodiment, when the main battery management circuit is disconnected, through the formula P` RL = P` R3H - P C , the power P` RL after disconnection of the load (RL1) is obtained;
[0143] Wherein, P` R3H is the power at the output end of the third resistor R3 when the main battery management circuit is disconnected;
[0144] P C is the power when the power supply switching circuit is not connected to any load.
[0145] In an alternative embodiment of the present invention, step 15 may include:
[0146] When the detection result indicates that the backup battery management circuit detects that the change value of the current power of the load RL1 within a preset time is less than a preset value, and the current power of the load RL1 is equal to the power after disconnection of the load RL1 after the first magnetic latching relay K1 is disconnected, the backup battery management circuit controls the main battery management circuit to turn on the main battery BT-OUT1;
[0147] When the detection result indicates that the backup battery management circuit detects that the change value of the current power of the load RL1 within a preset time is less than a preset value, and the current power of the load RL1 is greater than the power after disconnection of the load RL1 after the first magnetic latching relay K1 is disconnected, the backup battery management circuit controls the main battery management circuit to disconnect the main battery BT-OUT1.
[0148] In this embodiment, when the second chip MCU-IN detects that both the backup battery management circuit and the main battery management circuit are conducting, and the second chip MCU-IN detects that the current power of the load RL1 is in a stable period, that is, when the change amount of the current power of the load RL1 is less than a preset value, the main battery management circuit is controlled to disconnect through the backup battery management circuit to obtain the power after disconnection of the load RL1; when the second chip MCU-IN of the backup battery management circuit detects that the change values of the current power of the load RL1 and the power after disconnection of the load RL1 within a preset time are both less than a preset value, and the current power of the load RL1 is equal to the power after disconnection of the load RL1, the backup battery management circuit controls the main battery management circuit to conduct the main battery BT-OUT1, that is, at this time, the current circuit is operating normally without leakage or short circuit; when the backup battery management circuit detects that the change values of the current power of the load RL1 and the power after disconnection of the load RL1 within a preset time are both less than a preset value, and the current power of the load RL1 is greater than the power after disconnection of the load RL1 (the power after disconnection of the load RL1 when the first magnetic latching relay K1 is disconnected), the backup battery management circuit controls the main battery management circuit to disconnect the main battery BT-OUT1; that is, at this time, there is a leakage or short circuit in the current circuit. After the backup battery management circuit controls the main battery management circuit to disconnect the main battery BT-OUT1, the current disconnection information is simultaneously transmitted to the host computer for warning.
[0149] The power supply automatic switching circuit of the present invention can be applied to power supply devices that cannot or are difficult to replace batteries in harsh environments, and can be specifically used for power supply devices in mines and power supply devices in sewage pipelines. During use, first, the main battery BT-OUT1 and the inside of the main battery management circuit are potted and tested to be stable, and the backup battery BT-IN1, the backup battery management circuit, and the inside of the power supply switching circuit are potted and tested to be stable. This design can increase the circuit itself will not leak electricity during the use of the power supply device. Then, the main battery management circuit and the backup battery management circuit are electrically connected through the first interface P1 and the second interface P2; then, the leakage detection function of this solution can perform real-time leakage detection on the interface, and at the same time, when leakage occurs, the automatic switching function can realize the automatic switching and warning of the main battery BT-OUT1 and the backup battery BT-IN1.
[0150] The above is the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art in the technical field, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. An automatic power switching circuit, characterized in that, Applied to a power supply device, including: A main battery management circuit electrically connected to a main battery (BT - OUT1); A backup battery management circuit electrically connected to a backup battery (BT - IN1); The main battery management circuit and the backup battery management circuit are electrically connected; Output terminals of the main battery management circuit and the backup battery management circuit are electrically connected to an input terminal of a power supply switching circuit; An output terminal of the power supply switching circuit is electrically connected to a load (RL1); Wherein, the backup battery management circuit, the main battery management circuit, and the power supply switching circuit automatically switch between the main battery (BT - OUT1) and the backup battery (BT - IN1) to supply power to the load (RL1) according to a preset battery level, automatically detect leakage of the current power supply device according to the current power of the load (RL1), and control the on - off of the main battery (BT - OUT1) according to the detection result; The main battery management circuit includes: A first chip (MCU - OUT), a first magnetic latching relay (K1), and a seventh diode (D7); Wherein, a switch input terminal of the first magnetic latching relay (K1) is connected to the positive electrode of the main battery (BT - OUT1) through a first resistor (R1), and a switch output terminal of the first magnetic latching relay (K1) is connected to the power supply switching circuit and the backup battery management circuit through a first diode (D1); A coil input terminal of the first magnetic latching relay (K1) is connected to a first pin of the first chip (MCU - OUT), and a coil output terminal of the first magnetic latching relay (K1) is grounded; A cathode of the seventh diode (D7) is connected to the positive electrode of the main battery (BT - OUT1) through an eighth resistor (R8), and an anode is connected to a charging device port (BAT - C); A second pin of the first chip (MCU - OUT) is connected to an input terminal of the first resistor (R1), and a third pin of the first chip (MCU - OUT) is connected to an output terminal of the first resistor (R1); A fourth pin of the first chip (MCU - OUT) is connected to the cathode of the seventh diode (D7), a fifth pin of the first chip (MCU - OUT) is connected to the backup battery management circuit, and a sixth pin of the first chip (MCU - OUT) is connected to the backup battery management circuit; In the use state, the first chip (MCU - OUT) detects the battery level of the main battery (BT - OUT1) through the second pin, the third pin, and the fourth pin, and sends the detected first battery level to the backup battery management circuit. The backup battery management circuit controls the on - off of the first magnetic latching relay (K1) through the first chip (MCU - OUT) according to the first battery level; The backup battery management circuit includes: A second chip (MCU - IN), a second magnetic latching relay (K2), a third diode (D3), and a fourth diode (D4); Among them, the switch input end of the second magnetic latching relay (K2) is connected to the positive pole of the backup battery (BT-IN1) through a third resistor (R3), and the switch output end of the second magnetic latching relay (K2) is connected to the input end of the power supply switching circuit through a fifth diode (D5); The coil input end of the second magnetic latching relay (K2) is connected to the first pin of the second chip (MCU-IN), and the coil output end of the second magnetic latching relay (K2) is grounded; The anode of the third diode (D3) is connected to the negative pole of the backup battery (BT-IN1), and the cathode is grounded; The fourth diode (D4) is connected to the positive pole of the backup battery (BT-IN1) through a seventh resistor (R7), and the anode is connected to the cathode of the first diode (D1); The second pin of the second chip (MCU-IN) is connected to the input end of the third resistor (R3), and the third pin of the second chip (MCU-IN) is connected to the output end of the third resistor (R3); The fourth pin of the second chip (MCU-IN) is connected to the cathode of the fourth diode (D4), the fifth pin of the second chip (MCU-IN) is connected to the fifth pin of the first chip (MCU-OUT); the sixth pin of the second chip (MCU-IN) is connected to the sixth pin of the first chip (MCU-OUT); Among them, the second chip (MCU-IN) receives the first battery power of the first chip (MCU-OUT), and detects the battery power of the backup battery (BT-IN1) through the second pin, the third pin and the fourth pin to obtain the second battery power; When both the first battery power and the second battery power are greater than the preset battery power, the second chip (MCU-IN) and the first chip (MCU-OUT) simultaneously turn on the main battery (BT-OUT1) and the backup battery (BT-IN1), and supply power to the load (RL1); When the first battery power is less than the preset battery power and the second battery power is greater than the preset battery power, the power supply switching circuit uses the self-locking function to enable the second chip (MCU-IN) to control the backup battery management circuit to turn on, and supply power to the load (RL1) through the backup battery (BT-IN1), and the second chip (MCU-IN) sends the current battery power of the main battery (BT-OUT1) to the host computer for warning; When the first battery power is greater than the preset battery power and the second battery power is less than the preset battery power, the second chip (MCU-IN) controls the main battery (BT-OUT1) to charge the backup battery (BT-IN1) through the third diode (D3) and the fourth diode (D4) through the first chip (MCU-OUT), and supplies power to the load (RL1) through the sixth diode (D6); The power supply switching circuit includes: A first MOS transistor (Q1), a second MOS transistor (Q2) and a sixth diode (D6); Among them, the anode of the sixth diode (D6) is connected to the cathode of the first diode (D1), the cathode of the sixth diode (D6) is connected to the load (RL1), and is connected to the gate of the second MOS transistor (Q2) through the fifth resistor (R5); The source of the second MOS transistor (Q2) is grounded and is connected to the gate of the second MOS transistor (Q2) through the sixth resistor (R6); The gate of the second MOS transistor (Q2) is connected to the gate of the first MOS transistor (Q1) through the fourth resistor (R4), and is connected to the source of the first MOS transistor (Q1) through the second resistor (R2); The source of the first MOS transistor (Q1) is connected to the cathode of the fifth diode (D5), and the drain of the first MOS transistor (Q1) is connected to the load (RL1) through the second diode (D2); Among them, when there is a voltage between the cathode of the sixth diode (D6) and the cathode of the second diode (D2), the power supply switching circuit forms a self-lock; The main battery management circuit and the backup battery management circuit are electrically connected through the first interface (P1) and the second interface (P2); Among them, the first pin of the first interface (P1) is electrically connected to the first pin of the second interface (P2); The second pin of the first interface (P1) is grounded and is electrically connected to the second pin of the second interface (P2); The third pin of the first interface (P1) is connected to the first pin of the first interface (P1) and is electrically connected to the third pin of the second interface (P2); The fourth pin of the first interface (P1) is electrically connected to the fourth pin of the second interface (P2); The fifth pin of the first interface (P1) is electrically connected to the fifth pin of the second interface (P2).
2. A power supply automatic switching method, characterized in that, Applied to the power supply automatic switching circuit as described in claim 1, the method includes: Obtaining the current first power of the main battery (BT-OUT1) and the current second power of the backup battery (BT-IN1); Automatically switching the main battery (BT-OUT1) and the backup battery (BT-IN1) to supply power to the load (RL1) according to the first power, the second power, and the preset power; During the process of supplying power to the load (RL1), obtaining the current power of the load (RL1); Automatically detecting the current leakage of the current power supply device according to the current power of the load (RL1) to obtain a detection result; Controlling the on / off of the main battery (BT-OUT1) according to the detection result.
3. The power supply automatic switching method according to claim 2, wherein Automatically switching the main battery (BT-OUT1) and the backup battery (BT-IN1) to supply power to the load (RL1) according to the first power, the second power, and the preset power, includes: When both the first power and the second power are greater than the preset power, the second chip (MCU-IN) and the first chip (MCU-OUT) simultaneously turn on the main battery (BT-OUT1) and the backup battery (BT-IN1), and supply power to the load (RL1); When the first power is less than the preset power and the second power is greater than the preset power, the power supply switching circuit enables the second chip (MCU-IN) to control the conduction of the backup battery management circuit through the self-locking function, and supplies power to the load (RL1) through the backup battery (BT-IN1). Moreover, the second chip (MCU-IN) sends the current power of the main battery (BT-OUT1) to the host computer for warning prompt; When the first power is greater than the preset power and the second power is less than the preset power, the second chip (MCU-IN) controls the main battery (BT-OUT1) to charge the backup battery (BT-IN1) through the third diode (D3) and the fourth diode (D4) via the first chip (MCU-OUT), and supplies power to the load (RL1) through the sixth diode (D6).
4. The power supply automatic switching method according to claim 3, wherein Obtaining the current first power of the main battery (BT-OUT1) includes: Obtain the current first power Q of the main battery (BT-OUT1) through the formula Q 主 = Q 主额 + ∫ ( I in_i - I in_o )dt 主 ; Among them, Q 主额 is the initial rated power of the main battery (BT-OUT1), I in_i is the input current of the eighth resistor (R8), I in_i =(U AI6 -U AI1 ) / r8, where r8 is the resistance value of the eighth resistor (R8); U AI6 is the output terminal voltage of the eighth resistor (R8), U AI1 is the input terminal voltage of the first resistor (R1), I in_o is the output current of the first resistor (R1), I in_o =(U AI1 -U AI2 ) / r1, where r1 is the resistance value of the first resistor (R1), U AI2 is the output terminal voltage of the first resistor (R1).
5. The power supply automatic switching method according to claim 3, characterized in that, Obtaining the current second power of the backup battery (BT-IN1) includes: Obtain the current second power quantity Q of the backup battery (BT-IN1) through the formula Q 备用 = Q 备额 + ∫ ( I out_i - I out_o )dt 备用 ; Among them, Q 备额 is the initial rated power of the backup battery (BT-IN1), I out_i is the input current of the seventh resistor (R7), I out_i =(U AI5 -U AI3 ) / r7, where r7 is the resistance value of the seventh resistor (R7); U AI5 is the output terminal voltage of the seventh resistor (R7), U AI3 is the input terminal voltage of the third resistor (R3), I out_o is the output current of the third resistor (R3), I out_o =(U AI3 -U AI4 ) / r3, where r3 is the resistance value of the third resistor (R3), U AI4 is the output terminal voltage of the third resistor (R3).
6. The power supply automatic switching method according to claim 2, characterized in that During the process of supplying power to the load (RL1), obtaining the current power of the load (RL1) includes: During the process of powering the load (RL1), through the formula P RL = P R1H - P R7H + P R3H - P C , the current power P RL of the load (RL1) is obtained; Among them, P R1H is the power at the output terminal of the first resistor (R1); P R3H is the power at the output terminal of the third resistor (R3); P R7H is the power at the output terminal of the seventh resistor (R7); P C Is the power when the power supply switching circuit is not connected to any load.
7. The power supply automatic switching method according to claim 2, characterized in that, Controlling the on / off of the main battery (BT-OUT1) according to the detection result includes: When the detection result indicates that the backup battery management circuit detects that the change value of the current power of the load (RL1) within a preset time is less than the preset value, and the current power of the load (RL1) is equal to the power after disconnection of the load (RL1) after the first magnetic latching relay (K1) is disconnected, the backup battery management circuit controls the main battery management circuit to turn on the main battery (BT-OUT1); When the detection result indicates that the backup battery management circuit detects that the change value of the current power of the load (RL1) within a preset time is less than the preset value, and the current power of the load (RL1) is greater than the power after disconnection of the load (RL1) after the first magnetic latching relay (K1) is disconnected, the backup battery management circuit controls the main battery management circuit to turn off the main battery (BT-OUT1).
Citation Information
Patent Citations
Switch control method and apparatus for reserve power supply
CN104935072A
Control method and device of charging system
CN113036831A
Main and standby power switching circuit with self-locking protection
CN217427694U