Circuit for switching between main battery and auxiliary battery and flexible charging and charging method
Through power multiplexing circuit and threshold voltage control, automatic switching and charging management of the main and secondary batteries are realized, solving the problems of high cost, complex structure and cumbersome user operations, and improving system reliability and user experience.
Patent Information
- Application Number
- CN202411916598.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-03-25
AI Technical Summary
The existing main and secondary battery switching schemes are costly and complex, and the user's operation is cumbersome, and it is difficult to realize independent charging management of main and secondary batteries.
Power multiplexing circuit is adopted to realize automatic switching and charging management between power supplies through threshold voltage control, without the need for Hall components or spring pins, but only through hardware circuits.
It reduces hardware costs, simplifies the circuit structure, improves system reliability and user experience, and realizes automatic switching of main and secondary batteries and independent charging management.
Smart Images

Figure CN119696119A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power management, and in particular to a circuit and a charging method for switching between a main battery and a secondary battery and for flexibly charging the battery. Background Art
[0002] With the iteration and update of the modern electronic industry, the demand for standby time of some portable products is getting higher and higher. Due to the size limitation of such devices, it is impossible to extend the standby time by continuously increasing the battery capacity. Therefore, the replaceable battery solution has become the optimal solution. At present, more and more portable devices require the replacement of the main battery while the device is powered on during use. When the main battery is normally powering the system, the auxiliary battery is not powered, so as to ensure that the auxiliary battery has enough power to ensure the stability of the replacement process during the switch. After the battery is replaced, it can automatically switch to the main battery for power supply. At the same time, it is necessary to ensure that the charging circuits of the main and backup batteries can be managed separately without affecting each other.
[0003] Currently, the common main and auxiliary battery switching solutions use semiconductor devices to build hardware logic circuits and combine software and external Hall elements or spring pin detection to assist in switching. This solution requires the use of Hall elements or spring pins, so the cost is relatively high. It also increases the workload of software development, and the actual operation of the user is also cumbersome, affecting the user experience. Summary of the invention
[0004] The object of the present invention is to provide a circuit and a charging method for switching between a main battery and a secondary battery and charging flexibly, thereby reducing hardware costs and simplifying circuit structure.
[0005] The present invention discloses a circuit for switching between a main battery and a secondary battery and for flexible charging, comprising:
[0006] A power multiplexing circuit is used to select one of the main battery, the secondary battery or the external power supply to power the load according to the priority strategy and voltage size of the main battery, the secondary battery and the external power supply;
[0007] When an external power source is selected for power supply, the external power source charges the main battery through the first charging management unit; the power multiplexing circuit outputs a charging enable signal to the enable end of the second charging management unit; after the enable end is enabled, the external power source charges the secondary battery;
[0008] When the main battery is selected for power supply, the power multiplexing circuit outputs the charging enable signal to the enable terminal of the second charging management unit; after the enable terminal is enabled, the main battery charges the secondary battery.
[0009] Further, the first charging management unit includes a voltage divider network, a bleeder resistor R1 and a first decoupling capacitor C1;
[0010] The main battery is connected to the output end of the first charging management unit;
[0011] The voltage of the main battery or the external power supply is connected to the voltage detection terminal PR1 of the power multiplexing circuit through a first voltage divider network;
[0012] The first decoupling capacitor C1 is connected in parallel to the input end of the main battery, and the discharge resistor R1 is connected in parallel to both ends of the first decoupling capacitor C1;
[0013] The first charging voltage output by the main battery or the external power source is input to the first input terminal IN1 of the power multiplexing circuit.
[0014] Further, the second charging management unit includes a second decoupling capacitor C2;
[0015] The second power supply voltage output by the secondary battery is output to the second input terminal IN2 of the power multiplexing circuit;
[0016] The second decoupling capacitor C2 is connected in parallel across the secondary battery.
[0017] Further, the power multiplexing circuit includes a power multiplexing chip and a coupling capacitor C3;
[0018] The first input terminal IN1 and the second input terminal IN2 of the power multiplexing chip are electrically connected to a first power supply voltage and a second power supply voltage respectively;
[0019] The voltage detection terminal PR1 of the power multiplexing chip is electrically connected to the first reference voltage;
[0020] The power supply output terminal OUT outputs a load power supply voltage generated by the first power supply voltage or the second power supply voltage through the coupling capacitor C3.
[0021] Furthermore, the power multiplexing circuit further includes a threshold voltage generating circuit, and the threshold voltage generating circuit includes: a steady-state transistor D1 and a first current limiting resistor R5 ;
[0022] The base of the steady-state transistor D1 is connected to the threshold voltage reference voltage through the first current limiting resistor R5; the collector of the steady-state transistor D1 is grounded; and the emitter of the steady-state transistor D1 inputs the threshold voltage to the reference voltage input terminal CP2 of the power multiplexing chip.
[0023] Further, the power multiplexing circuit further includes a hysteresis circuit, and the hysteresis circuit includes a first resistor R4;
[0024] The first resistor R4 is connected between the voltage detection terminal PR1 of the power multiplexing chip and the state output terminal ST of the power multiplexing chip.
[0025] Further, the power multiplexing circuit also includes a charging enable signal control circuit;
[0026] The charging enable signal control circuit includes a third current limiting resistor R7, a light emitting diode D2 and an NMOS tube Q1;
[0027] The load voltage is connected to the source of the NMOS tube Q1 through the third current limiting resistor R7 and the light emitting diode D2, the gate of the NMOS tube Q1 is connected to the state output terminal ST of the power multiplexing circuit, and the drain of the NMOS tube Q1 outputs a charging enable signal to the second charging management unit.
[0028] Furthermore, it also includes a voltage boost circuit and a voltage step-down circuit;
[0029] An input end of the boost circuit is electrically connected to the first supply voltage, and an output end of the boost circuit is electrically connected to the second charging management unit;
[0030] The input end of the step-down circuit is connected to the output end of the power multiplexing circuit, and the output end of the step-down circuit is connected to a load system.
[0031] The present invention also discloses a method for switching between a main battery and a secondary battery and charging flexibly, which adopts the above-mentioned circuit for switching between a main battery and a secondary battery and charging flexibly, and the method comprises: selecting one of the main battery, the secondary battery or the external power supply to supply power to the load according to the priority strategy and voltage of the main battery, the secondary battery and the external power supply;
[0032] When an external power source is selected for power supply, the power multiplexing circuit outputs a charging enable signal to an enable terminal of the second charging management unit; after the enable terminal is enabled, the external power source charges the secondary battery; and the external power source charges the main battery through the first charging management unit;
[0033] When the main battery is selected for power supply, the power multiplexing circuit outputs the charging enable signal to the enable terminal of the second charging management unit; after the enable terminal is enabled, the main battery charges the secondary battery.
[0034] Further, selecting one of the main battery, the secondary battery or the external power supply to power the load according to the priority strategy and voltage of the main battery, the secondary battery and the external power supply includes:
[0035] When it is detected that an external power source is connected and the power voltage of the external power source is greater than a threshold voltage, selecting the external power source to power the load;
[0036] When the first reference voltage output by the external power supply is lower than the threshold voltage, the main battery is selected to supply power to the load;
[0037] When the first reference voltage output by the main battery is lower than the threshold voltage, the slave battery is selected to supply power to the load.
[0038] Compared with the prior art, the present invention has at least the following technical effects:
[0039] The automatic switching and charging control of the main and auxiliary batteries is realized through pure hardware circuits such as power multiplexing circuits. No external detection components such as Hall elements or spring pins are required, and no software is involved. When the main battery is replaced, it can automatically switch to the auxiliary battery for power supply, and automatically switch back to the main battery for power supply after the main battery is restored. At the same time, the charging function of the auxiliary battery is controlled by the charging enable signal, realizing the independent management of the main and auxiliary battery charging circuits. This solution not only reduces hardware costs, simplifies the circuit structure, but also improves system reliability and user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a structural block diagram of a circuit for switching between a main battery and a secondary battery and for flexible charging in one embodiment of the present invention;
[0041] Figure 2 Schematic diagram of the circuit structure of a circuit for switching between a primary battery and a secondary battery and for flexible charging in one embodiment of the present invention. DETAILED DESCRIPTION
[0042] The following will be combined with a schematic diagram to describe a circuit and charging method for switching between a primary battery and a secondary battery and charging flexibly, wherein a preferred embodiment of the present invention is shown. It should be understood that those skilled in the art can modify the present invention described herein and still achieve the advantageous effects of the present invention. Therefore, the following description should be understood as being widely known to those skilled in the art and not as a limitation of the present invention.
[0043] The present invention is described in more detail in the following paragraphs by way of example with reference to the accompanying drawings. The advantages and features of the present invention will become more apparent from the following description. It should be noted that the accompanying drawings are in very simplified form and in non-precise proportions, and are only used to facilitate and clearly assist in illustrating the purpose of the embodiments of the present invention.
[0044] Embodiment 1
[0045] Please refer to Figure 1-Figure 2 This embodiment discloses a circuit for switching between a primary battery and a secondary battery and for flexible charging, the circuit comprising:
[0046] The power multiplexing circuit is used to select one of the main battery, the secondary battery or the external power supply to supply power to the load according to the priority strategy and voltage size of the main battery, the secondary battery and the external power supply.
[0047] When an external power source is selected for power supply, the power multiplexing circuit outputs a charging enable signal to the enable end of the second charging management unit 2; after the enable end is enabled, the external power source charges the secondary battery; and the external power source charges the main battery through the first charging management unit 1; when the main battery is selected for power supply, the power multiplexing circuit outputs the charging enable signal to the enable end of the second charging management unit 2; after the enable end is enabled, the main battery charges the secondary battery.
[0048] Specifically, this embodiment adopts a three-level power priority management strategy: the external power supply is the highest priority, the main battery is the second, and the auxiliary battery is the last. The specific switching logic is as follows: the system monitors the status of the external power supply in real time. When the external power supply is detected and its voltage is higher than the set threshold, the system automatically selects the external power supply to power the load; when the external power supply is unavailable or the voltage drops below the threshold, the system switches to the main battery power supply mode; if the main battery voltage is also lower than its corresponding threshold, the system will enable the last backup power supply-the auxiliary battery to maintain the load operation.
[0049] Preferably, when the secondary battery is in operation, the main battery can be replaced with a fully charged main battery, so that the system again preferentially uses the main battery for power supply.
[0050] In this embodiment, there is no need to use external detection elements such as Hall elements or spring pins, nor is there any need for software participation. Pure hardware circuits such as power multiplexing circuits are used to achieve seamless switching between power sources through threshold voltage control, which not only ensures the reliability and continuity of system power supply, but also improves the battery utilization efficiency, providing a stable and reliable power supply guarantee solution for the device. In addition, when an external power supply is connected, it can not only power the load, but also manage the charging of the main and auxiliary batteries at the same time; when the main battery is used for power supply, the auxiliary battery can be charged while ensuring the power supply of the load, realizing a flexible combination of power supply and charging functions. This hierarchical charging strategy not only ensures the reliability of system power supply, but also maximizes the battery utilization efficiency, providing a continuous and stable power supply guarantee for the device.
[0051] In this embodiment, the power multiplexing circuit includes a power multiplexing chip 3. Specifically, the first input terminal IN1 and the second input terminal IN2 of the power multiplexing chip 3 are electrically connected to the first power supply voltage and the second power supply voltage respectively; the voltage detection terminal PR1 of the power multiplexing chip is electrically connected to the first reference voltage; and the power supply output terminal OUT outputs the load power supply voltage generated by the first power supply voltage or the second power supply voltage through the coupling capacitor C3.
[0052] Furthermore, in this embodiment, in order to provide a suitable charging voltage for the secondary battery, a boost circuit is further provided in this embodiment, the input end of the boost circuit is electrically connected to the first power supply voltage, and the output end of the boost circuit is electrically connected to the second charging management unit 2. The boost circuit is used to boost the first power supply voltage and input the boosted first power supply voltage into the second charging management unit 2.
[0053] In a specific embodiment, the boost circuit may be a DC-DC converter. Of course, those skilled in the art may select different boost circuits according to actual conditions.
[0054] Furthermore, in this embodiment, a step-down circuit is provided between the load system and the output end of the power multiplexing chip 3 , and the step-down circuit is used to reduce the load charging voltage to a suitable voltage level required by the system.
[0055] In a specific embodiment, the step-down circuit is a DC-DC converter or an LDO linear regulator. Among them, the DC-DC converter has a high conversion efficiency and is suitable for high current charging scenarios. The LDO linear regulator has a small output ripple and is suitable for occasions with high stability requirements. Those skilled in the art can select different boost circuits according to actual conditions.
[0056] Furthermore, in the present embodiment, the first charging management unit 1 is used to divide the voltage of the main battery or the external power supply to form a first reference voltage, the first reference voltage can be compared with the threshold voltage XREF, and the switching of the charging device is controlled according to the comparison result, and the input ends of the main battery and the external power supply are decoupled and voltage discharged; the second charging management unit 2 is used to receive the charging enable signal output by the power multiplexing circuit, and control the charging circuit of the secondary battery to be turned on or off according to the signal, so as to realize independent charging management of the secondary battery.
[0057] In a specific embodiment, please refer to Figure 1The first charging management unit 1 includes a voltage divider network, a discharge resistor R1 and a first decoupling capacitor C1; the voltage of the main battery or the external power supply is connected to the voltage detection terminal PR1 of the power multiplexing circuit through the first voltage divider network; the first voltage divider network includes a first voltage divider resistor R2 and a second voltage divider resistor R3, one end of the first voltage divider resistor R2 is connected to one end of the main battery, one end of the second voltage divider resistor R3 is grounded, the other end of the first voltage divider resistor R2 is connected to the other end of the second voltage divider resistor R3 and then connected to the voltage detection terminal PR1 of the power multiplexing chip 3; the first decoupling capacitor C1 is connected in parallel to the input end of the main battery, and the discharge resistor R1 is connected in parallel to both ends of the first decoupling capacitor C1; the first charging voltage output by the main battery or the external power supply is input into the power multiplexing circuit.
[0058] The voltage-dividing network divides the voltage of the main battery or the external power supply and provides it to the voltage detection terminal PR1 of the power multiplexing circuit as a voltage detection reference. The first decoupling capacitor C1 is connected in parallel to the main battery input terminal to filter out power ripple and noise and provide instantaneous energy storage during the switching process. The bleeder resistor R1 is connected in parallel to both ends of the decoupling capacitor to accelerate the capacitor discharge speed to ensure the stability of the switching process. Finally, the voltage of the main battery or the external power supply is input into the power multiplexing circuit through the first input terminal IN1, thereby realizing reliable switching control of the power supply.
[0059] In another specific embodiment, the second charging management unit 2 includes a second decoupling capacitor C2; the second supply voltage output by the slave battery is output to the second input terminal IN2 of the power multiplexing circuit; and the second decoupling capacitor C2 is connected in parallel across the two ends of the slave battery.
[0060] The second decoupling capacitor C2 is connected in parallel at both ends of the auxiliary battery to filter out power ripple and noise, provide transient voltage support, and ensure the stability of power supply during the switching process; the voltage of the auxiliary battery is directly connected to the second input terminal IN2 of the power multiplexing circuit as a backup power input. When the main battery or external power supply is unavailable, the second input terminal IN2 provides backup power supply for the system. The design of the entire unit ensures the stability and reliability of the auxiliary battery power supply.
[0061] It is understandable that in order to ensure that no oscillation occurs during the switching process between the main and standby batteries and to improve the stability of the switching process, the first decoupling capacitor C1 and the second decoupling capacitor C2 of the main and standby batteries need to have a larger capacitance. In order to minimize the sudden drop in the output voltage of the multiplexing chip, the value of the coupling capacitor C3 should also be selected as large as possible. At the same time, in order to ensure that the main battery voltage can quickly drop to the target voltage value during the switching process, the resistance of the discharge resistor R1 needs to be increased to ensure that the power supply will not be interrupted during the switching process. The specific specifications of the above-mentioned electronic components can be optimized and selected according to factors such as actual application scenarios, load characteristics, and switching time requirements. Those skilled in the art can flexibly configure them in combination with specific design requirements, and no specific restrictions are made here.
[0062] Furthermore, the power multiplexing circuit further includes a threshold voltage generating circuit 5 , and the threshold voltage generating circuit 5 includes: a steady-state transistor D1 and a first current limiting resistor R5 .
[0063] Specifically, the base of the steady-state transistor D1 is connected to the threshold voltage reference voltage through the first current limiting resistor R5, wherein the first current limiting resistor R5 is used to limit the base current to protect the steady-state transistor D1; the collector of the steady-state transistor D1 is grounded; the emitter of the steady-state transistor D1 inputs the threshold voltage to the reference voltage input terminal CP2 of the power multiplexing chip.
[0064] Furthermore, the power multiplexing circuit further includes a second current limiting resistor R6, a fourth decoupling capacitor C5 and a third decoupling capacitor C4.
[0065] Specifically, one end of the third decoupling capacitor C4 is connected to the reference voltage input terminal CP2 of the power multiplexing chip 3, and the other end is grounded. The third decoupling capacitor C4 is used to stabilize the reference voltage. One end of the second current limiting resistor R6 is connected to the current limiting terminal ILM of the power multiplexing chip 3, and the other end is grounded. The second current limiting resistor R6 is used to detect and limit the current. One end of the fourth decoupling capacitor C5 is connected to the soft start control terminal SS of the power multiplexing chip 3, and the other end is grounded. The fourth decoupling capacitor C5 is used to control the voltage slope when the chip starts, so as to realize the soft start function. The coordinated use of these components can ensure reliable startup and stable operation of the system.
[0066] Furthermore, in order to realize the function that the main battery or the external power source charges the secondary battery when the charging enable terminal is enabled, the multiplexing circuit disclosed in this embodiment further includes a charging enable signal control circuit 6. The charging enable signal control circuit 6 includes a third current limiting resistor R7, a light emitting diode D2 and an NMOS tube Q1.
[0067] Specifically, the load voltage is connected to the source of the NMOS tube Q1 through the third current limiting resistor R7 and the light-emitting diode D2, the gate of the NMOS tube Q1 is connected to the state output terminal ST of the power multiplexing circuit, and the drain of the NMOS tube Q1 outputs a charging enable signal to the second charging management unit 2.
[0068] In this embodiment, when the charging enable signal is low, the drain of the NMOS tube Q1 outputs a low level as a charging enable signal to the second charging management unit 2 to start charging the auxiliary battery. When the charging enable signal is high, the drain of the NMOS tube Q1 outputs a high level to shut down the auxiliary battery charging circuit.
[0069] Specifically, the control flow of the above circuit is as follows:
[0070] When the external power supply is inserted through the interface, the external power supply directly charges the main battery. The system power is output through the power multiplexing circuit to supply power to the back-end load. At this time, the power multiplexing chip 3 preferentially selects the first power supply voltage provided by the external power supply input at the first input terminal IN1 to supply power to the load. The first power supply voltage is processed by the power multiplexing chip 3 to obtain the load power supply voltage, and the load power supply voltage is input into the load. At the same time, the state output terminal ST outputs a high level. At this time, the NMOS tube in the charging enable signal control circuit 6 is turned on, and the drain of the NMOS tube Q1 outputs a low level to enable the charging of the auxiliary battery. The output of the power multiplexing chip 3 is boosted to the second charging management module through the DC boost module, and the auxiliary battery is charged through the second charging management module.
[0071] When the voltage of the external power supply is lower than the threshold voltage XREF (for example, the external power supply is unplugged), the power multiplexing chip 3 selects the input channel through the voltage division voltage of the voltage detection terminal PR1 (formed by the main battery or the external power supply through the voltage division network). When the first reference voltage is higher than the threshold voltage XREF on the CP2 terminal, the power multiplexing chip 3 selects the first power supply voltage provided by the main battery input at the first input terminal IN1 to power the load. The first power supply voltage is processed by the power multiplexing chip 3 to obtain the load power supply voltage, and the load power supply voltage is input into the load. At the same time, the state output terminal ST outputs a high level. At this time, the NMOS tube in the charging enable signal control circuit 6 is turned on, and the drain of the NMOS tube Q1 outputs a low level, enabling the charging of the auxiliary battery. The output of the power multiplexing chip 3 is boosted to the second charging management module through the DC boost module, and the auxiliary battery is charged through the second charging management module.
[0072] When the first power supply voltage output by the main battery is lower than the threshold voltage on the CP2 terminal (such as replacing the main battery), it automatically switches to the second power supply voltage to supply power to the load. The second power supply voltage is processed by the power multiplexing chip 3 to obtain the load power supply voltage, and the load power supply voltage is input into the load. The status output terminal ST outputs a low level to prohibit charging. At this time, the NMOS tube in the charging enable signal control circuit 6 is cut off, and the drain of the NMOS tube Q1 outputs a high level, disconnecting the auxiliary battery charging circuit.
[0073] After the main battery is restored, the voltage of the status output terminal ST is higher than the threshold voltage again, and the power multiplexing chip 3 automatically switches back to the second input terminal IN2 and re-enables the charging of the auxiliary battery. During this period, the decoupling capacitors and the discharge resistor R1 ensure the stability of the switching process, realizing a set of fully hardware-controlled power automatic switching and charging management solutions.
[0074] In addition, when the main battery is powered, the light emitting diode D2 will light up, and when the backup battery is powered, the light emitting diode D2 will be off.
[0075] In a specific embodiment, the threshold voltage reference voltage is 3.3V, and the threshold voltage XREF obtained after voltage division is 2.5V.
[0076] The charging enable signal control circuit 6 limits and indicates the charging current through the third current limiting resistor R7 and the light emitting diode D2. The NMOS tube Q1 serves as a switch control element, and its base is controlled by the state output terminal ST of the power multiplexing circuit. The collector is connected to the load voltage through the current limiting and indicating circuit. When the state output terminal ST outputs the enable signal, the NMOS tube Q1 is turned on to establish a charging path from the load voltage to the auxiliary battery, thereby realizing intelligent control of the charging process of the auxiliary battery.
[0077] Preferably, considering that the noise existing in the system will affect the voltage of the main battery, the voltage of the voltage detection terminal PR1 may be slightly increased or decreased near the threshold voltage during switching, which will cause the power multiplexing chip 3 to repeatedly switch between the first input terminal IN1 and the second input terminal IN2, thereby reducing the system performance. To solve this problem, this design connects a first resistor R4 between the voltage detection terminal PR1 and the status output terminal ST as a hysteresis circuit 4 to provide a precisely adjustable hysteresis voltage.
[0078] In a specific embodiment, a lithium battery with a charge and discharge current of 2A is selected as the main battery, and a high-rate polymer small-capacity battery with a discharge current of 1.5A and a charge current of no more than 100mA is selected as the secondary battery, and the threshold voltage XREF is set to 2.5V. When the first reference voltage is less than 2.5V and the main battery input voltage is less than 5V, that is, when the first supply voltage of the first input terminal IN1 is less than 5V, the second supply voltage is switched to supply power to the load; when the second supply voltage supplies power to the load, the state output terminal ST is grounded, and at this time the first supply voltage must be greater than 5V+V 迟滞 When the power multiplexing chip 3 switches to the first power supply voltage to supply power to the load.
[0079] In summary, the solution adopts an intelligent power priority management strategy, and realizes automatic switching and multi-level charging functions between external power supply, main battery and auxiliary battery through pure hardware design. The circuit design does not require external detection elements such as Hall elements or spring pins, and can achieve seamless switching between power sources only through threshold voltage control, with fast switching speed and no system power outage. The on-resistance of the solution is only at the mΩ level, ensuring extremely low power consumption and high conversion efficiency. In terms of power supply strategy, when an external power supply is detected and the voltage is higher than the threshold, the external power supply is given priority, and the main and auxiliary batteries can be charged at the same time; when the external power supply is unavailable, it switches to the main battery for power supply and can charge the auxiliary battery; when the main battery voltage is too low, it automatically switches to the auxiliary battery for power supply. The circuit integrates a complete decoupling and voltage discharge processing circuit, and avoids oscillation near the switching point through hysteresis design, ensuring the stability of the power supply switching process. The solution not only realizes reliable power management, but also maximizes battery efficiency through flexible charging combinations, providing a stable and long-lasting power supply guarantee solution for the device.
[0080] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A circuit for switching between a main battery and a secondary battery and for flexible charging, characterized in that: include: A power multiplexing circuit is used to select one of the main battery, the secondary battery or the external power supply to power the load according to the priority strategy and voltage size of the main battery, the secondary battery and the external power supply; When an external power source is selected for power supply, the external power source charges the main battery through the first charging management unit; the power multiplexing circuit outputs a charging enable signal to the enable end of the second charging management unit; after the enable end is enabled, the external power source charges the secondary battery; When the main battery is selected for power supply, the power multiplexing circuit outputs the charging enable signal to the enable terminal of the second charging management unit; after the enable terminal is enabled, the main battery charges the secondary battery.
2. The circuit for switching between the main and auxiliary batteries and charging flexibly as claimed in claim 1, characterized in that: The first charging management unit includes a voltage divider network, a discharge resistor R1 and a first decoupling capacitor C1; The main battery is connected to the output end of the first charging management unit; The voltage of the main battery or the external power supply is connected to the voltage detection terminal PR1 of the power multiplexing circuit through a first voltage divider network; The first decoupling capacitor C1 is connected in parallel to the input end of the main battery, and the discharge resistor R1 is connected in parallel to both ends of the first decoupling capacitor C1; The first charging voltage output by the main battery or the external power source is input to the first input terminal IN1 of the power multiplexing circuit.
3. The circuit for switching between the main and auxiliary batteries and charging flexibly as claimed in claim 2, characterized in that: The second charging management unit includes a second decoupling capacitor C2; The second power supply voltage output by the secondary battery is output to the second input terminal IN2 of the power multiplexing circuit; The second decoupling capacitor C2 is connected in parallel across the secondary battery.
4. The circuit for switching between the primary and secondary batteries and charging flexibly as claimed in claim 3, characterized in that: The power multiplexing circuit includes a power multiplexing chip and a coupling capacitor C3; The first input terminal IN1 and the second input terminal IN2 of the power multiplexing chip are electrically connected to a first power supply voltage and a second power supply voltage respectively; The voltage detection terminal PR1 of the power multiplexing chip is electrically connected to the first reference voltage; The power supply output terminal OUT outputs a load power supply voltage generated by the first power supply voltage or the second power supply voltage through the coupling capacitor C3.
5. The circuit for switching between the primary and secondary batteries and charging flexibly as claimed in claim 4, characterized in that: The power multiplexing circuit also includes a threshold voltage generating circuit, which includes a steady-state transistor D1 and a first current limiting resistor R5 ; The base of the steady-state transistor D1 is connected to the threshold voltage reference voltage through the first current limiting resistor R5; the collector of the steady-state transistor D1 is grounded; and the emitter of the steady-state transistor D1 inputs the threshold voltage to the reference voltage input terminal CP2 of the power multiplexing chip.
6. The circuit for switching between the main and auxiliary batteries and charging flexibly as claimed in claim 5, characterized in that: The power multiplexing circuit further includes a hysteresis circuit, and the hysteresis circuit includes a first resistor R4; The first resistor R4 is connected between the voltage detection terminal PR1 of the power multiplexing chip and the state output terminal ST of the power multiplexing chip.
7. The circuit for switching between the main and auxiliary batteries and charging flexibly as claimed in claim 5, characterized in that: The power multiplexing circuit also includes a charging enable signal control circuit; The charging enable signal control circuit includes a third current limiting resistor R7, a light emitting diode D2 and an NMOS tube; The load voltage is connected to the source of the NMOS tube Q1 through the third current limiting resistor R7 and the light emitting diode D2, the gate of the NMOS tube Q1 is connected to the state output terminal ST of the power multiplexing circuit, and the drain of the NMOS tube Q1 outputs a charging enable signal to the second charging management unit.
8. The circuit for switching between the primary and secondary batteries and charging flexibly as claimed in claim 5, characterized in that: It also includes a voltage-boosting circuit and a voltage-buckling circuit; An input end of the boost circuit is electrically connected to the first supply voltage, and an output end of the boost circuit is electrically connected to the second charging management unit; The input end of the step-down circuit is connected to the output end of the power multiplexing circuit, and the output end of the step-down circuit is connected to a load system.
9. A method for switching between a primary battery and a secondary battery and for flexible charging, characterized in that: The method comprises: According to the priority strategy and voltage of the main battery, the auxiliary battery and the external power supply, one of the main battery, the auxiliary battery or the external power supply is selected to supply power to the load; When an external power source is selected for power supply, the power multiplexing circuit outputs a charging enable signal to an enable terminal of the second charging management unit; after the enable terminal is enabled, the external power source charges the secondary battery; and the external power source charges the main battery through the first charging management unit; When the main battery is selected for power supply, the power multiplexing circuit outputs the charging enable signal to the enable terminal of the second charging management unit; after the enable terminal is enabled, the main battery charges the secondary battery.
10. The method for switching between the primary and secondary batteries and flexibly charging as claimed in claim 9, characterized in that: According to the priority strategy and voltage of the main battery, the secondary battery and the external power supply, one of the main battery, the secondary battery or the external power supply is selected to power the load, including: When it is detected that an external power source is connected and the power voltage of the external power source is greater than a threshold voltage, selecting the external power source to power the load; When the first reference voltage output by the external power supply is lower than the threshold voltage, the main battery is selected to supply power to the load; When the first reference voltage output by the main battery is lower than the threshold voltage, the slave battery is selected to supply power to the load.