Battery backup management circuit
Technical Field
The utility model belongs to the technical field of the electronic circuit, specifically be a battery backup management circuit.
Background
The battery power supply management circuit is used for switching the power supply of an application circuit to the power supply of a specified battery power supply when the external power supply of the application circuit is lost, and then the continuous input power supply can be provided for the application circuit.
Although the traditional battery power management circuit can control the lithium battery to supply power through an external circuit when the external power supply is lost, a power switching control function is integrated in some lithium battery charging management chips, but most low-end lithium battery charging management chips still need to be designed with an external switching circuit. For example, the chinese patent publication No. CN205544567U discloses an automatic switching circuit for external power supply and battery power supply, which is composed of an automatic switching module and a voltage stabilizing module connected in series, and realizes switching between an external power supply and lithium battery power supply through an external switching circuit.
At present, some chips are specially used for meeting the switching function, but the chips are expensive, so the chips are not suitable for most products with requirements on cost. Some designers often use two schottky diodes in parallel to achieve the switching function, but this method has certain limitations because schottky diodes inherently have a voltage drop and have certain losses when the supply current reaches the ampere level.
Therefore, a low-cost, fast-response, automated switching circuit has created a wide demand for portable electronic products in all sectors.
Disclosure of Invention
The utility model aims at the problem that prior art exists, provide a battery backup management circuit, this circuit has satisfied the low cost of portable electronic product to battery and external power source switch, quick response, the functional requirement of automatic switch-over.
In order to achieve the above object, the utility model adopts the following technical scheme:
a battery backup management circuit comprises a power supply voltage acquisition module, an external power supply output module, a CPU control switch module and a lithium battery output module; the power supply voltage acquisition module acquires the output voltage of the external power supply output module, compares the output voltage with a reference voltage, and outputs a compared level signal to the CPU control switch module; the CPU controls the switch module to process the level signal output by the power supply voltage acquisition module and then outputs a switch signal; the switching signal is used for controlling the on-off of the lithium battery output module.
Preferably, the power supply voltage acquisition module comprises a first resistor, a second resistor, a third resistor, a fourth resistor, a fifth resistor and a comparator; one end of the first resistor is connected with the grounding end, and the other end of the first resistor is connected with the non-inverting input end of the comparator; one end of the second resistor is connected with the VIN input end, and the other end of the second resistor is connected with the reverse input end of the comparator; one end of the third resistor is connected with the VREF input end, and the other end of the third resistor is connected with the non-inverting input end of the comparator; one end of the fourth resistor is connected with the grounding end, and the other end of the fourth resistor is connected with the reverse input end of the comparator; one end of the fifth resistor is connected with the VREF input end, and the other end of the fifth resistor is connected with the output end of the comparator.
Preferably, the CPU control switch module includes a sixth resistor, an and gate, and a triode; the first input end of the AND gate is connected with the output end of the comparator; the second input end of the gate is connected with the CPU enable end EN; one end of the second resistor is grounded, and the other end of the second resistor is connected with a second input end of the gate; the output end of the AND gate is connected with the base electrode of the triode; the emitter of the triode is grounded; and the triode collector is connected with the lithium battery output module.
Preferably, the lithium battery output module comprises a PMOS transistor, a capacitor, a seventh resistor and a second diode; the grid electrode of the PMOS tube is connected with the collector electrode of the triode; the source electrode of the PMOS tube is connected with the input end of the lithium battery; the drain electrode of the PMOS tube is connected with the anode of the diode; one end of the capacitor is grounded, and the other end of the capacitor is connected with the anode of a diode D2; the cathode of the diode is connected with VSYS; one end of the seventh resistor is connected with the input end of the lithium battery, and the other end of the seventh resistor is connected with the grid G of the PMOS tube Q1.
Preferably, the external power supply output module comprises an LDO chip and a first diode; one end of the LD0 chip is connected with a power supply VIN, and the other end of the LD0 chip is connected with the anode of the first diode; the cathode of the first diode is connected with VSYS.
Preferably, the EN enable terminal of the and gate is at a high level after the CPU is powered on, and the EN enable terminal is switched to a low level after the lithium battery output module is turned on and the CPU completes data storage.
Compared with the prior art, the beneficial effects of the utility model are that:
(1) the utility model collects the output voltage of the external power supply output module through the power supply voltage collecting module, compares the output voltage with the reference voltage, and outputs the level signal after comparison to the CPU control switch module; the CPU controls the switch module to process the level signal output by the power supply voltage acquisition module to obtain a switch signal; and the switching-on or switching-off of the lithium battery output module is controlled by the switching signal, so that the switching between the backup lithium battery and the external power supply is realized. The switching signal is provided by a triode, the conduction or cut-off of the lithium battery output module is provided by a PMOS (P-channel metal oxide semiconductor) tube, and the stability of the backup battery and the external power supply during switching is ensured by utilizing the high-speed switching characteristics of the triode and the PMOS tube.
(2) The utility model discloses but circuit real-time supervision external power supply's output voltage state gathers external power supply voltage in real time through supply voltage collection module to according to external power supply voltage and reference voltage's comparison result, drive CPU control switch module's switch, and then control switching on or end of lithium cell output module, through switching on or the confession outage of control backup lithium cell of switching module promptly, can prevent backup lithium cell from putting excessively, thereby prolong the life-span of backup lithium cell.
(3) Compare the battery backup management circuit of other types, the utility model discloses a hardware material general easy, circuit structure is simple, and the cost is lower, and control is simple, has comparatively outstanding performance, can use in the circuit that needs switch outside power supply and backup battery.
Drawings
Fig. 1 is a schematic diagram of the circuit structure of the present invention.
Detailed Description
The technical solution of the present invention will be described clearly and completely with reference to the accompanying drawings, and obviously, the described embodiments are only some embodiments, not all embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by a person skilled in the art without creative efforts belong to the protection scope of the present invention.
The utility model discloses a solve current battery power supply switching circuit structure complicated, with too high costs, switch the inefficient problem of response, provide a battery backup management circuit, including supply voltage collection module, outside power supply output module, CPU control switch module and lithium cell output module. The power supply voltage acquisition module acquires the output voltage of the external power supply output module, compares the output voltage with a reference voltage, and outputs a compared level signal to the CPU control switch module; the CPU controls the switch module to process the level signal output by the power supply voltage acquisition module and then outputs a switch signal; the switching signal is used for controlling the on-off of the lithium battery output module. The utility model discloses stability when can realizing backup battery and external power source switching, can prevent backup battery from putting excessively through switching on or the confession outage of ending control backup battery of switching signal again to extension backup battery's life-span.
Specifically, as shown in fig. 1, the power supply voltage collecting module includes a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4, a fifth resistor R5, and a comparator U1. One end of the first resistor R1 is connected with the ground terminal, and the other end is connected with the non-inverting input end of the comparator U1; one end of a second resistor R2 is connected with the VIN input end, and the other end of the second resistor R2 is connected with the reverse input end of a comparator U1; one end of a third resistor R3 is connected with the VREF input end, and the other end of the third resistor R3 is connected with the non-inverting input end of a comparator U1; one end of the fourth resistor R4 is connected with the ground end, and the other end is connected with the reverse input end of the comparator U1; one end of the fifth resistor R5 is connected with the VREF input end, and the other end is connected with the output end of the comparator U1.
The CPU control switch module comprises a sixth resistor R6, an AND gate U2 and a triode Q2. A first input end of the AND gate U2 is connected with an output end of the comparator U1; and gate U2 has a second input connected to the CPU enable EN. One end of the second resistor R6 is grounded, and the other end is connected with a second input end of the gate; the output end of the AND gate U2 is connected with the base electrode of the triode Q2; the emitter of the triode Q2 is grounded; and the collector of the triode Q2 is connected with the lithium battery output module.
The lithium battery output module comprises a P MOS tube Q1, a capacitor C1, a seventh resistor R7 and a diode D2. The grid G of the PMOS pipe Q1 is connected with the collector of the triode Q2. The source S of the PMOS tube is connected with the VBAT of the input end of the lithium battery; the drain D of the PMOS tube is connected with the anode of a diode D2; one end of the capacitor C1 is grounded, and the other end of the capacitor C1 is connected with the anode of the diode D2; the cathode of the diode D2 is connected with VSYS; one end of the seventh resistor R7 is connected with the input end VBAT of the lithium battery, and the other end is connected with the grid G of the PMOS tube Q1.
The external power supply output module comprises an LD0 chip U3 and a diode D1. One end of the LD0 is connected with a power supply VIN, and the other end is connected with the anode of a diode D1; the cathode of diode D1 is connected to VSYS.
The utility model discloses a theory of operation is: when the external power supply VIN outputs a high level signal, the voltage is output to the system voltage VSYS through the LD0 chip and the diode D1, at the moment, the comparator U1 collects that the VIN voltage is greater than the system reference voltage VREF voltage through serial partial voltage, the comparator outputs a low level to the AND gate circuit U2, the output end of the AND gate circuit outputs a low level to the base electrode of the triode Q2, the triode is in a cut-off state, the PMOS tube Q1 is in a cut-off state, and the lithium battery power VBAT cannot output the voltage to the VSYS.
When an external power supply VIN outputs a low level signal, no voltage is output to a system voltage VSYS through an LD0 chip and a diode D1, at the moment, a comparator U1 acquires that the VIN voltage is smaller than a system reference voltage VREF voltage through serial partial voltage, after the output end of the comparator is connected with a pull-up resistor R5, the comparator can output a high level to a gate circuit U2, a control enabling pin EN is a high level signal after a CPU is electrified, the output end of the gate circuit outputs a high level to a base electrode of a triode Q2, the triode is in a conducting state, a grid of a PMOS pipe Q1 is grounded and is in a conducting state, and a lithium battery power VBAT outputs a voltage to VSYS through a capacitor C1 and a diode D2. When the external power supply is powered off or abnormal, the lithium battery supplies power to the system.
Because the EN pin is pulled high after the CPU is powered on, after the lithium battery is powered on and the CPU data storage is finished, the CPU controls the EN pin to be at a low level, so that the circuit is powered off in a delayed manner, the data storage is complete, the battery cannot be overdischarged, and the service life of the battery is shortened. The circuit realizes delayed power-off, and can ensure that the circuit is not influenced by abnormal power supply during data storage.
The utility model discloses a triode and PMOS pipe have utilized the high-speed switching characteristic of triode and PMOS pipe as on-off control, especially have advantages such as small in noise, low power dissipation, dynamic range are big, easily integration, safe work area are wide, have satisfied the functional demand that portable electronic product switched low-cost, quick response, the automation of battery and external power source.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.