CN114977407B - Dual-battery charge and discharge system and method based on MCU, storage medium and electronic equipment - Google Patents

Dual-battery charge and discharge system and method based on MCU, storage medium and electronic equipment Download PDF

Info

Publication number
CN114977407B
CN114977407B CN202210630777.0A CN202210630777A CN114977407B CN 114977407 B CN114977407 B CN 114977407B CN 202210630777 A CN202210630777 A CN 202210630777A CN 114977407 B CN114977407 B CN 114977407B
Authority
CN
China
Prior art keywords
battery module
module
electric quantity
battery
charging
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210630777.0A
Other languages
Chinese (zh)
Other versions
CN114977407A (en
Inventor
赵保松
辛大勇
王维
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Jiaqing Information Technology Co ltd
Original Assignee
Jiangsu Jiaqing Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Jiaqing Information Technology Co ltd filed Critical Jiangsu Jiaqing Information Technology Co ltd
Priority to CN202210630777.0A priority Critical patent/CN114977407B/en
Publication of CN114977407A publication Critical patent/CN114977407A/en
Application granted granted Critical
Publication of CN114977407B publication Critical patent/CN114977407B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0013Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries acting upon several batteries simultaneously or sequentially
    • H02J7/0014Circuits for equalisation of charge between batteries
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/00032Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0068Battery or charger load switching, e.g. concurrent charging and load supply
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/007Regulation of charging or discharging current or voltage
    • H02J7/00712Regulation of charging or discharging current or voltage the cycle being controlled or terminated in response to electric parameters
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J9/00Circuit arrangements for emergency or stand-by power supply, e.g. for emergency lighting
    • H02J9/04Circuit arrangements for emergency or stand-by power supply, e.g. for emergency lighting in which the distribution system is disconnected from the normal source and connected to a standby source
    • H02J9/06Circuit arrangements for emergency or stand-by power supply, e.g. for emergency lighting in which the distribution system is disconnected from the normal source and connected to a standby source with automatic change-over, e.g. UPS systems
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Abstract

The invention provides a double-battery charge-discharge system, a method, a storage medium and electronic equipment based on an MCU, which can not only keep the system equipment uninterrupted, but also avoid the problems of insufficient power supply and influence on the working performance; the system comprises a charge-discharge module, a first battery module and a second battery module, wherein the charge-discharge module is connected with the first battery module and the second battery module; the first battery module comprises a first battery and is used for providing electric quantity and feedback electric quantity state of the first battery; the second battery module comprises a second battery and is used for providing the electric quantity and the feedback electric quantity state of the second battery; the judging control module is connected with the first battery module, the second battery module and the charging and discharging module and is used for judging whether to charge or discharge; the acquisition module is connected with the charge-discharge module and the judgment control module and is used for receiving the output information of the judgment control module to acquire the electric quantity of the first battery module or the second battery module and then supplying power to the system equipment through the corresponding battery.

Description

Dual-battery charge and discharge system and method based on MCU, storage medium and electronic equipment
Technical Field
The invention relates to the technical field of industrial power supply equipment, in particular to a double-battery charging and discharging system and method based on an MCU, a storage medium and electronic equipment.
Background
On one hand, a plurality of industrial equipment, especially medical equipment, must have an uninterrupted power supply in use, however, most of the current portable industrial equipment only has a group of batteries, and in the actual use process, when the electric quantity of the batteries is too low, if the batteries are not charged in time, the equipment is powered off abnormally, so that the problems of data loss, machine damage and the like are caused; on the other hand, most of the double-battery power supply methods in the market use schemes of imported materials, which do not meet the current autonomously controllable industry environment requirements; in addition, in some application scenarios, some adapters have smaller power and cannot provide full charging power for the battery, which may cause insufficient power supply in a high-power operation mode of the system, and the system automatically reduces the operating frequency, so that the operating performance is affected.
Disclosure of Invention
In order to solve the problems, the invention provides a double-battery charge-discharge system, a method, a storage medium and electronic equipment based on MCU, which can not only keep the system equipment uninterrupted, but also avoid the problems of insufficient power supply and influence on the working performance.
The technical scheme is as follows: double cell charge-discharge system based on MCU, its characterized in that: which comprises a first battery module, a second battery module, a charge-discharge module, an acquisition module and a judgment control module,
the charging and discharging module is connected with the first battery module and the second battery module, and is used for supplying power to the first battery module and the second battery module and acquiring electric quantity of the first battery module and the second battery module;
the first battery module comprises a first battery and is used for providing electric quantity and feedback electric quantity state of the first battery;
the second battery module comprises a second battery and is used for providing the electric quantity and the feedback electric quantity state of the second battery;
the judging control module is connected with the first battery module, the second battery module and the charging and discharging module and is used for acquiring the electric quantity states of the first battery module and the second battery module so as to judge whether to charge or discharge and realize double-battery switching power supply;
if the charging work is determined, controlling the charging and discharging module to charge the first battery module and the second battery module according to the electric quantity state;
if the discharging operation is determined, controlling the charging and discharging module to provide the acquired electric quantity of the first battery module or the second battery module for the acquisition module according to the electric quantity state;
the acquisition module is connected with the charge-discharge module and the judgment control module, and is used for receiving the output information of the judgment control module to acquire the electric quantity of the first battery module or the second battery module acquired by the charge-discharge module and then supplying power to the system equipment through the corresponding battery.
Further, the battery pack also comprises a key module which is connected with the judging control module, and the judging control module determines uninterrupted switching power supply work between the corresponding first battery module and the corresponding second battery module according to the control signal of the key module;
the charging and discharging module comprises a first charging and discharging unit and a second charging and discharging unit, the first charging and discharging unit and the second charging and discharging unit are connected with the judging control module and the acquisition module respectively, the first charging and discharging unit is connected with the first battery module, and the second charging and discharging unit is connected with the second battery module;
further, if the charging operation is determined, the judging control module controls the charging and discharging module to charge the first battery module and the second battery module according to the preset proportion of the charging current according to the electric quantity state;
the preset proportion of the charging current is divided into a first proportion and a second proportion, and the first proportion current is larger than the second proportion current;
further, when the electric quantity of the first battery module and the electric quantity of the second battery module are not full, the charging and discharging module charges the first battery module according to the first proportion current and charges the second battery module according to the second proportion current;
when the electric quantity of the first battery module is full and the electric quantity of the second battery module is not full, the charging and discharging module charges the second battery module according to the first proportional current;
further, if it is determined that the discharging operation is performed, when the electric quantity of the first battery module and the electric quantity of the second battery module are both greater than the discharging lower limit voltage, the judgment control module controls the acquisition module to acquire the electric quantity of the first battery module;
when the electric quantity of the first battery module is larger than the lower limit voltage of discharge and the electric quantity of the second battery module is smaller than the lower limit voltage of discharge, the judgment control module controls the acquisition module to acquire the electric quantity of the first battery module;
when the electric quantity of the first battery module is smaller than the lower limit voltage of discharge and the electric quantity of the second battery module is larger than the lower limit voltage of discharge, the judgment control module controls the acquisition module to acquire the electric quantity of the second battery module;
when the electric quantity of the first battery module and the electric quantity of the second battery module are smaller than the lower limit voltage of discharge, power is not supplied;
the double-battery charging and discharging method based on the MCU is characterized by comprising the following steps of: the method comprises the following steps:
acquiring electric quantity states of the first battery module and the second battery module;
judging whether to charge or discharge;
if the charging work is determined, the first battery module and the second battery module are controlled to be charged according to the electric quantity state;
and if the discharging operation is determined, controlling the first battery module or the second battery module to uninterruptedly switch and supply power to the system equipment according to the electric quantity state.
Further, when the electric quantity of the first battery module and the electric quantity of the second battery module are not full, the first battery module is charged according to a first proportion current, and the second battery module is charged according to a second proportion current;
charging the second battery module according to the first proportional current when the electric quantity of the first battery module is full and the electric quantity of the second battery module is not full;
further, if it is determined that the discharging operation is performed, when the electric quantity of the first battery module and the electric quantity of the second battery module are both greater than the discharging lower limit voltage, controlling the first battery module to provide the electric quantity for the system equipment;
when the electric quantity of the first battery module is larger than the lower limit voltage of discharge and the electric quantity of the second battery module is smaller than the lower limit voltage of discharge, the judgment control module controls the first battery module to provide electric quantity for the system equipment;
when the electric quantity of the first battery module is smaller than the lower limit voltage of discharge and the electric quantity of the second battery module is larger than the lower limit voltage of discharge, the judgment control module controls the second battery module to provide electric quantity for the system equipment;
and when the electric quantity of the first battery module and the electric quantity of the second battery module are smaller than the lower limit voltage of discharge, no power is supplied.
A storage medium storing a computer program executable by one or more processors for implementing the steps of the MCU-based dual battery charge-discharge method as described above.
An electronic device comprising a memory and a processor, said memory having stored thereon a computer program, said memory and said processor being communicatively coupled to each other, which, when executed by said processor, performs the steps of the MCU-based dual battery charge and discharge method as described above.
The invention has the advantages that the controllable charging of the two groups of batteries can be realized by the control of the judging control module, the problem of insufficient power supply is avoided, the two groups of batteries can be switched and discharged, the power supply for switching the batteries of the system equipment can be ensured when the electric quantity is low, the system equipment can not be immediately shut down, the problem of information loss and the like caused by the battery power failure can be avoided to a great extent, and the use is convenient.
Drawings
FIG. 1 is a block diagram of the structure of the present invention;
FIG. 2 is a schematic circuit diagram of a key module according to the present invention;
FIG. 3 is a schematic circuit diagram of a first battery module of the present invention;
FIG. 4 is a schematic circuit diagram of a second battery module according to the present invention;
FIG. 5 is a schematic circuit diagram of a judgment control module according to the present invention;
fig. 6 is a schematic diagram of the acquisition module circuit of the present invention.
Detailed Description
As shown in fig. 1 to 6, the dual battery charge-discharge system based on the MCU of the present invention includes a first battery module, a second battery module, a charge-discharge module, an acquisition module and a judgment control module,
the charging and discharging module is connected with the first battery module and the second battery module, and is used for supplying power to the first battery module and the second battery module and acquiring electric quantity of the first battery module and the second battery module;
the first battery module comprises a first battery and is used for providing electric quantity and feedback electric quantity state of the first battery;
the second battery module comprises a second battery and is used for providing the electric quantity and the feedback electric quantity state of the second battery;
in the embodiment of the invention, the first battery is used as a main battery, and the second battery is used as a secondary battery;
the judging control module is connected with the first battery module, the second battery module and the charging and discharging module and is used for acquiring the electric quantity states of the first battery module and the second battery module so as to judge whether to charge or discharge and realize double-battery switching power supply;
if the charging work is determined, controlling the charging and discharging module to charge the first battery module and the second battery module according to the electric quantity state;
if the discharging operation is determined, controlling the charging and discharging module to provide the acquired electric quantity of the first battery module or the second battery module to the acquisition module according to the electric quantity state;
during discharging, a control signal is released from the charging and discharging module, so that electricity of the battery can flow into the charging and discharging module, and the flowing electricity can be sent to the acquisition module after entering the charging and discharging module;
the judgment control module can acquire the electric quantity information, the charge-discharge current and voltage information and the like of the first battery module and the second battery module in real time, and can issue commands such as charge current, charge voltage and the like to the first charge-discharge unit and the second charge-discharge unit;
the acquisition module is connected with the charge-discharge module and the judgment control module and is used for receiving the output information of the judgment control module to acquire the electric quantity of the first battery module or the second battery module acquired by the charge-discharge module and then supplying power to the system equipment through the corresponding battery.
The device also comprises a key module which is connected with the judging control module, and the judging control module determines uninterrupted switching power supply work between the corresponding first battery module and the corresponding second battery module according to the control signal of the key module; the key module can be used as a judgment condition of the highest priority of discharging, and the key determines which battery is switched to discharge by the controller U1.
The charging and discharging module comprises a first charging and discharging unit and a second charging and discharging unit, the first charging and discharging unit and the second charging and discharging unit are connected with the judging and controlling module and the obtaining module, the first charging and discharging unit is connected with the first battery module, and the second charging and discharging unit is connected with the second battery module.
The key module comprises resistors R1 and R2, TVS tubes D1 and D2, keys Sw1_BAT_MAIN, sw2_BAT_AUX, capacitors C1 and C2, wherein the keys Sw1_BAT_MAIN are used as control keys of the first battery module, and the keys Sw2_BAT_AUX are used as control keys of the second battery module;
the first battery module comprises resistors R3-R7, capacitors C3-C6, TVS tubes D3-D5 and a first battery interface BAT1_CN1, and the first battery is connected to the first battery interface BAT1_CN1;
the second battery module comprises resistors R8-R12, capacitors C7-C10, TVS tubes D6-D8, a first battery interface BAT2_CN2, and a second battery connected to the second battery interface BAT2_CN2;
the judging control module comprises a controller U1, resistors R13-R34, a light emitting diode (LED 1) and an LED2, wherein the controller U1 adopts a megaly innovative GD32F205RCT6 MCU micro-control chip; the light emitting diode LED1 is used as a power indicator lamp of the first battery module, and the light emitting diode LED2 is used as a power indicator lamp of the second battery module;
the acquisition module comprises resistors R35-R42, capacitors C11-C17 and MOS transistors Q1-Q6; the MOS transistors Q1, Q2, Q4 and Q5 all adopt long crystal technology CJQ4407S, and the MOS transistors Q3 and Q6 all adopt Leshan wireless L2N7002KLT1G;
SC8885 charge-discharge chips of the south core semiconductor are adopted by the first charge-discharge unit and the second charge-discharge unit;
the RR resistor of the oscillator Hua Yunke is adopted by the resistor elements, and the capacitor element adopts the MLCC of Beijing element six;
in fig. 3 and 4, +vbat_chg1, +vbat_chg2 are full charge voltages in the first battery module and the second battery module, respectively, and may be selected to be 13V.
If the charging work is determined, the judgment control module controls the charging and discharging module to charge the first battery module and the second battery module according to the preset proportion of the charging current according to the electric quantity state;
the preset proportion of the charging current is divided into a first proportion and a second proportion, and the charging current range of the first proportion and the second proportion can be set to be 0.1-1C, so long as the condition that the first proportion current is larger than the second proportion current during use is satisfied;
namely, when the charging operation is performed:
when the electric quantity of the first battery module and the electric quantity of the second battery module are not full, the charging and discharging module charges the first battery module according to the current of 0.5C and charges the second battery module according to the current of 0.1C;
and when the electric quantity of the first battery module is full and the electric quantity of the second battery module is not full, the charging and discharging module charges the second battery module according to the current of 0.5C.
When the discharge operation is performed:
if the discharging operation is determined, when the electric quantity of the first battery module and the electric quantity of the second battery module are both larger than the discharging lower limit voltage, the judging control module controls the acquisition module to acquire the electric quantity of the first battery module;
when the electric quantity of the first battery module is larger than the lower limit voltage of discharge and the electric quantity of the second battery module is smaller than the lower limit voltage of discharge, the judgment control module controls the acquisition module to acquire the electric quantity of the first battery module;
when the electric quantity of the first battery module is smaller than the lower limit voltage of discharge and the electric quantity of the second battery module is larger than the lower limit voltage of discharge, the judgment control module controls the acquisition module to acquire the electric quantity of the second battery module;
when the electric quantity of the first battery module and the electric quantity of the second battery module are smaller than the lower limit voltage of discharge, power is not supplied;
the discharge lower limit voltage range may be set to 10V to 20V.
The double-battery charging and discharging method based on the MCU is characterized by comprising the following steps of: the method comprises the following steps:
acquiring electric quantity states of the first battery module and the second battery module;
judging whether to charge or discharge;
if the charging work is determined, the first battery module and the second battery module are controlled to be charged according to the electric quantity state;
and if the discharging operation is determined, controlling the first battery module or the second battery module to uninterruptedly switch and supply power to the system equipment according to the electric quantity state.
When the electric quantity of the first battery module and the electric quantity of the second battery module are not full, the first battery module is charged according to a first proportion current, and the second battery module is charged according to a second proportion current;
and when the electric quantity of the first battery module is full and the electric quantity of the second battery module is not full, charging the second battery module according to the first proportional current.
If the discharging operation is determined, when the electric quantity of the first battery module and the electric quantity of the second battery module are both larger than the discharging lower limit voltage, controlling the first battery module to provide the electric quantity for the system equipment;
when the electric quantity of the first battery module is larger than the lower limit voltage of discharge and the electric quantity of the second battery module is smaller than the lower limit voltage of discharge, the judgment control module controls the first battery module to provide electric quantity for the system equipment;
when the electric quantity of the first battery module is smaller than the lower limit voltage of discharge and the electric quantity of the second battery module is larger than the lower limit voltage of discharge, the judgment control module controls the second battery module to provide electric quantity for the system equipment;
when the electric quantity of the first battery module and the electric quantity of the second battery module are smaller than the lower limit voltage of discharge, no power is supplied.
A storage medium storing a computer program executable by one or more processors for implementing the steps of the MCU-based dual battery charge-discharge method described above.
An electronic device comprising a memory and a processor, the memory having stored thereon a computer program, the memory and the processor being communicatively coupled to each other, the computer program, when executed by the processor, performing the steps of the MCU-based dual battery charge and discharge method as described above.
In the present invention, when the power of the first battery is low, the controller U1 lights up the power indicator lamp (i.e., the light emitting diode LED 1) of the first battery, and the power indicator lamp (i.e., the light emitting diode LED 2) of the second battery remains in an off state, and when the power of the second battery is low, the controller U1 lights up the light emitting diode LED2. The Sw1_BAT_MAIN and Sw2_BAT_AUX are first battery and second battery switching notification control keys, the controller U1 outputs corresponding enabling signals to the acquisition module to open or close a battery power supply path by judging the level change of the keys, the Sw1_BAT_MAIN and Sw2_BAT_AUX default to high levels, the enabling signals BAT_MAIN of the acquisition module output high levels, and the BAT_AUX outputs low levels.
The enable signal BAT_MAIN is connected to the 17 pin of the controller U1, and the enable signal BAT_AUX is connected to the 20 pin of the controller U1.
Namely, when only the SW1_BAT_MAIN is pressed to be grounded, the BAT_MAIN of the acquisition module outputs a low level, and the BAT_AUX outputs a high level;
when only the SW2_BAT_AUX is pressed to be grounded, the BAT_MAIN outputs a high level, and the BAT_AUX outputs a low level;
when both sw1_bat_main and sw2_bat_aux are grounded, bat_main outputs a low level, and bat_aux outputs a low level.
VSYS_PWR is the final output voltage of the circuit system, and power is supplied to the system equipment through VSYS_PWR;
VSYS_1 is used as a power supply output end of the first charge and discharge unit, and the electric quantity of the first battery is output to the acquisition module through VSYS_1 after entering the first charge and discharge unit;
VSYS_2 is used as a power supply output end of the second charge and discharge unit, and the electric quantity of the second battery enters the second charge and discharge unit and is output to the acquisition module through VSYS_2;
the power supply analysis of the first battery and the second battery is as follows:
when BAT_MAIN is high level and Vgs of the MOS transistor Q3 is more than or equal to 2V, the MOS transistor Q3 is conducted, after the MOS transistor Q3 is conducted, the grid electrodes of the MOS transistor Q1 and the MOS transistor Q2 are grounded, the MOS transistor Q1 and the MOS transistor Q2 are conducted, then the electric quantity of the first battery is sent to VSYS_PWR through a VSYS_1 end, and then the electric quantity is output to supply power for system equipment through the VSYS_PWR; the body diode of the MOS transistor Q1 is reversely cut off, and VSYS_PWR cannot reversely leak to the second battery;
when BAT_MAIN is low level and Vgs of the MOS transistor Q3 is less than 2V, the MOS transistor Q3 is cut off, vgs of the MOS transistor Q1 and the MOS transistor Q2 are high, the MOS transistor Q1 and the MOS transistor Q2 are cut off, and electric quantity of the first battery is not sent to VSYS_PWR;
when BAT_AUX is high level and Vgs of the MOS transistor Q6 is more than or equal to 2V, the MOS transistor Q6 is conducted, after the MOS transistor Q6 is conducted, the grid electrodes of the MOS transistor Q4 and the MOS transistor Q5 are grounded, the MOS transistor Q4 and the MOS transistor Q5 are conducted, then the electric quantity of the second battery is sent to VSYS_PWR through a VSYS_2 end, and then the electric quantity is output to supply power for system equipment through the VSYS_PWR; the body diode of the MOS transistor Q4 is reversely cut off, and VSYS_PWR cannot reversely leak to the first battery;
when BAT_AUX is low level and Vgs of MOS transistor Q6 is <2V, MOS transistor Q6 is cut off, vgs of MOS transistor Q4 and MOS transistor Q5 are high, MOS transistor Q4 and MOS transistor Q5 are cut off, and electric quantity of the second battery can not be sent to VSYS_PWR.
In summary, when the electric quantity of the main battery and the auxiliary battery is sufficient or the electric quantity of the main battery is sufficient and the auxiliary battery is low, the power is taken from the main battery; and unless the electric quantity of the two groups of batteries is low, the main battery can be automatically switched to the auxiliary battery after the main battery is powered down, and the auxiliary battery supplies power to the outside.
According to the technical scheme, the controllable charging current of the main battery and the auxiliary battery is realized through the MCU, the main battery and the auxiliary battery can be switched to discharge, namely, the main battery is preferably charged with high current in the charging process, so that the problem of insufficient power of the adapter for simultaneously charging the two groups of batteries is avoided; the discharging process provides two batteries for supplying power, when the electric quantity of the main battery is low, the main battery can be switched into the auxiliary battery to supply power for the system equipment, so that the system can not be immediately shut down after the electric quantity of one group of batteries is used up, the problems of information loss and the like caused by the battery failure can be avoided to a great extent, and the discharging and the leakage of one battery to the other battery in the main and auxiliary power supply schemes can be avoided, so that the use is convenient; the invention adopts a fully domestic scheme, is fully and independently controllable, and can be applied to various domestic application scenes such as a Loongson CPU and the like.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present disclosure describes embodiments, not every embodiment is provided with a separate embodiment, and that this description is provided for clarity only, and that the disclosure is not limited to the embodiments described in detail below, and that the embodiments described in the examples may be combined as appropriate to form other embodiments that will be apparent to those skilled in the art.

Claims (5)

1. Double cell charge-discharge system based on MCU, its characterized in that: which comprises a first battery module, a second battery module, a charge-discharge module, an acquisition module and a judgment control module,
the charging and discharging module is connected with the first battery module and the second battery module, and is used for supplying power to the first battery module and the second battery module and acquiring electric quantity of the first battery module and the second battery module;
the first battery module comprises a first battery and is used for providing electric quantity and feedback electric quantity state of the first battery;
the second battery module comprises a second battery and is used for providing the electric quantity and the feedback electric quantity state of the second battery;
the judging control module is connected with the first battery module, the second battery module and the charging and discharging module and is used for acquiring the electric quantity states of the first battery module and the second battery module so as to judge whether to charge or discharge and realize double-battery switching power supply;
if the charging work is determined, controlling the charging and discharging module to charge the first battery module and the second battery module according to the electric quantity state;
if the discharging operation is determined, controlling the charging and discharging module to provide the acquired electric quantity of the first battery module or the second battery module for the acquisition module according to the electric quantity state;
the acquisition module is connected with the charge-discharge module and the judgment control module and is used for receiving the output information of the judgment control module to acquire the electric quantity of the first battery module or the second battery module acquired by the charge-discharge module and then supplying power to the system equipment through the corresponding battery;
if the charging work is determined to be carried out, the judging control module controls the charging and discharging module to carry out the charging work on the first battery module and the second battery module according to the preset proportion of the charging current according to the electric quantity state;
the preset proportion of the charging current is divided into a first proportion and a second proportion, and the first proportion current is larger than the second proportion current;
when the electric quantity of the first battery module and the electric quantity of the second battery module are not full, the charging and discharging module charges the first battery module according to the first proportion current and charges the second battery module according to the second proportion current;
when the electric quantity of the first battery module is full and the electric quantity of the second battery module is not full, the charging and discharging module charges the second battery module according to the first proportional current;
if the discharging operation is determined, when the electric quantity of the first battery module and the electric quantity of the second battery module are both larger than the discharging lower limit voltage, the judging control module controls the acquisition module to acquire the electric quantity of the first battery module;
when the electric quantity of the first battery module is larger than the lower limit voltage of discharge and the electric quantity of the second battery module is smaller than the lower limit voltage of discharge, the judgment control module controls the acquisition module to acquire the electric quantity of the first battery module;
when the electric quantity of the first battery module is smaller than the lower limit voltage of discharge and the electric quantity of the second battery module is larger than the lower limit voltage of discharge, the judgment control module controls the acquisition module to acquire the electric quantity of the second battery module;
and when the electric quantity of the first battery module and the electric quantity of the second battery module are smaller than the lower limit voltage of discharge, no power is supplied.
2. The MCU-based dual battery charge and discharge system of claim 1, wherein: the device also comprises a key module which is connected with the judging control module, and the judging control module determines uninterrupted switching power supply work between the corresponding first battery module and the corresponding second battery module according to the control signal of the key module;
the charging and discharging module comprises a first charging and discharging unit and a second charging and discharging unit, the first charging and discharging unit and the second charging and discharging unit are connected with the judging control module and the obtaining module, the first charging and discharging unit is connected with the first battery module, and the second charging and discharging unit is connected with the second battery module.
3. The double-battery charging and discharging method based on the MCU is characterized by comprising the following steps of: the method is applied to the dual-battery charging and discharging system based on the MCU as claimed in any one of claims 1 to 2, and comprises the following steps:
acquiring electric quantity states of the first battery module and the second battery module;
judging whether to charge or discharge;
if the charging work is determined, the first battery module and the second battery module are controlled to be charged according to the electric quantity state;
if the discharging operation is determined, controlling the first battery module or the second battery module to uninterruptedly switch and supply power to the system equipment according to the electric quantity state;
when the electric quantity of the first battery module and the electric quantity of the second battery module are not full, charging the first battery module according to a first proportion current, and charging the second battery module according to a second proportion current;
charging the second battery module according to the first proportional current when the electric quantity of the first battery module is full and the electric quantity of the second battery module is not full;
if the discharging operation is determined, when the electric quantity of the first battery module and the electric quantity of the second battery module are both larger than the discharging lower limit voltage, controlling the first battery module to provide the electric quantity for the system equipment;
when the electric quantity of the first battery module is larger than the lower limit voltage of discharge and the electric quantity of the second battery module is smaller than the lower limit voltage of discharge, the judgment control module controls the first battery module to provide electric quantity for the system equipment;
when the electric quantity of the first battery module is smaller than the lower limit voltage of discharge and the electric quantity of the second battery module is larger than the lower limit voltage of discharge, the judgment control module controls the second battery module to provide electric quantity for the system equipment;
and when the electric quantity of the first battery module and the electric quantity of the second battery module are smaller than the lower limit voltage of discharge, no power is supplied.
4. A storage medium storing a computer program executable by one or more processors for implementing the steps of the MCU-based dual battery charge-discharge method of claim 3.
5. An electronic device comprising a memory and a processor, said memory having stored thereon a computer program, said memory and said processor being communicatively coupled to each other, which computer program, when executed by said processor, performs the steps of the MCU-based dual battery charge-discharge method of claim 3.
CN202210630777.0A 2022-06-06 2022-06-06 Dual-battery charge and discharge system and method based on MCU, storage medium and electronic equipment Active CN114977407B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210630777.0A CN114977407B (en) 2022-06-06 2022-06-06 Dual-battery charge and discharge system and method based on MCU, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210630777.0A CN114977407B (en) 2022-06-06 2022-06-06 Dual-battery charge and discharge system and method based on MCU, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN114977407A CN114977407A (en) 2022-08-30
CN114977407B true CN114977407B (en) 2023-12-01

Family

ID=82960454

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210630777.0A Active CN114977407B (en) 2022-06-06 2022-06-06 Dual-battery charge and discharge system and method based on MCU, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114977407B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106532902A (en) * 2016-10-14 2017-03-22 惠州Tcl移动通信有限公司 Mobile terminal dual-battery control device and method
CN110718944A (en) * 2018-07-12 2020-01-21 中兴通讯股份有限公司 Method, device, terminal and storage medium for charging and discharging double batteries
CN111835057A (en) * 2020-01-09 2020-10-27 成都万创科技有限责任公司 Double-battery system, double-battery switching and charging method and tablet computer
KR20210086422A (en) * 2019-12-30 2021-07-08 현대오트론 주식회사 Dual battery system of vehicle and operation method thereof
CN114567034A (en) * 2022-02-28 2022-05-31 漳州科华电气技术有限公司 Control method and device of battery charge-discharge module, terminal and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106532902A (en) * 2016-10-14 2017-03-22 惠州Tcl移动通信有限公司 Mobile terminal dual-battery control device and method
CN110718944A (en) * 2018-07-12 2020-01-21 中兴通讯股份有限公司 Method, device, terminal and storage medium for charging and discharging double batteries
KR20210086422A (en) * 2019-12-30 2021-07-08 현대오트론 주식회사 Dual battery system of vehicle and operation method thereof
CN111835057A (en) * 2020-01-09 2020-10-27 成都万创科技有限责任公司 Double-battery system, double-battery switching and charging method and tablet computer
CN114567034A (en) * 2022-02-28 2022-05-31 漳州科华电气技术有限公司 Control method and device of battery charge-discharge module, terminal and storage medium

Also Published As

Publication number Publication date
CN114977407A (en) 2022-08-30

Similar Documents

Publication Publication Date Title
CN102664435B (en) Charging management circuit
CN105911458B (en) A kind of battery analogue circuit
CN101728843A (en) Automatic startup circuit and uninterrupted power supply with same
CN205385297U (en) Packaged plant of charging seat and applied this charging seat
CN100364202C (en) Charging device and portable electronic equipment comprising same
CN104065124B (en) There is the mobile terminal of false battery functi on and the method for enable, forbidden energy vacation battery thereof
US11101684B2 (en) Dual input power supply with shortened switching
CN101752881B (en) UPS (uninterrupted power supply) device with low power consumption
CN106602701A (en) Financial equipment uninterruptible power supply circuit and power supply method
CN113419617A (en) Wearable device charging reset circuit and control method
CN206698005U (en) Dual input double startup exports voltage regulation type uninterrupted switch power supply
CN114977407B (en) Dual-battery charge and discharge system and method based on MCU, storage medium and electronic equipment
CN106356987A (en) RTC (real time clock) circuit
CN110391682B (en) Battery charging and discharging circuit
CN110034595B (en) Backup power supply management device and vehicle-mounted equipment
CN104553840A (en) Automobile emergency startup power source and automobile emergency startup method
CN103311590A (en) Intelligent maintenance device for lead-acid batteries
CN205643632U (en) Battery simulating circuit
CN207218355U (en) A kind of power supply based on solar energy
CN203352229U (en) Lead-acid battery intelligent activation device
EP3996236A2 (en) Battery management system and battery pack
CN203707825U (en) Storage battery charger
CN212969138U (en) Device for simulating rechargeable battery characteristics by using capacitor
CN202616820U (en) Charging management circuit
CN110138074A (en) A kind of power supply circuit for electronic equipment and its control method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant