CN114977407A - MCU-based dual-battery charging and discharging system, method, storage medium and electronic equipment - Google Patents

MCU-based dual-battery charging and discharging system, method, storage medium and electronic equipment Download PDF

Info

Publication number
CN114977407A
CN114977407A CN202210630777.0A CN202210630777A CN114977407A CN 114977407 A CN114977407 A CN 114977407A CN 202210630777 A CN202210630777 A CN 202210630777A CN 114977407 A CN114977407 A CN 114977407A
Authority
CN
China
Prior art keywords
battery module
module
battery
electric quantity
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.)
Granted
Application number
CN202210630777.0A
Other languages
Chinese (zh)
Other versions
CN114977407B (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

Images

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Business, Economics & Management (AREA)
  • Emergency Management (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)
  • Secondary Cells (AREA)

Abstract

The invention provides a double-battery charging and discharging system based on an MCU (microprogrammed control Unit), a double-battery charging and discharging method based on the MCU, a storage medium and electronic equipment, which can not only keep system equipment from being powered off, but also avoid the problems of insufficient power supply and influence on working performance; the system comprises a charge and discharge module, a first battery module and a second battery module, wherein the charge and 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 the electric quantity and the 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 judgment 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 carry out charging or discharging work; and the acquisition module is connected with the charge-discharge module and the judgment control module and 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

MCU-based dual-battery charging and discharging system, method, 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 (microprogrammed control Unit), a storage medium and electronic equipment.
Background
On one hand, many industrial equipment, especially medical equipment, must have an uninterrupted power supply in use, however, most of the current portable industrial equipment only has one group of batteries, and in the actual use process, when the battery capacity is too low, if the battery capacity is not charged in time, the equipment is abnormally powered off and shut down, so that the problems of data loss, machine damage and the like are caused; on the other hand, the double-battery power supply method on the market is mostly a scheme using imported materials and does not meet the current autonomous controllable industry environment requirement; in addition, in some application scenarios, the power of some adapters is small, and the adapters cannot provide full charging power for the battery, which may cause power shortage in a high-power operation mode of the system, and the system automatically reduces the operating frequency, thereby affecting the operating performance.
Disclosure of Invention
In order to solve the problems, the invention provides a double-battery charging and discharging system based on an MCU (microprogrammed control Unit), a double-battery charging and discharging method based on the MCU, a storage medium and electronic equipment, which can not only keep system equipment from being powered off, but also avoid the problems of insufficient power supply and influence on working performance.
The technical scheme is as follows: MCU-based double-battery charging and discharging system is 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 the 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 the electric quantity and the 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 judgment 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 perform charging or discharging work and realize double-battery switching power supply;
if the charging operation 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 work is determined, controlling the charge-discharge 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;
the acquisition module is connected with the charge-discharge module and the judgment control module and 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 system equipment through corresponding batteries.
The first battery module and the second battery module are connected with the judgment control module, and the judgment control module determines uninterrupted switching power supply work between the first battery module and the second battery module according to a 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 judgment control module controls the charging and discharging module to charge the first battery module and the second battery module according to a preset proportion of charging current according to the state of electric quantity;
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 proportional current, and charges the second battery module according to the second 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, 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 quantities of the first battery module and 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 greater than the lower limit discharge voltage and the electric quantity of the second battery module is less than the lower limit discharge 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 smaller than the lower discharge limit voltage and the electric quantity of the second battery module is larger than the lower discharge limit voltage, 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 both smaller than the lower limit voltage of discharge, no power is supplied;
the MCU-based double-battery charging and discharging method is characterized in that: the method comprises the following steps:
acquiring the electric quantity states of the first battery module and the second battery module;
judging whether to charge or discharge;
if the charging operation is determined, controlling the first battery module and the second battery module to charge according to the electric quantity state;
and if the discharging work 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;
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;
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 greater than the lower-limit discharge voltage and the electric quantity of the second battery module is less than the lower-limit discharge voltage, the judgment control module controls the first battery module to provide the electric quantity for the system equipment;
when the electric quantity of the first battery module is smaller than the lower-limit discharge voltage and the electric quantity of the second battery module is larger than the lower-limit discharge voltage, the judgment control module controls the second battery module to provide the 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 both smaller than the discharging lower limit voltage, no power is supplied.
A storage medium storing a computer program executable by one or more processors and operable to implement the steps of the MCU-based dual battery charging and discharging 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 connected to each other, said computer program, when executed by said processor, performing the steps of the MCU-based dual battery charging and discharging method as described above.
The invention has the advantages that the controllable charging of the two groups of batteries can be realized through the control of the judgment control module, the problem of insufficient power supply is avoided, the two groups of batteries can be switched to discharge, the switching of the batteries for the system equipment to supply power can be ensured when the electric quantity is low, the system equipment can not be immediately shut down, the problems of information loss and the like caused by the fact that the batteries are not powered can be avoided to a great extent, and the use is convenient.
Drawings
FIG. 1 is a block diagram of the present invention;
FIG. 2 is a schematic circuit diagram of a key module of the present invention;
fig. 3 is a schematic circuit diagram of a first battery module according to the present invention;
FIG. 4 is a schematic circuit diagram of a second battery module of the present invention;
FIG. 5 is a schematic circuit diagram of a determination 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 MCU-based dual battery charging and discharging system of the present invention includes a first battery module, a second battery module, a charging and discharging module, an acquiring module and a determining 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 the 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 the electric quantity and the 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 perform charging or discharging work and realize double-battery switching power supply;
if the charging operation is determined, the charging and discharging module is controlled to charge the first battery module and the second battery module according to the electric quantity state;
if the discharging work is determined, controlling the charge-discharge 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;
when discharging, a control signal is released in the charge-discharge module, so that the electricity of the battery flows into the charge-discharge module, enters the charge-discharge module and can be transmitted to the acquisition module;
the judgment control module can acquire the electric quantity information, the charging and discharging current and voltage information and the like of the first battery module and the second battery module in real time, and can issue charging current, charging voltage and other commands to the first charging and discharging unit and the second charging and discharging unit;
and the acquisition module is connected with the charge-discharge module and the judgment control module and used for receiving the output information of the judgment control module so as 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 judgment control module, and the judgment control module determines uninterrupted switching power supply work between the first battery module and the second battery module according to a 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 discharged 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 control module and the obtaining 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.
The key module comprises resistors R1, R2, TVS tubes D1, 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 a first battery interface BAT1_ CN 1;
the second battery module comprises resistors R8-R12, capacitors C7-C10, TVS tubes D6-D8 and a first battery interface BAT2_ CN2, and the second battery is connected to a second battery interface BAT2_ CN 2;
the judgment control module comprises a controller U1, resistors R13-R34, a light emitting diode LED1 and an LED2, and the controller U1 adopts a megaly innovation 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 tubes Q1, Q2, Q4 and Q5 adopt crystal growth technology CJQ4407S, and the MOS tubes Q3 and Q6 adopt Leshan wireless L2N7002KLT 1G;
the first charging and discharging unit and the second charging and discharging unit are both provided with SC8885 charging and discharging chips of south-core semiconductors;
the resistance elements are RR resistors of Shahua Yuncuo, and the capacitance element is MLCC of Beijing Yuan six;
in fig. 3 and 4, + VBAT _ CHG1, + VBAT _ CHG2 represents a full charge voltage of the first battery module and the second battery module, respectively, and may be selected to be 13V.
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, the charging current ranges of the first proportion and the second proportion can be set to be 0.1C-1C, and the condition that the first proportion current is larger than the second proportion current when the charging current is used is met;
namely, when 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 0.5C current, and charges the second battery module according to the 0.1C 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 0.5C current.
When the discharge work is carried out:
if the discharging work 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 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 greater than the lower-limit discharge voltage and the electric quantity of the second battery module is less than the lower-limit discharge 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 smaller than the lower discharge limit voltage and the electric quantity of the second battery module is larger than the lower discharge limit voltage, 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 both smaller than the lower limit voltage of discharge, no power is supplied;
the discharge lower limit voltage range may be set to 10V to 20V.
The MCU-based double-battery charging and discharging method is characterized in that: the method comprises the following steps:
acquiring the electric quantity states of the first battery module and the second battery module;
judging whether to charge or discharge;
if the charging operation is determined, controlling the first battery module and the second battery module to charge according to the electric quantity state;
and if the discharging work 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 work is determined, controlling the first battery module to provide electric quantity for the system equipment when the electric quantities of the first battery module and the second battery module are both larger than the discharging lower limit voltage;
when the electric quantity of the first battery module is greater than the lower-limit discharge voltage and the electric quantity of the second battery module is less than the lower-limit discharge voltage, the judgment control module controls the first battery module to provide the electric quantity for the system equipment;
when the electric quantity of the first battery module is smaller than the lower-limit discharge voltage and the electric quantity of the second battery module is larger than the lower-limit discharge voltage, the judgment control module controls the second battery module to provide the 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 both smaller than the discharging lower limit voltage, no power is supplied.
A storage medium storing a computer program, executable by one or more processors, may be used to implement the steps of the MCU-based dual battery charging and discharging method as 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 charging and discharging method as described above.
In the present invention, the controller U1 lights the first battery charge indicator (i.e., LED1) when the first battery is low, the second battery charge indicator (i.e., LED2) remains off, and the controller U1 lights the LED2 when the second battery is low. SW1_ BAT _ MAIN and SW2_ BAT _ AUX are first battery and second battery switching notification control keys, the controller U1 outputs corresponding enable signals to the acquisition module to turn on or off a battery power supply path by judging the level change of the keys, SW1_ BAT _ MAIN and SW2_ BAT _ AUX default to high level, the enable signal BAT _ MAIN of the acquisition module outputs high level, and BAT _ AUX outputs low level.
The enable signal BAT _ MAIN is connected to pin 17 of the controller U1, and the enable signal BAT _ AUX is connected to pin 20 of the controller U1.
When only 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 SW2_ BAT _ AUX is pressed to be grounded, BAT _ MAIN outputs high level, and BAT _ AUX outputs low level;
when SW1_ BAT _ MAIN and SW2_ BAT _ AUX are both pressed to ground, BAT _ MAIN outputs low level and BAT _ AUX outputs low level.
VSYS _ PWR is the final output voltage of the circuit system, and power is supplied to system equipment through VSYS _ PWR;
the VSYS _1 is used as a power supply output end of the first charge-discharge unit, and after the electric quantity of the first battery enters the first charge-discharge unit, the electric quantity of the first battery is output to the acquisition module through the VSYS _ 1;
VSYS _2 is used as a power supply output end of the second charge-discharge unit, and after the electric quantity of the second battery enters the second charge-discharge unit, the electric quantity of the second battery is output to the acquisition module through the 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 MOS transistor Q3 is more than or equal to 2V, MOS transistor Q3 is conducted, after MOS transistor Q3 is conducted, the grids of MOS transistor Q1 and MOS transistor Q2 are grounded, MOS transistor Q1 and MOS transistor Q2 are conducted, the electric quantity of the first battery is sent to VSYS _ PWR through VSYS _1, and then the system equipment is supplied with power through VSYS _ PWR output; the body diode of the MOS transistor Q1 is cut off in the reverse direction, and VSYS _ PWR cannot leak to the second battery in the reverse direction;
when BAT _ MAIN is low and Vgs of MOS transistor Q3 is less than 2V, MOS transistor Q3 is cut off, Vgs of MOS transistor Q1 and MOS transistor Q2 is high, MOS transistor Q1 and MOS transistor Q2 are cut off, and the electric quantity of the first battery is not sent to VSYS _ PWR;
when BAT _ AUX is high level and Vgs of MOS transistor Q6 is larger than or equal to 2V, MOS transistor Q6 is conducted, after MOS transistor Q6 is conducted, the grids of MOS transistor Q4 and MOS transistor Q5 are grounded, MOS transistor Q4 and MOS transistor Q5 are conducted, the electric quantity of the second battery is sent to VSYS _ PWR through VSYS _2 end, and then the system equipment is supplied with power through VSYS _ PWR output; the body diode of the MOS transistor Q4 is cut off in the reverse direction, and VSYS _ PWR cannot leak to the first battery in the reverse direction;
when BAT _ AUX is low and Vgs of MOS transistor Q6 is <2V, MOS transistor Q6 is turned off, Vgs of MOS transistor Q4 and MOS transistor Q5 is high, MOS transistor Q4 and MOS transistor Q5 are turned off, and the power of the second battery is not sent to VSYS _ PWR.
In conclusion, when the main battery and the auxiliary battery are both sufficient in electric quantity or the main battery is sufficient in electric quantity and the auxiliary battery is low in electric quantity, the main battery and the auxiliary battery are both used for taking electricity from the main battery; and unless the two groups of batteries are low in electric quantity, the main battery can be automatically switched to the auxiliary battery after being out of power, 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 large current in the charging process, and the problem that the power of two groups of batteries is insufficient due to simultaneous charging of the adapters is solved; in the discharging process, two batteries are provided for supplying power, when the electric quantity of the main battery is lower, the main battery can be switched into the auxiliary battery for supplying power to the system equipment, so that the system can be ensured not to 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 fact that the batteries are not electrified can be avoided to a great extent, the situation that one battery in the main power supply scheme and the auxiliary power supply scheme discharges electricity and leaks electricity to the other battery can be avoided, and the use is convenient; the invention adopts a nationwide production scheme, is fully, independently and controllable, and can be applied to various domestic application scenes such as Loongson CPUs 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 attributes 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 description refers to embodiments, not every embodiment may contain only a single embodiment, and such description is for clarity only, and those skilled in the art should integrate the description, and the embodiments may be combined as appropriate to form other embodiments understood by those skilled in the art.

Claims (10)

1. MCU-based double-battery charging and discharging system is 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 the 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 the electric quantity and the 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 judgment 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 perform charging or discharging work and realize double-battery switching power supply;
if the charging operation 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 work is determined, controlling the charge-discharge 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;
the acquisition module is connected with the charge-discharge module and the judgment control module and 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 system equipment through corresponding batteries.
2. The MCU-based dual battery charge-discharge system of claim 1, wherein: the device also comprises a key module which is connected with the judgment control module, and the judgment control module determines uninterrupted switching power supply work between the first battery module and the second battery module according to a 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 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.
3. The MCU-based dual battery charge-discharge system of claim 1, wherein: 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 a preset proportion of 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.
4. The MCU-based dual battery charge-discharge system according to claim 3, wherein: 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;
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 first proportional current.
5. The MCU-based dual battery charge-discharge system of claim 1, wherein: if the discharging work 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 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 greater than the lower-limit discharge voltage and the electric quantity of the second battery module is less than the lower-limit discharge 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 smaller than the lower discharge limit voltage and the electric quantity of the second battery module is larger than the lower discharge limit voltage, 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 both smaller than the discharge lower limit voltage, no power is supplied.
6. The MCU-based double-battery charging and discharging method is characterized in that: the method is applied to the MCU-based dual-battery charging and discharging system as defined in any one of claims 1 to 5, and comprises the following steps:
acquiring the electric quantity states of the first battery module and the second battery module;
judging whether to charge or discharge;
if the charging operation is determined, controlling the first battery module and the second battery module to charge according to the electric quantity state;
and if the discharging work 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.
7. The MCU-based dual battery charging and discharging method according to claim 6, wherein: 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.
8. The MCU-based dual battery charging and discharging method according to claim 6, wherein: if the discharging work 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 greater than the lower-limit discharge voltage and the electric quantity of the second battery module is less than the lower-limit discharge voltage, the judgment control module controls the first battery module to provide the electric quantity for the system equipment;
when the electric quantity of the first battery module is smaller than the lower-limit discharge voltage and the electric quantity of the second battery module is larger than the lower-limit discharge voltage, the judgment control module controls the second battery module to provide the 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 both smaller than the discharging lower limit voltage, no power is supplied.
9. A storage medium storing a computer program executable by one or more processors for implementing the steps of the MCU based dual battery charging and discharging method as defined in any one of claims 6 to 8.
10. An electronic device comprising a memory and a processor, said memory having a computer program stored thereon, said memory and said processor being communicatively coupled to each other, said computer program, when executed by said processor, performing the steps of the MCU-based dual battery charging and discharging method of any of claims 6 to 8.
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 true CN114977407A (en) 2022-08-30
CN114977407B 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
CN114977407B (en) 2023-12-01

Similar Documents

Publication Publication Date Title
CN102664435B (en) Charging management circuit
CN105911458B (en) A kind of battery analogue circuit
CN104065124B (en) There is the mobile terminal of false battery functi on and the method for enable, forbidden energy vacation battery thereof
CN108808840A (en) The dual power supply system of remote transmission intelligent gas meter, flow meter
CN101897100A (en) Arrangement and approach for coupling power supplies using controlled switching techniques
CN115793546A (en) Low-power consumption MCU chip standby control circuit
CN201689651U (en) Circuit capable of realizing the fixed frequency and adjusting the duty ratio by button
CN113419617A (en) Wearable device charging reset circuit and control method
CN101752881A (en) UPS (uninterrupted power supply) device with low power consumption
CN114977407B (en) Dual-battery charge and discharge system and method based on MCU, storage medium and electronic equipment
CN205643632U (en) Battery simulating circuit
CN115649091A (en) High-low pressure energy distribution method, system, equipment and medium for automatic driving automobile
CN113676166B (en) Battery low-voltage automatic cut-off circuit and working method thereof
CN111262328A (en) Vehicle-mounted terminal standby battery management system
CN212751841U (en) Charging power supply device of Beidou equipment and Beidou system
CN111564834B (en) Power supply method of distribution terminal tester and storage battery activation method
CN212969138U (en) Device for simulating rechargeable battery characteristics by using capacitor
CN211744131U (en) Intelligent uninterrupted power supply capable of achieving ultra-long standby
CN203707825U (en) Storage battery charger
CN113541263A (en) Portable equipment external power supply and battery power supply automatic switching circuit
CN202616820U (en) Charging management circuit
CN110138074A (en) A kind of power supply circuit for electronic equipment and its control method
CN111934661A (en) Startup and shutdown control circuit
CN215580472U (en) Power supply circuit with internal and external battery switching function, power supply module and electric vehicle
CN115811121B (en) Farad capacitor backup power management circuit for power distribution terminal

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