A dual-battery charging and discharging circuit
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2026-08-11
AI Technical Summary
放电时的能量损耗与电池损伤:若直接并联供电,高电压电池会向低电压电池产生反向大电流(即 “倒灌”),不仅浪费能量,还会因持续过流导致电池发热、容量衰减,甚至引发安全风险;
本实用新型在放电模式时:当两个电池电压不同的情况下可以自动控制切换供电方式,根据两个电池的高低电量,然后自动控制使用高电池电量的电池给系统供电,同时确保电池不会应两个电池电压相差太大而导致相互之间大电流过充过放影响电池性能。当两个电池电量接近时,自动将两个电池并联合并一起给系统供电。
Smart Images

Figure CN224626313U_ABST
Abstract
Description
Technical Field
[0001] This utility model relates to the field of battery charging and discharging technology, and in particular to a dual-battery charging and discharging circuit. Background Technology
[0002] With the trend towards longer battery life and higher reliability in portable electronic devices, dual-battery power solutions are widely adopted due to their ability to effectively extend device usage time, especially in scenarios that support removable batteries (such as devices that meet user-replaceable battery specifications), where dual-battery designs better meet the need for flexible battery life. However, removable batteries have significant drawbacks in practical applications: Because users may frequently disassemble, store, or replace one of the batteries, the charge (voltage) of the two batteries is prone to inconsistency. Existing dual-battery charge / discharge control circuits generally suffer from the following problems: Energy loss and battery damage during discharge: If directly connected in parallel, the high-voltage battery will generate a large reverse current to the low-voltage battery (i.e., "reverse flow"), which not only wastes energy, but also causes the battery to heat up and capacity to decay due to continuous overcurrent, and may even cause safety risks. Low charging efficiency and poor balance: If two batteries with large voltage differences are charged at the same time, the lower voltage battery takes longer to charge, the overall charging efficiency is low, and the higher voltage battery may face the risk of overcharging due to premature charging, which further aggravates the power imbalance between the two batteries. Lack of adaptive adjustment capability: Existing circuits have difficulty automatically identifying the difference in power between the two batteries and cannot switch the charging and discharging mode according to the actual voltage state. This results in the need for manual intervention after battery installation and removal to ensure safety and efficiency, leading to a poor user experience. Utility Model Content
[0003] To address the problems existing in the prior art, this utility model provides a dual-battery charging and discharging circuit.
[0004] To achieve the above objectives, the technical solution of this utility model is as follows: This utility model provides a dual-battery charging and discharging circuit, including: a control module, a first switch module, a second switch module, a first battery, and a second battery; The control module is connected to the first battery and the second battery respectively, and is used to detect the voltage of the first battery and the second battery; The control module is also connected to the first switch module and the second switch module respectively, and is used to control the conduction and cutoff of the first switch module and the second switch module according to the voltage difference between the first battery and the second battery, so as to realize the switching of charging and discharging modes. In the discharging mode, the high-voltage battery is given priority to power supply or the batteries are connected in parallel to supply power. In the charging mode, the low-voltage battery is given priority to charge or the batteries are connected in parallel to charge.
[0005] Preferably, in discharge mode, when the voltage of the first battery is higher than the voltage of the second battery, the control module controls the first switch module to turn on and the second switch module to turn off; when the voltage of the first battery is lower than the voltage of the second battery, the control module controls the second switch module to turn on and the first switch module to turn off; when the voltages are equal, the control module controls both the first switch module and the second switch module to turn on.
[0006] Preferably, in charging mode, when the voltage of the first battery is higher than the voltage of the second battery, the control module controls the second switch module to be turned on and the first switch module to be turned off; when the voltage of the first battery is lower than the voltage of the second battery, the control module controls the first switch module to be turned on and the second switch module to be turned off; when the voltages are equal, the control module controls both the first switch module and the second switch module to be turned on.
[0007] Preferably, the control module is an MCU, and the 9th and 8th pins of the MCU are used as ADC ports, which are connected to the first battery and the second battery respectively, for real-time voltage detection.
[0008] Preferably, the first switching module is a PMOS transistor Q1, and the fourth pin of the MCU is electrically connected to the gate of the PMOS transistor Q1 and the fifth pin of the MCU.
[0009] Preferably, the second switching module is a PMOS transistor Q2; the 6th pin of the MCU is electrically connected to the gate of the PMOS transistor Q2 and the 5th pin of the MCU.
[0010] Preferably, the dual-battery charging and discharging circuit further includes resistors and capacitors, including resistors R1, R2, R3, R4, R5, and capacitors C1, C2, C3, and C4. The 9th pin of the MCU is electrically connected to the first end of capacitor C2 and resistor R4 respectively. The second end of resistor R4 is electrically connected to capacitor C1, the positive terminal of the first battery, and the drain of PMOS transistor Q1 respectively. The second end of capacitor C1, the second end of capacitor C2, and the negative terminal of the first battery are all grounded. The 8th pin of the MCU is electrically connected to the first end of capacitor C3 and resistor R5 respectively. The second end of resistor R5 is electrically connected to capacitor C4, the positive terminal of the second battery, and the drain of PMOS transistor Q2 respectively. The second end of capacitor C3, the second end of capacitor C4, and the negative terminal of the second battery are all grounded. The source of PMOS transistor Q1 is electrically connected to the first terminal of resistor R1 and the source of PMOS transistor Q2, respectively; the second terminal of resistor R1 is electrically connected to the first terminals of resistors R2 and R3, and the 5th pin of the MCU, respectively; the second terminal of resistor R2 is electrically connected to the 4th pin of the MCU and the gate of PMOS transistor Q1, respectively; the second terminal of resistor R3 is electrically connected to the 6th pin of the MCU and the gate of PMOS transistor Q2, respectively.
[0011] Preferably, in discharge mode, when the voltage of the first battery is higher than the voltage of the second battery, the MCU outputs a low level through pin 4 to turn on PMOS transistor Q1, and outputs a high level through pins 5 and 6 to turn off PMOS transistor Q2, ensuring the first battery discharges; when the voltage of the first battery is lower than the voltage of the second battery, the MCU outputs a low level through pin 6 to turn on PMOS transistor Q2, and outputs a high level through pins 4 and 5 to turn off PMOS transistor Q1, allowing the second battery to discharge; when the voltage of the first battery is equal to the voltage of the second battery, the MCU outputs low levels through pins 4, 5, and 6, turning on both PMOS transistors Q1 and Q2, achieving parallel discharge of the first and second batteries.
[0012] Preferably, in charging mode, when the voltage of the first battery is higher than the voltage of the second battery, the MCU outputs a low level through pin 6 to turn on PMOS transistor Q2, and outputs a high level through pins 4 and 5 to turn off PMOS transistor Q1, allowing the charging IC to prioritize charging the second battery; when the voltage of the first battery is lower than the voltage of the second battery, the MCU outputs a low level through pin 4 to turn on PMOS transistor Q1, and outputs a high level through pins 5 and 6 to turn off PMOS transistor Q2, allowing the charging IC to prioritize charging the first battery; when the voltage of the first battery is equal to the voltage of the second battery, the MCU outputs low levels through pins 4, 5, and 6, turning on both PMOS transistors Q1 and Q2, enabling the charging IC to charge both the first and second batteries simultaneously.
[0013] Preferably, the MCU adopts an 8-bit RISC core, with built-in program memory and data memory, an integrated 12-bit ADC module to support battery voltage detection, and also integrates a PWM module, a high-speed oscillator and a watchdog timer (WDT), and is packaged in an MSOP10 package.
[0014] The technical solution of this utility model has the following beneficial effects: In discharge mode, this invention automatically switches the power supply mode when the two batteries have different voltages. Based on the battery's charge level, it automatically uses the battery with the higher charge to power the system, while ensuring that the batteries do not experience excessive overcharging or over-discharging due to a large voltage difference, thus preventing damage to battery performance. When the two batteries have similar charge levels, they are automatically connected in parallel to power the system together.
[0015] In charging mode: When the voltages of the two batteries are different, the charging mode can be automatically switched. Based on the high and low charge levels of the two batteries, the charging IC will automatically control the charging of the battery with the lower charge to ensure that the batteries will not be overcharged or over-discharged due to the large difference in voltage between the two batteries, which would affect the battery performance. When the charge levels of the two batteries are close, the two batteries will be automatically connected in parallel, and the charging IC will charge both batteries at the same time.
[0016] This invention uses a control module to monitor the voltage of the two batteries in real time. During discharge, it isolates the low-voltage battery and prioritizes the use of the high-voltage battery. During charging, it isolates the high-voltage battery and prioritizes charging the low-voltage battery. This fundamentally eliminates problems such as "backflow," "overcharging," and "over-discharging" caused by excessive voltage differences, reduces battery capacity decay caused by overcurrent and overvoltage, and significantly extends its cycle life.
[0017] Improve charging and discharging efficiency and optimize energy utilization: During discharge, the high-voltage battery can be powered separately to make full use of its remaining energy and reduce ineffective losses; when the charge is close, it can be automatically connected in parallel to meet the high power requirements of the device; during charging, the low-voltage battery can be charged first to quickly reduce the voltage difference and shorten the overall charging cycle; when the charge is close, it can be charged in parallel to ensure that both batteries are fully charged at the same time, which greatly improves charging efficiency.
[0018] Adaptable to detachable scenarios and improved user experience: In response to the voltage imbalance problem that easily occurs after frequent disassembly and reassembly of detachable batteries, the circuit can automatically detect voltage differences and adjust the charging and discharging strategy without manual intervention. Whether it is replacing a single battery or reinstalling, it can quickly adapt to the new battery state, meet the user's need for "plug and play" detachable batteries, and improve the ease of operation.
[0019] Using an MCU as the control core, combined with PMOS transistor switching modules and resistor-capacitor components to achieve the functions, the system eliminates the need for complex external chips, resulting in a compact hardware structure and reduced production and maintenance costs. At the same time, the filtering and voltage dividing functions of the resistor-capacitor components, combined with the precise control of the MCU, ensure accurate voltage detection and stable switching status, reduce the risk of circuit failure, and improve the overall reliability of the equipment. Attached Figure Description
[0020] Figure 1This is a circuit diagram of the present invention; Figure 2 This is a pin diagram of the MCU of this utility model. Detailed Implementation
[0021] The embodiments of this utility model are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar modules or modules having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this utility model, and should not be construed as limiting this utility model.
[0022] In the description of this utility model, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", etc., indicating the orientation or positional relationship are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this utility model and simplifying the description, and are not intended to indicate or imply that the device or module referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this utility model.
[0023] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this utility model, "a plurality of" means two or more, unless otherwise explicitly specified.
[0024] In this utility model, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two modules. Those skilled in the art can understand the specific meaning of the above terms in this utility model according to the specific circumstances.
[0025] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can include direct contact between the first and second features, or contact between the first and second features through another feature between them. Furthermore, "above," "over," and "on top" of the second feature includes the first feature directly above or diagonally above the second feature, or simply indicates that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature includes the first feature directly below or diagonally below the second feature, or simply indicates that the first feature is at a lower horizontal level than the second feature.
[0026] Reference Figures 1 to 2 This utility model provides a dual-battery charging and discharging circuit, including: a control module 100, a first switch module 200, a second switch module 300, a first battery 400, and a second battery 500; The control module 100 is connected to the first battery 400 and the second battery 500 respectively, and is used to detect the voltage of the first battery 400 and the second battery 500, providing accurate monitoring of the battery status. The control module 100 is also connected to the first switch module 200 and the second switch module 300, respectively. Based on the voltage difference between the first battery 400 and the second battery 500, the control module 100 controls the on / off states of the first switch module 200 and the second switch module 300 to achieve charging / discharging mode switching, adapting to different usage scenarios. In discharge mode, it prioritizes powering the high-voltage battery or connects the batteries in parallel for power supply; in charging mode, it prioritizes charging the low-voltage battery or connects the batteries in parallel for charging. Prioritizing the discharge of the high-voltage battery fully utilizes battery energy and avoids energy waste caused by inconsistent battery voltages; prioritizing the charging of the low-voltage battery accelerates the overall battery pack's journey to full charge, improving charging efficiency. It also prevents overcharging and over-discharging due to excessive voltage differences during charging and discharging, reducing battery damage and extending battery life.
[0027] Furthermore, when the voltage of the first battery 400 is higher than the voltage of the second battery 500, the control module 100 controls the first switch module 200 to be turned on and the second switch module 300 to be turned off; when the voltage of the first battery 400 is lower than the voltage of the second battery 500, the control module 100 controls the second switch module 300 to be turned on and the first switch module 200 to be turned off; when the voltages are equal, the control module 100 controls both the first switch module 200 and the second switch module 300 to be turned on.
[0028] In this embodiment, a high-voltage battery is preferentially used for power supply to reduce energy loss caused by battery voltage differences and maximize the utilization of stored battery energy. When the voltages are equal, parallel power supply can meet higher power supply requirements through the coordinated output of the two batteries. Battery performance is protected: the low-voltage battery is isolated by the off state of the switching module to prevent the high-voltage battery from discharging a large current in reverse to the low-voltage battery, preventing the battery from overheating, capacity decaying, or having its lifespan shortened due to overcurrent. This is especially suitable for scenarios where voltage inconsistencies may occur after repeated disassembly and reassembly of removable batteries.
[0029] Furthermore, in charging mode, when the voltage of the first battery 400 is higher than the voltage of the second battery 500, the control module 100 controls the second switch module 300 to conduct and the first switch module 200 to be turned off; when the voltage of the first battery 400 is lower than the voltage of the second battery 500, the control module 100 controls the first switch module 200 to conduct and the second switch module 300 to be turned off; when the voltages are equal, the control module 100 controls both the first switch module 200 and the second switch module 300 to conduct. In this embodiment, the low-voltage battery is charged separately first, which can quickly reduce the voltage difference between the two batteries and shorten the overall charging cycle; when the voltages are equal, parallel charging can simultaneously replenish the power of both batteries, reducing the total charging time, which is especially suitable for scenarios that require rapid restoration of battery life. By isolating the high-voltage battery through the off state of the switch module, the risk of "overcharging" caused by excessive concentration of charging current in the high-voltage battery is avoided, preventing the battery from bulging, leaking, or deteriorating due to overvoltage, and extending the battery life. To address the potential voltage inconsistencies that may arise from repeated disassembly and reassembly of removable batteries, the system can automatically identify and prioritize replenishing the low-voltage battery, ensuring a balanced state between the two batteries and preventing accelerated single-cell wear due to long-term voltage imbalance. This meets the requirements of the EU's new regulations on removable batteries for battery life protection.
[0030] Furthermore, the control module 100 is an MCU, and the 9th and 8th pins of the MCU are used as ADC ports, which are connected to the first battery 400 and the second battery 500 respectively for real-time voltage detection.
[0031] By utilizing the MCU's built-in ADC (analog-to-digital converter) function to directly acquire battery voltage, the signal loss or delay caused by an additional voltage detection chip is avoided, ensuring the real-time and accuracy of voltage data and providing a reliable basis for the precise control of subsequent switching modules.
[0032] Furthermore, the MCU employs an 8-bit RISC core with built-in program and data memory, integrates a 12-bit ADC module to support battery voltage detection, and also integrates a PWM module, a high-speed oscillator, and a watchdog timer (WDT), all packaged in an MSOP10 package. The MCU's 8-bit RISC core boasts efficient instruction execution capabilities, enabling rapid processing of voltage detection data and output of switch control signals, adapting to the real-time requirements of dual-battery charging and discharging. The 12-bit ADC module accurately identifies minute voltage differences between batteries (e.g., millivolt levels), ensuring the accuracy of the switch control logic and preventing malfunctions due to detection errors. The integrated PWM module allows for flexible adjustment of the switch module's drive signals, the high-speed oscillator ensures clock stability, and the watchdog timer (WDT) automatically resets in case of program abnormalities, reducing the risk of circuit failure. This multi-functional integration eliminates the need for external auxiliary chips, simplifying circuit design and reducing hardware costs. The MSOP10 package is compact, making it suitable for space-constrained environments such as portable devices, thus improving circuit integration. Its standardized core and memory configuration facilitates the writing and storage of charge and discharge control programs. The package is compatible with conventional surface mount technology, which is beneficial for mass production and cost control, making it suitable for large-scale commercial applications.
[0033] Furthermore, the first switching module 200 is a PMOS transistor Q1, and the 4th pin of the MCU is electrically connected to the gate of the PMOS transistor Q1 and the 5th pin of the MCU.
[0034] The second switching module 300 is a PMOS transistor Q2; pin 6 of the MCU is electrically connected to the gate of the PMOS transistor Q2 and pin 5 of the MCU.
[0035] Furthermore, the dual-battery charging and discharging circuit also includes resistors and capacitors, including resistors R1, R2, R3, R4, R5, and capacitors C1, C2, C3, and C4. Pin 9 of the MCU is electrically connected to the first end of capacitor C2 and resistor R4 respectively. The second end of resistor R4 is electrically connected to capacitor C1, the positive terminal of the first battery, and the drain of PMOS transistor Q1 respectively. The second end of capacitor C1, the second end of capacitor C2, and the negative terminal of the first battery are all grounded. Pin 8 of the MCU is electrically connected to the first end of capacitor C3 and resistor R5 respectively. The second end of resistor R5 is electrically connected to capacitor C4, the positive terminal of the second battery, and the drain of PMOS transistor Q2 respectively. The second ends of capacitor C3, capacitor C4, and the negative terminal of the second battery are all grounded. The source of PMOS transistor Q1 is electrically connected to the first terminal of resistor R1 and the source of PMOS transistor Q2, respectively. The second terminal of resistor R1 is electrically connected to the first terminals of resistors R2 and R3, and to pin 5 of the MCU, respectively. The second terminal of resistor R2 is electrically connected to pin 4 of the MCU and the gate of PMOS transistor Q1, respectively. The second terminal of resistor R3 is electrically connected to pin 6 of the MCU and the gate of PMOS transistor Q2, respectively. In this embodiment, PMOS transistors are selected as the switching module because their low on-resistance characteristic can reduce energy loss during charging and discharging, making them suitable for battery-powered scenarios. The connection design between the gate and pins 4, 5, and 6 of the MCU allows the MCU to directly control the gate voltage by outputting high and low levels (e.g., low level for conduction, high level for cutoff), ensuring rapid and stable switching response and avoiding malfunctions caused by ambiguous control signals, thus providing hardware protection for charging and discharging mode switching. Resistors R4 and R5, acting as voltage divider resistors, enhance voltage detection accuracy by reducing the battery voltage to a safe sampling range at the MCU ADC port, preventing overvoltage damage to the chip. The filter network formed by capacitors C1 and C2 (C3, C4) filters out high-frequency noise in the battery voltage, making the voltage signal acquired by the MCU more stable and reducing charging / discharging logic misjudgments caused by detection errors. Resistors R2 and R3 provide bias current to the PMOS transistor gates, preventing false turn-on due to gate floating. Resistor R1 connects the sources of the two PMOS transistors, balancing their on-state voltage drops and preventing overcurrent in a single transistor. The synergistic effect of these resistors and capacitors reduces the risk of component damage, ensuring stable circuit operation even during frequent charge / discharge switching.
[0036] Furthermore, in discharge mode, when the voltage of the first battery 400 is higher than the voltage of the second battery 500, the MCU outputs a low level through pin 4 to turn on PMOS transistor Q1, and outputs a high level through pins 5 and 6 to turn off PMOS transistor Q2, ensuring the first battery discharges; when the voltage of the first battery 400 is lower than the voltage of the second battery 500, the MCU outputs a low level through pin 6 to turn on PMOS transistor Q2, and outputs a high level through pins 4 and 5 to turn off PMOS transistor Q1, allowing the second battery to discharge; when the voltage of the first battery 400 is equal to the voltage of the second battery 500, the MCU outputs low levels through pins 4, 5, and 6, turning on both PMOS transistors Q1 and Q2, achieving parallel discharge of the first and second batteries.
[0037] Furthermore, in charging mode, when the voltage of the first battery 400 is higher than the voltage of the second battery 500, the MCU outputs a low level through pin 6 to turn on PMOS transistor Q2, and outputs a high level through pins 4 and 5 to turn off PMOS transistor Q1, allowing the charging IC to prioritize charging the second battery 500. When the voltage of the first battery 400 is lower than the voltage of the second battery 500, the MCU outputs a low level through pin 4 to turn on PMOS transistor Q1, and outputs a high level through pins 5 and 6 to turn off PMOS transistor Q2, allowing the charging IC to prioritize charging the first battery 400. When the voltage of the first battery 400 is equal to the voltage of the second battery 500, the MCU outputs low levels through pins 4, 5, and 6, turning on both PMOS transistors Q1 and Q2, enabling the charging IC to charge both the first battery 400 and the second battery 500 simultaneously.
[0038] The working principle of this utility model: Discharge mode: 1. The MCU's 8-pin and 9-pin are ADC ports, which simultaneously detect the voltages of the two batteries and then perform identification and judgment internally.
[0039] 2. If the U1 MCU detects that the voltage of battery BAT1 is higher than that of battery BAT2, the U1 MCU pin 4 outputs a low level to control Q1 PMOS to conduct; the U1 MCU pins 5 and 6 output a high level to control Q2 PMOS to cut off, ensuring that the high-charge battery BAT1 supplies power to the system.
[0040] 3. If the U1 MCU detects that the voltage of battery BAT1 is lower than that of battery BAT2, the U1 MCU pin 6 outputs a low level to control Q2 PMOS to conduct; the U1 MCU pins 4 and 5 output a high level to control Q1 PMOS to cut off, ensuring that the high-charge battery BAT2 supplies power to the system.
[0041] 4. If the U1 MCU checks and determines that the voltage of battery BAT1 and battery BAT2 are equal, pins 4, 5, and 6 of the U1 MCU will all output a low level, controlling Q1 PMOS and Q2 PMOS to conduct, connecting batteries BAT1 and BAT2 in parallel to supply power to the system simultaneously.
[0042] Charging mode: 1. The 8-pin and 9-pin ports of the U1 MCU are ADC ports, which simultaneously detect the voltage of the two batteries and then perform identification and judgment internally.
[0043] 2. If the U1 MCU detects that the voltage of battery BAT1 is higher than that of battery BAT2, the U1 MCU pin 6 outputs a low level, controlling Q2 PMOS to conduct; the U1 MCU pins 4 and 5 output a high level, controlling Q1 PMOS to be cut off, so that the charging IC prioritizes charging battery BAT2.
[0044] 3. If the U1 MCU detects that the voltage of battery BAT1 is lower than that of battery BAT2, the U1 MCU pin 4 outputs a low level, controlling Q1 PMOS to conduct; the U1 MCU pins 5 and 6 output a high level, controlling Q2 PMOS to be cut off, so that the charging IC prioritizes charging battery BAT1.
[0045] 4. If the U1 MCU checks and determines that the voltage of battery BAT1 and battery BAT2 are equal, pins 4, 5, and 6 of the U1 MCU will all output a low level, controlling Q1 PMOS and Q2 PMOS to conduct, connecting battery BAT1 and battery BAT2 in parallel, and the charging IC will charge both batteries at the same time.
[0046] The above description is only a preferred embodiment of the present utility model and does not limit the patent scope of the present utility model. All equivalent structural transformations made under the inventive concept of the present utility model using the contents of the present utility model specification and drawings, or direct / indirect applications in other related technical fields, are included within the patent protection scope of the present utility model.
Claims
1. A dual-battery charging and discharging circuit, characterized in that, include: Control module, first switch module, second switch module, first battery and second battery; The control module is connected to the first battery and the second battery respectively, and is used to detect the voltage of the first battery and the second battery; The control module is also connected to the first switch module and the second switch module respectively, and is used to control the conduction and cutoff of the first switch module and the second switch module according to the voltage difference between the first battery and the second battery, so as to realize the switching of charging and discharging modes. In the discharging mode, the high-voltage battery is given priority to power supply or the batteries are connected in parallel to supply power. In the charging mode, the low-voltage battery is given priority to charge or the batteries are connected in parallel to charge.
2. The dual-battery charging and discharging circuit according to claim 1, characterized in that, In discharge mode, when the voltage of the first battery is higher than the voltage of the second battery, the control module controls the first switch module to turn on and the second switch module to turn off; when the voltage of the first battery is lower than the voltage of the second battery, the control module controls the second switch module to turn on and the first switch module to turn off; when the voltages are equal, the control module controls both the first switch module and the second switch module to turn on.
3. The dual-battery charging and discharging circuit according to claim 1, characterized in that, In charging mode, when the voltage of the first battery is higher than the voltage of the second battery, the control module controls the second switch module to be turned on and the first switch module to be turned off; when the voltage of the first battery is lower than the voltage of the second battery, the control module controls the first switch module to be turned on and the second switch module to be turned off; when the voltages are equal, the control module controls both the first switch module and the second switch module to be turned on.
4. The dual-battery charging and discharging circuit according to claim 1, characterized in that, The control module is an MCU, and the 9th and 8th pins of the MCU are used as ADC ports, which are connected to the first battery and the second battery respectively, for real-time voltage detection.
5. The dual-battery charging and discharging circuit according to claim 4, characterized in that, The first switching module is a PMOS transistor Q1, and the fourth pin of the MCU is electrically connected to the gate of the PMOS transistor Q1 and the fifth pin of the MCU.
6. The dual-battery charging and discharging circuit according to claim 5, characterized in that, The second switching module is a PMOS transistor Q2; the 6th pin of the MCU is electrically connected to the gate of the PMOS transistor Q2 and the 5th pin of the MCU.
7. The dual-battery charging and discharging circuit according to claim 6, characterized in that, The dual-battery charging and discharging circuit also includes resistors and capacitors, including resistors R1, R2, R3, R4, R5, and capacitors C1, C2, C3, and C4. The 9th pin of the MCU is electrically connected to the first end of capacitor C2 and resistor R4 respectively. The second end of resistor R4 is electrically connected to capacitor C1, the positive terminal of the first battery, and the drain of PMOS transistor Q1 respectively. The second end of capacitor C1, the second end of capacitor C2, and the negative terminal of the first battery are all grounded. The 8th pin of the MCU is electrically connected to the first end of capacitor C3 and resistor R5 respectively. The second end of resistor R5 is electrically connected to capacitor C4, the positive terminal of the second battery, and the drain of PMOS transistor Q2 respectively. The second end of capacitor C3, the second end of capacitor C4, and the negative terminal of the second battery are all grounded. The source of PMOS transistor Q1 is electrically connected to the first terminal of resistor R1 and the source of PMOS transistor Q2, respectively; the second terminal of resistor R1 is electrically connected to the first terminals of resistors R2 and R3, and the 5th pin of the MCU, respectively; the second terminal of resistor R2 is electrically connected to the 4th pin of the MCU and the gate of PMOS transistor Q1, respectively; the second terminal of resistor R3 is electrically connected to the 6th pin of the MCU and the gate of PMOS transistor Q2, respectively.
8. The dual-battery charging and discharging circuit according to claim 2, characterized in that, In discharge mode, when the voltage of the first battery is higher than the voltage of the second battery, the MCU outputs a low level through pin 4 to turn on PMOS transistor Q1, and outputs a high level through pins 5 and 6 to turn off PMOS transistor Q2, ensuring the first battery discharges. When the voltage of the first battery is lower than the voltage of the second battery, the MCU outputs a low level through pin 6 to turn on PMOS transistor Q2, and outputs a high level through pins 4 and 5 to turn off PMOS transistor Q1, allowing the second battery to discharge. When the voltage of the first battery is equal to the voltage of the second battery, the MCU outputs low levels through pins 4, 5, and 6, turning on both PMOS transistors Q1 and Q2, achieving parallel discharge of the first and second batteries.
9. The dual-battery charging and discharging circuit according to claim 3, characterized in that, In charging mode, when the voltage of the first battery is higher than the voltage of the second battery, the MCU outputs a low level through pin 6 to turn on PMOS transistor Q2, and outputs a high level through pins 4 and 5 to turn off PMOS transistor Q1, allowing the charging IC to prioritize charging the second battery. When the voltage of the first battery is lower than the voltage of the second battery, the MCU outputs a low level through pin 4 to turn on PMOS transistor Q1, and outputs a high level through pins 5 and 6 to turn off PMOS transistor Q2, allowing the charging IC to prioritize charging the first battery. When the voltage of the first battery is equal to the voltage of the second battery, the MCU outputs low levels through pins 4, 5, and 6, turning on both PMOS transistors Q1 and Q2, allowing the charging IC to charge both the first and second batteries simultaneously.
10. The dual-battery charging and discharging circuit according to claim 4, characterized in that, The MCU uses an 8-bit RISC core, with built-in program memory and data memory. It integrates a 12-bit ADC module to support battery voltage detection, as well as a PWM module, a high-speed oscillator, and a watchdog timer, and is packaged in an MSOP10 package.